diff --git a/AUTHORS b/AUTHORS index 7c30654..3adf4ae 100644 --- a/AUTHORS +++ b/AUTHORS
@@ -361,6 +361,7 @@ Divya Bansal <divya.bansal@samsung.com> Dmitry Shachnev <mitya57@gmail.com> Dmitry Sokolov <dimanne@gmail.com> +Dominic Elm <elmdominic@gmx.net> Dominic Farolino <domfarolino@gmail.com> Dominic Jodoin <dominic.jodoin@gmail.com> Dominik Röttsches <dominik.rottsches@intel.com>
diff --git a/DEPS b/DEPS index c27ac95..520528e 100644 --- a/DEPS +++ b/DEPS
@@ -308,7 +308,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'src_internal_revision': '86281eb09ff42ce162e85fc16de5f421c9fb0326', + 'src_internal_revision': '5ce14973929ecd9621346387de88a3a51c35926a', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. @@ -403,7 +403,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'a4b48c8d99babc040a53175d65d00e46adecce7e', + 'devtools_frontend_revision': '2b15a13468d006b360d9ca8583ac76ead624e2e7', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -459,7 +459,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling nearby # and whatever else without interference from each other. - 'nearby_revision': '03f0b3dae98d218e8420add5a13893822d290855', + 'nearby_revision': '33e682f24427a0eb634bd3186fe3c6fd96bd6768', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling securemessage # and whatever else without interference from each other. @@ -827,12 +827,12 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - 'c6b38390c572e804afcf74bab326e370b0f22598', + 'aa5f21626312b2ea0e263e4a5fcaab6708c729f3', 'condition': 'checkout_android and checkout_src_internal', }, 'src/docs/website': { - 'url': Var('chromium_git') + '/website.git' + '@' + '446e54b44987857f3ef2f164d524e7d79dba64cc', + 'url': Var('chromium_git') + '/website.git' + '@' + '71e75ac16593d3ba8f5427958b9f5feda559c04f', }, 'src/ios/third_party/earl_grey2/src': { @@ -1042,7 +1042,7 @@ 'packages': [ { 'package': 'chromium/third_party/android_build_tools/lint', - 'version': 'KDj5mDBFUzEQm9A0ycRaZZWiYR5SbJFZiuZx3t8Vc5cC', + 'version': 'kt0D0n2B3KP5Ptno-stWIuNnhvCfms_w-8iZrMgSS8sC', }, ], 'condition': 'checkout_android', @@ -1157,7 +1157,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' + '@' + '004355d6885f0d4735fea67a97761604c85a9940', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'ffd6d710ef3788efef6227ef8fd42b2bfd747ac8', 'condition': 'checkout_chromeos', }, @@ -1178,7 +1178,7 @@ # For Linux and Chromium OS. 'src/third_party/cros_system_api': { - 'url': Var('chromium_git') + '/chromiumos/platform2/system_api.git' + '@' + 'b7dce64f68622017e2cd32c32cfd34cefc6150f4', + 'url': Var('chromium_git') + '/chromiumos/platform2/system_api.git' + '@' + 'a402de012c03f81bed7c69a21f442f60a86aeb44', 'condition': 'checkout_linux or checkout_chromeos', }, @@ -1192,13 +1192,13 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'a7c97f7871fa7a80af50e68cf2ea563ade59749b', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '76f20f73a04e620918439aa510a186129d33a761', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '7827c0d9878c8c2e78dbce3e518545b2ca180cfe', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + 'ac773bc1e6de69f43c4d0f52af0843747609c952', 'condition': 'checkout_src_internal', }, @@ -1663,7 +1663,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '7c2650cb53369ddc5324c58b671bc7906f08d86a', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'f5850350645c54d2a3f1b5016a76b992afe7babe', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '8ef97ff3b7332e38e61b347a2fbed425a4617151', @@ -1848,10 +1848,10 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'f4bf599a8b575df685c31d9c4729a70a04e377ed', 'src/third_party/webgpu-cts/src': - Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'e5fb8824ade85fae690f2bb45cc347a1398cca2f', + Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '2874ad1e88a6fbc8b5d8988b82d7cb84496ba20d', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'f591f2dcf1bfb00f25967d214776fee6b675e2ef', + Var('webrtc_git') + '/src.git' + '@' + '1c35107cdca725ca700f1c8c3ea39d690e4cfc3e', # Wuffs' canonical repository is at github.com/google/wuffs, but we use # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file. @@ -1974,7 +1974,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'izGNe9pmoJ74afk3vMRusth17aF7JypXEbjGtjL74z8C', + 'version': 'YuWea8tiYeNj1MOqa1VxOQ6-ahR7OnuHaQA5Hsbu5JsC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -3983,7 +3983,7 @@ # grepping. 'src/chrome/installer/mac/internal': { 'url': Var('chrome_git') + '/chrome/installer/mac/internal.git' + '@' + - 'd827c3bc161c0c4d1f9159611af274413ea25f27', + '61d619941db56cde7aaec67bd10e3b4277576404', 'condition': 'checkout_src_internal', }, @@ -4065,7 +4065,7 @@ 'src/components/optimization_guide/internal': { 'url': Var('chrome_git') + '/chrome/components/optimization_guide.git' + '@' + - '750f8af0ac3d188eb13a742a04c00af449b62137', + 'a1c522469a9f572005c0e5e5907647c8b7b0d7f8', 'condition': 'checkout_src_internal', },
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 7b18baf0..65dcbcd05 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -1950,7 +1950,6 @@ 'build/android/devil_chromium.pydeps', 'build/android/gyp/aar.pydeps', 'build/android/gyp/aidl.pydeps', - 'build/android/gyp/allot_native_libraries.pydeps', 'build/android/gyp/apkbuilder.pydeps', 'build/android/gyp/assert_static_initializers.pydeps', 'build/android/gyp/binary_baseline_profile.pydeps',
diff --git a/android_webview/browser/aw_form_database_service_unittest.cc b/android_webview/browser/aw_form_database_service_unittest.cc index 63e2fec6..98052fa 100644 --- a/android_webview/browser/aw_form_database_service_unittest.cc +++ b/android_webview/browser/aw_form_database_service_unittest.cc
@@ -54,7 +54,7 @@ std::vector<FormFieldData> fields; FormFieldData field; field.name = u"foo"; - field.value = u"bar"; + field.set_value(u"bar"); fields.push_back(field); service_->get_autofill_webdata_service()->AddFormFields(fields); EXPECT_TRUE(service_->HasFormData());
diff --git a/android_webview/java/src/org/chromium/android_webview/common/CommandLineUtil.java b/android_webview/java/src/org/chromium/android_webview/common/CommandLineUtil.java index a333365..319dcc5a3 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/CommandLineUtil.java +++ b/android_webview/java/src/org/chromium/android_webview/common/CommandLineUtil.java
@@ -13,29 +13,11 @@ * Utility class for WebView's CommandLine - this is compiled into a separate target that can be * reached from WebView's separate minidump-uploading Services. */ -public class CommandLineUtil { - protected CommandLineUtil() {} +public final class CommandLineUtil { + private CommandLineUtil() {} public static final String WEBVIEW_COMMAND_LINE_FILE = "/data/local/tmp/webview-command-line"; - private static final String COMMAND_LINE_UTIL_INTERNAL = - "org.chromium.android_webview.common.CommandLineUtilInternal"; - - private static CommandLineUtil sInstance; - - private static CommandLineUtil getInstance() { - if (sInstance != null) return sInstance; - try { - sInstance = (CommandLineUtil) Class.forName(COMMAND_LINE_UTIL_INTERNAL).newInstance(); - } catch (ClassNotFoundException - | InstantiationException - | IllegalAccessException - | IllegalArgumentException e) { - sInstance = new CommandLineUtil(); - } - return sInstance; - } - /** * Initialize the CommandLine for WebView - this should be initialized on the same thread where * we subsequently access CommandLine. @@ -49,8 +31,5 @@ } else { CommandLine.init(null); } - getInstance().initCommandLineInternal(CommandLine.getInstance()); } - - protected void initCommandLineInternal(CommandLine commandLine) {} }
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 44d4728..db55129f 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
@@ -149,9 +149,6 @@ GpuFeatures.PRUNE_OLD_TRANSFER_CACHE_ENTRIES, "Prune old transfer cache entries and disable pruning from client"), Flag.baseFeature( - VizFeatures.ALLOW_BYPASS_RENDER_PASS_QUADS, - "Enable bypass render pass for RenderPassDrawQuads"), - Flag.baseFeature( VizFeatures.WEBVIEW_NEW_INVALIDATE_HEURISTIC, "More robust heuristic for calling Invalidate"), Flag.baseFeature(VizFeatures.WEBVIEW_VULKAN_INTERMEDIATE_BUFFER, "For debugging vulkan"), @@ -821,7 +818,8 @@ Flag.baseFeature("V8SingleThreadedGCInBackground"), Flag.baseFeature("V8MemoryReducer"), Flag.baseFeature("V8MinorMS"), - Flag.baseFeature("V8SynchronousSparkplug"), + Flag.baseFeature("V8ConcurrentSparkplug"), + Flag.baseFeature("V8BaselineBatchCompilation"), Flag.baseFeature("WebAssemblyMoreAggressiveCodeCaching"), Flag.baseFeature("WebAssemblyTurboshaft"), Flag.baseFeature("WebAssemblyTurboshaftInstructionSelection"),
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 2472b66d..52abaa7 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -3858,6 +3858,7 @@ "system/input_device_settings/settings_updated_metrics_info_unittest.cc", "system/keyboard_brightness/keyboard_backlight_color_controller_unittest.cc", "system/keyboard_brightness/keyboard_backlight_color_nudge_controller_unittest.cc", + "system/keyboard_brightness/keyboard_brightness_controller_unittest.cc", "system/keyboard_brightness/unified_keyboard_brightness_slider_controller_unittest.cc", "system/locale/locale_detailed_view_unittest.cc", "system/locale/locale_feature_pod_controller_unittest.cc",
diff --git a/ash/components/arc/arc_util.cc b/ash/components/arc/arc_util.cc index 9fce4357..ca8b537b 100644 --- a/ash/components/arc/arc_util.cc +++ b/ash/components/arc/arc_util.cc
@@ -307,17 +307,16 @@ // ARC is only supported for the following cases: // - Users have Gaia accounts; - // - Active directory users; // - ARC kiosk session; // - Public Session users; // kUserTypeArcKioskApp check is compatible with IsArcKioskMode() // above because ARC kiosk user is always the primary/active user of a // user session. The same for kPublicAccount. - if (!user->HasGaiaAccount() && !user->IsActiveDirectoryUser() && + if (!user->HasGaiaAccount() && user->GetType() != user_manager::UserType::kArcKioskApp && user->GetType() != user_manager::UserType::kPublicAccount) { - VLOG(1) << "Users without GAIA or AD accounts, or not ARC kiosk apps are " - "not supported in ARC."; + VLOG(1) << "Users without GAIA account, or not ARC kiosk apps are not " + "supported in ARC."; return false; }
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index ecfa0b4..fad7520 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -290,7 +290,7 @@ // Enables or disables the Bluetooth Disconnect Warning feature. BASE_FEATURE(kBluetoothDisconnectWarning, "BluetoothDisconnectWarning", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); // Enables or disables the Bluetooth Quality Report feature. BASE_FEATURE(kBluetoothQualityReport, @@ -1242,6 +1242,15 @@ // Enables or disables Focus Mode feature on ChromeOS. BASE_FEATURE(kFocusMode, "FocusMode", base::FEATURE_DISABLED_BY_DEFAULT); +// Force enables additional on-device parental controls regardless of the device +// region. +// Used for development and testing only. Should remain disabled by default. +// See `kForceEnableAdditionalOnDeviceAppsParentalControls` description for the +// feature details. +BASE_FEATURE(kForceAdditionalOnDeviceAppsParentalControlsAllRegions, + "ForceAdditionalOnDeviceAppsParentalControlsAllRegions", + base::FEATURE_DISABLED_BY_DEFAULT); + // If enabled, makes the Projector app use server side speech // recognition instead of on-device speech recognition. BASE_FEATURE(kForceEnableServerSideSpeechRecognitionForDev, @@ -1876,6 +1885,11 @@ "ModifierSplit", base::FEATURE_DISABLED_BY_DEFAULT); +// Enables to split left and right modifiers in settings. +BASE_FEATURE(kMouseImposterCheck, + "MouseImposterCheck", + base::FEATURE_ENABLED_BY_DEFAULT); + // Enables the full apps list in Phone Hub bubble. BASE_FEATURE(kEcheLauncher, "EcheLauncher", base::FEATURE_ENABLED_BY_DEFAULT); @@ -3539,6 +3553,11 @@ return base::FeatureList::IsEnabled(kFloatingWorkspaceV2); } +bool IsForceAdditionalOnDeviceAppsParentalControlsAllRegionsEnabled() { + return base::FeatureList::IsEnabled( + kForceAdditionalOnDeviceAppsParentalControlsAllRegions); +} + bool IsFocusModeEnabled() { return base::FeatureList::IsEnabled(kFocusMode); } @@ -3648,9 +3667,14 @@ } bool IsGlanceablesTimeManagementTasksViewEnabled() { - // Allow users to force-enable/disable the feature via the key even if the - // `kSysUiShouldHoldbackTaskManagement` is applied to their device. This will - // allow developers to escape the holdback. + const bool device_enrolled_in_holdback = + !base::FeatureList::IsEnabled( + kFeatureManagementShouldExcludeFromSysUiHoldback) && + base::FeatureList::IsEnabled(kSysUiShouldHoldbackTaskManagement); + if (device_enrolled_in_holdback) { + return false; + } + const auto* const command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kGlanceablesKeySwitch)) { // Force-enable or -disable based on hash correctness. @@ -3659,12 +3683,7 @@ switches::kGlanceablesKeyExpectedHash; } - const bool device_enrolled_in_holdback = - !base::FeatureList::IsEnabled( - kFeatureManagementShouldExcludeFromSysUiHoldback) && - base::FeatureList::IsEnabled(kSysUiShouldHoldbackTaskManagement); - return !device_enrolled_in_holdback && - base::FeatureList::IsEnabled(kGlanceablesTimeManagementTasksView); + return base::FeatureList::IsEnabled(kGlanceablesTimeManagementTasksView); } bool AreAnyGlanceablesTimeManagementViewsEnabled() { @@ -4038,6 +4057,11 @@ switches::IsModifierSplitSecretKeyMatched(); } +bool IsMouseImposterCheckEnabled() { + return base::FeatureList::IsEnabled(kMouseImposterCheck) && + IsInputDeviceSettingsSplitEnabled(); +} + bool IsSplitKeyboardRefactorEnabled() { return base::FeatureList::IsEnabled(kSplitKeyboardRefactor) && IsModifierSplitEnabled();
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index 4aca0bb..69e2a04 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -403,6 +403,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kFingerprintAuthFactor); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kFocusMode); COMPONENT_EXPORT(ASH_CONSTANTS) +BASE_DECLARE_FEATURE(kForceAdditionalOnDeviceAppsParentalControlsAllRegions); +COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kForceEnableServerSideSpeechRecognitionForDev); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kForceReSyncDrive); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kForestFeature); @@ -577,6 +579,8 @@ BASE_DECLARE_FEATURE(kEducationEnrollmentOobeFlow); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kMinimumChromeVersion); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kModifierSplit); +COMPONENT_EXPORT(ASH_CONSTANTS) +BASE_DECLARE_FEATURE(kMouseImposterCheck); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kMojoDBusRelay); COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kMultiCalendarSupport); COMPONENT_EXPORT(ASH_CONSTANTS) @@ -1037,6 +1041,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsFloatingWorkspaceV2Enabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsFocusModeEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) +bool IsForceAdditionalOnDeviceAppsParentalControlsAllRegionsEnabled(); +COMPONENT_EXPORT(ASH_CONSTANTS) bool ShouldForceEnableServerSideSpeechRecognitionForDev(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsForceReSyncDriveEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsForestFeatureEnabled(); @@ -1214,6 +1220,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPhoneHubAttestationRetriesEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPhoneHubCallNotificationEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsModifierSplitEnabled(); +COMPONENT_EXPORT(ASH_CONSTANTS) bool IsMouseImposterCheckEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsSplitKeyboardRefactorEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPickerUpdateEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsPickerFlipEnabled();
diff --git a/ash/constants/ash_pref_names.h b/ash/constants/ash_pref_names.h index 01e62ed..b5b3b3d2 100644 --- a/ash/constants/ash_pref_names.h +++ b/ash/constants/ash_pref_names.h
@@ -26,6 +26,14 @@ inline constexpr char kCalendarIntegrationEnabled[] = "ash.calendar_integration_enabled"; +// Pref which stores a list of enabled Google integrations such as Calendar, +// Classroom, Tasks, etc. +inline constexpr char kContextualGoogleIntegrationsConfiguration[] = + "ash.contextual_google_integrations_configuration"; +inline constexpr char kGoogleCalendarIntegrationName[] = "GoogleCalendar"; +inline constexpr char kGoogleClassroomIntegrationName[] = "GoogleClassroom"; +inline constexpr char kGoogleTasksIntegrationName[] = "GoogleTasks"; + // A boolean pref of whether emoji suggestion is enabled. inline constexpr char kEmojiSuggestionEnabled[] = "assistive_input.emoji_suggestion_enabled";
diff --git a/ash/game_dashboard/game_dashboard_context.cc b/ash/game_dashboard/game_dashboard_context.cc index b49a32b..5768eb3 100644 --- a/ash/game_dashboard/game_dashboard_context.cc +++ b/ash/game_dashboard/game_dashboard_context.cc
@@ -28,6 +28,7 @@ #include "ash/strings/grit/ash_strings.h" #include "ash/wm/overview/overview_controller.h" #include "ash/wm/window_state.h" +#include "ash/wm/window_util.h" #include "base/check.h" #include "base/check_op.h" #include "base/i18n/time_formatting.h" @@ -37,6 +38,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/time_format.h" #include "ui/compositor/layer.h" +#include "ui/events/event.h" #include "ui/events/types/event_type.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" @@ -115,6 +117,7 @@ } GameDashboardContext::~GameDashboardContext() { + MaybeRemovePreTargetHandler(); window_state_observation_.Reset(); game_dashboard_button_->RemoveObserver(this); if (main_menu_widget_) { @@ -171,6 +174,10 @@ if (!IsArcWindow(game_window_)) { MaybeShowWelcomeDialog(); } + // The pretarget handler must be added when the context is initialized, since + // `OnWindowActivated()` is called before the context was created and + // initialized. + MaybeAddPreTargetHandler(); } void GameDashboardContext::MaybeStackAboveWidget(views::Widget* widget) { @@ -393,6 +400,60 @@ } } +void GameDashboardContext::MaybeAddPreTargetHandler() { + if (!game_window_->Contains( + wm::GetTransientRoot(window_util::GetActiveWindow()))) { + // Don't add a pretarget handler to any window whose transient root is not + // active. + return; + } + + if (!added_to_pre_target_handler_) { + added_to_pre_target_handler_ = true; + // The pretarget handler must be added to the Shell in order to be + // properly notified of all events interacting with different widgets + // within the game window. + Shell::Get()->AddPreTargetHandler(this); + } +} + +void GameDashboardContext::MaybeRemovePreTargetHandler() { + if (added_to_pre_target_handler_) { + added_to_pre_target_handler_ = false; + Shell::Get()->RemovePreTargetHandler(this); + } +} + +void GameDashboardContext::OnEvent(ui::Event* event) { + // Close the main menu if the user clicks outside of both the main menu + // widget and the Game Dashboard button. + if (main_menu_widget_) { + switch (event->type()) { + case ui::ET_TOUCH_PRESSED: + case ui::ET_MOUSE_PRESSED: { + // TODO(b/328852471): Update logic to compare event target with native + // window. + const ui::LocatedEvent* located_event = event->AsLocatedEvent(); + const auto event_location = + located_event->target()->GetScreenLocation(*located_event); + if (!game_dashboard_button_->GetBoundsInScreen().Contains( + event_location) && + !main_menu_widget_->GetWindowBoundsInScreen().Contains( + event_location)) { + // Touch/Mouse event occurred outside both the main menu widget and + // the Game Dashboard button bounds. Ignore the bounds of the Game + // Dashboard button since it will already toggle the main menu when + // pressed. + CloseMainMenu(GameDashboardMainMenuToggleMethod::kOthers); + } + } break; + default: + break; + } + } + ui::EventHandler::OnEvent(event); +} + void GameDashboardContext::OnViewPreferredSizeChanged( views::View* observed_view) { CHECK_EQ(game_dashboard_button_, observed_view); @@ -478,9 +539,10 @@ weak_ptr_factory_.GetWeakPtr())); DCHECK(!game_dashboard_button_); game_dashboard_button_ = game_dashboard_button.get(); + // Allow the Game Dashboard button to be activatable so that it can be + // focusable during tab navigation. game_dashboard_button_widget_ = CreateTransientChildWidget( - game_window_, "GameDashboardButton", std::move(game_dashboard_button), - views::Widget::InitParams::Activatable::kNo); + game_window_, "GameDashboardButton", std::move(game_dashboard_button)); // Add observer after `game_dashboard_button_widget_` is created because the // observation is to update `game_dashboard_button_widget_` bounds. game_dashboard_button_->AddObserver(this);
diff --git a/ash/game_dashboard/game_dashboard_context.h b/ash/game_dashboard/game_dashboard_context.h index b475d77..9b98050b 100644 --- a/ash/game_dashboard/game_dashboard_context.h +++ b/ash/game_dashboard/game_dashboard_context.h
@@ -14,6 +14,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/timer/timer.h" +#include "ui/events/event_handler.h" #include "ui/views/view_observer.h" #include "ui/views/widget/unique_widget_ptr.h" @@ -35,7 +36,8 @@ // This class manages Game Dashboard related UI for a given `aura::Window`, and // its instance is managed by the `GameDashboardController`. -class ASH_EXPORT GameDashboardContext : public views::ViewObserver, +class ASH_EXPORT GameDashboardContext : public ui::EventHandler, + public views::ViewObserver, public views::WidgetObserver, public WindowStateObserver { public: @@ -139,6 +141,17 @@ // Controls the Game Dashboard Button visibility. void SetGameDashboardButtonVisibility(bool visible); + // Conditionally, adds this context to the pre-target handler if it hasn't + // already been added. + void MaybeAddPreTargetHandler(); + + // Conditionally, removes this context from the pre-target handler if it + // hasn't already been removed. + void MaybeRemovePreTargetHandler(); + + // ui::EventHandler: + void OnEvent(ui::Event* event) override; + // views::ViewObserver: void OnViewPreferredSizeChanged(views::View* observed_view) override; @@ -273,6 +286,11 @@ // is started from somewhere else. std::optional<bool> recording_from_main_menu_; + // Indicates whether this context has been added as a Shell's pre-target + // handler. This param ensures this context isn't added as a pre-target + // handler multiple times. + bool added_to_pre_target_handler_ = false; + base::ScopedObservation<WindowState, WindowStateObserver> window_state_observation_{this};
diff --git a/ash/game_dashboard/game_dashboard_context_unittest.cc b/ash/game_dashboard/game_dashboard_context_unittest.cc index 3771148..ac3fb09 100644 --- a/ash/game_dashboard/game_dashboard_context_unittest.cc +++ b/ash/game_dashboard/game_dashboard_context_unittest.cc
@@ -413,8 +413,7 @@ auto* game_dashboard_button_widget = test_api_->GetGameDashboardButton()->GetWidget(); CHECK(game_dashboard_button_widget); - ASSERT_FALSE(game_dashboard_button_widget->CanActivate()); - ASSERT_FALSE(game_dashboard_button_widget->IsActive()); + ASSERT_TRUE(game_dashboard_button_widget->CanActivate()); // Using `prefs::kGameDashboardShowWelcomeDialog`, verify whether the // welcome dialog should be shown. @@ -581,15 +580,34 @@ VerifyGameDashboardButtonState(test_api_.get(), is_recording); } + // Moves the cursor inside the window frame header, half way between the left + // edge of the window and `GameDashboardMainMenuButton`. Returns the new mouse + // location. + gfx::Point MoveCursorToEmptySpaceInFrameHeader( + GameDashboardContextTestApi* test_api) { + const auto window_bounds = + test_api->context()->game_window()->GetBoundsInScreen(); + const auto gd_button_bounds_x = + test_api->GetGameDashboardButton()->GetBoundsInScreen().x(); + gfx::Point new_mouse_location = + gfx::Point((window_bounds.x() + gd_button_bounds_x) / 2, + window_bounds.y() + frame_header_height_ / 2); + GetEventGenerator()->MoveMouseTo(new_mouse_location); + return new_mouse_location; + } + // Starts recording `recording_window_test_api`'s window, and verifies its // record game buttons are enabled and toggled on, while the record game // buttons in `other_window_test_api` are disabled and toggled off. void RecordGameAndVerifyButtons( GameDashboardContextTestApi* recording_window_test_api, GameDashboardContextTestApi* other_window_test_api) { + auto* event_generator = GetEventGenerator(); + // Verify the initial state of the record buttons. for (auto* test_api : {recording_window_test_api, other_window_test_api}) { - wm::ActivateWindow(test_api->context()->game_window()); + MoveCursorToEmptySpaceInFrameHeader(test_api); + event_generator->ClickLeftButton(); test_api->OpenTheMainMenu(); const auto* record_game_tile = test_api->GetMainMenuRecordGameTile(); @@ -621,7 +639,8 @@ auto* recording_window = recording_window_test_api->context()->game_window(); ASSERT_TRUE(recording_window); - wm::ActivateWindow(recording_window); + MoveCursorToEmptySpaceInFrameHeader(recording_window_test_api); + event_generator->ClickLeftButton(); // Start recording recording_window. recording_window_test_api->OpenTheMainMenu(); @@ -654,8 +673,8 @@ /*enabled=*/true, /*toggled=*/true); // Retrieve the record game buttons for the `other_window`. - auto* other_window = other_window_test_api->context()->game_window(); - wm::ActivateWindow(other_window); + MoveCursorToEmptySpaceInFrameHeader(other_window_test_api); + event_generator->ClickLeftButton(); other_window_test_api->OpenTheMainMenu(); // Retrieve the record game buttons for the `other_window` and verify @@ -665,15 +684,13 @@ /*enabled=*/false, /*toggled=*/false); // Stop the video recording session. - wm::ActivateWindow(recording_window); + MoveCursorToEmptySpaceInFrameHeader(recording_window_test_api); + event_generator->ClickLeftButton(); recording_window_test_api->OpenTheMainMenu(); LeftClickOn(recording_window_test_api->GetMainMenuRecordGameTile()); EXPECT_FALSE(CaptureModeController::Get()->is_recording_in_progress()); WaitForCaptureFileToBeSaved(); - // TODO(b/286889161): Update the record game button pointers after the bug - // has been addressed. The main menu will no longer remain open, which makes - // button pointers invalid. // Verify all the record game buttons for the `recording_window` are enabled // and toggled off. VerifyRecordGameStatus( @@ -682,7 +699,8 @@ /*enabled=*/true, /*toggled=*/false); // Verify all the `other_window` buttons are enabled and toggled off. - wm::ActivateWindow(other_window); + MoveCursorToEmptySpaceInFrameHeader(other_window_test_api); + event_generator->ClickLeftButton(); other_window_test_api->OpenTheMainMenu(); VerifyRecordGameStatus(other_window_test_api->GetMainMenuRecordGameTile(), other_window_test_api->GetToolbarRecordGameButton(), @@ -705,7 +723,8 @@ // Open the main menu of the recording window to close the toolbar and then // the main menu. - wm::ActivateWindow(recording_window); + MoveCursorToEmptySpaceInFrameHeader(recording_window_test_api); + event_generator->ClickLeftButton(); recording_window_test_api->OpenTheMainMenu(); recording_window_test_api->CloseTheToolbar(); recording_window_test_api->CloseTheMainMenu(); @@ -1216,10 +1235,13 @@ TEST_F(GameDashboardContextTest, TwoGameWindowsRecordingState) { // Create an ARC game window. CreateGameWindow(/*is_arc_window=*/true); - // Create a GFN game window. + + // Create a GFN game window that doesn't overlap with the ARC game window. + // This allows the test to interact with both windows without having to + // artificially activate it. auto gfn_game_window = CreateAppWindow(extension_misc::kGeForceNowAppId, AppType::NON_APP, - gfx::Rect(50, 50, 400, 200)); + gfx::Rect(950, 550, 400, 200)); auto* gfn_game_context = GameDashboardController::Get()->GetGameDashboardContext( gfn_game_window.get()); @@ -1374,15 +1396,8 @@ ASSERT_TRUE(test_api_->GetMainMenuCursorHandler()); ASSERT_TRUE(cursor_manager->IsCursorVisible()); - // Move the cursor inside the window frame header, half way between the left - // edge of the window and `GameDashboardMainMenuButton`. - const auto window_bounds = game_window_->GetBoundsInScreen(); - const auto gd_button_bounds_x = - test_api_->GetGameDashboardButton()->GetBoundsInScreen().x(); gfx::Point new_mouse_location = - gfx::Point((window_bounds.x() + gd_button_bounds_x) / 2, - window_bounds.y() + frame_header_height_ / 2); - event_generator->MoveMouseTo(new_mouse_location); + MoveCursorToEmptySpaceInFrameHeader(test_api_.get()); // Verify the mouse event was not consumed by // `GameDashboardMainMenuCursorHandler`. @@ -1391,8 +1406,8 @@ ASSERT_FALSE(last_mouse_event->handled()); ASSERT_FALSE(last_mouse_event->stopped_propagation()); - // Move the mouse to the enter of the window, and below the main menu. - new_mouse_location.set_x(window_bounds.CenterPoint().x()); + // Move the mouse to the center of the window, and below the main menu. + new_mouse_location.set_x(game_window_->GetBoundsInScreen().CenterPoint().x()); const auto main_menu_bounds = test_api_->GetMainMenuView()->GetBoundsInScreen(); new_mouse_location.set_y(main_menu_bounds.y() + main_menu_bounds.height() + @@ -1537,6 +1552,7 @@ ASSERT_FALSE(test_api_->GetGameDashboardButtonWidget()->IsVisible()); // Move mouse to top edge of window. + app_bounds = game_window_->GetBoundsInScreen(); event_generator->MoveMouseTo(app_bounds.top_center()); base::OneShotTimer& top_edge_hover_timer = test_api_->GetRevealControllerTopEdgeHoverTimer(); @@ -1590,35 +1606,34 @@ GameDashboardController::Get()->GetGameDashboardContext( gfn_game_window.get()), GetEventGenerator()); - // Toggle the main menu to change the focus from the window to the toolbar - // widget. - gfn_window_test_api.OpenTheMainMenu(); - gfn_window_test_api.CloseTheMainMenu(); - ASSERT_FALSE(gfn_game_window->HasFocus()); - ASSERT_TRUE(gfn_window_test_api.GetToolbarWidget()->IsActive()); + ASSERT_TRUE(gfn_window_test_api.GetToolbarWidget()); - // Create an ARC game window and display the toolbar. + // Create an ARC game window with the toolbar displayed. CreateGameWindow(/*is_arc_window=*/true); auto* arc_game_window = game_window_.get(); auto arc_window_test_api = GameDashboardContextTestApi( GameDashboardController::Get()->GetGameDashboardContext(arc_game_window), GetEventGenerator()); + ASSERT_TRUE(arc_window_test_api.GetToolbarWidget()); ASSERT_FALSE(gfn_game_window->HasFocus()); ASSERT_TRUE(arc_game_window->HasFocus()); - // Toggle the main menu to change the focus from the window to the toolbar - // widget. - arc_window_test_api.OpenTheMainMenu(); - arc_window_test_api.CloseTheMainMenu(); + // In the toolbar, click the gamepad button and press tab so the gamepad + // button gains focus. + const auto* arc_gamepad_button = + arc_window_test_api.GetToolbarGamepadButton(); + ASSERT_TRUE(arc_gamepad_button); + LeftClickOn(arc_gamepad_button); + GetEventGenerator()->PressAndReleaseKey(ui::VKEY_TAB); ASSERT_FALSE(arc_game_window->HasFocus()); - ASSERT_TRUE(arc_window_test_api.GetToolbarWidget()->IsActive()); + ASSERT_TRUE(arc_gamepad_button->HasFocus()); // Enter and exit overview mode and verify the ARC game window's toolbar - // maintains its status as the active widget. + // maintains focus. EnterOverview(); ExitOverview(); ASSERT_FALSE(gfn_game_window->HasFocus()); ASSERT_FALSE(arc_game_window->HasFocus()); - ASSERT_TRUE(arc_window_test_api.GetToolbarWidget()->IsActive()); + ASSERT_TRUE(arc_gamepad_button->HasFocus()); } // -----------------------------------------------------------------------------
diff --git a/ash/game_dashboard/game_dashboard_controller.cc b/ash/game_dashboard/game_dashboard_controller.cc index 762785e..6f58e413 100644 --- a/ash/game_dashboard/game_dashboard_controller.cc +++ b/ash/game_dashboard/game_dashboard_controller.cc
@@ -14,6 +14,7 @@ #include "ash/constants/notifier_catalogs.h" #include "ash/game_dashboard/game_dashboard_constants.h" #include "ash/game_dashboard/game_dashboard_context.h" +#include "ash/game_dashboard/game_dashboard_main_menu_view.h" #include "ash/game_dashboard/game_dashboard_metrics.h" #include "ash/game_dashboard/game_dashboard_utils.h" #include "ash/public/cpp/app_types_util.h" @@ -32,6 +33,8 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/display/screen.h" #include "ui/display/tablet_state.h" +#include "ui/wm/core/window_util.h" +#include "ui/wm/public/activation_client.h" namespace ash { @@ -80,11 +83,13 @@ env_observation_.Observe(aura::Env::GetInstance()); CaptureModeController::Get()->AddObserver(this); Shell::Get()->overview_controller()->AddObserver(this); + Shell::Get()->activation_client()->AddObserver(this); } GameDashboardController::~GameDashboardController() { CHECK_EQ(g_instance, this); g_instance = nullptr; + Shell::Get()->activation_client()->RemoveObserver(this); Shell::Get()->overview_controller()->RemoveObserver(this); CaptureModeController::Get()->RemoveObserver(this); } @@ -96,7 +101,6 @@ GameDashboardContext* GameDashboardController::GetGameDashboardContext( aura::Window* window) const { - DCHECK(window); auto it = game_window_contexts_.find(window); return it != game_window_contexts_.end() ? it->second.get() : nullptr; } @@ -256,6 +260,32 @@ GameDashboardMainMenuToggleMethod::kOverview); } +void GameDashboardController::OnWindowActivated( + wm::ActivationChangeObserver::ActivationReason reason, + aura::Window* gained_active, + aura::Window* lost_active) { + GameDashboardContext* lost_active_context = + GetGameDashboardContext(wm::GetTransientRoot(lost_active)); + GameDashboardContext* gained_active_context = + GetGameDashboardContext(wm::GetTransientRoot(gained_active)); + if (lost_active_context == gained_active_context) { + // Ignore if the activation is moving within the same game window. + return; + } + + // If `lost_active_context` and `gained_active_context` both exist, the + // activated widget is moving between Game Dashboard windows. If only + // `gained_active_context` exists, activation is moving from a non-game window + // to a Game Dashboard window. If only `lost_active_context` exists, + // activation is moving from a Game Dashboard window into a non-game window. + if (gained_active_context) { + gained_active_context->MaybeAddPreTargetHandler(); + } + if (lost_active_context) { + lost_active_context->MaybeRemovePreTargetHandler(); + } +} + void GameDashboardController::GetWindowGameState(aura::Window* window) { if (const auto* app_id = window->GetProperty(kAppIDKey); !app_id) { RefreshWindowTracking(window, WindowGameState::kNotYetKnown);
diff --git a/ash/game_dashboard/game_dashboard_controller.h b/ash/game_dashboard/game_dashboard_controller.h index 980caf3..8a08dab 100644 --- a/ash/game_dashboard/game_dashboard_controller.h +++ b/ash/game_dashboard/game_dashboard_controller.h
@@ -21,6 +21,7 @@ #include "ui/aura/window_observer.h" #include "ui/display/display_observer.h" #include "ui/gfx/geometry/rect.h" +#include "ui/wm/public/activation_change_observer.h" class PrefRegistrySimple; @@ -40,7 +41,8 @@ public aura::WindowObserver, public CaptureModeObserver, public display::DisplayObserver, - public OverviewObserver { + public OverviewObserver, + public wm::ActivationChangeObserver { public: explicit GameDashboardController( std::unique_ptr<GameDashboardDelegate> delegate); @@ -115,6 +117,11 @@ void OnOverviewModeWillStart() override; void OnOverviewModeEnded() override; + // wm::ActivationChangeObserver: + void OnWindowActivated(wm::ActivationChangeObserver::ActivationReason reason, + aura::Window* gained_active, + aura::Window* lost_active) override; + private: friend class GameDashboardControllerTest; friend class GameDashboardTestBase;
diff --git a/ash/game_dashboard/game_dashboard_main_menu_view.cc b/ash/game_dashboard/game_dashboard_main_menu_view.cc index f8ee6cf..edd719b 100644 --- a/ash/game_dashboard/game_dashboard_main_menu_view.cc +++ b/ash/game_dashboard/game_dashboard_main_menu_view.cc
@@ -677,7 +677,9 @@ /*thickness=*/1, kBubbleCornerRadius, cros_tokens::kCrosSysSystemHighlight1)); set_corner_radius(kBubbleCornerRadius); - set_close_on_deactivate(true); + // Closing on deactivation is manually handled by the `GameDashboardContext` + // in order to support tabbing between sibling widgets. + set_close_on_deactivate(false); set_internal_name("GameDashboardMainMenuView"); set_margins(gfx::Insets()); set_parent_window(
diff --git a/ash/game_dashboard/game_dashboard_test_base.h b/ash/game_dashboard/game_dashboard_test_base.h index d7540d0c..12e7d4c 100644 --- a/ash/game_dashboard/game_dashboard_test_base.h +++ b/ash/game_dashboard/game_dashboard_test_base.h
@@ -17,7 +17,7 @@ class GameDashboardTestBase : public AshTestBase { public: // The bounds for the screen that will contain app windows. - static constexpr gfx::Rect kScreenBounds = gfx::Rect(10, 10, 1000, 750); + static constexpr gfx::Rect kScreenBounds = gfx::Rect(10, 10, 2000, 1500); GameDashboardTestBase(); GameDashboardTestBase(const GameDashboardTestBase&) = delete;
diff --git a/ash/glanceables/classroom/glanceables_classroom_item_view.cc b/ash/glanceables/classroom/glanceables_classroom_item_view.cc index 3c9aade5..b4cb5df 100644 --- a/ash/glanceables/classroom/glanceables_classroom_item_view.cc +++ b/ash/glanceables/classroom/glanceables_classroom_item_view.cc
@@ -55,21 +55,24 @@ // Styles for the whole `GlanceablesClassroomItemView`. constexpr int kFocusRingCornerRadius = 14; +constexpr auto kClassroomItemMargin = gfx::Insets::VH(4, 0); // Styles for the icon view. constexpr int kIconViewBackgroundRadius = 12; -constexpr auto kIconViewMargin = gfx::Insets::TLBR(2, 0, 0, 4); +constexpr auto kIconViewMargin = gfx::Insets::TLBR(0, 0, 0, 12); constexpr auto kIconViewPreferredSize = gfx::Size(kIconViewBackgroundRadius * 2, kIconViewBackgroundRadius * 2); constexpr int kIconSize = 16; // Styles for the assignment labels. -constexpr int kAssignmentBetweenLabelsSpacing = 4; -constexpr auto kAssignmentLabelsInsets = - gfx::Insets::VH(kAssignmentBetweenLabelsSpacing, 8); +constexpr int kAssignmentBetweenLabelsSpacing = 2; +constexpr auto kAssignmentLabelsMargin = gfx::Insets::TLBR(2, 0, 0, 16); +constexpr auto kAssignmentCourseWorkTypography = TypographyToken::kCrosButton2; +constexpr auto kAssignmentCourseTypography = TypographyToken::kCrosAnnotation1; // Styles for the container containing due date and time labels. -constexpr auto kDueLabelsMargin = gfx::Insets::VH(0, 16); +constexpr auto kDueLabelsMargin = gfx::Insets::TLBR(2, 0, 0, 4); +constexpr auto kDueLabelsTypography = TypographyToken::kCrosAnnotation1; constexpr char kDayOfWeekFormatterPattern[] = "EEE"; // "Wed" constexpr char kMonthAndDayFormatterPattern[] = "MMM d"; // "Feb 28" @@ -134,7 +137,7 @@ .SetMainAxisAlignment(views::BoxLayout::MainAxisAlignment::kCenter) .SetCrossAxisAlignment(views::BoxLayout::CrossAxisAlignment::kStart) .SetBetweenChildSpacing(kAssignmentBetweenLabelsSpacing) - .SetProperty(views::kMarginsKey, kAssignmentLabelsInsets) + .SetProperty(views::kMarginsKey, kAssignmentLabelsMargin) .SetProperty( views::kFlexBehaviorKey, views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero, @@ -145,18 +148,18 @@ GlanceablesViewId::kClassroomItemCourseWorkTitleLabel)) .SetEnabledColorId(cros_tokens::kCrosSysOnSurface) .SetFontList(typography_provider->ResolveTypographyToken( - TypographyToken::kCrosButton2)) + kAssignmentCourseWorkTypography)) .SetLineHeight(typography_provider->ResolveLineHeight( - TypographyToken::kCrosButton2))) + kAssignmentCourseWorkTypography))) .AddChild(views::Builder<views::Label>() .SetText(base::UTF8ToUTF16(assignment->course_title)) .SetID(base::to_underlying( GlanceablesViewId::kClassroomItemCourseTitleLabel)) .SetEnabledColorId(cros_tokens::kCrosSysOnSurfaceVariant) .SetFontList(typography_provider->ResolveTypographyToken( - TypographyToken::kCrosAnnotation1)) + kAssignmentCourseTypography)) .SetLineHeight(typography_provider->ResolveLineHeight( - TypographyToken::kCrosAnnotation1))) + kAssignmentCourseTypography))) .Build(); } @@ -169,6 +172,7 @@ .SetOrientation(views::BoxLayout::Orientation::kVertical) .SetMainAxisAlignment(views::BoxLayout::MainAxisAlignment::kCenter) .SetCrossAxisAlignment(views::BoxLayout::CrossAxisAlignment::kEnd) + .SetBetweenChildSpacing(kAssignmentBetweenLabelsSpacing) .SetProperty(views::kMarginsKey, kDueLabelsMargin) .AddChild(views::Builder<views::Label>() .SetText(due_date) @@ -176,18 +180,20 @@ GlanceablesViewId::kClassroomItemDueDateLabel)) .SetEnabledColorId(cros_tokens::kCrosSysOnSurfaceVariant) .SetFontList(typography_provider->ResolveTypographyToken( - TypographyToken::kCrosAnnotation1)) + kDueLabelsTypography)) + // Use the course work line height to align with the + // assignment labels. .SetLineHeight(typography_provider->ResolveLineHeight( - TypographyToken::kCrosAnnotation1))) + kAssignmentCourseWorkTypography))) .AddChild(views::Builder<views::Label>() .SetText(due_time) .SetID(base::to_underlying( GlanceablesViewId::kClassroomItemDueTimeLabel)) .SetEnabledColorId(cros_tokens::kCrosSysOnSurfaceVariant) .SetFontList(typography_provider->ResolveTypographyToken( - TypographyToken::kCrosAnnotation1)) + kDueLabelsTypography)) .SetLineHeight(typography_provider->ResolveLineHeight( - TypographyToken::kCrosAnnotation1))) + kDueLabelsTypography))) .Build(); } @@ -201,6 +207,7 @@ SetLayoutManager(std::make_unique<views::FlexLayout>()) ->SetCrossAxisAlignment(views::LayoutAlignment::kStart); + SetProperty(views::kMarginsKey, kClassroomItemMargin); std::vector<std::u16string> a11y_description_parts{ base::UTF8ToUTF16(assignment->course_title)};
diff --git a/ash/glanceables/classroom/glanceables_classroom_student_view.cc b/ash/glanceables/classroom/glanceables_classroom_student_view.cc index 9d0b8ad..74cf85c4 100644 --- a/ash/glanceables/classroom/glanceables_classroom_student_view.cc +++ b/ash/glanceables/classroom/glanceables_classroom_student_view.cc
@@ -94,7 +94,8 @@ constexpr auto kEmptyListLabelMargins = gfx::Insets::TLBR(24, 0, 32, 0); constexpr auto kHeaderIconButtonMargins = gfx::Insets::TLBR(0, 0, 0, 2); -constexpr auto kViewInteriorMargins = gfx::Insets::TLBR(16, 16, 0, 16); +constexpr auto kViewInteriorMargins = gfx::Insets::TLBR(12, 12, 12, 12); +constexpr auto kFooterMargins = gfx::Insets::TLBR(12, 2, 0, 0); std::u16string GetAssignmentListName(size_t index) { CHECK(index >= 0 || index < kStudentAssignmentsListTypeOrdered.size()); @@ -137,7 +138,7 @@ } // namespace GlanceablesClassroomStudentView::GlanceablesClassroomStudentView() - : GlanceableTrayChildBubble(/*use_glanceables_container_style=*/true), + : GlanceableTrayChildBubble(/*use_glanceables_container_style=*/false), shown_time_(base::Time::Now()) { SetLayoutManager(std::make_unique<views::FlexLayout>()) ->SetInteriorMargin(kViewInteriorMargins) @@ -207,6 +208,7 @@ base::Unretained(this)))); list_footer_view_->SetID( base::to_underlying(GlanceablesViewId::kClassroomBubbleListFooter)); + list_footer_view_->SetVisible(false); SelectedAssignmentListChanged(/*initial_update=*/true); } @@ -380,6 +382,7 @@ const bool is_list_empty = shown_assignments == 0; empty_list_label_->SetVisible(is_list_empty); list_footer_view_->SetVisible(!is_list_empty); + list_footer_view_->SetProperty(views::kMarginsKey, kFooterMargins); list_container_view_->SetAccessibleName(l10n_util::GetStringFUTF16( IDS_GLANCEABLES_CLASSROOM_SELECTED_LIST_ACCESSIBLE_NAME, list_name)); @@ -406,7 +409,7 @@ if (initial_update) { RecordClassromInitialLoadTime( - /* first_occurrence=*/controller->bubble_shown_count() == 1, + /*first_occurrence=*/controller->bubble_shown_count() == 1, base::TimeTicks::Now() - controller->last_bubble_show_time()); } else { RecordClassroomChangeLoadTime(
diff --git a/ash/glanceables/common/glanceables_list_footer_view.cc b/ash/glanceables/common/glanceables_list_footer_view.cc index 0c83ce79..55e863b 100644 --- a/ash/glanceables/common/glanceables_list_footer_view.cc +++ b/ash/glanceables/common/glanceables_list_footer_view.cc
@@ -51,14 +51,18 @@ ? u"" : l10n_util::GetStringUTF16( IDS_GLANCEABLES_LIST_FOOTER_ACTION_BUTTON_LABEL)); - SetCallback(std::move(on_see_all_pressed)); - SetID(base::to_underlying(GlanceablesViewId::kListFooterSeeAllButton)); - SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_RIGHT); + // TODO(b/333770880): Revisit this to see if it can be refactored. if (stable_launch) { // Explicitly set an empty border to replace the border created by default // in LabelButton. SetBorder(views::CreateEmptyBorder(0)); + } else { + SetBorder(views::CreateEmptyBorder(gfx::Insets::VH(2, 2))); } + + SetCallback(std::move(on_see_all_pressed)); + SetID(base::to_underlying(GlanceablesViewId::kListFooterSeeAllButton)); + SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_RIGHT); SetImageModel( views::Button::STATE_NORMAL, ui::ImageModel::FromVectorIcon(vector_icons::kLaunchIcon,
diff --git a/ash/glanceables/glanceables_controller.cc b/ash/glanceables/glanceables_controller.cc index 97fca01..15ac500a 100644 --- a/ash/glanceables/glanceables_controller.cc +++ b/ash/glanceables/glanceables_controller.cc
@@ -4,6 +4,8 @@ #include "ash/glanceables/glanceables_controller.h" +#include <utility> + #include "ash/api/tasks/tasks_client.h" #include "ash/constants/ash_pref_names.h" #include "ash/glanceables/classroom/glanceables_classroom_client.h" @@ -13,6 +15,7 @@ #include "ash/public/cpp/session/session_controller.h" #include "base/check.h" #include "base/time/time.h" +#include "base/values.h" #include "components/account_id/account_id.h" #include "components/prefs/pref_registry_simple.h" @@ -32,6 +35,14 @@ void GlanceablesController::RegisterUserProfilePrefs( PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kGlanceablesEnabled, true); + + base::Value::List default_integrations; + default_integrations.Append(prefs::kGoogleCalendarIntegrationName); + default_integrations.Append(prefs::kGoogleClassroomIntegrationName); + default_integrations.Append(prefs::kGoogleTasksIntegrationName); + registry->RegisterListPref(prefs::kContextualGoogleIntegrationsConfiguration, + std::move(default_integrations)); + GlanceablesClassroomStudentView::RegisterUserProfilePrefs(registry); GlanceablesTasksComboboxModel::RegisterUserProfilePrefs(registry); }
diff --git a/ash/public/cpp/resources/ash_public_unscaled_resources.grd b/ash/public/cpp/resources/ash_public_unscaled_resources.grd index 0142f42..bd7c6e1 100644 --- a/ash/public/cpp/resources/ash_public_unscaled_resources.grd +++ b/ash/public/cpp/resources/ash_public_unscaled_resources.grd
@@ -54,10 +54,10 @@ <!-- Clipboard Nudge --> <structure type="lottie" name="IDR_CLIPBOARD_NUDGE_COPIED_IMAGE" file="unscaled_resources/clipboard_nudge_copied.json" compress="gzip" /> <structure type="lottie" name="IDR_CLIPBOARD_NUDGE_SELECT_IMAGE" file="unscaled_resources/clipboard_nudge_select.json" compress="gzip" /> - <!-- Pine --> - <structure type="lottie" name="IDR_PINE_NUDGE_IMAGE_DM" file="unscaled_resources/pine_nudge_dm.json" compress="gzip" /> - <structure type="lottie" name="IDR_PINE_NUDGE_IMAGE_LM" file="unscaled_resources/pine_nudge_lm.json" compress="gzip" /> - <structure type="lottie" name="IDR_PINE_ONBOARDING_IMAGE" file="unscaled_resources/pine_onboarding.json" compress="gzip" /> + <!-- Pine --> + <structure type="lottie" name="IDR_PINE_NUDGE_IMAGE_DM" file="unscaled_resources/pine_nudge_dm.json" compress="gzip" /> + <structure type="lottie" name="IDR_PINE_NUDGE_IMAGE_LM" file="unscaled_resources/pine_nudge_lm.json" compress="gzip" /> + <structure type="lottie" name="IDR_PINE_ONBOARDING_IMAGE" file="unscaled_resources/pine_onboarding.json" compress="gzip" /> <!-- Focus Mode --> <structure type="lottie" name="IDR_FOCUS_MODE_EQUALIZER_LIGHT_ANIMATION" file="unscaled_resources/equalizer_light.json" compress="gzip" /> <!-- Birch -->
diff --git a/ash/system/bluetooth/hid_preserving_controller/disable_bluetooth_dialog_controller_impl.cc b/ash/system/bluetooth/hid_preserving_controller/disable_bluetooth_dialog_controller_impl.cc index 6674dfe..d4b76d6a 100644 --- a/ash/system/bluetooth/hid_preserving_controller/disable_bluetooth_dialog_controller_impl.cc +++ b/ash/system/bluetooth/hid_preserving_controller/disable_bluetooth_dialog_controller_impl.cc
@@ -17,6 +17,7 @@ #include "ui/views/controls/bulleted_label_list/bulleted_label_list_view.h" #include "ui/views/controls/image_view.h" #include "ui/views/layout/layout_provider.h" +#include "ui/views/style/typography.h" #include "ui/views/widget/widget.h" namespace ash { @@ -81,16 +82,17 @@ weak_ptr_factory_.GetWeakPtr())) .Build(); - // TODO(b/330161794): Fix bulleted list text color to match mocks. - std::unique_ptr<views::BulletedLabelListView> list_view = - std::make_unique<views::BulletedLabelListView>(); - + std::vector<std::u16string> labels; int count = std::min((int)devices.size(), 3); - // Intentionally limit the number of devices shown in the UI. for (int i = 0; i < count; i++) { - list_view->AddLabel(base::UTF8ToUTF16(devices[i])); + labels.push_back(base::UTF8ToUTF16(devices[i])); } + // Create the BulletedLabelListView with the generated labels. + std::unique_ptr<views::BulletedLabelListView> list_view = + std::make_unique<views::BulletedLabelListView>( + labels, views::style::TextStyle::STYLE_SECONDARY); + dialog->SetModalType(ui::MODAL_TYPE_SYSTEM); dialog->SetShowCloseButton(false); dialog->SetMiddleContentView(std::move(list_view));
diff --git a/ash/system/input_device_settings/input_device_notifier.cc b/ash/system/input_device_settings/input_device_notifier.cc index 9dd695df..7cd8117 100644 --- a/ash/system/input_device_settings/input_device_notifier.cc +++ b/ash/system/input_device_settings/input_device_notifier.cc
@@ -8,6 +8,7 @@ #include <vector> #include "ash/bluetooth_devices_observer.h" +#include "ash/constants/ash_features.h" #include "ash/public/cpp/input_device_settings_controller.h" #include "ash/public/mojom/input_device_settings.mojom-forward.h" #include "ash/public/mojom/input_device_settings.mojom.h" @@ -69,7 +70,29 @@ return base::Contains(imposters, device_key); } -// Saves `imposter_false_positives_to_add` to the know list of imposters in +// Imposter here means a device that has a virtual keyboard device as well as a +// virtual mouse device presented to evdev and the mouse device is "fake". +bool IsMouseAKnownImposterFalsePositive(const ui::InputDevice& device) { + if (!features::IsMouseImposterCheckEnabled()) { + return false; + } + + if (!Shell::Get()->session_controller()->IsActiveUserSessionStarted()) { + return false; + } + + PrefService* prefs = + Shell::Get()->session_controller()->GetActivePrefService(); + if (!prefs) { + return false; + } + + const auto& imposters = prefs->GetList(prefs::kMouseDeviceImpostersListPref); + const std::string device_key = BuildDeviceKey(device); + return base::Contains(imposters, device_key); +} + +// Saves `imposter_false_positives_to_add` to the known list of imposters in // prefs. Clears the list if it successfully adds the devices to prefs. void SaveKeyboardsToImposterPref( base::flat_set<std::string>& imposter_false_positives_to_add) { @@ -98,6 +121,35 @@ imposter_false_positives_to_add.clear(); } +// Saves `imposter_false_positives_to_add` to the known list of mouse imposters +// in prefs. Clears the list if it successfully adds the devices to prefs. +void SaveMiceToImposterPref( + base::flat_set<std::string>& imposter_false_positives_to_add) { + if (!Shell::Get()->session_controller()->IsActiveUserSessionStarted()) { + return; + } + + PrefService* prefs = + Shell::Get()->session_controller()->GetActivePrefService(); + if (!prefs) { + return; + } + + auto updated_imposters = + prefs->GetList(prefs::kMouseDeviceImpostersListPref).Clone(); + for (const auto& device_key : imposter_false_positives_to_add) { + if (base::Contains(updated_imposters, device_key)) { + continue; + } + + updated_imposters.Append(device_key); + } + + prefs->SetList(prefs::kMouseDeviceImpostersListPref, + std::move(updated_imposters)); + imposter_false_positives_to_add.clear(); +} + template <> bool IsDeviceASuspectedImposter<mojom::KeyboardPtr>( BluetoothDevicesObserver* bluetooth_observer, @@ -166,6 +218,10 @@ break; } + if (IsMouseAKnownImposterFalsePositive(device)) { + return false; + } + // If the device is bluetooth, check the bluetooth device to see if it is a // mouse or mouse/keyboard combo. if (device.type == ui::INPUT_DEVICE_BLUETOOTH) { @@ -185,7 +241,11 @@ return true; } - return false; + if (!features::IsMouseImposterCheckEnabled()) { + return false; + } + + return device.suspected_mouse_imposter; } template <typename T> @@ -295,6 +355,35 @@ } template <> +void InputDeviceNotifier<mojom::MousePtr, ui::InputDevice>::HandleImposterPref( + const std::vector<ui::InputDevice>& updated_device_list) { + if (!features::IsMouseImposterCheckEnabled()) { + return; + } + + // Use a temporary set to store the device ids of imposter devices so devices + // get removed upon device disconnect. + base::flat_set<DeviceId> updated_imposter_devices; + for (const ui::InputDevice& device : updated_device_list) { + if (device.suspected_mouse_imposter) { + updated_imposter_devices.insert(device.id); + continue; + } + + // If the device is no longer an imposter and once was (which means it was + // in `mouse_imposter_devices_`) add it to our list of device keys to add to + // the known imposter list. + if (mouse_imposter_devices_.contains(device.id)) { + mouse_imposter_false_positives_to_add_.insert(BuildDeviceKey(device)); + } + } + mouse_imposter_devices_ = std::move(updated_imposter_devices); + + // Always try to add additional devices to the imposter pref list. + SaveMiceToImposterPref(mouse_imposter_false_positives_to_add_); +} + +template <> void InputDeviceNotifier<mojom::KeyboardPtr, ui::KeyboardDevice>:: HandleImposterPref( const std::vector<ui::KeyboardDevice>& updated_device_list) { @@ -308,16 +397,16 @@ } // If the device is no longer an imposter and once was (which means it was - // in `imposter_devices_`) add it to our list of device keys to add to the - // known imposter list. - if (imposter_devices_.contains(device.id)) { - imposter_false_positives_to_add_.insert(BuildDeviceKey(device)); + // in `keyboard_imposter_devices_`) add it to our list of device keys to add + // to the known imposter list. + if (keyboard_imposter_devices_.contains(device.id)) { + keyboard_imposter_false_positives_to_add_.insert(BuildDeviceKey(device)); } } - imposter_devices_ = std::move(updated_imposter_devices); + keyboard_imposter_devices_ = std::move(updated_imposter_devices); // Always try to add additional devices to the imposter pref list. - SaveKeyboardsToImposterPref(imposter_false_positives_to_add_); + SaveKeyboardsToImposterPref(keyboard_imposter_false_positives_to_add_); } template <typename MojomDevicePtr, typename InputDeviceType>
diff --git a/ash/system/input_device_settings/input_device_notifier.h b/ash/system/input_device_settings/input_device_notifier.h index b36062994..28e2613 100644 --- a/ash/system/input_device_settings/input_device_notifier.h +++ b/ash/system/input_device_settings/input_device_notifier.h
@@ -73,22 +73,32 @@ std::unique_ptr<BluetoothDevicesObserver> bluetooth_devices_observer_; - // The set of devices that were imposters last time devices were refreshed. - base::flat_set<DeviceId> imposter_devices_; + // The set of devices that were keyboard imposters last time devices were + // refreshed. + base::flat_set<DeviceId> keyboard_imposter_devices_; + // The set of devices that were mouse imposters last time devices were + // refreshed. + base::flat_set<DeviceId> mouse_imposter_devices_; // The set of device keys to add to the prefs. - base::flat_set<std::string> imposter_false_positives_to_add_; + base::flat_set<std::string> keyboard_imposter_false_positives_to_add_; + base::flat_set<std::string> mouse_imposter_false_positives_to_add_; }; // Below explicit template instantiations needed for all supported types. template <> -ASH_EXPORT std::vector<ui::KeyboardDevice> -InputDeviceNotifier<mojom::KeyboardPtr, - ui::KeyboardDevice>::GetUpdatedDeviceList(); -template <> ASH_EXPORT void InputDeviceNotifier<mojom::KeyboardPtr, ui::KeyboardDevice>::HandleImposterPref( const std::vector<ui::KeyboardDevice>& updated_device_list); template <> +ASH_EXPORT void +InputDeviceNotifier<mojom::MousePtr, ui::InputDevice>::HandleImposterPref( + const std::vector<ui::InputDevice>& updated_device_list); + +template <> +ASH_EXPORT std::vector<ui::KeyboardDevice> +InputDeviceNotifier<mojom::KeyboardPtr, + ui::KeyboardDevice>::GetUpdatedDeviceList(); +template <> ASH_EXPORT std::vector<ui::TouchpadDevice> InputDeviceNotifier<mojom::TouchpadPtr, ui::TouchpadDevice>::GetUpdatedDeviceList();
diff --git a/ash/system/input_device_settings/input_device_notifier_unittest.cc b/ash/system/input_device_settings/input_device_notifier_unittest.cc index 9011ffe..2aa51403 100644 --- a/ash/system/input_device_settings/input_device_notifier_unittest.cc +++ b/ash/system/input_device_settings/input_device_notifier_unittest.cc
@@ -704,4 +704,62 @@ raw_ptr<const device::BluetoothDevice, VectorExperimental>>())); } +TEST_F(InputDeviceMouseNotifierTest, ImpostersRemoved) { + ui::InputDevice imposter_mouse = kSampleMouseUsb; + imposter_mouse.vendor_id = 0x1234; + imposter_mouse.product_id = 0x5678; + imposter_mouse.suspected_mouse_imposter = true; + + ui::DeviceDataManagerTestApi().SetMouseDevices( + {imposter_mouse, kSampleMouseBluetooth}); + ASSERT_EQ(1u, devices_to_add_.size()); + EXPECT_EQ(kSampleMouseBluetooth.name, devices_to_add_[0].name); + EXPECT_EQ(kSampleMouseBluetooth.id, devices_to_add_[0].id); + + imposter_mouse.suspected_mouse_imposter = false; + ui::DeviceDataManagerTestApi().SetMouseDevices( + {imposter_mouse, kSampleMouseBluetooth}); + ASSERT_EQ(2u, devices_to_add_.size()); + EXPECT_EQ(imposter_mouse.name, devices_to_add_[0].name); + EXPECT_EQ(imposter_mouse.id, devices_to_add_[0].id); + EXPECT_EQ(kSampleMouseBluetooth.name, devices_to_add_[1].name); + EXPECT_EQ(kSampleMouseBluetooth.id, devices_to_add_[1].id); +} + +TEST_F(InputDeviceMouseNotifierTest, ImpostersRemembered) { + ui::InputDevice imposter_mouse = kSampleMouseUsb; + imposter_mouse.vendor_id = 0x1234; + imposter_mouse.product_id = 0x5678; + imposter_mouse.suspected_mouse_imposter = true; + + ui::DeviceDataManagerTestApi().SetMouseDevices( + {imposter_mouse, kSampleMouseBluetooth}); + ASSERT_EQ(1u, devices_to_add_.size()); + EXPECT_EQ(kSampleMouseBluetooth.name, devices_to_add_[0].name); + EXPECT_EQ(kSampleMouseBluetooth.id, devices_to_add_[0].id); + + // Remove imposter flag and make sure the notifier includes the old + // "imposter". + imposter_mouse.suspected_mouse_imposter = false; + ui::DeviceDataManagerTestApi().SetMouseDevices( + {imposter_mouse, kSampleMouseBluetooth}); + ASSERT_EQ(2u, devices_to_add_.size()); + EXPECT_EQ(imposter_mouse.name, devices_to_add_[0].name); + EXPECT_EQ(imposter_mouse.id, devices_to_add_[0].id); + EXPECT_EQ(kSampleMouseBluetooth.name, devices_to_add_[1].name); + EXPECT_EQ(kSampleMouseBluetooth.id, devices_to_add_[1].id); + + // Remove the imposter and then add it back and ensure it was remembered as + // being a previously valid device. + ui::DeviceDataManagerTestApi().SetMouseDevices({kSampleMouseBluetooth}); + imposter_mouse.suspected_mouse_imposter = true; + ui::DeviceDataManagerTestApi().SetMouseDevices( + {imposter_mouse, kSampleMouseBluetooth}); + ASSERT_EQ(2u, devices_to_add_.size()); + EXPECT_EQ(imposter_mouse.name, devices_to_add_[0].name); + EXPECT_EQ(imposter_mouse.id, devices_to_add_[0].id); + EXPECT_EQ(kSampleMouseBluetooth.name, devices_to_add_[1].name); + EXPECT_EQ(kSampleMouseBluetooth.id, devices_to_add_[1].id); +} + } // namespace ash
diff --git a/ash/system/input_device_settings/input_device_settings_controller_impl.cc b/ash/system/input_device_settings/input_device_settings_controller_impl.cc index 0513692..e757977 100644 --- a/ash/system/input_device_settings/input_device_settings_controller_impl.cc +++ b/ash/system/input_device_settings/input_device_settings_controller_impl.cc
@@ -692,6 +692,7 @@ prefs::kPointingStickUpdateSettingsMetricInfo); pref_registry->RegisterListPref(prefs::kKeyboardDeviceImpostersListPref); + pref_registry->RegisterListPref(prefs::kMouseDeviceImpostersListPref); pref_registry->RegisterDictionaryPref(prefs::kMouseButtonRemappingsDictPref); pref_registry->RegisterDictionaryPref( prefs::kGraphicsTabletTabletButtonRemappingsDictPref); @@ -719,6 +720,10 @@ void InputDeviceSettingsControllerImpl::OnActiveUserPrefServiceChanged( PrefService* pref_service) { + if (!features::IsMouseImposterCheckEnabled()) { + pref_service->ClearPref(prefs::kMouseDeviceImpostersListPref); + } + // If the flag is disabled, clear the button remapping dictionaries. if (!features::IsPeripheralCustomizationEnabled()) { pref_service->ClearPref( @@ -742,6 +747,7 @@ pref_service->SetDict(prefs::kPointingStickDeviceSettingsDictPref, {}); pref_service->SetDict(prefs::kTouchpadDeviceSettingsDictPref, {}); pref_service->SetList(prefs::kKeyboardDeviceImpostersListPref, {}); + pref_service->SetList(prefs::kMouseDeviceImpostersListPref, {}); pref_service->ClearPref(prefs::kKeyboardInternalSettings); pref_service->ClearPref(prefs::kKeyboardUpdateSettingsMetricInfo);
diff --git a/ash/system/input_device_settings/input_device_settings_pref_names.h b/ash/system/input_device_settings/input_device_settings_pref_names.h index be52962..a24638f 100644 --- a/ash/system/input_device_settings/input_device_settings_pref_names.h +++ b/ash/system/input_device_settings/input_device_settings_pref_names.h
@@ -73,6 +73,10 @@ // to be valid (ie false positives). inline constexpr char kKeyboardDeviceImpostersListPref[] = "settings.keyboard.imposter_false_positives"; +// Pref which contains a list of previously seen imposter mice that we know to +// be valid (ie false positives). +inline constexpr char kMouseDeviceImpostersListPref[] = + "settings.mouse.imposter_false_positives"; // Prefs which contain dictionaries of button remappings for each connected // device.
diff --git a/ash/system/keyboard_brightness/keyboard_brightness_controller.cc b/ash/system/keyboard_brightness/keyboard_brightness_controller.cc index 5803165a..a224674 100644 --- a/ash/system/keyboard_brightness/keyboard_brightness_controller.cc +++ b/ash/system/keyboard_brightness/keyboard_brightness_controller.cc
@@ -4,11 +4,25 @@ #include "ash/system/keyboard_brightness/keyboard_brightness_controller.h" +#include "base/logging.h" +#include "base/metrics/histogram_functions.h" #include "chromeos/dbus/power/power_manager_client.h" #include "chromeos/dbus/power_manager/backlight.pb.h" namespace ash { +KeyboardBrightnessController::KeyboardBrightnessController() { + chromeos::PowerManagerClient* power_manager_client = + chromeos::PowerManagerClient::Get(); + DCHECK(power_manager_client); + // Record whether the keyboard has a backlight for metric collection. + power_manager_client->HasKeyboardBacklight(base::BindOnce( + &KeyboardBrightnessController::OnReceiveHasKeyboardBacklight, + weak_ptr_factory_.GetWeakPtr())); +} + +KeyboardBrightnessController::~KeyboardBrightnessController() = default; + void KeyboardBrightnessController::HandleKeyboardBrightnessDown() { chromeos::PowerManagerClient::Get()->DecreaseKeyboardBrightness(); } @@ -40,4 +54,15 @@ std::move(callback)); } +void KeyboardBrightnessController::OnReceiveHasKeyboardBacklight( + std::optional<bool> has_keyboard_backlight) { + if (has_keyboard_backlight.has_value()) { + base::UmaHistogramBoolean("ChromeOS.Keyboard.HasBacklight", + has_keyboard_backlight.value()); + return; + } + LOG(ERROR) << "KeyboardBrightnessController: Failed to get the keyboard " + "backlight status"; +} + } // namespace ash
diff --git a/ash/system/keyboard_brightness/keyboard_brightness_controller.h b/ash/system/keyboard_brightness/keyboard_brightness_controller.h index 2da7b64..3bfa836 100644 --- a/ash/system/keyboard_brightness/keyboard_brightness_controller.h +++ b/ash/system/keyboard_brightness/keyboard_brightness_controller.h
@@ -5,8 +5,11 @@ #ifndef ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ #define ASH_SYSTEM_KEYBOARD_BRIGHTNESS_KEYBOARD_BRIGHTNESS_CONTROLLER_H_ +#include <optional> + #include "ash/ash_export.h" #include "ash/system/keyboard_brightness_control_delegate.h" +#include "base/memory/weak_ptr.h" namespace ash { @@ -15,14 +18,14 @@ class ASH_EXPORT KeyboardBrightnessController : public KeyboardBrightnessControlDelegate { public: - KeyboardBrightnessController() = default; + KeyboardBrightnessController(); // Disallow copy and move. KeyboardBrightnessController(const KeyboardBrightnessController&) = delete; KeyboardBrightnessController& operator=(const KeyboardBrightnessController&) = delete; - ~KeyboardBrightnessController() override = default; + ~KeyboardBrightnessController() override; private: // Overridden from KeyboardBrightnessControlDelegate: @@ -32,6 +35,9 @@ void HandleSetKeyboardBrightness(double percent, bool gradual) override; void HandleGetKeyboardBrightness( base::OnceCallback<void(std::optional<double>)> callback) override; + void OnReceiveHasKeyboardBacklight(std::optional<bool> has_backlight); + + base::WeakPtrFactory<KeyboardBrightnessController> weak_ptr_factory_{this}; }; } // namespace ash
diff --git a/ash/system/keyboard_brightness/keyboard_brightness_controller_unittest.cc b/ash/system/keyboard_brightness/keyboard_brightness_controller_unittest.cc new file mode 100644 index 0000000..aef7e00 --- /dev/null +++ b/ash/system/keyboard_brightness/keyboard_brightness_controller_unittest.cc
@@ -0,0 +1,73 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/system/keyboard_brightness/keyboard_brightness_controller.h" + +#include "ash/shell.h" +#include "ash/system/keyboard_brightness_control_delegate.h" +#include "ash/test/ash_test_base.h" +#include "base/metrics/histogram_functions.h" +#include "base/test/metrics/histogram_tester.h" + +namespace ash { + +class FakeKeyboardBrightnessControlDelegate + : public KeyboardBrightnessControlDelegate { + public: + FakeKeyboardBrightnessControlDelegate() = default; + ~FakeKeyboardBrightnessControlDelegate() override = default; + + // override methods: + void HandleKeyboardBrightnessDown() override {} + void HandleKeyboardBrightnessUp() override {} + void HandleToggleKeyboardBacklight() override {} + void HandleGetKeyboardBrightness( + base::OnceCallback<void(std::optional<double>)> callback) override { + std::move(callback).Run(keyboard_brightness_); + } + void HandleSetKeyboardBrightness(double percent, bool gradual) override { + keyboard_brightness_ = percent; + } + + double keyboard_brightness() { return keyboard_brightness_; } + + void OnReceiveHasKeyboardBacklight( + std::optional<bool> has_keyboard_backlight) { + if (has_keyboard_backlight.has_value()) { + base::UmaHistogramBoolean("ChromeOS.Keyboard.HasBacklight", + has_keyboard_backlight.value()); + } + } + + private: + double keyboard_brightness_ = 0; +}; + +class KeyboardBrightnessControllerTest : public AshTestBase { + public: + KeyboardBrightnessControllerTest() = default; + + void SetUp() override { + AshTestBase::SetUp(); + delegate_ = std::make_unique<FakeKeyboardBrightnessControlDelegate>(); + histogram_tester_ = std::make_unique<base::HistogramTester>(); + } + + void TearDown() override { + AshTestBase::TearDown(); + delegate_.reset(); + } + + protected: + std::unique_ptr<base::HistogramTester> histogram_tester_; + std::unique_ptr<FakeKeyboardBrightnessControlDelegate> delegate_; +}; + +TEST_F(KeyboardBrightnessControllerTest, RecordHasKeyboardBrightness) { + histogram_tester_->ExpectTotalCount("ChromeOS.Keyboard.HasBacklight", 0); + delegate_->OnReceiveHasKeyboardBacklight(std::optional<bool>(true)); + histogram_tester_->ExpectTotalCount("ChromeOS.Keyboard.HasBacklight", 1); +} + +} // namespace ash
diff --git a/ash/system/unified/date_tray_unittest.cc b/ash/system/unified/date_tray_unittest.cc index f7e03c62..17049ac 100644 --- a/ash/system/unified/date_tray_unittest.cc +++ b/ash/system/unified/date_tray_unittest.cc
@@ -614,10 +614,15 @@ ASSERT_TRUE(scroll_view); EXPECT_EQ(scroll_view->contents()->children().size(), 1u); - // Classroom student bubble is added. + // Classroom student bubble is added in TimeManagementContainer. glanceables_classroom_client()->RespondToPendingIsStudentRoleEnabledCallbacks( true); - EXPECT_EQ(scroll_view->contents()->children().size(), 2u); + EXPECT_EQ(scroll_view->contents()->children().size(), 1u); + EXPECT_STREQ("TimeManagementContainer", GetGlanceableTrayBubble() + ->GetBubbleView() + ->children() + .at(0) + ->GetClassName()); } TEST_P(DateTrayTest, EmptyClientsFallbackToLegacyDateBubble) {
diff --git a/ash/system/unified/glanceable_tray_bubble_view.cc b/ash/system/unified/glanceable_tray_bubble_view.cc index 5430923..859e4314 100644 --- a/ash/system/unified/glanceable_tray_bubble_view.cc +++ b/ash/system/unified/glanceable_tray_bubble_view.cc
@@ -95,6 +95,7 @@ BEGIN_METADATA(TimeManagementContainer) END_METADATA +// TODO(b/333770880): Remove `ContainerView`. // The view that parents glanceable bubbles. It's a flex layout view that // propagates child preferred size changes to the tray bubble view and the // container bounds changes to the bubble view. @@ -221,6 +222,7 @@ void GlanceableTrayBubbleView::InitializeContents() { CHECK(!initialized_); + // TODO(b/333770880): Remove `scroll_view_`. scroll_view_ = AddChildView(std::make_unique<views::ScrollView>( views::ScrollView::ScrollWithLayers::kEnabled)); scroll_view_->SetPaintToLayer(); @@ -382,12 +384,11 @@ } // Adds classroom bubble before `calendar_view_`. - auto* const scroll_contents = scroll_view_->contents(); - const auto calendar_view_index = - base::ranges::find(scroll_contents->children(), calendar_view_) - - scroll_contents->children().begin(); - classroom_bubble_student_view_ = scroll_contents->AddChildViewAt( - std::make_unique<GlanceablesClassroomStudentView>(), calendar_view_index); + MaybeCreateTimeManagementContainer(); + classroom_bubble_student_view_ = + time_management_container_view_->AddChildView( + std::make_unique<GlanceablesClassroomStudentView>()); + UpdateBubble(); AdjustChildrenFocusOrder(); } @@ -400,9 +401,7 @@ } // Add tasks bubble before everything. - time_management_container_view_ = - AddChildViewAt(std::make_unique<TimeManagementContainer>(), 0); - box_layout()->SetFlexForView(time_management_container_view_, 1); + MaybeCreateTimeManagementContainer(); tasks_bubble_view_ = time_management_container_view_->AddChildView( std::make_unique<GlanceablesTasksView>(task_lists)); UpdateBubble(); @@ -445,28 +444,22 @@ void GlanceableTrayBubbleView::AdjustChildrenFocusOrder() { const bool is_calendar_for_glanceables = features::IsGlanceablesV2CalendarViewEnabled(); + auto* default_focused_child = GetChildrenFocusList().front().get(); // Make sure the view that contains calendar is the first in the focus list of // glanceable views. Depending on whether GlanceablesV2CalendarView is - // enabled, the nearest common ancestor of the calendar view and other - // glanceables is `this`, or `scroll_view_->contents()`. + // enabled, `calendar_view_` could be either under `calendar_container_` or + // `scroll_view_`. Note that `calendar_view_` is the only view that could be + // created under `scroll_view_`. if (is_calendar_for_glanceables) { - auto* default_focused_child = GetChildrenFocusList().front().get(); if (default_focused_child != calendar_container_) { calendar_container_->InsertBeforeInFocusList(default_focused_child); } } else { - auto* default_focused_child = - scroll_view_->contents()->GetChildrenFocusList().front().get(); - if (default_focused_child != calendar_view_) { - calendar_view_->InsertBeforeInFocusList(default_focused_child); + if (default_focused_child != scroll_view_) { + scroll_view_->InsertBeforeInFocusList(default_focused_child); } } - - if (features::AreAnyGlanceablesTimeManagementViewsEnabled()) { - time_management_container_view_->InsertAfterInFocusList( - calendar_container_); - } } void GlanceableTrayBubbleView::SetCalendarPreferredSize() const { @@ -494,6 +487,14 @@ kMarginBetweenGlanceables); } +void GlanceableTrayBubbleView::MaybeCreateTimeManagementContainer() { + if (!time_management_container_view_) { + time_management_container_view_ = + AddChildViewAt(std::make_unique<TimeManagementContainer>(), 0); + box_layout()->SetFlexForView(time_management_container_view_, 1); + } +} + BEGIN_METADATA(GlanceableTrayBubbleView) END_METADATA
diff --git a/ash/system/unified/glanceable_tray_bubble_view.h b/ash/system/unified/glanceable_tray_bubble_view.h index 6d29067c..eb360ab3 100644 --- a/ash/system/unified/glanceable_tray_bubble_view.h +++ b/ash/system/unified/glanceable_tray_bubble_view.h
@@ -88,6 +88,9 @@ // initialization and when the `calendar_view_` height changes. void ClipScrollViewHeight(int screen_max_height) const; + // Creates `time_management_container_view_` if needed. + void MaybeCreateTimeManagementContainer(); + const raw_ptr<Shelf> shelf_; // Whether the bubble view has been initialized.
diff --git a/ash/system/video_conference/bubble/set_camera_background_view.cc b/ash/system/video_conference/bubble/set_camera_background_view.cc index 0c011fe..6e5a21a 100644 --- a/ash/system/video_conference/bubble/set_camera_background_view.cc +++ b/ash/system/video_conference/bubble/set_camera_background_view.cc
@@ -253,11 +253,18 @@ image = gfx::ImageSkiaOperations::CreateImageWithRoundRectClip( kSetCameraBackgroundViewRadius, image); - AddChildView(std::make_unique<RecentlyUsedImageButton>( - image, images_info[i].metadata, kRecentlyUsedImageButtonId[i], - base::BindRepeating(&RecentlyUsedBackgroundView::OnImageButtonClicked, - weak_factory_.GetWeakPtr(), i, - images_info[i].basename))); + auto recently_used_image_button = + std::make_unique<RecentlyUsedImageButton>( + image, images_info[i].metadata, kRecentlyUsedImageButtonId[i], + base::BindRepeating( + &RecentlyUsedBackgroundView::OnImageButtonClicked, + weak_factory_.GetWeakPtr(), i, images_info[i].basename)); + // If background replace is applied, then set first image as selected. + if (i == 0 && + GetCameraEffectsController()->GetCameraEffects()->replace_enabled) { + recently_used_image_button->SetSelected(true); + } + AddChildView(std::move(recently_used_image_button)); } // Because this is async, we need to update the ui when all images are
diff --git a/ash/webui/common/resources/sea_pen/sea_pen_controller.ts b/ash/webui/common/resources/sea_pen/sea_pen_controller.ts index 43cec751..f3297a5 100644 --- a/ash/webui/common/resources/sea_pen/sea_pen_controller.ts +++ b/ash/webui/common/resources/sea_pen/sea_pen_controller.ts
@@ -5,6 +5,7 @@ import {SeaPenImageId} from './constants.js'; import {MantaStatusCode, SeaPenFeedbackMetadata, SeaPenProviderInterface, SeaPenQuery, SeaPenThumbnail} from './sea_pen.mojom-webui.js'; import * as seaPenAction from './sea_pen_actions.js'; +import {logSeaPenImageSet} from './sea_pen_metrics_logger.js'; import {SeaPenStoreInterface} from './sea_pen_store.js'; import {isNonEmptyArray} from './sea_pen_utils.js'; @@ -36,6 +37,10 @@ success ? id : originalCurrentSelected)); } store.endBatchUpdate(); + + if (success) { + logSeaPenImageSet(/*source=*/ 'Recent'); + } } export async function searchSeaPenThumbnails( @@ -73,6 +78,7 @@ // Re-fetches the recent Sea Pen image if setting sea pen wallpaper // successfully, which means the file has been downloaded successfully. if (success) { + logSeaPenImageSet(/*source=*/ 'Create'); await fetchRecentSeaPenData(provider, store); } }
diff --git a/ash/webui/common/resources/sea_pen/sea_pen_metrics_logger.ts b/ash/webui/common/resources/sea_pen/sea_pen_metrics_logger.ts index 958aebe2..464dcec 100644 --- a/ash/webui/common/resources/sea_pen/sea_pen_metrics_logger.ts +++ b/ash/webui/common/resources/sea_pen/sea_pen_metrics_logger.ts
@@ -45,6 +45,12 @@ RecentImageActionMenuItem.MAX_VALUE + 1); } +export function logSeaPenImageSet(source: 'Create'|'Recent') { + const appName = isPersonalizationApp() ? 'Wallpaper' : 'VcBackground'; + chrome.metricsPrivate.recordBoolean( + `Ash.SeaPen.${appName}.${source}.ImageSet`, true); +} + export function logSeaPenVisited() { const appName = isPersonalizationApp() ? 'Wallpaper' : 'VcBackground'; chrome.metricsPrivate.recordBoolean(`Ash.SeaPen.${appName}.Visited`, true);
diff --git a/ash/webui/vc_background_ui/resources/index.html b/ash/webui/vc_background_ui/resources/index.html index 0429dbc..f030ae61 100644 --- a/ash/webui/vc_background_ui/resources/index.html +++ b/ash/webui/vc_background_ui/resources/index.html
@@ -12,7 +12,7 @@ margin: 0; } body.jelly-enabled { - background-color: var(--cros-sys-app_base_shaded); + background-color: var(--cros-bg-color); } </style> <link rel="stylesheet"
diff --git a/ash/webui/vc_background_ui/resources/js/vc_background_app.html b/ash/webui/vc_background_ui/resources/js/vc_background_app.html index e2432f5bf..4312827 100644 --- a/ash/webui/vc_background_ui/resources/js/vc_background_app.html +++ b/ash/webui/vc_background_ui/resources/js/vc_background_app.html
@@ -7,7 +7,7 @@ background-color: var(--cros-sys-app_base_shaded); display: grid; grid-template-areas: '. . breadcrumb . .'; - grid-template-columns: 1fr 10px minmax(568px, 920px) 10px 1fr; + grid-template-columns: 1fr 4px minmax(568px, 920px) 10px 1fr; grid-template-rows: var(--app-breadcrumb-height); position: sticky; top: 0;
diff --git a/ash/webui/vc_background_ui/resources/js/vc_background_breadcrumb_element.html b/ash/webui/vc_background_ui/resources/js/vc_background_breadcrumb_element.html index 8a05ab5..4cba430d 100644 --- a/ash/webui/vc_background_ui/resources/js/vc_background_breadcrumb_element.html +++ b/ash/webui/vc_background_ui/resources/js/vc_background_breadcrumb_element.html
@@ -5,7 +5,6 @@ display: flex; flex-flow: row nowrap; height: 100%; - padding: 0 10px; } #selector {
diff --git a/ash/wm/overview/overview_grid.cc b/ash/wm/overview/overview_grid.cc index 34ebf66..c3aeaf97 100644 --- a/ash/wm/overview/overview_grid.cc +++ b/ash/wm/overview/overview_grid.cc
@@ -20,6 +20,7 @@ #include "ash/public/cpp/shelf_config.h" #include "ash/public/cpp/window_properties.h" #include "ash/resources/vector_icons/vector_icons.h" +#include "ash/root_window_controller.h" #include "ash/rotator/screen_rotation_animator.h" #include "ash/screen_util.h" #include "ash/shelf/shelf.h"
diff --git a/ash/wm/snap_group/snap_group_controller.cc b/ash/wm/snap_group/snap_group_controller.cc index d2c2817c..5237ae5 100644 --- a/ash/wm/snap_group/snap_group_controller.cc +++ b/ash/wm/snap_group/snap_group_controller.cc
@@ -127,12 +127,16 @@ bool SnapGroupController::OnSnappingWindow( aura::Window* to_be_snapped_window, WindowSnapActionSource snap_action_source) { - // Early return when `snap_action_source` originates from - // `kDragOrSelectOverviewWindowToSnap` to avoid snap-to-replace within another - // snap group in Overview. + // Early return when + // 1. In tablet mode; + // 2. `snap_action_source` originates from `kDragOrSelectOverviewWindowToSnap` + // to avoid snap-to-replace within another snap group in Overview; + // 3. `to_be_snapped_window` belongs to a snap group, this can happen when + // moving a snap group to another desk with snap groups. if (display::Screen::GetScreen()->InTabletMode() || snap_action_source == - WindowSnapActionSource::kDragOrSelectOverviewWindowToSnap) { + WindowSnapActionSource::kDragOrSelectOverviewWindowToSnap || + GetSnapGroupForGivenWindow(to_be_snapped_window)) { return false; }
diff --git a/ash/wm/snap_group/snap_group_unittest.cc b/ash/wm/snap_group/snap_group_unittest.cc index a92ed35..58feada 100644 --- a/ash/wm/snap_group/snap_group_unittest.cc +++ b/ash/wm/snap_group/snap_group_unittest.cc
@@ -16,10 +16,12 @@ #include "ash/display/window_tree_host_manager.h" #include "ash/keyboard/ui/keyboard_ui_controller.h" #include "ash/public/cpp/accelerators.h" +#include "ash/public/cpp/shelf_types.h" #include "ash/public/cpp/test/shell_test_api.h" #include "ash/public/cpp/window_properties.h" #include "ash/root_window_controller.h" #include "ash/screen_util.h" +#include "ash/shelf/shelf.h" #include "ash/shell.h" #include "ash/shell_delegate.h" #include "ash/style/close_button.h" @@ -285,6 +287,8 @@ union_bounds.Union(w2_bounds); const auto divider_bounds = divider->GetDividerBoundsInScreen(/*is_dragging=*/false); + EXPECT_FALSE(w1_bounds.Contains(divider_bounds)); + EXPECT_FALSE(w2_bounds.Contains(divider_bounds)); EXPECT_FALSE(w1_bounds.Intersects(divider_bounds)); EXPECT_FALSE(w2_bounds.Intersects(divider_bounds)); union_bounds.Union(divider_bounds); @@ -2599,6 +2603,49 @@ } } +// Tests that window and divider boundaries adjust correctly with shelf +// auto-hide behavior change. +TEST_F(SnapGroupTest, SnapGroupDividerBoundsWithShelfAutoHideBehaviorChange) { + std::unique_ptr<aura::Window> w1(CreateAppWindow()); + std::unique_ptr<aura::Window> w2(CreateAppWindow()); + SnapTwoTestWindows(w1.get(), w2.get()); + + SplitViewDivider* divider = snap_group_divider(); + auto* divider_widget = divider->divider_widget(); + ASSERT_TRUE(divider_widget); + + Shelf* shelf = GetPrimaryShelf(); + ASSERT_EQ(shelf->auto_hide_behavior(), ShelfAutoHideBehavior::kNever); + + shelf->SetAutoHideBehavior(ShelfAutoHideBehavior::kAlways); + EXPECT_EQ(divider_widget->GetWindowBoundsInScreen().height(), + work_area_bounds().height()); + UnionBoundsEqualToWorkAreaBounds(w1.get(), w2.get(), divider); +} + +// Tests that snapped windows and divider bounds adjust correctly when shelf +// alignment changes. +TEST_F(SnapGroupTest, SnapGroupDividerBoundsWithShelfAlignmentChange) { + std::unique_ptr<aura::Window> w1(CreateAppWindow()); + std::unique_ptr<aura::Window> w2(CreateAppWindow()); + SnapTwoTestWindows(w1.get(), w2.get()); + + SplitViewDivider* divider = snap_group_divider(); + auto* divider_widget = divider->divider_widget(); + ASSERT_TRUE(divider_widget); + + Shelf* shelf = GetPrimaryShelf(); + ASSERT_EQ(shelf->alignment(), ShelfAlignment::kBottom); + for (auto alignment : {ShelfAlignment::kLeft, ShelfAlignment::kRight, + ShelfAlignment::kBottom}) { + shelf->SetAlignment(alignment); + const gfx::Rect divider_bounds = divider_widget->GetWindowBoundsInScreen(); + EXPECT_EQ(divider_bounds.x(), w1->GetBoundsInScreen().right()); + EXPECT_EQ(divider_bounds.right(), w2->GetBoundsInScreen().x()); + UnionBoundsEqualToWorkAreaBounds(w1.get(), w2.get(), divider); + } +} + // Tests to verify that when a window is dragged out of a snap group and onto // another display, it snaps correctly with accurate bounds on the destination // display. See regression at http://b/331663949. @@ -3690,6 +3737,65 @@ SnapGroupController::Get()->AreWindowsInSnapGroup(w0.get(), w1.get())); } +// Test: Dragging an `OverviewGroupItem` between desk containers (both +// containing `OverviewGroupItem`) +// - Verify that an `OverviewGroupItem` can be dragged from one desk container +// to another when both containers already have `OverviewGroupItem` present. +// - Ensure no crashes occur during the process. +// - Confirm that the OverviewGroupItem is reparented to the new desk +// container. +// See http://b/333613078 for more details about the crash. +TEST_F(SnapGroupTest, DragOverviewGroupItemToAnotherDeskWithSnapGroup) { + auto* desks_controller = DesksController::Get(); + desks_controller->NewDesk(DesksCreationRemovalSource::kButton); + ASSERT_EQ(2u, desks_controller->desks().size()); + const Desk* desk0 = desks_controller->GetDeskAtIndex(0); + const Desk* desk1 = desks_controller->GetDeskAtIndex(1); + + std::unique_ptr<aura::Window> w0(CreateAppWindow(gfx::Rect(0, 0, 300, 300))); + std::unique_ptr<aura::Window> w1( + CreateAppWindow(gfx::Rect(500, 20, 200, 200))); + SnapTwoTestWindows(w0.get(), w1.get()); + ASSERT_EQ(desks_util::GetDeskForContext(w0.get()), desk0); + ASSERT_EQ(desks_util::GetDeskForContext(w1.get()), desk0); + + ActivateDesk(desk1); + std::unique_ptr<aura::Window> w2(CreateAppWindow(gfx::Rect(0, 0, 100, 100))); + std::unique_ptr<aura::Window> w3( + CreateAppWindow(gfx::Rect(200, 20, 100, 200))); + SnapTwoTestWindows(w2.get(), w3.get()); + ASSERT_EQ(desks_util::GetDeskForContext(w2.get()), desk1); + ASSERT_EQ(desks_util::GetDeskForContext(w3.get()), desk1); + + OverviewController* overview_controller = OverviewController::Get(); + overview_controller->StartOverview(OverviewStartAction::kOverviewButton); + ASSERT_TRUE(overview_controller->InOverviewSession()); + + auto* overview_grid = GetOverviewGridForRoot(Shell::GetPrimaryRootWindow()); + ASSERT_TRUE(overview_grid); + const auto* desks_bar_view = overview_grid->desks_bar_view(); + ASSERT_TRUE(desks_bar_view); + const auto& mini_views = desks_bar_view->mini_views(); + ASSERT_EQ(mini_views.size(), 2u); + + // Test that both windows contained in the overview group item will be moved + // to the `desk0` and no crash on activating `desk0`. + DragGroupItemToPoint( + overview_controller->overview_session()->GetOverviewItemForWindow( + w3.get()), + mini_views[0]->GetBoundsInScreen().CenterPoint(), GetEventGenerator(), + /*by_touch_gestures=*/false, + /*drop=*/true); + EXPECT_TRUE(overview_controller->InOverviewSession()); + EXPECT_EQ(desks_util::GetDeskForContext(w2.get()), desk0); + EXPECT_EQ(desks_util::GetDeskForContext(w3.get()), desk0); + EXPECT_TRUE( + SnapGroupController::Get()->AreWindowsInSnapGroup(w0.get(), w1.get())); + EXPECT_TRUE( + SnapGroupController::Get()->AreWindowsInSnapGroup(w2.get(), w3.get())); + ActivateDesk(desk0); +} + // Tests that the hit area of the snap group divider can be outside of its // bounds with the extra insets whose value is `kSplitViewDividerExtraInset`. TEST_F(SnapGroupTest, SnapGroupDividerEnlargedHitArea) {
diff --git a/ash/wm/splitview/split_view_controller.cc b/ash/wm/splitview/split_view_controller.cc index 4a6c187b..515c983 100644 --- a/ash/wm/splitview/split_view_controller.cc +++ b/ash/wm/splitview/split_view_controller.cc
@@ -1184,7 +1184,8 @@ void SplitViewController::OnWindowRemovingFromRootWindow( aura::Window* window, aura::Window* new_root) { - if (new_root != root_window_) { + if (new_root) { + // Detach the window first to stop ongoing divider animations. OnSnappedWindowDetached(window, WindowDetachedReason::kWindowMovedToAnotherDisplay); } @@ -2235,9 +2236,10 @@ to_be_activated_window_ = nullptr; } - const bool is_window_destroyed_or_moved = - reason == WindowDetachedReason::kWindowDestroyed || + const bool is_window_moved = reason == WindowDetachedReason::kWindowMovedToAnotherDisplay; + const bool is_window_destroyed_or_moved = + reason == WindowDetachedReason::kWindowDestroyed || is_window_moved; const SnapPosition position_of_snapped_window = GetPositionOfSnappedWindow(window); @@ -2280,6 +2282,11 @@ EndSplitView(reason == WindowDetachedReason::kWindowDragged ? EndReason::kWindowDragStarted : EndReason::kNormal); + if (is_window_moved) { + // If the snapped window is being moved to another display, end overview. + Shell::Get()->overview_controller()->EndOverview( + OverviewEndAction::kSplitView); + } } else { DCHECK(InTabletSplitViewMode()); aura::Window* other_window =
diff --git a/ash/wm/splitview/split_view_controller_unittest.cc b/ash/wm/splitview/split_view_controller_unittest.cc index 5c6ea9a..edc4201 100644 --- a/ash/wm/splitview/split_view_controller_unittest.cc +++ b/ash/wm/splitview/split_view_controller_unittest.cc
@@ -4030,6 +4030,100 @@ w2->GetBoundsInScreen()); } +// Tests that using the shortcut to move the snapped window to another display +// works as intended. +TEST_F(SplitViewControllerTest, MoveWindowToDisplayShortcut) { + Shell::Get()->tablet_mode_controller()->SetEnabledForTest(false); + UpdateDisplay("1200x900,800x600"); + display::test::DisplayManagerTestApi display_manager_test(display_manager()); + + std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 200, 200))); + std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 200, 200))); + + // Also create `w3` and `w4` on each display so we can start partial overview. + std::unique_ptr<aura::Window> w3(CreateTestWindow(gfx::Rect(0, 0, 200, 200))); + std::unique_ptr<aura::Window> w4( + CreateTestWindow(gfx::Rect(1200, 0, 200, 200))); + + auto* split_view_controller1 = + SplitViewController::Get(Shell::GetPrimaryRootWindow()); + auto* split_view_controller2 = + SplitViewController::Get(Shell::GetRootWindowForDisplayId( + display_manager_test.GetSecondaryDisplay().id())); + auto* overview_controller = OverviewController::Get(); + + // Test for both setups. + enum class TestCase { kFasterSplitScreenSetup, kOverviewDragToSnap }; + const auto kTestCases = {TestCase::kFasterSplitScreenSetup, + TestCase::kOverviewDragToSnap}; + + for (const auto kTestCase : kTestCases) { + // 1 - Snap `w1` to primary on display 1. + if (kTestCase == TestCase::kOverviewDragToSnap) { + ToggleOverview(); + ASSERT_TRUE(overview_controller->InOverviewSession()); + } + split_view_controller1->SnapWindow( + w1.get(), SnapPosition::kPrimary, + WindowSnapActionSource::kDragWindowToEdgeToSnap); + + // Expect we start splitview on root 1 but not root 2. + if (faster_split_screen_enabled()) { + EXPECT_TRUE(overview_controller->InOverviewSession()); + EXPECT_TRUE(split_view_controller1->InSplitViewMode()); + EXPECT_FALSE(split_view_controller2->InSplitViewMode()); + } + + // Use the shortcut ALT+SEARCH+M to move `w1` to display 2. + wm::ActivateWindow(w1.get()); + PressAndReleaseKey(ui::VKEY_M, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN); + const gfx::Rect work_area2 = + display_manager_test.GetSecondaryDisplay().work_area(); + EXPECT_EQ(gfx::Rect(work_area2.x(), 0, work_area2.width() / 2, + work_area2.height()), + w1->GetBoundsInScreen()); + + // Expect we ended overview and splitview. + if (faster_split_screen_enabled()) { + EXPECT_FALSE(OverviewController::Get()->InOverviewSession()); + EXPECT_FALSE(split_view_controller1->InSplitViewMode()); + EXPECT_FALSE(split_view_controller2->InSplitViewMode()); + } + + // 2 - Snap `w1` to secondary on display 2. + if (kTestCase == TestCase::kOverviewDragToSnap) { + ToggleOverview(); + ASSERT_TRUE(overview_controller->InOverviewSession()); + } + split_view_controller2->SnapWindow( + w1.get(), SnapPosition::kSecondary, + WindowSnapActionSource::kDragWindowToEdgeToSnap); + + // Expect we start splitview on root 2 but not root 1. + if (faster_split_screen_enabled()) { + EXPECT_TRUE(OverviewController::Get()->InOverviewSession()); + EXPECT_FALSE(split_view_controller1->InSplitViewMode()); + EXPECT_TRUE(split_view_controller2->InSplitViewMode()); + } + + // Use the shortcut ALT+SEARCH+M to move `w1` to display 1. + wm::ActivateWindow(w1.get()); + PressAndReleaseKey(ui::VKEY_M, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN); + const gfx::Rect work_area1 = + display::Screen::GetScreen()->GetPrimaryDisplay().work_area(); + EXPECT_EQ(gfx::Rect(work_area1.width() / 2, 0, work_area1.width() / 2, + work_area1.height()), + w1->GetBoundsInScreen()); + + // Expect we ended overview and splitview. + if (faster_split_screen_enabled()) { + EXPECT_FALSE(OverviewController::Get()->InOverviewSession()); + EXPECT_FALSE(split_view_controller2->InSplitViewMode()); + EXPECT_FALSE(split_view_controller1->InSplitViewMode()); + } + } +} + // The test class that enables the feature flag of portrait mode split view // virtual keyboard improvement and the virtual keyboard. class SplitViewKeyboardTest : public SplitViewControllerTest {
diff --git a/ash/wm/splitview/split_view_divider.cc b/ash/wm/splitview/split_view_divider.cc index 1201353..62fe8eb 100644 --- a/ash/wm/splitview/split_view_divider.cc +++ b/ash/wm/splitview/split_view_divider.cc
@@ -299,10 +299,11 @@ } gfx::Rect SplitViewDivider::GetDividerBoundsInScreen(bool is_dragging) { + auto* root_window = GetRootWindow(); const gfx::Rect work_area_bounds_in_screen = - GetWorkAreaBoundsInScreen(divider_widget_->GetNativeWindow()); + GetWorkAreaBoundsInScreen(root_window); return GetDividerBoundsInScreen(work_area_bounds_in_screen, - IsLayoutHorizontal(GetRootWindow()), + IsLayoutHorizontal(root_window), divider_position_, is_dragging); } @@ -337,6 +338,7 @@ transient_manager->transient_children()) { StartObservingTransientChild(transient_window); } + RefreshDividerState(/*observed_windows_changed=*/true); } @@ -470,6 +472,17 @@ StopObservingTransientChild(transient); } +void SplitViewDivider::OnDisplayMetricsChanged(const display::Display& display, + uint32_t metrics) { + if (!(metrics & + (DISPLAY_METRIC_BOUNDS | DISPLAY_METRIC_ROTATION | + DISPLAY_METRIC_DEVICE_SCALE_FACTOR | DISPLAY_METRIC_WORK_AREA))) { + return; + } + + UpdateDividerBounds(); +} + void SplitViewDivider::RefreshDividerState(bool observed_windows_changed) { // Avoid any recursive updates. if (is_refreshing_state_) { @@ -572,6 +585,7 @@ if (auto* transient_parent = wm::GetTransientParent(divider_window)) { wm::RemoveTransientChild(transient_parent, divider_window); } + // During the asynchronous window closing, there may be a duration when the // divider widget is closing, but the pointer to `this` is not cleared in // `SplitViewDividerView` yet, i.e. in `Layout()` which is called during
diff --git a/ash/wm/splitview/split_view_divider.h b/ash/wm/splitview/split_view_divider.h index def32d8..a3a6fb75 100644 --- a/ash/wm/splitview/split_view_divider.h +++ b/ash/wm/splitview/split_view_divider.h
@@ -10,6 +10,7 @@ #include "base/scoped_multi_source_observation.h" #include "ui/aura/window.h" #include "ui/aura/window_observer.h" +#include "ui/display/display_observer.h" #include "ui/views/widget/widget_observer.h" #include "ui/wm/core/transient_window_observer.h" @@ -32,7 +33,8 @@ // always be placed above its observed windows to be able to receive events // unless it's being dragged. class ASH_EXPORT SplitViewDivider : public aura::WindowObserver, - public ::wm::TransientWindowObserver { + public wm::TransientWindowObserver, + public display::DisplayObserver { public: // The split view resize behavior in tablet mode. The normal mode resizes // windows on drag events. In the fast mode, windows are instead moved. A @@ -148,6 +150,10 @@ void OnTransientChildRemoved(aura::Window* window, aura::Window* transient) override; + // display::DisplayObserver: + void OnDisplayMetricsChanged(const display::Display& display, + uint32_t metrics) override; + SplitViewDividerView* divider_view_for_testing() { return divider_view_; } private: @@ -234,6 +240,8 @@ // True *while* a resize event is being processed. bool processing_resize_event_ = false; + + display::ScopedDisplayObserver display_observer_{this}; }; } // namespace ash
diff --git a/ash/wm/splitview/split_view_divider_view.cc b/ash/wm/splitview/split_view_divider_view.cc index 97c4c59..3e73a89 100644 --- a/ash/wm/splitview/split_view_divider_view.cc +++ b/ash/wm/splitview/split_view_divider_view.cc
@@ -109,6 +109,7 @@ } SetBoundsRect(GetLocalBounds()); + RefreshFeedbackButtonBounds(); divider_handler_view_->Refresh(divider_->is_resizing_with_divider()); }
diff --git a/ash/wm/window_restore/pine_app_image_view.cc b/ash/wm/window_restore/pine_app_image_view.cc index 526a6e0..1edaf16 100644 --- a/ash/wm/window_restore/pine_app_image_view.cc +++ b/ash/wm/window_restore/pine_app_image_view.cc
@@ -5,10 +5,12 @@ #include "ash/wm/window_restore/pine_app_image_view.h" #include "ash/public/cpp/saved_desk_delegate.h" +#include "ash/resources/vector_icons/vector_icons.h" #include "ash/shell.h" #include "ash/wm/window_restore/pine_constants.h" #include "components/services/app_service/public/cpp/app_registry_cache_wrapper.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/chromeos/styles/cros_tokens_color_mappings.h" #include "ui/views/background.h" namespace ash { @@ -58,6 +60,11 @@ SetImageSize(GetImageSizeForType(type_)); SetPreferredSize(GetPreferredSizeForType(type_)); + // Set a default image that may be replaced when the app icon is fetched + // and/or the app is installed. + SetImage(ui::ImageModel::FromVectorIcon(kDefaultAppIcon, + cros_tokens::kCrosSysPrimary)); + if (type_ == Type::kItem) { SetBackground(views::CreateThemedRoundedRectBackground( pine::kIconBackgroundColorId, kItemIconBackgroundRounding)); @@ -102,8 +109,10 @@ } void PineAppImageView::GetIconCallback(const gfx::ImageSkia& icon) { - // TODO(hewer): Add a default app icon if `icon` is null. - SetImage(ui::ImageModel::FromImageSkia(icon)); + // We don't want to replace the default icon if `icon` is null. + if (!icon.isNull()) { + SetImage(ui::ImageModel::FromImageSkia(icon)); + } } BEGIN_METADATA(PineAppImageView)
diff --git a/ash/wm/window_restore/pine_unittest.cc b/ash/wm/window_restore/pine_unittest.cc index f7713d5c5..bde8c6b 100644 --- a/ash/wm/window_restore/pine_unittest.cc +++ b/ash/wm/window_restore/pine_unittest.cc
@@ -47,9 +47,11 @@ #include "components/app_constants/constants.h" #include "components/services/app_service/public/cpp/app_registry_cache.h" #include "components/services/app_service/public/cpp/app_registry_cache_wrapper.h" +#include "ui/base/models/image_model.h" #include "ui/display/test/display_manager_test_api.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h" +#include "ui/gfx/image/image_unittest_util.h" #include "ui/views/controls/button/image_button.h" #include "ui/views/test/widget_test.h" #include "ui/views/view_utils.h" @@ -769,22 +771,28 @@ // Tests that `PineAppImageView` properly updates the displayed image when the // app with the given ID is installed. TEST_F(PineAppIconTest, UpdateAfterSessionStarted) { + // The intended icon for our test app. It should not be shown until the app is + // "updated". + gfx::ImageSkia test_icon = + CreateSolidColorTestImage(gfx::Size(1, 1), SK_ColorRED); const std::string test_id = "TEST_ID"; auto data = std::make_unique<PineContentsData>(); data->apps_infos.emplace_back(test_id, "TEST_TITLE"); StartPineOverviewSession(std::move(data)); - // The image should be empty before installation. + // The image view should show the default app icon before installation. const PineAppImageView* image_view = views::AsViewClass<PineAppImageView>( GetContentsView()->GetViewByID(pine::kItemImageViewID)); ASSERT_TRUE(image_view); - EXPECT_TRUE(image_view->GetImage().isNull()); + EXPECT_FALSE(image_view->GetImage().isNull()); + EXPECT_FALSE(gfx::test::AreImagesClose(gfx::Image(image_view->GetImage()), + gfx::Image(test_icon), + /*max_deviation=*/0)); // Update the test delegate to return a valid icon the next time one is // requested. - GetTestSavedDeskDelegate()->set_default_app_icon( - CreateSolidColorTestImage(gfx::Size(1, 1), SK_ColorRED)); + GetTestSavedDeskDelegate()->set_default_app_icon(test_icon); // Using the existing app ID, mark the app as ready, so `app_image_view` will // update with the new image. @@ -796,8 +804,11 @@ apps::AppType::kWeb, /*should_notify_initialized=*/false); - // The image should now be valid. + // The image view should now show our test image. EXPECT_FALSE(image_view->GetImage().isNull()); + EXPECT_TRUE(gfx::test::AreImagesClose(gfx::Image(image_view->GetImage()), + gfx::Image(test_icon), + /*max_deviation=*/0)); } } // namespace ash
diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc index 09eddf4..f5a9516c 100644 --- a/ash/wm/workspace/workspace_layout_manager.cc +++ b/ash/wm/workspace/workspace_layout_manager.cc
@@ -209,60 +209,6 @@ } ////////////////////////////////////////////////////////////////////////////// -// WorkspaceLayoutManager, ash::KeyboardControllerObserver implementation: - -void WorkspaceLayoutManager::OnKeyboardVisibleBoundsChanged( - const gfx::Rect& new_bounds) { - auto* keyboard_window = - keyboard::KeyboardUIController::Get()->GetKeyboardWindow(); - if (keyboard_window && keyboard_window->GetRootWindow() == root_window_) - MaybeUpdateA11yFloatingPanelOrPipBounds(); -} - -void WorkspaceLayoutManager::OnKeyboardDisplacingBoundsChanged( - const gfx::Rect& new_bounds_in_screen) { - aura::Window* window = window_util::GetActiveWindow(); - if (!window) - return; - - window = window->GetToplevelWindow(); - if (!window_->Contains(window)) - return; - - WindowState* window_state = WindowState::Get(window); - if (window_state->ignore_keyboard_bounds_change()) - return; - - if (!new_bounds_in_screen.IsEmpty()) { - // Store existing bounds to be restored before resizing for keyboard if it - // is not already stored. - if (!window_state->HasRestoreBounds()) - window_state->SaveCurrentBoundsForRestore(); - - gfx::Rect window_bounds(window->GetTargetBounds()); - ::wm::ConvertRectToScreen(window_, &window_bounds); - const int vertical_displacement = - std::max(0, window_bounds.bottom() - new_bounds_in_screen.y()); - const int shift = std::min( - vertical_displacement, - window_bounds.y() - - screen_util::GetDisplayWorkAreaBoundsInParent(window_).y()); - if (shift > 0) { - const gfx::Point origin(window_bounds.x(), window_bounds.y() - shift); - SetChildBounds(window, gfx::Rect(origin, window_bounds.size())); - } - } else if (window_state->IsNormalStateType() && - window_state->HasRestoreBounds()) { - // Keyboard hidden, restore original bounds if they exist. If the user has - // resized or dragged the window in the meantime, WorkspaceWindowResizer - // will have cleared the restore bounds and this code will not accidentally - // override user intent. Only do this for normal window states that use the - // restore bounds. - window_state->SetAndClearRestoreBounds(); - } -} - -////////////////////////////////////////////////////////////////////////////// // WorkspaceLayoutManager, aura::WindowObserver implementation: void WorkspaceLayoutManager::OnWindowHierarchyChanged( @@ -385,6 +331,65 @@ } ////////////////////////////////////////////////////////////////////////////// +// WorkspaceLayoutManager, ash::KeyboardControllerObserver implementation: + +void WorkspaceLayoutManager::OnKeyboardVisibleBoundsChanged( + const gfx::Rect& new_bounds) { + auto* keyboard_window = + keyboard::KeyboardUIController::Get()->GetKeyboardWindow(); + if (keyboard_window && keyboard_window->GetRootWindow() == root_window_) { + MaybeUpdateA11yFloatingPanelOrPipBounds(); + } +} + +void WorkspaceLayoutManager::OnKeyboardDisplacingBoundsChanged( + const gfx::Rect& new_bounds_in_screen) { + aura::Window* window = window_util::GetActiveWindow(); + if (!window) { + return; + } + + window = window->GetToplevelWindow(); + if (!window_->Contains(window)) { + return; + } + + WindowState* window_state = WindowState::Get(window); + if (window_state->ignore_keyboard_bounds_change()) { + return; + } + + if (!new_bounds_in_screen.IsEmpty()) { + // Store existing bounds to be restored before resizing for keyboard if it + // is not already stored. + if (!window_state->HasRestoreBounds()) { + window_state->SaveCurrentBoundsForRestore(); + } + + gfx::Rect window_bounds(window->GetTargetBounds()); + wm::ConvertRectToScreen(window_, &window_bounds); + const int vertical_displacement = + std::max(0, window_bounds.bottom() - new_bounds_in_screen.y()); + const int shift = std::min( + vertical_displacement, + window_bounds.y() - + screen_util::GetDisplayWorkAreaBoundsInParent(window_).y()); + if (shift > 0) { + const gfx::Point origin(window_bounds.x(), window_bounds.y() - shift); + SetChildBounds(window, gfx::Rect(origin, window_bounds.size())); + } + } else if (window_state->IsNormalStateType() && + window_state->HasRestoreBounds()) { + // Keyboard hidden, restore original bounds if they exist. If the user has + // resized or dragged the window in the meantime, WorkspaceWindowResizer + // will have cleared the restore bounds and this code will not accidentally + // override user intent. Only do this for normal window states that use the + // restore bounds. + window_state->SetAndClearRestoreBounds(); + } +} + +////////////////////////////////////////////////////////////////////////////// // WorkspaceLayoutManager, WindowStateObserver implementation: void WorkspaceLayoutManager::OnPostWindowStateTypeChange(
diff --git a/ash/wm/workspace/workspace_layout_manager.h b/ash/wm/workspace/workspace_layout_manager.h index 276e7cd7..d8ad7ec8 100644 --- a/ash/wm/workspace/workspace_layout_manager.h +++ b/ash/wm/workspace/workspace_layout_manager.h
@@ -27,18 +27,18 @@ namespace ash { -class RootWindowController; class BackdropController; +class RootWindowController; class WMEvent; // LayoutManager used on the window created for a workspace. class ASH_EXPORT WorkspaceLayoutManager : public aura::LayoutManager, public aura::WindowObserver, - public ::wm::ActivationChangeObserver, + public wm::ActivationChangeObserver, public KeyboardControllerObserver, + public WindowStateObserver, public display::DisplayObserver, public ShellObserver, - public WindowStateObserver, public ShelfObserver, public AppListControllerObserver { public: @@ -79,10 +79,9 @@ void OnWindowActivating(ActivationReason reason, aura::Window* gaining_active, aura::Window* losing_active) override; - void OnWindowActivated( - ::wm::ActivationChangeObserver::ActivationReason reason, - aura::Window* gained_active, - aura::Window* lost_active) override; + void OnWindowActivated(wm::ActivationChangeObserver::ActivationReason reason, + aura::Window* gained_active, + aura::Window* lost_active) override; // KeyboardControllerObserver: void OnKeyboardVisibleBoundsChanged(const gfx::Rect& new_bounds) override;
diff --git a/base/BUILD.gn b/base/BUILD.gn index c1c384e..283b7f0 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -1088,7 +1088,7 @@ defines += [ "IS_RAW_PTR_IMPL" ] if (build_rust_json_reader) { - deps += [ "//third_party/rust/serde_json_lenient/v0_1/wrapper" ] + deps += [ "//third_party/rust/serde_json_lenient/v0_2/wrapper" ] } # native_unwinder_android is intended for use solely via a dynamic feature
diff --git a/base/DEPS b/base/DEPS index 8b0e4b90..730ecaa3 100644 --- a/base/DEPS +++ b/base/DEPS
@@ -24,7 +24,7 @@ "+third_party/rust/cxx", "+third_party/test_fonts", # JSON Deserialization. - "+third_party/rust/serde_json_lenient/v0_1/wrapper", + "+third_party/rust/serde_json_lenient/v0_2/wrapper", # These are implicitly brought in from the root, and we don't want them. "-ipc",
diff --git a/base/android/junit/src/org/chromium/base/PostNativeFlagUnitTest.java b/base/android/junit/src/org/chromium/base/PostNativeFlagUnitTest.java index 03a5165..2c024789 100644 --- a/base/android/junit/src/org/chromium/base/PostNativeFlagUnitTest.java +++ b/base/android/junit/src/org/chromium/base/PostNativeFlagUnitTest.java
@@ -9,13 +9,13 @@ import static org.chromium.base.test.util.BaseFlagTestRule.FEATURE_B; import static org.chromium.base.test.util.BaseFlagTestRule.assertIsEnabledMatches; -import org.chromium.base.cached_flags.PostNativeFlag; -import org.chromium.base.test.util.BaseFlagTestRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +import org.chromium.base.cached_flags.PostNativeFlag; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.BaseFlagTestRule; /** Unit Tests for {@link PostNativeFlag}. */ @RunWith(BaseRobolectricTestRunner.class) @@ -31,6 +31,11 @@ @Test(expected = AssertionError.class) public void testNativeNotInitialized_throwAssertionError() { PostNativeFlag featureA = new PostNativeFlag(BaseFlagTestRule.FEATURE_MAP, FEATURE_A); + + // Disable test feature short circuit so it goes through the same code + // path as prod chrome. + FeatureList.setTestFeatures(null); + featureA.isEnabled(); }
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc index d149095..4406549 100644 --- a/base/json/json_parser.cc +++ b/base/json/json_parser.cc
@@ -86,7 +86,8 @@ kXEscape, kVerticalTabEscape, kControlCharacter, - kMaxValue = kControlCharacter, + kNewlineInString, + kMaxValue = kNewlineInString, }; const char kExtensionHistogramName[] = @@ -561,7 +562,15 @@ // quotation marks, except for the characters that MUST be escaped: // quotation mark, reverse solidus, and the control characters (U+0000 // through U+001F)". - if (next_char <= 0x1F) { + if (next_char == '\n' || next_char == '\r') { + UmaHistogramEnumeration(kExtensionHistogramName, + ChromiumJsonExtension::kNewlineInString); + if (!(options_ & + (JSON_ALLOW_NEWLINES_IN_STRINGS | JSON_ALLOW_CONTROL_CHARS))) { + ReportError(JSON_UNSUPPORTED_ENCODING, -1); + return false; + } + } else if (next_char <= 0x1F) { UmaHistogramEnumeration(kExtensionHistogramName, ChromiumJsonExtension::kControlCharacter); if (!(options_ & JSON_ALLOW_CONTROL_CHARS)) {
diff --git a/base/json/json_parser_unittest.cc b/base/json/json_parser_unittest.cc index 3985a700..fa8fe310 100644 --- a/base/json/json_parser_unittest.cc +++ b/base/json/json_parser_unittest.cc
@@ -327,6 +327,16 @@ parser.GetErrorMessage()); EXPECT_EQ(JSONParser::JSON_INVALID_ESCAPE, parser.error_code()); } + + { + JSONParser parser(JSON_PARSE_RFC); + std::optional<Value> value = parser.Parse("\"abc\ndef\""); + EXPECT_FALSE(value); + EXPECT_EQ( + JSONParser::FormatErrorMessage(1, 4, JSONParser::kUnsupportedEncoding), + parser.GetErrorMessage()); + EXPECT_EQ(JSONParser::JSON_UNSUPPORTED_ENCODING, parser.error_code()); + } } } // namespace internal
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc index ec86924..f34c851e22 100644 --- a/base/json/json_reader.cc +++ b/base/json/json_reader.cc
@@ -14,8 +14,8 @@ #if BUILDFLAG(BUILD_RUST_JSON_READER) #include "base/strings/string_piece_rust.h" -#include "third_party/rust/serde_json_lenient/v0_1/wrapper/functions.h" -#include "third_party/rust/serde_json_lenient/v0_1/wrapper/lib.rs.h" +#include "third_party/rust/serde_json_lenient/v0_2/wrapper/functions.h" +#include "third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs.h" #endif // BUILDFLAG(BUILD_RUST_JSON_READER) #include "base/json/json_parser.h" @@ -90,6 +90,7 @@ .replace_invalid_characters = (options & base::JSON_REPLACE_INVALID_CHARACTERS) != 0, .allow_comments = (options & base::JSON_ALLOW_COMMENTS) != 0, + .allow_newlines = (options & base::JSON_ALLOW_NEWLINES_IN_STRINGS) != 0, .allow_control_chars = (options & base::JSON_ALLOW_CONTROL_CHARS) != 0, .allow_vert_tab = (options & base::JSON_ALLOW_VERT_TAB) != 0, .allow_x_escapes = (options & base::JSON_ALLOW_X_ESCAPES) != 0,
diff --git a/base/json/json_reader.h b/base/json/json_reader.h index 5ab1f88..12701ffe 100644 --- a/base/json/json_reader.h +++ b/base/json/json_reader.h
@@ -74,14 +74,19 @@ // Permits \\xNN escapes as described above. JSON_ALLOW_X_ESCAPES = 1 << 5, + // Permits exactly \r and \n to occur in strings, which is normally not + // allowed; this is a subset of the behavior of JSON_ALLOW_CONTROL_CHARS. + JSON_ALLOW_NEWLINES_IN_STRINGS = 1 << 6, + // This parser historically accepted, without configuration flags, // non-standard JSON extensions. This flag enables that traditional parsing // behavior. // // This set of options is mirrored in Rust // base::JsonOptions::with_chromium_extensions(). - JSON_PARSE_CHROMIUM_EXTENSIONS = - JSON_ALLOW_COMMENTS | JSON_ALLOW_CONTROL_CHARS | JSON_ALLOW_X_ESCAPES, + JSON_PARSE_CHROMIUM_EXTENSIONS = JSON_ALLOW_COMMENTS | + JSON_ALLOW_NEWLINES_IN_STRINGS | + JSON_ALLOW_X_ESCAPES, }; class BASE_EXPORT JSONReader {
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc index 8b1194ee..6ef8d83 100644 --- a/base/json/json_reader_unittest.cc +++ b/base/json/json_reader_unittest.cc
@@ -851,12 +851,24 @@ // rejected. RFC 8259 section 7 says "the characters that MUST be escaped // [include]... the control characters (U+0000 through U+001F)". // - // Nonetheless, we accept them, for backwards compatibility. - const char json[] = {'"', 'a', '\0', 'b', '\n', 'c', '"'}; - std::optional<Value> root = JSONReader::Read(std::string(json, sizeof(json))); - ASSERT_TRUE(root); - ASSERT_TRUE(root->is_string()); - EXPECT_EQ(5u, root->GetString().length()); + // Currently, we accept \r and \n in JSON strings because they are widely used + // and somewhat useful (especially when nesting JSON messages), but reject all + // other control characters. + { + const char json[] = "\"a\rn\nc\""; + auto root = JSONReader::Read(json); + ASSERT_TRUE(root); + ASSERT_TRUE(root->is_string()); + EXPECT_EQ(5u, root->GetString().length()); + } + + { + // Replace the \r with a disallowed \f, and require parsing to fail: + const char json[] = "\"a\fn\nc\""; + auto root = JSONReader::ReadAndReturnValueWithError(json); + EXPECT_FALSE(root.has_value()); + EXPECT_NE("", root.error().message); + } } TEST_P(JSONReaderTest, MaxNesting) { @@ -1101,7 +1113,7 @@ SCOPED_TRACE(StringPrintf("case %u: \"%s\"", i, test_case.input)); auto root = JSONReader::ReadAndReturnValueWithError( - test_case.input, JSON_PARSE_RFC | JSON_ALLOW_CONTROL_CHARS); + test_case.input, JSON_PARSE_RFC | JSON_ALLOW_NEWLINES_IN_STRINGS); EXPECT_FALSE(root.has_value()); EXPECT_EQ(test_case.error_line, root.error().line); EXPECT_EQ(test_case.error_column, root.error().column); @@ -1120,12 +1132,8 @@ {"{ /* comment */ \"foo\": 3 }", JSON_ALLOW_COMMENTS}, {"{ // comment\n \"foo\": 3 }", JSON_ALLOW_COMMENTS}, {"[\"\\xAB\"]", JSON_ALLOW_X_ESCAPES}, - {"[\"\b\"]", JSON_ALLOW_CONTROL_CHARS}, - {"[\"\f\"]", JSON_ALLOW_CONTROL_CHARS}, - {"[\"\n\"]", JSON_ALLOW_CONTROL_CHARS}, - {"[\"\r\"]", JSON_ALLOW_CONTROL_CHARS}, - {"[\"\t\"]", JSON_ALLOW_CONTROL_CHARS}, - {"[\"\v\"]", JSON_ALLOW_CONTROL_CHARS}, + {"[\"\n\"]", JSON_ALLOW_NEWLINES_IN_STRINGS}, + {"[\"\r\"]", JSON_ALLOW_NEWLINES_IN_STRINGS}, }; for (size_t i = 0; i < std::size(kCases); ++i) { @@ -1150,6 +1158,32 @@ } } +// For every control character, place it unescaped in a string and ensure that: +// a) It doesn't parse with JSON_PARSE_RFC +// b) It doesn't parse with JSON_PARSE_CHROMIUM_EXTENSIONS +// c) It does parse with JSON_ALLOW_CONTROL_CHARS +TEST_P(JSONReaderTest, UnescapedControls) { + std::string input = "\"foo\""; + // ECMA-404 (JSON standard) section 9: characters from 0x00 to 0x1f must be + // escaped. + for (char c = 0x00; c <= 0x1f; c++) { + input[1] = c; + + auto result = JSONReader::Read(input, JSON_PARSE_RFC); + EXPECT_FALSE(result.has_value()); + + bool should_parse_with_extensions = (c == '\r' || c == '\n'); + result = JSONReader::Read(input, JSON_PARSE_CHROMIUM_EXTENSIONS); + EXPECT_EQ(should_parse_with_extensions, result.has_value()); + + result = JSONReader::Read(input, JSON_ALLOW_CONTROL_CHARS); + ASSERT_TRUE(result.has_value()); + ASSERT_TRUE(result->is_string()); + EXPECT_EQ(result->GetString().length(), input.length() - 2); + EXPECT_EQ(result->GetString()[0], c); + } +} + TEST_P(JSONReaderTest, UsingRust) { ASSERT_EQ(JSONReader::UsingRust(), using_rust_); }
diff --git a/base/task/post_job.h b/base/task/post_job.h index 582aa61..8864e55 100644 --- a/base/task/post_job.h +++ b/base/task/post_job.h
@@ -11,7 +11,7 @@ #include "base/dcheck_is_on.h" #include "base/functional/callback.h" #include "base/location.h" -#include "base/memory/raw_ptr.h" +#include "base/memory/stack_allocated.h" namespace base { namespace internal { @@ -26,6 +26,8 @@ // communicate with the scheduler. To prevent deadlocks, JobDelegate methods // should never be called while holding a user lock. class BASE_EXPORT JobDelegate { + STACK_ALLOCATED(); + public: // A JobDelegate is instantiated for each worker task that is run. // |task_source| is the task source whose worker task is running with this @@ -70,9 +72,8 @@ private: static constexpr uint8_t kInvalidTaskId = std::numeric_limits<uint8_t>::max(); - const raw_ptr<internal::JobTaskSource> task_source_; - const raw_ptr<internal::PooledTaskRunnerDelegate> - pooled_task_runner_delegate_; + internal::JobTaskSource* task_source_ = nullptr; + internal::PooledTaskRunnerDelegate* pooled_task_runner_delegate_ = nullptr; uint8_t task_id_ = kInvalidTaskId; #if DCHECK_IS_ON()
diff --git a/base/task/thread_pool/sequence.cc b/base/task/thread_pool/sequence.cc index e7117ce..e6aa6dac 100644 --- a/base/task/thread_pool/sequence.cc +++ b/base/task/thread_pool/sequence.cc
@@ -11,6 +11,7 @@ #include "base/feature_list.h" #include "base/functional/bind.h" #include "base/memory/ptr_util.h" +#include "base/memory/stack_allocated.h" #include "base/task/task_features.h" #include "base/time/time.h" @@ -22,19 +23,19 @@ // Asserts that a lock is acquired and annotates the scope such that // base/thread_annotations.h can recognize that the lock is acquired. class SCOPED_LOCKABLE AnnotateLockAcquired { + STACK_ALLOCATED(); + public: explicit AnnotateLockAcquired(const CheckedLock& lock) EXCLUSIVE_LOCK_FUNCTION(lock) : acquired_lock_(lock) { - acquired_lock_->AssertAcquired(); + acquired_lock_.AssertAcquired(); } - ~AnnotateLockAcquired() UNLOCK_FUNCTION() { - acquired_lock_->AssertAcquired(); - } + ~AnnotateLockAcquired() UNLOCK_FUNCTION() { acquired_lock_.AssertAcquired(); } private: - const raw_ref<const CheckedLock> acquired_lock_; + const CheckedLock& acquired_lock_; }; void MaybeMakeCriticalClosure(TaskShutdownBehavior shutdown_behavior,
diff --git a/base/task/thread_pool/task_source.h b/base/task/thread_pool/task_source.h index d1862210..565005af 100644 --- a/base/task/thread_pool/task_source.h +++ b/base/task/thread_pool/task_source.h
@@ -35,6 +35,9 @@ }; struct BASE_EXPORT ExecutionEnvironment { + STACK_ALLOCATED(); + + public: ExecutionEnvironment(SequenceToken token) : token(token) {} ExecutionEnvironment(SequenceToken token, @@ -53,9 +56,9 @@ ~ExecutionEnvironment(); const SequenceToken token; - const raw_ptr<SequenceLocalStorageMap> sequence_local_storage; - const raw_ptr<SingleThreadTaskRunner> single_thread_task_runner; - const raw_ptr<SequencedTaskRunner> sequenced_task_runner; + SequenceLocalStorageMap* const sequence_local_storage = nullptr; + SingleThreadTaskRunner* const single_thread_task_runner = nullptr; + SequencedTaskRunner* const sequenced_task_runner = nullptr; }; // A TaskSource is a virtual class that provides a series of Tasks that must be @@ -152,7 +155,7 @@ private: friend class TaskSource; - TaskSource* task_source_; + TaskSource* task_source_ = nullptr; }; // |traits| is metadata that applies to all Tasks in the TaskSource.
diff --git a/base/task/thread_pool/task_tracker.cc b/base/task/thread_pool/task_tracker.cc index 5a4cbdef..44f060e 100644 --- a/base/task/thread_pool/task_tracker.cc +++ b/base/task/thread_pool/task_tracker.cc
@@ -492,7 +492,7 @@ ScopedSetSequenceLocalStorageMapForCurrentThread scoped_set_sequence_local_storage_map_for_current_thread( environment.sequence_local_storage - ? environment.sequence_local_storage.get() + ? environment.sequence_local_storage : &local_storage_map.value()); // Set up TaskRunner CurrentDefaultHandle as expected for the scope of the @@ -505,12 +505,12 @@ DCHECK_EQ(TaskSourceExecutionMode::kSequenced, task_source->execution_mode()); sequenced_task_runner_current_default_handle.emplace( - environment.sequenced_task_runner.get()); + environment.sequenced_task_runner); } else if (environment.single_thread_task_runner) { DCHECK_EQ(TaskSourceExecutionMode::kSingleThread, task_source->execution_mode()); single_thread_task_runner_current_default_handle.emplace( - environment.single_thread_task_runner.get()); + environment.single_thread_task_runner); } else { DCHECK_NE(TaskSourceExecutionMode::kSequenced, task_source->execution_mode());
diff --git a/base/task/thread_pool/thread_group.h b/base/task/thread_pool/thread_group.h index 2274db3..6ea5bad0 100644 --- a/base/task/thread_pool/thread_group.h +++ b/base/task/thread_pool/thread_group.h
@@ -238,7 +238,7 @@ // RAW_PTR_EXCLUSION: Performance: visible in sampling profiler and stack // scoped, also a back-pointer to the owning object. - RAW_PTR_EXCLUSION ThreadGroup* outer_; + RAW_PTR_EXCLUSION ThreadGroup* outer_ = nullptr; protected: // Performs BaseScopedCommandsExecutor-related tasks, must be called in this
diff --git a/base/test/android/javatests/src/org/chromium/base/test/util/Features.java b/base/test/android/javatests/src/org/chromium/base/test/util/Features.java index ef3e0ae..8b3c639d 100644 --- a/base/test/android/javatests/src/org/chromium/base/test/util/Features.java +++ b/base/test/android/javatests/src/org/chromium/base/test/util/Features.java
@@ -12,10 +12,12 @@ import org.chromium.base.FeatureList; import org.chromium.base.cached_flags.CachedFlag; import org.chromium.base.cached_flags.CachedFlagUtils; +import org.chromium.base.test.util.AnnotationProcessingUtils.AnnotationExtractor; import java.lang.annotation.Annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.reflect.Method; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -74,9 +76,6 @@ * to {@link FeatureList}'s test values. */ public static class JUnitProcessor extends Processor { - public JUnitProcessor() { - super(EnableFeatures.class, DisableFeatures.class); - } @Override protected void collectFeatures() { @@ -101,9 +100,6 @@ * collected feature states are applied to {@link CommandLine}. */ public static class InstrumentationProcessor extends Processor { - public InstrumentationProcessor() { - super(EnableFeatures.class, DisableFeatures.class); - } @Override protected void collectFeatures() { @@ -134,6 +130,10 @@ super(firstAnnotationType, additionalTypes); } + public Processor() { + super(EnableFeatures.class, DisableFeatures.class); + } + @Override protected void before() { collectFeatures(); @@ -167,6 +167,19 @@ } /** + * Collect feature annotations form |testMethod| and apply them for robolectric tests. + * + * @param testMethod an @Test method from a Robolectric test. + */ + public void applyFeaturesFromTestMethodForRobolectric(Method testMethod) { + AnnotationExtractor annotationExtractor = + new AnnotationExtractor(EnableFeatures.class, DisableFeatures.class); + List<Annotation> annotations = annotationExtractor.getMatchingAnnotations(testMethod); + collectFeatures(annotations); + applyForJUnit(); + } + + /** * Explicitly applies features collected so far to the command line. Note: This is only valid * during instrumentation tests. TODO(dgn): remove once we have the compound test rule is * available to enable a deterministic rule execution order. @@ -218,6 +231,19 @@ mRegisteredState.clear(); } + /** Resets test fixtures for Feature flags after a Robolectric Test. */ + public static void resetAfterRobolectricTest() { + // Resets state that might persist in between tests. + FeatureList.setTestFeatures(null); + + resetCachedFlags(false); + + // sInstance may already be null if there are nested usages. + if (sInstance == null) return; + + sInstance.clearRegisteredState(); + } + /** * Updates the reference list of features held by the CommandLine by merging it with the feature * state registered via this utility.
diff --git a/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricAndroidConfigurer.java b/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricAndroidConfigurer.java index e80594c..a3ad61a 100644 --- a/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricAndroidConfigurer.java +++ b/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricAndroidConfigurer.java
@@ -10,6 +10,8 @@ import org.robolectric.internal.bytecode.InstrumentationConfiguration; import org.chromium.base.ResettersForTesting; +import org.chromium.base.test.util.Features.DisableFeatures; +import org.chromium.base.test.util.Features.EnableFeatures; import org.chromium.base.test.util.TimeoutTimer; import org.chromium.testing.local.ChromiumAndroidConfigurer; @@ -22,6 +24,9 @@ builder.doNotAcquireClass(BaseRobolectricTestRunner.HelperTestRunner.class) // Requires access to non-fake SystemClock. .doNotAcquireClass(TimeoutTimer.class) + // Annotations used by the test runner itself to set up feature flags. + .doNotAcquireClass(EnableFeatures.class) + .doNotAcquireClass(DisableFeatures.class) // Called from outside of sandbox classloader in BaseRobolectricTestRunner. .doNotAcquireClass(ResettersForTesting.class); }
diff --git a/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRule.java b/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRule.java index 199ad25..fa65e40 100644 --- a/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRule.java +++ b/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRule.java
@@ -25,6 +25,7 @@ import org.chromium.base.task.PostTask; import org.chromium.base.test.BaseRobolectricTestRunner.HelperTestRunner; import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.Features; import org.chromium.build.NativeLibraries; import java.lang.reflect.Method; @@ -86,6 +87,7 @@ BundleUtils.resetForTesting(); Flag.resetAllInMemoryCachedValuesForTesting(); FeatureParam.resetAllInMemoryCachedValuesForTesting(); + Features.getInstance().applyFeaturesFromTestMethodForRobolectric(method); } static void tearDown(boolean testFailed) { @@ -96,6 +98,7 @@ HelperTestRunner.sTestFailed = true; throw new RuntimeException(e); } finally { + Features.resetAfterRobolectricTest(); CommandLineFlags.tearDownMethod(); CommandLineFlags.tearDownClass(); ApplicationStatus.destroyForJUnitTests();
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h index e4703a3f9..998eb457 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h
@@ -362,6 +362,7 @@ class ScopedAllowBlockingForSettingGetter; namespace internal { class AddressTrackerLinux; +class PemFileCertStore; } } // namespace net namespace printing { @@ -633,6 +634,7 @@ friend class net::ProxyConfigServiceWin; // http://crbug.com/61453 friend class net:: ScopedAllowBlockingForSettingGetter; // http://crbug.com/69057 + friend class net::internal::PemFileCertStore; friend class printing::LocalPrinterHandlerDefault; friend class printing::PrintBackendServiceManager; friend class printing::PrintPreviewUIUntrusted;
diff --git a/base/win/windows_version.cc b/base/win/windows_version.cc index 4843a3c..2abd967 100644 --- a/base/win/windows_version.cc +++ b/base/win/windows_version.cc
@@ -204,8 +204,12 @@ case PRODUCT_ENTERPRISE_S_EVALUATION: case PRODUCT_ENTERPRISE_S_N: case PRODUCT_ENTERPRISE_S_N_EVALUATION: + case PRODUCT_ENTERPRISE_SUBSCRIPTION: + case PRODUCT_ENTERPRISE_SUBSCRIPTION_N: case PRODUCT_BUSINESS: case PRODUCT_BUSINESS_N: + case PRODUCT_IOTENTERPRISE: + case PRODUCT_IOTENTERPRISES: version_type_ = SUITE_ENTERPRISE; break; case PRODUCT_PRO_FOR_EDUCATION:
diff --git a/build/android/gyp/allot_native_libraries.py b/build/android/gyp/allot_native_libraries.py deleted file mode 100755 index 61daac2..0000000 --- a/build/android/gyp/allot_native_libraries.py +++ /dev/null
@@ -1,186 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright 2019 The Chromium Authors -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Allots libraries to modules to be packaged into. - -All libraries that are depended on by a single module will be allotted to this -module. All other libraries will be allotted to the closest ancestor. - -Example: - Given the module dependency structure - - c - / \ - b d - / \ - a e - - and libraries assignment - - a: ['lib1.so'] - e: ['lib2.so', 'lib1.so'] - - will make the allotment decision - - c: ['lib1.so'] - e: ['lib2.so'] - - The above example is invoked via: - - ./allot_native_libraries \ - --libraries 'a,["1.so"]' \ - --libraries 'e,["2.so", "1.so"]' \ - --dep c:b \ - --dep b:a \ - --dep c:d \ - --dep d:e \ - --output <output JSON> -""" - -import argparse -import collections -import json -import sys - -from util import build_utils -import action_helpers # build_utils adds //build to sys.path. - - -def _ModuleLibrariesPair(arg): - pos = arg.find(',') - assert pos > 0 - return (arg[:pos], arg[pos + 1:]) - - -def _DepPair(arg): - parent, child = arg.split(':') - return (parent, child) - - -def _PathFromRoot(module_tree, module): - """Computes path from root to a module. - - Parameters: - module_tree: Dictionary mapping each module to its parent. - module: Module to which to compute the path. - - Returns: - Path from root the the module. - """ - path = [module] - while module_tree.get(module): - module = module_tree[module] - path = [module] + path - return path - - -def _ClosestCommonAncestor(module_tree, modules): - """Computes the common ancestor of a set of modules. - - Parameters: - module_tree: Dictionary mapping each module to its parent. - modules: Set of modules for which to find the closest common ancestor. - - Returns: - The closest common ancestor. - """ - paths = [_PathFromRoot(module_tree, m) for m in modules] - assert len(paths) > 0 - ancestor = None - for level in zip(*paths): - if len(set(level)) != 1: - return ancestor - ancestor = level[0] - return ancestor - - -def _AllotLibraries(module_tree, libraries_map): - """Allot all libraries to a module. - - Parameters: - module_tree: Dictionary mapping each module to its parent. Modules can map - to None, which is considered the root of the tree. - libraries_map: Dictionary mapping each library to a set of modules, which - depend on the library. - - Returns: - A dictionary mapping mapping each module name to a set of libraries allotted - to the module such that libraries with multiple dependees are allotted to - the closest ancestor. - - Raises: - Exception if some libraries can only be allotted to the None root. - """ - allotment_map = collections.defaultdict(set) - for library, modules in libraries_map.items(): - ancestor = _ClosestCommonAncestor(module_tree, modules) - if not ancestor: - raise Exception('Cannot allot libraries for given dependency tree') - allotment_map[ancestor].add(library) - return allotment_map - - -def main(args): - parser = argparse.ArgumentParser() - parser.add_argument( - '--libraries', - action='append', - type=_ModuleLibrariesPair, - required=True, - help='A pair of module name and GN list of libraries a module depends ' - 'on. Can be specified multiple times.') - parser.add_argument( - '--output', - required=True, - help='A JSON file with a key for each module mapping to a list of ' - 'libraries, which should be packaged into this module.') - parser.add_argument( - '--dep', - action='append', - type=_DepPair, - dest='deps', - default=[], - help='A pair of parent module name and child module name ' - '(format: "<parent>:<child>"). Can be specified multiple times.') - options = parser.parse_args(build_utils.ExpandFileArgs(args)) - options.libraries = [(m, action_helpers.parse_gn_list(l)) - for m, l in options.libraries] - - # Parse input creating libraries and dependency tree. - libraries_map = collections.defaultdict(set) # Maps each library to its - # dependee modules. - module_tree = {} # Maps each module name to its parent. - for module, libraries in options.libraries: - module_tree[module] = None - for library in libraries: - libraries_map[library].add(module) - for parent, child in options.deps: - if module_tree.get(child): - raise Exception('%s cannot have multiple parents' % child) - module_tree[child] = parent - module_tree[parent] = module_tree.get(parent) - - # Allot all libraries to a module such that libraries with multiple dependees - # are allotted to the closest ancestor. - allotment_map = _AllotLibraries(module_tree, libraries_map) - - # The build system expects there to be a set of libraries even for the modules - # that don't have any libraries allotted. - for module in module_tree: - # Creates missing sets because of defaultdict. - allotment_map[module] = allotment_map[module] - - with open(options.output, 'w') as f: - # Write native libraries config and ensure the output is deterministic. - json.dump({m: sorted(l) - for m, l in allotment_map.items()}, - f, - sort_keys=True, - indent=2) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:]))
diff --git a/build/android/gyp/allot_native_libraries.pydeps b/build/android/gyp/allot_native_libraries.pydeps deleted file mode 100644 index aacaaff..0000000 --- a/build/android/gyp/allot_native_libraries.pydeps +++ /dev/null
@@ -1,7 +0,0 @@ -# Generated by running: -# build/print_python_deps.py --root build/android/gyp --output build/android/gyp/allot_native_libraries.pydeps build/android/gyp/allot_native_libraries.py -../../action_helpers.py -../../gn_helpers.py -allot_native_libraries.py -util/__init__.py -util/build_utils.py
diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py index 19c9e4bd..e4e9f68 100755 --- a/build/android/gyp/apkbuilder.py +++ b/build/android/gyp/apkbuilder.py
@@ -124,7 +124,9 @@ options.secondary_native_lib_placeholders = action_helpers.parse_gn_list( options.secondary_native_lib_placeholders) options.java_resources = action_helpers.parse_gn_list(options.java_resources) + logging.warning('Adding lib/ %r', options.native_libs) options.native_libs = action_helpers.parse_gn_list(options.native_libs) + logging.warning('Adding lib/ %r', options.native_libs) options.secondary_native_libs = action_helpers.parse_gn_list( options.secondary_native_libs) options.library_always_compress = action_helpers.parse_gn_list( @@ -373,6 +375,7 @@ apk_root_dir=apk_root_dir)) return ret + logging.warning('Adding lib/ %r', native_libs) libs_to_add = _GetNativeLibrariesToAdd(native_libs, options.android_abi, fast_align, options.library_always_compress) @@ -464,6 +467,7 @@ # 4. Native libraries. logging.debug('Adding lib/') + logging.warning('Adding lib/ %r', libs_to_add) _AddFiles(out_apk, libs_to_add) # Add a placeholder lib if the APK should be multi ABI but is missing libs
diff --git a/build/android/gyp/compile_java.py b/build/android/gyp/compile_java.py index 52522e4..b39b826 100755 --- a/build/android/gyp/compile_java.py +++ b/build/android/gyp/compile_java.py
@@ -766,6 +766,8 @@ # Do not warn about finalize() methods. Android still intends to support # them. '-Xlint:-removal', + # https://crbug.com/1441023 + '-J-XX:+PerfDisableSharedMem', ] if options.enable_errorprone:
diff --git a/build/config/android/abi.gni b/build/config/android/abi.gni index 580b9a6..09f0af80 100644 --- a/build/config/android/abi.gni +++ b/build/config/android/abi.gni
@@ -38,6 +38,7 @@ if (current_cpu == "x86") { android_app_abi = "x86" android_abi_target = "i686-linux-android" + sanitizer_arch = "i686" } else if (current_cpu == "arm") { import("//build/config/arm.gni") if (arm_version < 7) { @@ -46,18 +47,18 @@ android_app_abi = "armeabi-v7a" } android_abi_target = "arm-linux-androideabi" + sanitizer_arch = "arm" } else if (current_cpu == "mipsel") { android_app_abi = "mips" android_abi_target = "mipsel-linux-android" } else if (current_cpu == "x64") { android_app_abi = "x86_64" - - # Place holder for x64 support, not tested. - # TODO: Enable clang support for Android x64. http://crbug.com/539781 android_abi_target = "x86_64-linux-android" + sanitizer_arch = "x86_64" } else if (current_cpu == "arm64") { android_app_abi = "arm64-v8a" android_abi_target = "aarch64-linux-android" + sanitizer_arch = "aarch64" } else if (current_cpu == "mips64el") { android_app_abi = "mips64" @@ -68,6 +69,7 @@ # Place holder for riscv64 support, not tested. android_abi_target = "riscv64-linux-android" + sanitizer_arch = "riscv64" } else { assert(false, "Unknown Android ABI: " + current_cpu) }
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni index cd1bf6a..a186b00 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni
@@ -4422,8 +4422,6 @@ # this will always perform synchronized proguarding. template("create_android_app_bundle_module") { _rebased_build_config = rebase_path(invoker.build_config, root_build_dir) - _rebased_native_libraries_config = - rebase_path(invoker.native_libraries_config, root_build_dir) forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) _deps = invoker.deps @@ -4436,10 +4434,7 @@ # dependencies like extra native libraries are all pulled from the # .build_config.json through @FileArg() references (see below) and # will be listed in the generated depfile instead. - _inputs = [ - invoker.build_config, - invoker.native_libraries_config, - ] + _inputs = [ invoker.build_config ] _outputs = [ invoker.module_zip_path ] _args = [ "--format=bundle-module", @@ -4450,8 +4445,8 @@ "--assets=@FileArg($_rebased_build_config:assets)", "--uncompressed-assets=@FileArg(" + "$_rebased_build_config:uncompressed_assets)", - "--native-libs=@FileArg($_rebased_native_libraries_config" + - ":${invoker.module_name})", + "--native-libs=@FileArg($_rebased_build_config:native:libraries)", + "--native-libs=@FileArg($_rebased_build_config:native:loadable_modules)", "--native-lib-placeholders=@FileArg($_rebased_build_config" + ":native:native_library_placeholders)", "--secondary-native-lib-placeholders=@FileArg($_rebased_build_config" + @@ -4461,13 +4456,11 @@ "--library-always-compress=@FileArg($_rebased_build_config:native:library_always_compress)", ] if (defined(android_app_secondary_abi)) { - _rebased_secondary_abi_native_libraries_config = - rebase_path(invoker.secondary_abi_native_libraries_config, - root_build_dir) _args += [ - "--secondary-native-libs", - "@FileArg($_rebased_secondary_abi_native_libraries_config" + - ":${invoker.module_name})", + "--secondary-native-libs=@FileArg(" + + "$_rebased_build_config:native:secondary_abi_libraries)", + "--secondary-native-libs=@FileArg(" + + "$_rebased_build_config:native:secondary_abi_loadable_modules)", "--secondary-android-abi=$android_app_secondary_abi", ] } @@ -4503,16 +4496,8 @@ inputs = [ invoker.expected_libs_and_assets, invoker.build_config, - invoker.native_libraries_config, ] - deps = [ - invoker.build_config_target, - invoker.native_libraries_config_target, - ] - if (defined(android_app_secondary_abi)) { - inputs += [ invoker.secondary_abi_native_libraries_config ] - deps += [ invoker.secondary_abi_native_libraries_config_target ] - } + deps = [ invoker.build_config_target ] outputs = [ _actual_file, _failure_file, @@ -4553,52 +4538,3 @@ ] } } - -# Allots native libraries depended on by feature modules to the module the -# libraries should be packaged into. The packaging module may be different from -# the dependee module in case a library is depended on by multiple modules. In -# that case the library will be allotted to the closest ancestor given a module -# dependency tree (see |parent| below). -# -# Variables: -# modules: List of scopes with the following format: -# name: The module's name. -# parent: The module's parent's name. -# build_config: Path to the module's build config. -# build_config_target: Target creating |build_config|. -# native_libraries_filearg_keys: Keys to be used in -# @FileArg(|build_config|:<keys>) expressions pointing to a list of native -# libraries to consider in |build_config|. -# output: Path to native libraries config. -template("allot_native_libraries") { - action_with_pydeps(target_name) { - script = "//build/android/gyp/allot_native_libraries.py" - args = [ - "--output", - rebase_path(invoker.output, root_build_dir), - ] - outputs = [ invoker.output ] - deps = [] - if (defined(invoker.deps)) { - deps += invoker.deps - } - inputs = [] - foreach(_module, invoker.modules) { - deps += [ _module.build_config_target ] - inputs += [ _module.build_config ] - _rebased_build_config = rebase_path(_module.build_config, root_out_dir) - foreach(_key, invoker.native_libraries_filearg_keys) { - args += [ - "--libraries", - "${_module.name},@FileArg($_rebased_build_config:$_key)", - ] - } - if (defined(_module.parent)) { - args += [ - "--dep", - "${_module.parent}:${_module.name}", - ] - } - } - } -}
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index 9b127b6..a65ed43 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni
@@ -2,128 +2,123 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Do not add any imports to non-//build directories here. -# Some projects (e.g. V8) do not have non-build directories DEPS'ed in. -import("//build/config/android/config.gni") -import("//build/config/android/copy_ex.gni") -import("//build/config/clang/clang.gni") -import("//build/config/compiler/compiler.gni") -import("//build/config/coverage/coverage.gni") -import("//build/config/profiling/profiling.gni") -import("//build/config/python.gni") -import("//build/config/sanitizers/sanitizers.gni") -import("//build/config/zip.gni") -import("//build/toolchain/toolchain.gni") +import("//build_overrides/build.gni") + assert( is_android || is_robolectric, "current_toolchain=$current_toolchain default_toolchain=$default_toolchain") -if (target_cpu == "arm") { - _sanitizer_arch = "arm" -} else if (target_cpu == "arm64") { - _sanitizer_arch = "aarch64" -} else if (target_cpu == "x86") { - _sanitizer_arch = "i686" -} else if (target_cpu == "riscv64") { - _sanitizer_arch = "riscv64" -} - -_sanitizer_runtimes = [] -if (use_cfi_diag || is_ubsan || is_ubsan_security || is_ubsan_vptr) { - _sanitizer_runtimes = [ "$clang_base_path/lib/clang/$clang_version/lib/linux/libclang_rt.ubsan_standalone-$_sanitizer_arch-android.so" ] -} - -_BUNDLETOOL_JAR_PATH = - "//third_party/android_build_tools/bundletool/bundletool.jar" - -# Creates a dist directory for a native executable. -# -# Running a native executable on a device requires all the shared library -# dependencies of that executable. To make it easier to install and run such an -# executable, this will create a directory containing the native exe and all -# it's library dependencies. -# -# Note: It's usually better to package things as an APK than as a native -# executable. -# -# Variables -# dist_dir: Directory for the exe and libraries. Everything in this directory -# will be deleted before copying in the exe and libraries. -# binary: Path to (stripped) executable. -# extra_files: List of extra files to copy in (optional). -# -# Example -# create_native_executable_dist("foo_dist") { -# dist_dir = "$root_build_dir/foo_dist" -# binary = "$root_build_dir/foo" -# deps = [ ":the_thing_that_makes_foo" ] -# } -template("create_native_executable_dist") { - forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) - - _libraries_list = "${target_gen_dir}/${target_name}_library_dependencies.list" - - _sanitizer_runtimes_target_name = "${target_name}__sanitizer_runtimes" - group(_sanitizer_runtimes_target_name) { - metadata = { - shared_libraries = _sanitizer_runtimes - } +if (is_robolectric) { + template("create_native_executable_dist") { + not_needed(invoker, [ "*" ]) } - - generated_file("${target_name}__library_list") { - forward_variables_from(invoker, [ "deps" ]) - if (!defined(deps)) { - deps = [] - } - deps += [ ":${_sanitizer_runtimes_target_name}" ] - output_conversion = "json" - outputs = [ _libraries_list ] - data_keys = [ "shared_libraries" ] - walk_keys = [ "shared_libraries_barrier" ] - rebase = root_build_dir - } - - copy_ex(target_name) { - inputs = [ - _libraries_list, - invoker.binary, - ] - - dest = invoker.dist_dir - data = [ "${invoker.dist_dir}/" ] - - _rebased_libraries_list = rebase_path(_libraries_list, root_build_dir) - _rebased_binaries_list = rebase_path([ invoker.binary ], root_build_dir) - args = [ - "--clear", - "--files=@FileArg($_rebased_libraries_list)", - "--files=$_rebased_binaries_list", - ] - if (defined(invoker.extra_files)) { - _rebased_extra_files = rebase_path(invoker.extra_files, root_build_dir) - args += [ "--files=$_rebased_extra_files" ] - } - - _depfile = "$target_gen_dir/$target_name.d" - _stamp_file = "$target_gen_dir/$target_name.stamp" - outputs = [ _stamp_file ] - args += [ - "--depfile", - rebase_path(_depfile, root_build_dir), - "--stamp", - rebase_path(_stamp_file, root_build_dir), - ] - - deps = [ ":${target_name}__library_list" ] - if (defined(invoker.deps)) { - deps += invoker.deps - } - } -} - -# non-robolectric things -if (enable_java_templates && is_android) { +} else if (enable_java_templates) { + import("//build/config/android/abi.gni") + import("//build/config/android/config.gni") + import("//build/config/android/copy_ex.gni") import("//build/config/android/internal_rules.gni") + import("//build/config/clang/clang.gni") + import("//build/config/compiler/compiler.gni") + import("//build/config/coverage/coverage.gni") + import("//build/config/profiling/profiling.gni") + import("//build/config/python.gni") + import("//build/config/sanitizers/sanitizers.gni") + import("//build/config/zip.gni") + import("//build/toolchain/toolchain.gni") + + _BUNDLETOOL_JAR_PATH = + "//third_party/android_build_tools/bundletool/bundletool.jar" + + _sanitizer_runtimes = [] + if (use_cfi_diag || is_ubsan || is_ubsan_security || is_ubsan_vptr) { + _sanitizer_runtimes += [ "$clang_base_path/lib/clang/$clang_version/lib/linux/libclang_rt.ubsan_standalone-$sanitizer_arch-android.so" ] + } + + # Creates a dist directory for a native executable. + # + # Running a native executable on a device requires all the shared library + # dependencies of that executable. To make it easier to install and run such an + # executable, this will create a directory containing the native exe and all + # it's library dependencies. + # + # Note: It's usually better to package things as an APK than as a native + # executable. + # + # Variables + # dist_dir: Directory for the exe and libraries. Everything in this directory + # will be deleted before copying in the exe and libraries. + # binary: Path to (stripped) executable. + # extra_files: List of extra files to copy in (optional). + # + # Example + # create_native_executable_dist("foo_dist") { + # dist_dir = "$root_build_dir/foo_dist" + # binary = "$root_build_dir/foo" + # deps = [ ":the_thing_that_makes_foo" ] + # } + template("create_native_executable_dist") { + forward_variables_from(invoker, TESTONLY_AND_VISIBILITY) + + _libraries_list = + "${target_gen_dir}/${target_name}_library_dependencies.list" + + _sanitizer_runtimes_target_name = "${target_name}__sanitizer_runtimes" + group(_sanitizer_runtimes_target_name) { + metadata = { + shared_libraries = _sanitizer_runtimes + } + } + + generated_file("${target_name}__library_list") { + forward_variables_from(invoker, [ "deps" ]) + if (!defined(deps)) { + deps = [] + } + deps += [ ":${_sanitizer_runtimes_target_name}" ] + output_conversion = "json" + outputs = [ _libraries_list ] + data_keys = [ "shared_libraries" ] + walk_keys = [ "shared_libraries_barrier" ] + rebase = root_build_dir + } + + copy_ex(target_name) { + inputs = [ + _libraries_list, + invoker.binary, + ] + + dest = invoker.dist_dir + data = [ "${invoker.dist_dir}/" ] + + _rebased_libraries_list = rebase_path(_libraries_list, root_build_dir) + _rebased_binaries_list = rebase_path([ invoker.binary ], root_build_dir) + args = [ + "--clear", + "--files=@FileArg($_rebased_libraries_list)", + "--files=$_rebased_binaries_list", + ] + if (defined(invoker.extra_files)) { + _rebased_extra_files = rebase_path(invoker.extra_files, root_build_dir) + args += [ "--files=$_rebased_extra_files" ] + } + + _depfile = "$target_gen_dir/$target_name.d" + _stamp_file = "$target_gen_dir/$target_name.stamp" + outputs = [ _stamp_file ] + args += [ + "--depfile", + rebase_path(_depfile, root_build_dir), + "--stamp", + rebase_path(_stamp_file, root_build_dir), + ] + + deps = [ ":${target_name}__library_list" ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + } + } # Declare a target for c-preprocessor-generated java files # @@ -2114,10 +2109,8 @@ _is_bundle_module = defined(invoker.is_bundle_module) && invoker.is_bundle_module - if (_is_bundle_module) { - _is_base_module = - defined(invoker.is_base_module) && invoker.is_base_module - } + _is_base_module = !_is_bundle_module || (defined(invoker.is_base_module) && + invoker.is_base_module) _omit_dex = defined(invoker.omit_dex) && invoker.omit_dex @@ -2136,7 +2129,7 @@ } # Non-base bundle modules create only proto resources. - if (!_is_bundle_module || _is_base_module) { + if (_is_base_module) { _arsc_resources_path = "$target_out_dir/$target_name.ap_" } if (_is_bundle_module) { @@ -2438,7 +2431,7 @@ } # Bundle modules have to reference resources from the base module. - if (!_is_bundle_module || _is_base_module) { + if (_is_base_module) { arsc_output = _arsc_resources_path } @@ -2542,8 +2535,7 @@ _generate_native_libraries_java = invoker.generate_native_libraries_java } else { _generate_native_libraries_java = - (!_is_bundle_module || _is_base_module) && !_omit_dex && - !defined(invoker.apk_under_test) + _is_base_module && !_omit_dex && !defined(invoker.apk_under_test) } if (_generate_native_libraries_java) { write_native_libraries_java("${_template_name}__native_libraries") { @@ -4459,10 +4451,6 @@ # # static_library_provider: Specifies a single target that this target will # use as a static library APK. - # Additionally, when allotting libraries to be packaged into modules, the - # libraries packaged into the static library will be accounted for to - # avoid library duplication. Effectively, the static library will be - # treated as the parent of the base module. # # expected_libs_and_assets: Verify the list of included native libraries # and assets is consistent with the given expectation file. @@ -4583,57 +4571,6 @@ _module_build_configs += [ _module.build_config ] } - if (_uses_static_library) { - _lib_proxy_module = { - name = "lib" - } - _static_library_target_name = - get_label_info(invoker.static_library_provider, "name") - _static_library_gen_dir = - get_label_info(invoker.static_library_provider, "target_gen_dir") - _lib_proxy_module.build_config = "$_static_library_gen_dir/$_static_library_target_name.build_config.json" - _lib_proxy_module.build_config_target = - "${invoker.static_library_provider}$build_config_target_suffix" - } - - # Allot native libraries to modules they should be packaged into. This is - # necessary since all libraries that are depended on by multiple modules - # have to go into base or the static shared library if it exists. - # TODO(crbug.com/1021565): It would be nice if this lived outside the - # android_app_bundle template and the static shared library would pull in - # the libs as allotted by this step. - _native_libraries_config = - "$target_gen_dir/$_target_name.native_libraries_config" - _native_libraries_config_target = "${_target_name}__allot_native_libraries" - allot_native_libraries(_native_libraries_config_target) { - modules = _modules - native_libraries_filearg_keys = [ - "native:libraries", - "native:loadable_modules", - ] - output = _native_libraries_config - if (_uses_static_library) { - modules += [ _lib_proxy_module ] - } - } - if (defined(android_app_secondary_abi)) { - _secondary_abi_native_libraries_config = - "$target_gen_dir/$_target_name.secondary_abi_native_libraries_config" - _secondary_abi_native_libraries_config_target = - "${_target_name}__allot_secondary_abi_native_libraries" - allot_native_libraries(_secondary_abi_native_libraries_config_target) { - modules = _modules - native_libraries_filearg_keys = [ - "native:secondary_abi_libraries", - "native:secondary_abi_loadable_modules", - ] - output = _secondary_abi_native_libraries_config - if (_uses_static_library) { - modules += [ _lib_proxy_module ] - } - } - } - # Used to expose the module Java targets of the bundle. group("${_target_name}__java") { deps = _module_java_targets @@ -4845,7 +4782,6 @@ min_sdk_version = _min_sdk_version build_config = _module_build_config module_zip_path = _module_zip_path - native_libraries_config = _native_libraries_config if (!_proguard_enabled) { dex_path = _dex_path # dex_path is read from the build_config in the proguard case. @@ -4860,26 +4796,14 @@ ]) top_target_name = _target_name build_config_target = _module_build_config_target - native_libraries_config_target = ":$_native_libraries_config_target" - if (defined(android_app_secondary_abi)) { - secondary_abi_native_libraries_config_target = - ":$_secondary_abi_native_libraries_config_target" - } } deps = [ - ":$_native_libraries_config_target", _dex_target_for_module, _module_build_config_target, _module_target, ] - if (defined(android_app_secondary_abi)) { - secondary_abi_native_libraries_config = - _secondary_abi_native_libraries_config - deps += [ ":$_secondary_abi_native_libraries_config_target" ] - } - if (_enable_art_profile_optimizations && _include_baseline_profile) { # extra_assets is a list of ["{src_path}:{dst_path}"] extra_assets = [ @@ -5288,34 +5212,34 @@ outputs = [ _output_path ] } } -} -# Generate an Android resources target that contains localized strings -# describing the current locale used by the Android framework to display -# UI strings. These are used by -# org.chromium.chrome.browser.ChromeLocalizationUtils. -# -# Variables: -# ui_locales: List of Chromium locale names to generate resources for. -# -template("generate_ui_locale_resources") { - _generating_target_name = "${target_name}__generate" - _rebased_output_zip_path = rebase_path(target_gen_dir, root_gen_dir) - _output_zip = "${root_out_dir}/resource_zips/${_rebased_output_zip_path}/" + - "${target_name}.zip" + # Generate an Android resources target that contains localized strings + # describing the current locale used by the Android framework to display + # UI strings. These are used by + # org.chromium.chrome.browser.ChromeLocalizationUtils. + # + # Variables: + # ui_locales: List of Chromium locale names to generate resources for. + # + template("generate_ui_locale_resources") { + _generating_target_name = "${target_name}__generate" + _rebased_output_zip_path = rebase_path(target_gen_dir, root_gen_dir) + _output_zip = "${root_out_dir}/resource_zips/${_rebased_output_zip_path}/" + + "${target_name}.zip" - action_with_pydeps(_generating_target_name) { - script = "//build/android/gyp/create_ui_locale_resources.py" - outputs = [ _output_zip ] - args = [ - "--locale-list=${invoker.ui_locales}", - "--output-zip", - rebase_path(_output_zip, root_build_dir), - ] - } + action_with_pydeps(_generating_target_name) { + script = "//build/android/gyp/create_ui_locale_resources.py" + outputs = [ _output_zip ] + args = [ + "--locale-list=${invoker.ui_locales}", + "--output-zip", + rebase_path(_output_zip, root_build_dir), + ] + } - android_generated_resources(target_name) { - generating_target = ":$_generating_target_name" - generated_resources_zip = _output_zip + android_generated_resources(target_name) { + generating_target = ":$_generating_target_name" + generated_resources_zip = _output_zip + } } }
diff --git a/build/rust/tests/test_serde_json_lenient/BUILD.gn b/build/rust/tests/test_serde_json_lenient/BUILD.gn index dbc954e0..494528a 100644 --- a/build/rust/tests/test_serde_json_lenient/BUILD.gn +++ b/build/rust/tests/test_serde_json_lenient/BUILD.gn
@@ -10,7 +10,7 @@ allow_unsafe = true sources = [ "lib.rs" ] cxx_bindings = [ "lib.rs" ] - deps = [ "//third_party/rust/serde_json_lenient/v0_1:lib" ] + deps = [ "//third_party/rust/serde_json_lenient/v0_2:lib" ] } # TODO(https://crbug.com/1278030) - convert to a pure-
diff --git a/cc/paint/decode_stashing_image_provider.h b/cc/paint/decode_stashing_image_provider.h index 0169b8e..9f281c4 100644 --- a/cc/paint/decode_stashing_image_provider.h +++ b/cc/paint/decode_stashing_image_provider.h
@@ -38,7 +38,7 @@ private: // RAW_PTR_EXCLUSION: Performance: visible in sampling profiler and stack // scoped. - RAW_PTR_EXCLUSION ImageProvider* source_provider_; + RAW_PTR_EXCLUSION ImageProvider* source_provider_ = nullptr; absl::InlinedVector<ScopedResult, 1> decoded_images_; };
diff --git a/cc/paint/scoped_raster_flags.h b/cc/paint/scoped_raster_flags.h index b36ae01..bd1f10d6 100644 --- a/cc/paint/scoped_raster_flags.h +++ b/cc/paint/scoped_raster_flags.h
@@ -80,7 +80,7 @@ // RAW_PTR_EXCLUSION: Performance: visible in sampling profiler and stack // scoped. - RAW_PTR_EXCLUSION const PaintFlags* original_flags_; + RAW_PTR_EXCLUSION const PaintFlags* original_flags_ = nullptr; std::optional<PaintFlags> modified_flags_; std::optional<DecodeStashingImageProvider> decode_stashing_image_provider_; bool decode_failed_ = false;
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index 0b0a285..33eec97 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -460,6 +460,7 @@ "//chrome/browser/tab:java", "//chrome/browser/tab_group:java", "//chrome/browser/tab_group_sync:factory_java", + "//chrome/browser/tab_group_sync:java", "//chrome/browser/tab_resumption:java", "//chrome/browser/tab_ui/android:java", "//chrome/browser/tabmodel:factory_java", @@ -1115,6 +1116,8 @@ "//chrome/browser/tab:junit", "//chrome/browser/tab_group:java", "//chrome/browser/tab_group:junit", + "//chrome/browser/tab_group_sync:java", + "//chrome/browser/tab_group_sync:junit", "//chrome/browser/tab_resumption:junit", "//chrome/browser/tab_ui/android:java", "//chrome/browser/tab_ui/android:junit",
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java index 221a50bf..a00399f2 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java
@@ -385,6 +385,11 @@ void hideDialog(boolean showAnimation) { if (!mModel.get(TabGridDialogProperties.IS_DIALOG_VISIBLE)) return; + if (mModel.get(TabGridDialogProperties.IS_SHARE_SHEET_VISIBLE)) { + // TODO(b/333776074): Close the ShareSheet without causing a crash at accessibility + // important restoration. + } + if (mSnackbarManager != null) { mSnackbarManager.dismissSnackbars(TabGridDialogMediator.this); }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewBinder.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewBinder.java index be36b2b3..1897b1ac 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewBinder.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewBinder.java
@@ -239,7 +239,7 @@ viewHolder.toolbarView.setColorIconOnClickListener( model.get(COLOR_ICON_CLICK_LISTENER)); } else if (IS_SHARE_SHEET_VISIBLE == propertyKey) { - if (!model.get(IS_SHARE_SHEET_VISIBLE)) { + if (!model.get(IS_SHARE_SHEET_VISIBLE) && model.get(IS_DIALOG_VISIBLE)) { // Fit the scrim to the TabGridDialog again after the bottom sheet visibility // changes. viewHolder.dialogView.refreshScrim();
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCoordinator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCoordinator.java index 2cd6b19..1580a496f 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCoordinator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCoordinator.java
@@ -618,4 +618,9 @@ private TabSwitcherMessageManager getMessageManager() { return mMessageManager; } + + @Override + public void openInvitationModal(String invitationId) { + return; + } }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneAdapter.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneAdapter.java index 9f6058b..a734dfd 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneAdapter.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneAdapter.java
@@ -84,4 +84,9 @@ public void refreshTabList() { mTabSwitcherPane.showAllTabs(); } + + @Override + public void openInvitationModal(String invitationId) { + mTabSwitcherPane.openInvitationModal(invitationId); + } }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneBase.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneBase.java index 5833c8f..905040b 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneBase.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneBase.java
@@ -517,4 +517,16 @@ mHandler.removeCallbacks(mHardCleanupRunnable); mHandler.removeCallbacks(mDestroyCoordinatorRunnable); } + + /** + * Open the invitation modal on top of the tab switcher view when an invitation intent is + * intercepted. + * + * @param invitationId The id of the invitation. + */ + public void openInvitationModal(String invitationId) { + TabSwitcherPaneCoordinator coordinator = mTabSwitcherPaneCoordinatorSupplier.get(); + if (coordinator == null) return; + coordinator.openInvitationModal(invitationId); + } }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinator.java index ecd4483b..1200060 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinator.java
@@ -467,4 +467,15 @@ public void showQuickDeleteAnimation(Runnable onAnimationEnd, List<Tab> tabs) { mTabListCoordinator.showQuickDeleteAnimation(onAnimationEnd, tabs); } + + /** + * Open the invitation modal on top of the tab switcher view when an invitation intent is + * intercepted. + * + * @param invitationId The id of the invitation. + */ + public void openInvitationModal(String invitationId) { + if (mTabGridDialogCoordinator == null) return; + mTabGridDialogCoordinator.hideDialog(true); + } }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinatorUnitTest.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinatorUnitTest.java index b86ceb3..d69ec9a 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinatorUnitTest.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherPaneCoordinatorUnitTest.java
@@ -202,6 +202,24 @@ mIsVisibleSupplier.set(true); } + DialogController showTabGridDialogWithTabs() { + ViewStub dialogStub = new ViewStub(mActivity); + mCoordinatorView.addView(dialogStub); + dialogStub.setId(R.id.tab_grid_dialog_stub); + + DialogController controller = mCoordinator.getTabGridDialogControllerForTesting(); + MockTab tab = MockTab.createAndInitialize(/* id= */ 1, mProfile); + tab.setIsInitialized(true); + int index = 0; + mTabModel.addTab( + tab, index, TabLaunchType.FROM_CHROME_UI, TabCreationState.LIVE_IN_FOREGROUND); + when(mTabModelFilter.indexOf(tab)).thenReturn(index); + when(mTabModelFilter.getTabAt(index)).thenReturn(tab); + controller.resetWithListOfTabs(Collections.singletonList(tab)); + + return controller; + } + @After public void tearDown() { mCoordinator.destroy(); @@ -260,24 +278,13 @@ @DisableFeatures({ChromeFeatureList.DATA_SHARING_ANDROID}) @EnableFeatures(ChromeFeatureList.TAB_GROUP_PARITY_ANDROID) public void testTabGridDialogVisibilitySupplier() { - ViewStub dialogStub = new ViewStub(mActivity); - mCoordinatorView.addView(dialogStub); - dialogStub.setId(R.id.tab_grid_dialog_stub); Supplier<Boolean> tabGridDialogVisibilitySupplier = mCoordinator.getTabGridDialogVisibilitySupplier(); assertFalse(tabGridDialogVisibilitySupplier.get()); - DialogController controller = mCoordinator.getTabGridDialogControllerForTesting(); - MockTab tab = MockTab.createAndInitialize(/* id= */ 1, mProfile); - tab.setIsInitialized(true); - int index = 0; - mTabModel.addTab( - tab, index, TabLaunchType.FROM_CHROME_UI, TabCreationState.LIVE_IN_FOREGROUND); - when(mTabModelFilter.indexOf(tab)).thenReturn(index); - when(mTabModelFilter.getTabAt(index)).thenReturn(tab); - controller.resetWithListOfTabs(Collections.singletonList(tab)); + DialogController controller = showTabGridDialogWithTabs(); assertTrue(tabGridDialogVisibilitySupplier.get()); controller.hideDialog(false); @@ -361,4 +368,19 @@ // Don't assert on the actual child count, robolectric isn't removing the child view for // some reason. } + + @Test + @SmallTest + @EnableFeatures({ + ChromeFeatureList.TAB_GROUP_PARITY_ANDROID, + ChromeFeatureList.DATA_SHARING_ANDROID + }) + public void testOpenInvitationModal() { + DialogController controller = showTabGridDialogWithTabs(); + + assertTrue(controller.isVisible()); + + mCoordinator.openInvitationModal(""); + assertFalse(controller.isVisible()); + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index 340be34..49279bc 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -4033,12 +4033,19 @@ IntentUtils.safeGetBooleanExtra( intent, DataSharingNotificationManager.DATA_SHARING_EXTRA, false) && IntentHandler.wasIntentSenderChrome(intent); - if (shouldShowTabSwitcher && !isInOverviewMode()) { + if (shouldShowTabSwitcher) { // TODO(haileywang): Close the tab grid dialog when showing tab switcher from this path. TabModelUtils.runOnTabStateInitialized( getTabModelSelectorSupplier().get(), (tabModelSelectorReturn) -> { - showOverview(StartSurfaceState.SHOWING_TABSWITCHER); + if (!isInOverviewMode()) { + showOverview(StartSurfaceState.SHOWING_TABSWITCHER); + } + if (mTabSwitcherSupplier.hasValue()) { + // TODO(b/332961197): Add the actual invitation id obtained from url + // intent. + mTabSwitcherSupplier.get().openInvitationModal(""); + } }); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TitleBitmapFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TitleBitmapFactory.java index 837b9507..a729a22 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TitleBitmapFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TitleBitmapFactory.java
@@ -189,6 +189,8 @@ ChromeFeatureList.sSmallerTabStripTitleLimit.isEnabled() ? SMALLER_MAX_NUM_TITLE_CHAR : MAX_NUM_TITLE_CHAR; + RecordHistogram.recordCount100Histogram( + "Android.TabStrip.TitleBitmapFactory.TitleLength", title.length()); c.drawText( title, 0,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java index 752797e..6ba24887 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java
@@ -120,10 +120,10 @@ /** * @return whether or not the Contextual Search Result should be preloaded before the user - * explicitly interacts with the feature. + * explicitly interacts with the feature. */ boolean shouldPrefetchSearchResult() { - if (PreloadPagesSettingsBridge.getState() == PreloadPagesState.NO_PRELOADING) { + if (PreloadPagesSettingsBridge.getState(mProfile) == PreloadPagesState.NO_PRELOADING) { return false; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java index 6c67dbd..46b45f2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
@@ -1790,12 +1790,12 @@ if (!DeviceClassManager.enablePrerendering()) { return false; } - if (UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) - .getInteger(COOKIE_CONTROLS_MODE) + Profile profile = ProfileManager.getLastUsedRegularProfile(); + if (UserPrefs.get(profile).getInteger(COOKIE_CONTROLS_MODE) == CookieControlsMode.BLOCK_THIRD_PARTY) { return false; } - if (PreloadPagesSettingsBridge.getState() == PreloadPagesState.NO_PRELOADING) { + if (PreloadPagesSettingsBridge.getState(profile) == PreloadPagesState.NO_PRELOADING) { return false; } return true;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/desktop_site/DesktopSiteSettingsIPHController.java b/chrome/android/java/src/org/chromium/chrome/browser/desktop_site/DesktopSiteSettingsIPHController.java index 5e7fe9d..a2bc6fc 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/desktop_site/DesktopSiteSettingsIPHController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/desktop_site/DesktopSiteSettingsIPHController.java
@@ -214,6 +214,7 @@ () -> { SiteSettingsHelper.showCategorySettings( mContext, + profile, SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE); return PrimaryActionClickBehavior.DISMISS_IMMEDIATELY; })
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java index 80e97c6..1fee901 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java
@@ -152,7 +152,7 @@ /** Handle a back press event. */ public boolean onBackPressed() { if (!shouldInterceptBackPress()) return false; - mPresenter.dismissCurrentDialog(DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + mPresenter.dismissCurrentDialog(DialogDismissalCause.NAVIGATE_BACK); return true; } @@ -160,7 +160,7 @@ public @BackPressResult int handleBackPress() { int result = shouldInterceptBackPress() ? BackPressResult.SUCCESS : BackPressResult.FAILURE; if (result == BackPressResult.SUCCESS) { - mPresenter.dismissCurrentDialog(DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + mPresenter.dismissCurrentDialog(DialogDismissalCause.NAVIGATE_BACK); } return result; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/page_info/ChromePageInfoControllerDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/page_info/ChromePageInfoControllerDelegate.java index 927eaf0..4a29764 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/page_info/ChromePageInfoControllerDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/page_info/ChromePageInfoControllerDelegate.java
@@ -217,7 +217,7 @@ @Override public void showCookieSettings() { SiteSettingsHelper.showCategorySettings( - mContext, SiteSettingsCategory.Type.THIRD_PARTY_COOKIES); + mContext, mProfile, SiteSettingsCategory.Type.THIRD_PARTY_COOKIES); } /** {@inheritDoc} */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/page_info/SiteSettingsHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/page_info/SiteSettingsHelper.java index 3c9a9ab..44ef4f68 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/page_info/SiteSettingsHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/page_info/SiteSettingsHelper.java
@@ -9,7 +9,9 @@ import android.os.Bundle; import org.chromium.chrome.browser.offlinepages.OfflinePageUtils; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.settings.SettingsLauncherImpl; +import org.chromium.chrome.browser.site_settings.ChromeSiteSettingsDelegate; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.site_settings.ContentSettingsResources; import org.chromium.components.browser_ui.site_settings.SingleCategorySettings; @@ -42,7 +44,7 @@ /** Show the single category settings page for given category and type. */ public static void showCategorySettings( - Context context, @SiteSettingsCategory.Type int category) { + Context context, Profile profile, @SiteSettingsCategory.Type int category) { SettingsLauncher settingsLauncher = new SettingsLauncherImpl(); Bundle extras = new Bundle(); extras.putString( @@ -51,7 +53,10 @@ extras.putString( SingleCategorySettings.EXTRA_TITLE, context.getResources() - .getString(ContentSettingsResources.getTitleForCategory(category))); + .getString( + ContentSettingsResources.getTitleForCategory( + category, + new ChromeSiteSettingsDelegate(context, profile)))); Intent preferencesIntent = settingsLauncher.createSettingsActivityIntent( context, SingleCategorySettings.class.getName(), extras);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java index c34bd9e..88c5241 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
@@ -311,7 +311,8 @@ Preference preloadPagesPreference = findPreference(PREF_PRELOAD_PAGES); if (preloadPagesPreference != null) { preloadPagesPreference.setSummary( - PreloadPagesSettingsFragment.getPreloadPagesSummaryString(getContext())); + PreloadPagesSettingsFragment.getPreloadPagesSummaryString( + getContext(), getProfile())); } Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java index 44fb39ab..3e52cdba 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
@@ -582,7 +582,7 @@ sandboxFragment.setCookieSettingsIntentHelper( (Context context) -> { SiteSettingsHelper.showCategorySettings( - context, SiteSettingsCategory.Type.THIRD_PARTY_COOKIES); + context, mProfile, SiteSettingsCategory.Type.THIRD_PARTY_COOKIES); }); } if (fragment instanceof SafeBrowsingSettingsFragmentBase) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndHistoryOptInActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndHistoryOptInActivity.java index 7c52991..50fcf88 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndHistoryOptInActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninAndHistoryOptInActivity.java
@@ -4,8 +4,6 @@ package org.chromium.chrome.browser.signin; -import android.accounts.AccountManager; -import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; @@ -29,14 +27,11 @@ import org.chromium.chrome.browser.ui.signin.SigninAndHistoryOptInCoordinator.HistoryOptInMode; import org.chromium.chrome.browser.ui.signin.SigninAndHistoryOptInCoordinator.NoAccountSigninMode; import org.chromium.chrome.browser.ui.signin.SigninAndHistoryOptInCoordinator.WithAccountSigninMode; -import org.chromium.chrome.browser.ui.signin.SigninUtils; import org.chromium.chrome.browser.ui.signin.UpgradePromoCoordinator; import org.chromium.chrome.browser.ui.signin.account_picker.AccountPickerBottomSheetStrings; import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; -import org.chromium.components.signin.AccountManagerFacadeProvider; import org.chromium.components.signin.metrics.SigninAccessPoint; import org.chromium.ui.base.ActivityWindowAndroid; -import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; @@ -273,31 +268,8 @@ /** Implements {@link UpgradePromoCoordinator.Delegate} */ @Override - public void addAccount() { - final WindowAndroid.IntentCallback onAddAccountCompleted = - (int resultCode, Intent data) -> { - if (resultCode != Activity.RESULT_OK) { - return; - } - String accountAddedEmail = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME); - // TODO(crbug.com/41493767): Implement new account selection for when the - // SigninAndHistoryOptIn coordinator is shown rather than the Upgrade promo. - if (mUpgradePromoCoordinator != null && accountAddedEmail != null) { - mUpgradePromoCoordinator.onAccountSelected(accountAddedEmail); - } - }; - AccountManagerFacadeProvider.getInstance() - .createAddAccountIntent( - intent -> { - if (intent == null) { - // AccountManagerFacade couldn't create the intent, use SigninUtils - // to open settings instead. - SigninUtils.openSettingsForAllAccounts(this); - return; - } - - getWindowAndroid().showIntent(intent, onAddAccountCompleted, null); - }); + public void addAccountInUpgradePromo() { + // TODO(b/41493788): Implement this method } /** Implements {@link UpgradePromoCoordinator.Delegate} */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/RequestDesktopUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/RequestDesktopUtils.java index 2dc5b6d..b24aef7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/RequestDesktopUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/RequestDesktopUtils.java
@@ -358,6 +358,7 @@ () -> { SiteSettingsHelper.showCategorySettings( context, + profile, SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE); tracker.notifyEvent( EventConstants.DESKTOP_SITE_DEFAULT_ON_PRIMARY_ACTION);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java index 25f5284..4dd2058 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
@@ -182,15 +182,16 @@ // Skip preconnecting an empty URL. if (url.isEmpty()) return; + Profile profile = getProfile(); // Only preconnect if we are allowed to trigger preloading. - if (PreloadPagesSettingsBridge.getState() == PreloadPagesState.NO_PRELOADING) return; + if (PreloadPagesSettingsBridge.getState(profile) == PreloadPagesState.NO_PRELOADING) return; - WarmupManager.getInstance() - .maybePreconnectUrlAndSubResources(getProfile(), url.getScheme()); + WarmupManager.getInstance().maybePreconnectUrlAndSubResources(profile, url.getScheme()); } /** * Creates a new tab and posts to UI. + * * @param loadUrlParams parameters of the url load. * @param type Information about how the tab was launched. * @param parent the parent tab, if present.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java index 83ac59a..06367d5 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java
@@ -486,7 +486,8 @@ // in the update dialog warning (presses Back). Otherwise, they can be left in a state where // they always press Back and are stuck on an old version of the app forever. if (dismissalCause != DialogDismissalCause.POSITIVE_BUTTON_CLICKED - && dismissalCause != DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE) { + && dismissalCause != DialogDismissalCause.NAVIGATE_BACK + && dismissalCause != DialogDismissalCause.TOUCH_OUTSIDE) { return; }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java index 74627cb..457bb978 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionTest.java
@@ -36,6 +36,8 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesState; +import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.tab.EmptyTabObserver; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; @@ -563,8 +565,11 @@ int state = TestThreadUtils.runOnUiThreadBlocking( () -> { - @PreloadPagesState int oldState = PreloadPagesSettingsBridge.getState(); - PreloadPagesSettingsBridge.setState(PreloadPagesState.NO_PRELOADING); + Profile profile = ProfileManager.getLastUsedRegularProfile(); + @PreloadPagesState + int oldState = PreloadPagesSettingsBridge.getState(profile); + PreloadPagesSettingsBridge.setState( + profile, PreloadPagesState.NO_PRELOADING); return oldState; }); @@ -573,7 +578,10 @@ mCustomTabsConnection.mayLaunchUrl(token, Uri.parse(URL), null, null)); TestThreadUtils.runOnUiThreadBlocking(this::assertSpareWebContentsNotNullAndDestroy); } finally { - TestThreadUtils.runOnUiThreadBlocking(() -> PreloadPagesSettingsBridge.setState(state)); + TestThreadUtils.runOnUiThreadBlocking( + () -> + PreloadPagesSettingsBridge.setState( + ProfileManager.getLastUsedRegularProfile(), state)); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java index 24815d6..5b21bdb 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java
@@ -208,6 +208,7 @@ ChromeFeatureList.FULLSCREEN_INSETS_API_MIGRATION, ChromeFeatureList.FULLSCREEN_INSETS_API_MIGRATION_ON_AUTOMOTIVE }) + @DisabledTest(message = "Flaky. See crbug.com/332844712") public void testBackPressExitPersistentFullscreenLegacy() { testBackPressExitPersistentFullscreenInternal(false); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java index 62867140..3a7bb17 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java
@@ -34,6 +34,7 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesState; +import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.ui.messages.infobar.SimpleConfirmInfoBarBuilder; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeTabbedActivityTestRule; @@ -46,7 +47,6 @@ import org.chromium.net.test.EmbeddedTestServer; import java.util.List; -import java.util.concurrent.Callable; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; @@ -204,14 +204,15 @@ // Define function to pass parameter to Runnable to be used in testInfoBarExpirationNoPrerender. private Runnable setNetworkPredictionOptions(final boolean networkPredictionEnabled) { - return new Runnable() { - @Override - public void run() { - if (networkPredictionEnabled) { - PreloadPagesSettingsBridge.setState(PreloadPagesState.STANDARD_PRELOADING); - } else { - PreloadPagesSettingsBridge.setState(PreloadPagesState.NO_PRELOADING); - } + return () -> { + if (networkPredictionEnabled) { + PreloadPagesSettingsBridge.setState( + ProfileManager.getLastUsedRegularProfile(), + PreloadPagesState.STANDARD_PRELOADING); + } else { + PreloadPagesSettingsBridge.setState( + ProfileManager.getLastUsedRegularProfile(), + PreloadPagesState.NO_PRELOADING); } }; } @@ -227,13 +228,10 @@ // Save prediction preference. boolean networkPredictionEnabled = TestThreadUtils.runOnUiThreadBlocking( - new Callable<Boolean>() { - @Override - public Boolean call() { - return PreloadPagesSettingsBridge.getState() - != PreloadPagesState.NO_PRELOADING; - } - }); + () -> + PreloadPagesSettingsBridge.getState( + ProfileManager.getLastUsedRegularProfile()) + != PreloadPagesState.NO_PRELOADING); try { TestThreadUtils.runOnUiThreadBlocking(setNetworkPredictionOptions(false)); testInfoBarExpiration();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java index 7075cf6..09d3001 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java
@@ -509,7 +509,7 @@ @Features.DisableFeatures({ChromeFeatureList.BACK_GESTURE_REFACTOR}) public void testDismiss_DismissalCause_BackPressed() throws Exception { PropertyModel dialog1 = createDialog(mActivity, mManager, "1", mTestObserver); - mExpectedDismissalCause = DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE; + mExpectedDismissalCause = DialogDismissalCause.NAVIGATE_BACK; showDialog(mManager, dialog1, ModalDialogType.TAB);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/PasswordManagerDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/PasswordManagerDialogTest.java index 0e378df1..cf07599 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/PasswordManagerDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/PasswordManagerDialogTest.java
@@ -127,7 +127,7 @@ @SmallTest public void testDismissedCallbackBackButton() { pressBack(); - verify(mOnClick).onResult(DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + verify(mOnClick).onResult(DialogDismissalCause.NAVIGATE_BACK); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/AutomaticEmbargoTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/AutomaticEmbargoTest.java index ca6f7b41..532b038 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/AutomaticEmbargoTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/AutomaticEmbargoTest.java
@@ -25,6 +25,7 @@ import org.chromium.device.geolocation.LocationProviderOverrider; import org.chromium.device.geolocation.MockLocationProvider; import org.chromium.ui.modaldialog.DialogDismissalCause; +import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; /** Test suite for permissions automatic embargo logic. */ @RunWith(ChromeJUnit4ClassRunner.class) @@ -67,6 +68,7 @@ mPermissionRule.runJavaScriptCodeInCurrentTab(javascript); } PermissionTestRule.waitForDialog(mPermissionRule.getActivity()); + int dialogType = mPermissionRule.getActivity().getModalDialogManager().getCurrentType(); TestThreadUtils.runOnUiThreadBlocking( () -> { mPermissionRule @@ -74,7 +76,10 @@ .getModalDialogManager() .getCurrentPresenterForTest() .dismissCurrentDialog( - DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + dialogType == ModalDialogType.APP + ? DialogDismissalCause + .NAVIGATE_BACK_OR_TOUCH_OUTSIDE + : DialogDismissalCause.NAVIGATE_BACK); }); InstrumentationRegistry.getInstrumentation().waitForIdleSync(); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java index f3b0453d..99649123c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java
@@ -27,6 +27,7 @@ import org.chromium.device.geolocation.MockLocationProvider; import org.chromium.ui.modaldialog.DialogDismissalCause; import org.chromium.ui.modaldialog.ModalDialogManager; +import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.permissions.AndroidPermissionDelegate; @@ -220,11 +221,15 @@ ((TextView) dialogText).getText(), activity.getResources().getString(missingPermissionPromptTextId, appName)); + int dialogType = activity.getModalDialogManager().getCurrentType(); TestThreadUtils.runOnUiThreadBlocking( () -> { manager.getCurrentPresenterForTest() .dismissCurrentDialog( - DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + dialogType == ModalDialogType.APP + ? DialogDismissalCause + .NAVIGATE_BACK_OR_TOUCH_OUTSIDE + : DialogDismissalCause.NAVIGATE_BACK); }); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/UpgradePromoIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/UpgradePromoIntegrationTest.java index bf99609..ae37827 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/UpgradePromoIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/UpgradePromoIntegrationTest.java
@@ -10,13 +10,11 @@ import static androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.withId; -import static androidx.test.espresso.matcher.ViewMatchers.withText; import static org.hamcrest.CoreMatchers.allOf; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; -import android.app.Activity; import android.content.Intent; import android.content.res.Configuration; import android.os.Build; @@ -40,7 +38,6 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.ActivityTestUtils; import org.chromium.chrome.test.util.ChromeRestriction; import org.chromium.chrome.test.util.browser.signin.AccountManagerTestRule; @@ -210,29 +207,6 @@ ApplicationTestUtils.waitForActivityState(mActivity, Stage.DESTROYED); } - @Test - @MediumTest - public void testAddAccount() { - String secondAccountEmail = "jane.doe@gmail.com"; - mSigninTestRule.setResultForNextAddAccountFlow(Activity.RESULT_OK, secondAccountEmail); - launchActivity(); - - // Verify that the fullscreen sign-in promo is shown with the default account. - onView(withId(org.chromium.chrome.test.R.id.fullscreen_signin)) - .check(matches(isDisplayed())); - onView(withText(AccountManagerTestRule.TEST_ACCOUNT_1.getEmail())) - .check(matches(isDisplayed())); - - // Add the second account. - onView(withText(AccountManagerTestRule.TEST_ACCOUNT_1.getEmail())).perform(click()); - onView(withText(R.string.signin_add_account_to_device)).perform(click()); - - // Verify that the fullscreen sign-in promo is shown with the newly added account. - onView(withId(org.chromium.chrome.test.R.id.fullscreen_signin)) - .check(matches(isDisplayed())); - onView(withText(secondAccountEmail)).check(matches(isDisplayed())); - } - private void launchActivity() { Intent intent = SigninAndHistoryOptInActivity.createIntentForUpgradePromo(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java index 157fd0b..ee8262d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java
@@ -2942,11 +2942,17 @@ singleCategorySettings.findPreference(SingleCategorySettings.BINARY_TOGGLE_KEY); assert toggle != null; + var delegate = + new ChromeSiteSettingsDelegate( + toggle.getContext(), ProfileManager.getLastUsedRegularProfile()); + Assert.assertEquals( "Preference title is not set correctly.", singleCategorySettings .getResources() - .getString(ContentSettingsResources.getTitle(mContentSettingsType)), + .getString( + ContentSettingsResources.getTitle( + mContentSettingsType, delegate)), toggle.getTitle()); assertNotNull("Enabled summary text should not be null.", toggle.getSummaryOn()); assertNotNull("Disabled summary text should not be null.", toggle.getSummaryOff()); @@ -2961,9 +2967,9 @@ .getString( mIsCategoryEnabled ? ContentSettingsResources.getEnabledSummary( - mContentSettingsType) + mContentSettingsType, delegate) : ContentSettingsResources.getDisabledSummary( - mContentSettingsType)); + mContentSettingsType, delegate)); Assert.assertEquals( "Summary text in state <" + mIsCategoryEnabled + "> does not match.", expected,
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTestUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTestUtils.java index ecc2059..75cf9fd9 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTestUtils.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTestUtils.java
@@ -61,8 +61,13 @@ () -> { Context context = InstrumentationRegistry.getInstrumentation().getContext(); + var delegate = + new ChromeSiteSettingsDelegate( + context, ProfileManager.getLastUsedRegularProfile()); return context.getResources() - .getString(ContentSettingsResources.getTitleForCategory(type)); + .getString( + ContentSettingsResources.getTitleForCategory( + type, delegate)); }); fragmentArgs.putString(SingleCategorySettings.EXTRA_TITLE, title); SettingsLauncher settingsLauncher = new SettingsLauncherImpl();
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java index e4af3bef..3232f4ed 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java
@@ -43,9 +43,7 @@ import org.junit.After; 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; @@ -56,7 +54,6 @@ import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Feature; -import org.chromium.base.test.util.Features; import org.chromium.base.test.util.Features.DisableFeatures; import org.chromium.base.test.util.Features.EnableFeatures; import org.chromium.chrome.R; @@ -97,7 +94,6 @@ shadows = {ShadowAppCompatResources.class}) @LooperMode(Mode.LEGACY) public class StripLayoutHelperTest { - @Rule public TestRule mFeaturesProcessorRule = new Features.JUnitProcessor(); @Mock private View mInteractingTabView; @Mock private LayoutManagerHost mManagerHost; @Mock private LayoutUpdateHost mUpdateHost;
diff --git a/chrome/android/trichrome.gni b/chrome/android/trichrome.gni index ce4e5858..64e00a32 100644 --- a/chrome/android/trichrome.gni +++ b/chrome/android/trichrome.gni
@@ -96,8 +96,6 @@ omit_dex = true include_size_info = is_official_build - alternative_android_sdk_dep = webview_framework_dep - r_java_root_package_name = "trichrome_lib" app_as_shared_lib = true version_name = chrome_version_name version_code = _version_code
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 3bffe6b..cb3af484 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -3364,6 +3364,12 @@ <message name="IDS_DOWNLOAD_BUBBLE_TOOLTIP_IN_PROGRESS_COUNT" desc="Tooltip text for the download toolbar button, displayed when there are one or more downloads in progress."> {COUNT, plural, =1 {1 download in progress} other {# downloads in progress}} </message> + <message name="IDS_DOWNLOAD_ROW_ESB_PROMOTION" desc="Link button text that teaches the user about Enhanced Protection."> + Discover enhanced protection to get Chrome's highest level of security for downloads + </message> + <message name="IDS_DOWNLOAD_ROW_ESB_PROMO_A11Y" desc="ARIA (accessibility) label describing a link which opens in a new tab."> + Opens security settings page in a new tab + </message> <!-- Tailored Warning in Download Bubble --> <message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_WARNING_COOKIE_THEFT"
diff --git a/chrome/app/generated_resources_grd/IDS_DOWNLOAD_ROW_ESB_PROMOTION.png.sha1 b/chrome/app/generated_resources_grd/IDS_DOWNLOAD_ROW_ESB_PROMOTION.png.sha1 new file mode 100644 index 0000000..622174b --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_DOWNLOAD_ROW_ESB_PROMOTION.png.sha1
@@ -0,0 +1 @@ +ea3e025c04d86e878a4aa14e8f728704b5f7dae9 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_DOWNLOAD_ROW_ESB_PROMO_A11Y.png.sha1 b/chrome/app/generated_resources_grd/IDS_DOWNLOAD_ROW_ESB_PROMO_A11Y.png.sha1 new file mode 100644 index 0000000..d0d0f52 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_DOWNLOAD_ROW_ESB_PROMO_A11Y.png.sha1
@@ -0,0 +1 @@ +4810e32887da5b6e5bd663e2fc23e3dab47e59c1 \ No newline at end of file
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 5480025..d3853eb 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -5340,7 +5340,6 @@ "//chrome/browser/nearby_sharing/logging", "//chrome/browser/nearby_sharing/logging:util", "//chrome/browser/nearby_sharing/proto:tachyon_proto", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/browser/policy:onc", "//chrome/browser/push_notification:push_notification", "//chrome/browser/resources:app_icon_resources", @@ -5406,6 +5405,7 @@ "//chromeos/ash/components/login/session", "//chromeos/ash/components/memory", "//chromeos/ash/components/nearby/common/client", + "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/ash/components/network", "//chromeos/ash/components/report", "//chromeos/ash/components/scalable_iph",
diff --git a/chrome/browser/ash/BUILD.gn b/chrome/browser/ash/BUILD.gn index e78d1a1..a1603a0c 100644 --- a/chrome/browser/ash/BUILD.gn +++ b/chrome/browser/ash/BUILD.gn
@@ -2648,6 +2648,8 @@ "policy/handlers/bluetooth_policy_handler.h", "policy/handlers/configuration_policy_handler_ash.cc", "policy/handlers/configuration_policy_handler_ash.h", + "policy/handlers/contextual_google_integrations_policies_handler.cc", + "policy/handlers/contextual_google_integrations_policies_handler.h", "policy/handlers/device_dlc_predownload_list_policy_handler.cc", "policy/handlers/device_dlc_predownload_list_policy_handler.h", "policy/handlers/device_dock_mac_address_source_handler.cc", @@ -4173,7 +4175,6 @@ "//chrome/browser/metrics/structured:features", "//chrome/browser/nearby_sharing/common", "//chrome/browser/nearby_sharing/logging", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/browser/pdf:pdf_pref_names", "//chrome/browser/pdf:pdf_service", "//chrome/browser/policy:onc", @@ -4251,6 +4252,7 @@ "//chromeos/ash/components/mojo_service_manager", "//chromeos/ash/components/multidevice:stub_multidevice_util", "//chromeos/ash/components/multidevice/logging", + "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/ash/components/peripheral_notification", "//chromeos/ash/components/power", "//chromeos/ash/components/report", @@ -5108,7 +5110,6 @@ "//chrome/browser/ash:print_job_info_proto", "//chrome/browser/extensions", "//chrome/browser/extensions:test_support", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/browser/ui/ash/system_web_apps", "//chrome/browser/web_applications:web_applications_test_support", "//chrome/common", @@ -5124,6 +5125,7 @@ "//chromeos/ash/components/dbus/dlcservice", "//chromeos/ash/components/dbus/seneschal", "//chromeos/ash/components/login/login_state", + "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/dbus/constants", "//chromeos/dbus/power", "//chromeos/dbus/tpm_manager",
diff --git a/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc b/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc index 7e12de7..ebd1a30 100644 --- a/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc +++ b/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc
@@ -35,9 +35,11 @@ #include "chrome/browser/ash/arc/input_overlay/ui/target_view.h" #include "chrome/browser/ash/arc/input_overlay/ui/ui_utils.h" #include "chrome/browser/ash/arc/input_overlay/util.h" +#include "chromeos/strings/grit/chromeos_strings.h" #include "chromeos/ui/base/window_properties.h" #include "components/exo/shell_surface_base.h" #include "components/exo/shell_surface_util.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/rect.h" #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/background.h" @@ -45,6 +47,7 @@ #include "ui/views/view.h" #include "ui/views/view_utils.h" #include "ui/views/widget/widget.h" +#include "ui/views/widget/widget_delegate.h" #include "ui/wm/core/transient_window_manager.h" #include "ui/wm/core/window_util.h" @@ -831,6 +834,8 @@ button_options_widget_->SetContentsView( std::make_unique<ButtonOptionsMenu>(this, action)); UpdateButtonOptionsMenuWidgetBounds(); + button_options_widget_->widget_delegate()->SetAccessibleTitle( + l10n_util::GetStringUTF16(IDS_INPUT_OVERLAY_BUTTON_OPTIONS_A11Y_LABEL)); // Always hide editing list when button options menu shows up. SetEditingListVisibility(/*visible=*/false); @@ -1290,6 +1295,8 @@ editing_list_widget_->Show(); UpdateEditingListWidgetBounds(); + editing_list_widget_->widget_delegate()->SetAccessibleTitle( + l10n_util::GetStringUTF16(IDS_INPUT_OVERLAY_EDITING_LIST_A11Y_LABEL)); } void DisplayOverlayController::RemoveEditingListWidget() {
diff --git a/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc b/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc index e8fc6546..de340a0 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc
@@ -54,9 +54,9 @@ controller_->HideActionHighlightWidget(); } // Tab key is not considered as processed here, so it falls to the end to - // return false. + // return parent class call. } - return false; + return ActionEditView::OnKeyPressed(event); } void ActionViewListItem::OnFocus() {
diff --git a/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory.cc b/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory.cc index 8a1539c..ad6a3e8 100644 --- a/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory.cc +++ b/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory.cc
@@ -9,6 +9,7 @@ #include "ash/constants/ash_features.h" #include "base/no_destructor.h" #include "chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service.h" +#include "chrome/browser/ash/child_accounts/on_device_controls/on_device_utils.h" #include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/profiles/profile.h" @@ -37,7 +38,14 @@ return false; } - return features::IsAdditionalOnDeviceAppsParentalControlsEnabled(); + if (!features::IsAdditionalOnDeviceAppsParentalControlsEnabled()) { + return false; + } + + const std::string region = on_device_controls::GetDeviceRegionCode(); + return on_device_controls::IsOnDeviceControlsRegion(region) || + features:: + IsForceAdditionalOnDeviceAppsParentalControlsAllRegionsEnabled(); } // static
diff --git a/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory_unittest.cc b/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory_unittest.cc index eddc1de..d61da716 100644 --- a/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory_unittest.cc +++ b/chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory_unittest.cc
@@ -5,25 +5,39 @@ #include "chrome/browser/ash/child_accounts/on_device_controls/on_device_apps_parental_controls_service_factory.h" #include <memory> +#include <string> +#include <tuple> #include "ash/constants/ash_features.h" +#include "base/containers/flat_map.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/profiles/profile.h" #include "chrome/test/base/testing_profile.h" +#include "chromeos/ash/components/system/fake_statistics_provider.h" +#include "chromeos/ash/components/system/statistics_provider.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" namespace ash { +// This test class is testing all possible feature configurations and is +// parametrized with three booleans: +// * whether `kAdditionalOnDeviceAppsParentalControls` feature is enabled +// * whether `kForceAdditionalOnDeviceAppsParentalControlsAllRegions` is enabled +// * whether feature is available in the device region class OnDeviceAppsParentalControlsServiceFactoryTest : public testing::Test, - public testing::WithParamInterface<bool> { + public testing::WithParamInterface<std::tuple<bool, bool, bool>> { public: OnDeviceAppsParentalControlsServiceFactoryTest() { - if (IsOnDeviceAppsParentalControlsEnabled()) { - scoped_feature_list.InitAndEnableFeature( - features::kAdditionalOnDeviceAppsParentalControls); - } + scoped_feature_list_.InitWithFeatureStates( + {{features::kAdditionalOnDeviceAppsParentalControls, + IsOnDeviceAppsParentalControlsEnabled()}, + {features::kForceAdditionalOnDeviceAppsParentalControlsAllRegions, + IsOnDeviceAppsParentalControlsForceEnabled()}}); + + SetDeviceRegion(IsOnDeviceAppsParentalControlsAvailableInRegion() ? "gp" + : "ca"); } OnDeviceAppsParentalControlsServiceFactoryTest( @@ -34,11 +48,28 @@ ~OnDeviceAppsParentalControlsServiceFactoryTest() override = default; protected: - bool IsOnDeviceAppsParentalControlsEnabled() { return GetParam(); } + bool IsOnDeviceAppsParentalControlsEnabled() const { + return std::get<0>(GetParam()); + } + + bool IsOnDeviceAppsParentalControlsForceEnabled() const { + return std::get<1>(GetParam()); + } + + bool IsOnDeviceAppsParentalControlsAvailableInRegion() const { + return std::get<2>(GetParam()); + ; + } private: + // Sets device region in VPD. + void SetDeviceRegion(const std::string& region) { + statistics_provider_.SetMachineStatistic(ash::system::kRegionKey, region); + } + content::BrowserTaskEnvironment task_environment_; - base::test::ScopedFeatureList scoped_feature_list; + base::test::ScopedFeatureList scoped_feature_list_; + ash::system::ScopedFakeStatisticsProvider statistics_provider_; }; TEST_P(OnDeviceAppsParentalControlsServiceFactoryTest, @@ -46,7 +77,9 @@ TestingProfile::Builder builder; std::unique_ptr<Profile> profile = builder.Build(); - if (IsOnDeviceAppsParentalControlsEnabled()) { + if (IsOnDeviceAppsParentalControlsEnabled() && + (IsOnDeviceAppsParentalControlsAvailableInRegion() || + IsOnDeviceAppsParentalControlsForceEnabled())) { EXPECT_TRUE(OnDeviceAppsParentalControlsServiceFactory:: IsOnDeviceAppsParentalControlsAvailable(profile.get())); } else { @@ -77,6 +110,8 @@ INSTANTIATE_TEST_SUITE_P(, OnDeviceAppsParentalControlsServiceFactoryTest, - testing::Bool()); + testing::Combine(testing::Bool(), + testing::Bool(), + testing::Bool())); } // namespace ash
diff --git a/chrome/browser/ash/chromebox_for_meetings/hotlog2/command_source.cc b/chrome/browser/ash/chromebox_for_meetings/hotlog2/command_source.cc index b9c7802..ae0dbcc1 100644 --- a/chrome/browser/ash/chromebox_for_meetings/hotlog2/command_source.cc +++ b/chrome/browser/ash/chromebox_for_meetings/hotlog2/command_source.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ash/chromebox_for_meetings/hotlog2/command_source.h" +#include "base/i18n/time_formatting.h" #include "base/process/launch.h" #include "base/strings/string_split.h" #include "base/time/time.h" @@ -35,7 +36,8 @@ // TODO(b/326440932): if there are CHANGE watchdogs, trigger them here. last_output_ = output; - return {output}; + return {base::TimeFormatAsIso8601(base::Time::NowFromSystemTime()) + " " + + output}; } } // namespace ash::cfm
diff --git a/chrome/browser/ash/crosapi/BUILD.gn b/chrome/browser/ash/crosapi/BUILD.gn index 01e6467..ab76588 100644 --- a/chrome/browser/ash/crosapi/BUILD.gn +++ b/chrome/browser/ash/crosapi/BUILD.gn
@@ -337,7 +337,6 @@ "//chrome/browser/ash/telemetry_extension/telemetry", "//chrome/browser/image_decoder:image_decoder", "//chrome/browser/media/router/discovery/access_code:access_code_cast_feature", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/browser/profiles:profile", "//chrome/browser/screen_ai:screen_ai_install_state", "//chrome/browser/ui/webui/ash/parent_access:mojo_bindings", @@ -362,6 +361,7 @@ "//chromeos/ash/components/install_attributes", "//chromeos/ash/components/login/auth", "//chromeos/ash/components/login/login_state", + "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/ash/components/network", "//chromeos/ash/components/network/portal_detector", "//chromeos/ash/components/osauth/public",
diff --git a/chrome/browser/ash/enhanced_network_tts/enhanced_network_tts_utils_unittest.cc b/chrome/browser/ash/enhanced_network_tts/enhanced_network_tts_utils_unittest.cc index 92b19884..53d6615 100644 --- a/chrome/browser/ash/enhanced_network_tts/enhanced_network_tts_utils_unittest.cc +++ b/chrome/browser/ash/enhanced_network_tts/enhanced_network_tts_utils_unittest.cc
@@ -188,11 +188,11 @@ TEST_F(EnhancedNetworkTtsUtilsTest, UnpackJsonResponseFailsWithWrongDataFormat) { - // The data is not Base64 encoded. - const std::vector<uint8_t> response_data = {1, 2, 5}; - const std::string encoded_data(response_data.begin(), response_data.end()); + // The response data is not correctly base64 encoded, but is a valid JSON string embedded + // within a valid JSON message (kTemplateResponse). It should still be rejected due to not + // being valid base64. const std::string encoded_response = - base::StringPrintf(kTemplateResponse, encoded_data.c_str()); + base::StringPrintf(kTemplateResponse, "a b"); std::optional<base::Value> json = base::JSONReader::Read(encoded_response); mojom::TtsResponsePtr result = UnpackJsonResponse(
diff --git a/chrome/browser/ash/login/oobe_quick_start/BUILD.gn b/chrome/browser/ash/login/oobe_quick_start/BUILD.gn index f9c992d..4fae974 100644 --- a/chrome/browser/ash/login/oobe_quick_start/BUILD.gn +++ b/chrome/browser/ash/login/oobe_quick_start/BUILD.gn
@@ -20,7 +20,6 @@ "//base", "//chrome/browser:browser_process", "//chrome/browser/ash/nearby:quick_start_connectivity_service", - "//chrome/browser/nearby_sharing/public/cpp:cpp", "//chrome/common:channel_info", "//chromeos/ash/components/attestation:attestation", "//chromeos/ash/components/dbus/attestation:attestation_proto",
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 86c2861..233da7f 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/BUILD.gn +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/BUILD.gn
@@ -13,7 +13,6 @@ "//chrome/browser:browser_process", "//chrome/browser/ash/login/oobe_quick_start:oobe_quick_start_pref_names", "//chrome/browser/ash/nearby:quick_start_connectivity_service", - "//chrome/browser/nearby_sharing/public/cpp", "//chromeos/ash/components/nearby/common/connections_manager:connections_manager", "//chromeos/ash/components/quick_start", "//chromeos/ash/services/nearby/public/cpp", @@ -59,8 +58,9 @@ deps = [ "//base", "//chrome/browser/ash/nearby:quick_start_connectivity_service", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/test:test_support", + "//chromeos/ash/components/nearby/common/connections_manager", + "//chromeos/ash/components/nearby/common/connections_manager:test_support", "//chromeos/ash/components/quick_start:test_support", "//components/cbor", ] @@ -83,9 +83,8 @@ "//base", "//base/test:test_support", "//chrome/browser/ash:test_support", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/test:test_support", - "//chromeos/ash/components/nearby/common/connections_manager:connections_manager", + "//chromeos/ash/components/nearby/common/connections_manager:test_support", "//chromeos/ash/components/quick_start", "//chromeos/ash/components/quick_start:test_support", "//chromeos/ash/services/nearby/public/mojom",
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.cc index 131c2231..1517d96 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/ash/login/oobe_quick_start/connectivity/handshake_helpers.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/components/quick_start/logging.h" #include "chromeos/ash/components/quick_start/quick_start_message.h" #include "chromeos/ash/components/quick_start/quick_start_metrics.h"
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h index 741535e8..c3ae383 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h
@@ -19,7 +19,7 @@ #include "chrome/browser/ash/login/oobe_quick_start/connectivity/fido_assertion_info.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/components/quick_start/quick_start_metrics.h" #include "chromeos/ash/components/quick_start/quick_start_response_type.h" #include "chromeos/ash/components/quick_start/types.h"
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc index 8aa6a65..9b565f7 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc
@@ -25,8 +25,8 @@ #include "chrome/browser/ash/login/oobe_quick_start/connectivity/handshake_helpers.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker.h" -#include "chrome/browser/nearby_sharing/fake_nearby_connection.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/components/quick_start/fake_quick_start_decoder.h" #include "chromeos/ash/components/quick_start/quick_start_message.h" #include "chromeos/ash/components/quick_start/quick_start_metrics.h"
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/fake_target_device_connection_broker.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/fake_target_device_connection_broker.cc index 329cc355..b1976fa 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/fake_target_device_connection_broker.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/fake_target_device_connection_broker.cc
@@ -11,8 +11,8 @@ #include "chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker.h" #include "chrome/browser/ash/nearby/quick_start_connectivity_service.h" -#include "chrome/browser/nearby_sharing/fake_nearby_connection.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/components/quick_start/fake_quick_start_decoder.h" #include "chromeos/ash/services/nearby/public/mojom/quick_start_decoder.mojom.h"
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.cc index 9509c2e..6fbcdb80 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.cc
@@ -26,6 +26,7 @@ constexpr char kPrepareForUpdateAdvertisingIdKey[] = "advertising_id"; constexpr char kPrepareForUpdateSecondarySharedSecretKey[] = "secondary_shared_secret"; +constexpr char kPrepareForUpdateDidTransferWifiKey[] = "did_transfer_wifi"; bool ShouldResumeAfterUpdate() { const base::Value::Dict& maybe_info = @@ -89,9 +90,23 @@ kPrepareForUpdateSecondarySharedSecretKey, base::Base64Encode(secondary_shared_secret_bytes)); + // We persist the bit representing completion of the Wi-Fi transfer, but Gaia + // account setup happens after any updates are installed, so there is no need + // to persist the Gaia account setup bit. + prepare_for_update_info.Set(kPrepareForUpdateDidTransferWifiKey, + did_transfer_wifi_); + return prepare_for_update_info; } +void SessionContext::SetDidTransferWifi(bool did_transfer_wifi) { + did_transfer_wifi_ = did_transfer_wifi; +} + +void SessionContext::SetDidSetUpGaia(bool did_set_up_gaia) { + did_set_up_gaia_ = did_set_up_gaia; +} + void SessionContext::PopulateRandomSessionContext() { // The session_id_ should be in range (INT32_MAX, INT64_MAX]. int64_t min = static_cast<int64_t>(INT32_MAX) + 1; @@ -100,6 +115,8 @@ advertising_id_ = AdvertisingId(); crypto::RandBytes(shared_secret_); crypto::RandBytes(secondary_shared_secret_); + did_transfer_wifi_ = false; + did_set_up_gaia_ = false; } void SessionContext::FetchPersistedSessionContext() { @@ -129,6 +146,12 @@ session_info.FindString(kPrepareForUpdateSecondarySharedSecretKey); CHECK(secondary_shared_secret_str); DecodeSharedSecret(*secondary_shared_secret_str); + + std::optional<bool> did_transfer_wifi = + session_info.FindBool(kPrepareForUpdateDidTransferWifiKey); + CHECK(did_transfer_wifi.has_value()); + did_transfer_wifi_ = did_transfer_wifi.value(); + prefs->ClearPref(prefs::kResumeQuickStartAfterRebootInfo); }
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h b/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h index 98a0c17..35fbfb4 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context.h
@@ -62,6 +62,12 @@ // reboots. base::Value::Dict GetPrepareForUpdateInfo(); + bool did_transfer_wifi() const { return did_transfer_wifi_; } + bool did_set_up_gaia() const { return did_set_up_gaia_; } + + void SetDidTransferWifi(bool did_transfer_wifi); + void SetDidSetUpGaia(bool did_set_up_gaia); + private: void PopulateRandomSessionContext(); // When Quick Start is automatically resumed after the target device updates, @@ -75,6 +81,8 @@ SharedSecret shared_secret_; SharedSecret secondary_shared_secret_; bool is_resume_after_update_ = false; + bool did_transfer_wifi_ = false; + bool did_set_up_gaia_ = false; }; } // namespace ash::quick_start
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context_unittest.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context_unittest.cc index f10d656..4af1265 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context_unittest.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/session_context_unittest.cc
@@ -25,6 +25,7 @@ constexpr char kPrepareForUpdateAdvertisingIdKey[] = "advertising_id"; constexpr char kPrepareForUpdateSecondarySharedSecretKey[] = "secondary_shared_secret"; +constexpr char kPrepareForUpdateDidTransferWifiKey[] = "did_transfer_wifi"; } // namespace @@ -56,6 +57,7 @@ }; TEST_F(SessionContextTest, GetPrepareForUpdateInfo) { + session_context_->SetDidTransferWifi(true); base::Value::Dict prepare_for_update_info = session_context_->GetPrepareForUpdateInfo(); EXPECT_FALSE(prepare_for_update_info.empty()); @@ -67,6 +69,8 @@ EXPECT_EQ(GetSecondarySharedSecretString(), *prepare_for_update_info.FindString( kPrepareForUpdateSecondarySharedSecretKey)); + EXPECT_EQ(true, *prepare_for_update_info.FindBool( + kPrepareForUpdateDidTransferWifiKey)); } TEST_F(SessionContextTest, ResumeAfterUpdate) { @@ -74,6 +78,7 @@ // The bootstrap controller expects this pref to be set if resuming after an // update. + session_context_->SetDidTransferWifi(true); GetLocalState()->SetDict(prefs::kResumeQuickStartAfterRebootInfo, session_context_->GetPrepareForUpdateInfo()); @@ -98,6 +103,7 @@ EXPECT_TRUE(GetLocalState() ->GetDict(prefs::kResumeQuickStartAfterRebootInfo) .empty()); + EXPECT_TRUE(session_context_->did_transfer_wifi()); } TEST_F(SessionContextTest, CancelResume) {
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker_impl_unittest.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker_impl_unittest.cc index 8fd2b93f..e9f3ca9 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker_impl_unittest.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker_impl_unittest.cc
@@ -20,9 +20,9 @@ #include "chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker.h" #include "chrome/browser/ash/login/oobe_quick_start/connectivity/target_device_connection_broker_factory.h" #include "chrome/browser/ash/nearby/fake_quick_start_connectivity_service.h" -#include "chrome/browser/nearby_sharing/fake_nearby_connection.h" #include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/testing_browser_process.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" #include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connections_manager.h" #include "chromeos/ash/components/nearby/common/connections_manager/nearby_connections_manager.h" #include "chromeos/ash/components/quick_start/fake_quick_start_decoder.h"
diff --git a/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller.cc b/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller.cc index 106acaf0..967bece 100644 --- a/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller.cc +++ b/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller.cc
@@ -299,7 +299,7 @@ void TargetDeviceBootstrapController::OnWifiCredentialsReceived( std::optional<mojom::WifiCredentials> credentials) { CHECK_EQ(status_.step, Step::REQUESTING_WIFI_CREDENTIALS); - + session_context_.SetDidTransferWifi(true); if (credentials.has_value()) { UpdateStatus(/*step=*/Step::WIFI_CREDENTIALS_RECEIVED, /*payload=*/credentials.value()); @@ -443,6 +443,7 @@ UpdateStatus(/*step=*/Step::TRANSFERRED_GOOGLE_ACCOUNT_DETAILS, /*payload=*/gaia_creds); is_error = false; + session_context_.SetDidSetUpGaia(true); }, [&](SecondDeviceAuthBroker:: AuthCodeAdditionalChallengesOnTargetResponse res) {
diff --git a/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller_unittest.cc b/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller_unittest.cc index c1d023e..800220f9 100644 --- a/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller_unittest.cc +++ b/chrome/browser/ash/login/oobe_quick_start/target_device_bootstrap_controller_unittest.cc
@@ -489,6 +489,7 @@ EXPECT_EQ(fake_observer_->last_status.step, Step::WIFI_CREDENTIALS_RECEIVED); EXPECT_TRUE(absl::holds_alternative<mojom::WifiCredentials>( fake_observer_->last_status.payload)); + EXPECT_TRUE(GetSessionContext()->did_transfer_wifi()); histogram_tester_.ExpectBucketCount(kWifiTransferResultHistogramName, true, 1); } @@ -684,6 +685,7 @@ const auto gaia_creds = absl::get<TargetDeviceBootstrapController::GaiaCredentials>(payload); EXPECT_EQ(gaia_creds.auth_code, kTestAuthCode); + EXPECT_TRUE(GetSessionContext()->did_set_up_gaia()); histogram_tester_.ExpectBucketCount(kGaiaTransferAttemptedName, true, 1); }
diff --git a/chrome/browser/ash/login/quickstart_controller.cc b/chrome/browser/ash/login/quickstart_controller.cc index abfa624..de796f3 100644 --- a/chrome/browser/ash/login/quickstart_controller.cc +++ b/chrome/browser/ash/login/quickstart_controller.cc
@@ -20,6 +20,7 @@ #include "chrome/browser/ash/login/wizard_context.h" #include "chrome/browser/ash/login/wizard_controller.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/webui/ash/login/add_child_screen_handler.h" #include "chrome/browser/ui/webui/ash/login/consumer_update_screen_handler.h" #include "chrome/browser/ui/webui/ash/login/error_screen_handler.h" @@ -104,6 +105,43 @@ } } +QuickStartMetrics::ScreenName ScreenNameFromUiState( + QuickStartController::UiState ui_state, + QuickStartController::ControllerState controller_state) { + switch (ui_state) { + case QuickStartController::UiState::SHOWING_QR: + [[fallthrough]]; + case QuickStartController::UiState::SHOWING_PIN: + return QuickStartMetrics::ScreenName::kQSSetUpWithAndroidPhone; + case QuickStartController::UiState::CONNECTING_TO_WIFI: + return QuickStartMetrics::ScreenName::kQSConnectingToWifi; + case QuickStartController::UiState::WIFI_CREDENTIALS_RECEIVED: + return QuickStartMetrics::ScreenName::kQSWifiCredentialsReceived; + case QuickStartController::UiState::CONFIRM_GOOGLE_ACCOUNT: + return QuickStartMetrics::ScreenName::kQSSelectGoogleAccount; + case QuickStartController::UiState::SIGNING_IN: + return QuickStartMetrics::ScreenName::kQSGettingGoogleAccountInfo; + case QuickStartController::UiState::CREATING_ACCOUNT: + return QuickStartMetrics::ScreenName::kQSCreatingAccount; + case QuickStartController::UiState::SETUP_COMPLETE: + return QuickStartMetrics::ScreenName::kQSComplete; + case QuickStartController::UiState::CONNECTING_TO_PHONE: + if (controller_state == QuickStartController::ControllerState:: + WAITING_TO_RESUME_AFTER_UPDATE) { + return QuickStartMetrics::ScreenName::kQSResumingConnectionAfterUpdate; + } + [[fallthrough]]; + case QuickStartController::UiState::FALLBACK_URL_FLOW: + [[fallthrough]]; + case QuickStartController::UiState::EXIT_SCREEN: + [[fallthrough]]; + case QuickStartController::UiState::SHOWING_BLUETOOTH_DIALOG: + [[fallthrough]]; + default: + return QuickStartMetrics::ScreenName::kNone; + } +} + bool IsConnectedToWiFi() { NetworkStateHandler* nsh = NetworkHandler::Get()->network_state_handler(); return nsh->ConnectedNetworkByType(NetworkTypePattern::WiFi()) != nullptr; @@ -133,6 +171,8 @@ } // namespace QuickStartController::QuickStartController() { + metrics_ = std::make_unique<QuickStartMetrics>(); + // Main feature flag if (!features::IsOobeQuickStartEnabled()) { if (g_browser_process->local_state()->GetBoolean( @@ -149,6 +189,12 @@ return; } + // A guest session state is SessionState::OOBE if there are no other users + // added. Quick Start is not available in this case. + if (ProfileManager::GetActiveUserProfile()->IsGuestSession()) { + return; + } + InitTargetDeviceBootstrapController(); StartObservingBluetoothState(); } @@ -170,61 +216,35 @@ ui_delegates_.RemoveObserver(delegate); } -void QuickStartController::MaybeRecordQuickStartScreenOpened(UiState new_ui) { - switch (new_ui) { - case UiState::CONNECTING_TO_PHONE: - if (controller_state_ == - ControllerState::WAITING_TO_RESUME_AFTER_UPDATE) { - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSResumingConnectionAfterUpdate); - } - return; - case UiState::SHOWING_QR: - [[fallthrough]]; - case UiState::SHOWING_PIN: - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSSetUpWithAndroidPhone); - return; - case UiState::CONNECTING_TO_WIFI: - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSConnectingToWifi); - return; - case UiState::WIFI_CREDENTIALS_RECEIVED: - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSWifiCredentialsReceived); - return; - case UiState::CONFIRM_GOOGLE_ACCOUNT: - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSSelectGoogleAccount); - return; - case UiState::SIGNING_IN: - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSGettingGoogleAccountInfo); - return; - case UiState::SETUP_COMPLETE: - QuickStartMetrics::RecordScreenOpened( - QuickStartMetrics::ScreenName::kQSComplete); - return; - case UiState::CREATING_ACCOUNT: - [[fallthrough]]; - case UiState::FALLBACK_URL_FLOW: - [[fallthrough]]; - case UiState::EXIT_SCREEN: - [[fallthrough]]; - case UiState::SHOWING_BLUETOOTH_DIALOG: - [[fallthrough]]; - default: - return; +void QuickStartController::MaybeRecordQuickStartScreenOpened( + QuickStartController::UiState new_ui) { + QuickStartMetrics::ScreenName screen_name = + ScreenNameFromUiState(new_ui, controller_state_); + if (screen_name != QuickStartMetrics::ScreenName::kNone) { + metrics_->QuickStartMetrics::RecordScreenOpened(screen_name); + } +} + +void QuickStartController::MaybeRecordQuickStartScreenClosed( + QuickStartController::UiState closed_ui) { + QuickStartMetrics::ScreenName screen_name = + ScreenNameFromUiState(closed_ui, controller_state_); + if (screen_name != QuickStartMetrics::ScreenName::kNone) { + metrics_->RecordScreenClosed(screen_name); } } void QuickStartController::UpdateUiState(UiState ui_state) { QS_LOG(INFO) << "Updating UI state to " << ui_state; + std::optional<UiState> previous_ui_state = ui_state_; ui_state_ = ui_state; CHECK(!ui_delegates_.empty()); for (auto& delegate : ui_delegates_) { delegate.OnUiUpdateRequested(ui_state_.value()); } + if (previous_ui_state.has_value()) { + MaybeRecordQuickStartScreenClosed(previous_ui_state.value()); + } MaybeRecordQuickStartScreenOpened(ui_state); } @@ -470,8 +490,8 @@ // the Quick Start screen are recorded from OnStatusChanged(). HandleTransitionToQuickStartScreen(); } else if (IsSetupOngoing()) { - QuickStartMetrics::RecordScreenOpened( - ScreenNameFromOobeScreenId(current_screen)); + metrics_->RecordScreenClosed(ScreenNameFromOobeScreenId(previous_screen)); + metrics_->RecordScreenOpened(ScreenNameFromOobeScreenId(current_screen)); // Detect when the user leaves the Gaia screen during the fallback flow. if (controller_state_ ==
diff --git a/chrome/browser/ash/login/quickstart_controller.h b/chrome/browser/ash/login/quickstart_controller.h index 2401053..e568458 100644 --- a/chrome/browser/ash/login/quickstart_controller.h +++ b/chrome/browser/ash/login/quickstart_controller.h
@@ -22,6 +22,8 @@ namespace ash::quick_start { +class QuickStartMetrics; + // Main orchestrator of the QuickStart flow in OOBE // // QuickStartController holds all the logic for QuickStart and acts as the @@ -178,9 +180,12 @@ void OnPropertiesUpdated(bluetooth_config::mojom::BluetoothSystemPropertiesPtr properties) override; - // Records ScreenOpened metric when UiState changes. + // Records ScreenOpened metric when UiState or OOBE screen changes. void MaybeRecordQuickStartScreenOpened(UiState new_ui); + // Records ScreenClosed metric when UiState or OOBE screen changes. + void MaybeRecordQuickStartScreenClosed(UiState closed_ui); + // Updates the UI state and notifies the frontend. void UpdateUiState(UiState ui_state); @@ -264,6 +269,8 @@ // is shown. UI updates happen over this observation path. base::ObserverList<UiDelegate> ui_delegates_; + std::unique_ptr<QuickStartMetrics> metrics_; + // Gaia credentials used for account creation. TargetDeviceBootstrapController::GaiaCredentials gaia_creds_;
diff --git a/chrome/browser/ash/login/screens/multidevice_setup_screen.cc b/chrome/browser/ash/login/screens/multidevice_setup_screen.cc index 1df7f3d..8a054ea2 100644 --- a/chrome/browser/ash/login/screens/multidevice_setup_screen.cc +++ b/chrome/browser/ash/login/screens/multidevice_setup_screen.cc
@@ -104,8 +104,7 @@ const std::string& phone_instance_id = context.quick_start_phone_instance_id; if (!phone_instance_id.empty()) { setup_client_->SetQuickStartPhoneInstanceID(phone_instance_id); - quick_start::QuickStartMetrics::RecordScreenOpened( - quick_start::QuickStartMetrics::ScreenName::kUnifiedSetup); + quick_start_metrics_ = std::make_unique<quick_start::QuickStartMetrics>(); } // Do not skip if potential host exists but none is set yet. @@ -131,6 +130,11 @@ view_->Show(); } + if (quick_start_metrics_ != nullptr) { + quick_start_metrics_->RecordScreenOpened( + quick_start::QuickStartMetrics::ScreenName::kUnifiedSetup); + } + // Record that user was presented with setup flow to prevent spam // notifications from suggesting setup in the future. multidevice_setup::OobeCompletionTracker* oobe_completion_tracker = @@ -148,8 +152,10 @@ if (action_id == kAcceptedSetupUserAction) { RecordMultiDeviceSetupOOBEUserChoiceHistogram( MultiDeviceSetupOOBEUserChoice::kAccepted); + MaybeRecordQuickStartScreenClosed(); exit_callback_.Run(Result::NEXT); } else if (action_id == kDeclinedSetupUserAction) { + MaybeRecordQuickStartScreenClosed(); RecordMultiDeviceSetupOOBEUserChoiceHistogram( MultiDeviceSetupOOBEUserChoice::kDeclined); exit_callback_.Run(Result::NEXT); @@ -275,6 +281,12 @@ } } +void MultiDeviceSetupScreen::MaybeRecordQuickStartScreenClosed() { + if (quick_start_metrics_ != nullptr) { + quick_start_metrics_->RecordScreenClosed( + quick_start::QuickStartMetrics::ScreenName::kUnifiedSetup); + } +} void MultiDeviceSetupScreen::RecordOobeMultideviceScreenSkippedReasonHistogram( OobeMultideviceScreenSkippedReason reason) { skipped_reason_determined_ = true;
diff --git a/chrome/browser/ash/login/screens/multidevice_setup_screen.h b/chrome/browser/ash/login/screens/multidevice_setup_screen.h index c1a98dc..5c60134d 100644 --- a/chrome/browser/ash/login/screens/multidevice_setup_screen.h +++ b/chrome/browser/ash/login/screens/multidevice_setup_screen.h
@@ -26,6 +26,10 @@ class DeviceSyncClient; } +namespace quick_start { +class QuickStartMetrics; +} + class MultiDeviceSetupScreen : public BaseScreen { public: enum class Result { NEXT, NOT_APPLICABLE }; @@ -133,11 +137,16 @@ void RecordOobeMultideviceScreenSkippedReasonHistogram( OobeMultideviceScreenSkippedReason reason); + // Record Quick Start ScreenClosed if the QS screen enhancements were shown. + void MaybeRecordQuickStartScreenClosed(); + static void RecordMultiDeviceSetupOOBEUserChoiceHistogram( MultiDeviceSetupOOBEUserChoice value); raw_ptr<multidevice_setup::MultiDeviceSetupClient> setup_client_ = nullptr; raw_ptr<device_sync::DeviceSyncClient> device_sync_client_ = nullptr; + std::unique_ptr<quick_start::QuickStartMetrics> quick_start_metrics_ = + nullptr; bool skipped_ = false; bool skipped_reason_determined_ = false;
diff --git a/chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.cc b/chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.cc new file mode 100644 index 0000000..5e2bc14 --- /dev/null +++ b/chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.cc
@@ -0,0 +1,85 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.h" + +#include <memory> +#include <string_view> +#include <utility> + +#include "ash/constants/ash_pref_names.h" +#include "base/check.h" +#include "base/containers/fixed_flat_set.h" +#include "base/values.h" +#include "components/policy/core/browser/configuration_policy_handler.h" +#include "components/policy/core/browser/policy_error_map.h" +#include "components/policy/core/common/policy_map.h" +#include "components/policy/core/common/schema.h" +#include "components/policy/policy_constants.h" +#include "components/prefs/pref_value_map.h" + +namespace policy { +namespace { + +constexpr auto kKnownGoogleIntegrations = + base::MakeFixedFlatSet<std::string_view>( + {ash::prefs::kGoogleCalendarIntegrationName, + ash::prefs::kGoogleClassroomIntegrationName, + ash::prefs::kGoogleTasksIntegrationName}); + +} // namespace + +ContextualGoogleIntegrationsPoliciesHandler:: + ContextualGoogleIntegrationsPoliciesHandler(const Schema& schema) + : SchemaValidatingPolicyHandler( + key::kContextualGoogleIntegrationsConfiguration, + schema.GetKnownProperty( + key::kContextualGoogleIntegrationsConfiguration), + policy::SchemaOnErrorStrategy:: + SCHEMA_ALLOW_UNKNOWN_AND_INVALID_LIST_ENTRY) {} + +ContextualGoogleIntegrationsPoliciesHandler:: + ~ContextualGoogleIntegrationsPoliciesHandler() = default; + +bool ContextualGoogleIntegrationsPoliciesHandler::CheckPolicySettings( + const PolicyMap& policies, + PolicyErrorMap* errors) { + return TypeCheckingPolicyHandler::CheckPolicySettings( + key::kContextualGoogleIntegrationsEnabled, + base::Value::Type::BOOLEAN, + policies.Get(key::kContextualGoogleIntegrationsEnabled), errors) && + SchemaValidatingPolicyHandler::CheckPolicySettings(policies, errors); +} + +void ContextualGoogleIntegrationsPoliciesHandler::ApplyPolicySettings( + const PolicyMap& policies, + PrefValueMap* prefs) { + const auto* const umbrella_policy_value = policies.GetValue( + key::kContextualGoogleIntegrationsEnabled, base::Value::Type::BOOLEAN); + const bool is_umbrella_policy_enabled = + !umbrella_policy_value || umbrella_policy_value->GetBool(); + if (!is_umbrella_policy_enabled) { + prefs->SetValue(ash::prefs::kContextualGoogleIntegrationsConfiguration, + base::Value(base::Value::List())); + return; + } + + if (policies.IsPolicySet(key::kContextualGoogleIntegrationsConfiguration)) { + std::unique_ptr<base::Value> value; + CheckAndGetValue(policies, /*errors=*/nullptr, &value); + CHECK(value); + + base::Value::List enabled_integrations; + for (const auto& integration_value : value->GetList()) { + if (integration_value.is_string() && + kKnownGoogleIntegrations.contains(integration_value.GetString())) { + enabled_integrations.Append(integration_value.Clone()); + } + } + prefs->SetValue(ash::prefs::kContextualGoogleIntegrationsConfiguration, + base::Value(std::move(enabled_integrations))); + } +} + +} // namespace policy
diff --git a/chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.h b/chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.h new file mode 100644 index 0000000..1a27705b --- /dev/null +++ b/chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.h
@@ -0,0 +1,42 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_ASH_POLICY_HANDLERS_CONTEXTUAL_GOOGLE_INTEGRATIONS_POLICIES_HANDLER_H_ +#define CHROME_BROWSER_ASH_POLICY_HANDLERS_CONTEXTUAL_GOOGLE_INTEGRATIONS_POLICIES_HANDLER_H_ + +#include "components/policy/core/browser/configuration_policy_handler.h" + +class PrefValueMap; + +namespace policy { + +class PolicyErrorMap; +class PolicyMap; +class Schema; + +// Handles `ContextualGoogleIntegrationsEnabled` and +// `ContextualGoogleIntegrationsConfiguration` policies. +class ContextualGoogleIntegrationsPoliciesHandler + : public SchemaValidatingPolicyHandler { + public: + explicit ContextualGoogleIntegrationsPoliciesHandler(const Schema& schema); + ContextualGoogleIntegrationsPoliciesHandler( + const ContextualGoogleIntegrationsPoliciesHandler&) = delete; + ContextualGoogleIntegrationsPoliciesHandler& operator=( + const ContextualGoogleIntegrationsPoliciesHandler&) = delete; + ~ContextualGoogleIntegrationsPoliciesHandler() override; + + // SchemaValidatingPolicyHandler: + bool CheckPolicySettings(const PolicyMap& policies, + PolicyErrorMap* errors) override; + + protected: + // SchemaValidatingPolicyHandler: + void ApplyPolicySettings(const PolicyMap& policies, + PrefValueMap* prefs) override; +}; + +} // namespace policy + +#endif // CHROME_BROWSER_ASH_POLICY_HANDLERS_CONTEXTUAL_GOOGLE_INTEGRATIONS_POLICIES_HANDLER_H_
diff --git a/chrome/browser/ash/smb_client/smb_service.cc b/chrome/browser/ash/smb_client/smb_service.cc index 2f6d056..9a4e2331c 100644 --- a/chrome/browser/ash/smb_client/smb_service.cc +++ b/chrome/browser/ash/smb_client/smb_service.cc
@@ -125,12 +125,6 @@ return; } - if (user->IsActiveDirectoryUser()) { - const std::string& account_id_guid = user->GetAccountId().GetObjGuid(); - SetupKerberos(account_id_guid); - return; - } - KerberosCredentialsManager* credentials_manager = KerberosCredentialsManagerFactory::GetExisting(profile); if (credentials_manager) { @@ -384,12 +378,7 @@ smbfs_options.password_salt = info.password_salt(); } if (info.use_kerberos()) { - if (user->IsActiveDirectoryUser()) { - smbfs_options.kerberos_options = - std::make_optional<SmbFsShare::KerberosOptions>( - SmbFsShare::KerberosOptions::Source::kActiveDirectory, - user->GetAccountId().GetObjGuid()); - } else if (kerberos_credentials_updater_) { + if (kerberos_credentials_updater_) { smbfs_options.kerberos_options = std::make_optional<SmbFsShare::KerberosOptions>( SmbFsShare::KerberosOptions::Source::kKerberos,
diff --git a/chrome/browser/autofill/autofill_across_iframes_browsertest.cc b/chrome/browser/autofill/autofill_across_iframes_browsertest.cc index 8ca0a29f..a012d52 100644 --- a/chrome/browser/autofill/autofill_across_iframes_browsertest.cc +++ b/chrome/browser/autofill/autofill_across_iframes_browsertest.cc
@@ -204,7 +204,7 @@ } auto HasValue(std::string_view value) { - return Field(&FormFieldData::value, base::ASCIIToUTF16(value)); + return Property(&FormFieldData::value, base::ASCIIToUTF16(value)); } } // namespace
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc index 40dfabcf..0cbe25d 100644 --- a/chrome/browser/autofill/autofill_interactive_uitest.cc +++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -3755,7 +3755,7 @@ [[nodiscard]] static auto HasNameValue(const NameValue& nv) { return AllOf(Field("name", &FormFieldData::name, nv.name), - Field("value", &FormFieldData::value, nv.value)); + Property("value", &FormFieldData::value, nv.value)); } [[nodiscard]] static auto HasExpectedValues() { @@ -3776,7 +3776,7 @@ const NameValueUserInput& nvu) { return AllOf( Field("name", &FormFieldData::name, nvu.name), - Field("value", &FormFieldData::value, nvu.value), + Property("value", &FormFieldData::value, nvu.value), Field("user_input", &FormFieldData::user_input, nvu.user_input)); }
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc index e3c18756..2a27a91 100644 --- a/chrome/browser/autofill/form_structure_browsertest.cc +++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -134,7 +134,7 @@ } string_form += base::JoinString( {field->Type().ToStringView(), base::UTF16ToUTF8(field->name), - base::UTF16ToUTF8(field->label), base::UTF16ToUTF8(field->value), + base::UTF16ToUTF8(field->label), base::UTF16ToUTF8(field->value()), section}, " | "); string_form.push_back('\n');
diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserStateBrowserControlsVisibilityDelegate.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserStateBrowserControlsVisibilityDelegate.java index b1d1432..c6301313 100644 --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserStateBrowserControlsVisibilityDelegate.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserStateBrowserControlsVisibilityDelegate.java
@@ -10,7 +10,6 @@ import androidx.annotation.VisibleForTesting; import org.chromium.base.CommandLine; -import org.chromium.base.FeatureList; import org.chromium.base.lifetime.Destroyable; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; @@ -115,10 +114,8 @@ // there wasn't any significant change to the screen. They should unlock as soon as the // capture logic thinks it's safe to do so. Long term this can probably be removed for // all. - boolean useSuppression = - (FeatureList.isInitialized() - && ChromeFeatureList.isEnabled( - ChromeFeatureList.SUPPRESS_TOOLBAR_CAPTURES)); + boolean useSuppression = ChromeFeatureList.sSuppressionToolbarCaptures.isEnabled(); + if (!useSuppression) { ensureControlsVisibleForMinDuration(); }
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 7893ea2..19949bde 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc
@@ -22,6 +22,7 @@ #include "base/functional/callback_helpers.h" #include "base/location.h" #include "base/memory/ptr_util.h" +#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" #include "base/notreached.h" #include "base/path_service.h" @@ -35,6 +36,7 @@ #include "base/threading/thread_restrictions.h" #include "base/time/default_clock.h" #include "base/time/default_tick_clock.h" +#include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -1359,7 +1361,16 @@ std::make_unique<os_crypt_async::OSCryptAsync>(std::move(providers)); // Trigger async initialization of OSCrypt key providers. - std::ignore = os_crypt_async_->GetInstance(base::DoNothing()); + os_crypt_async_init_subscription_.emplace( + os_crypt_async_->GetInstance(base::BindOnce( + [](base::TimeTicks start_time, os_crypt_async::Encryptor encryptor, + bool success) { + base::UmaHistogramTimes("OSCrypt.AsyncInitialization.Time", + base::TimeTicks::Now() - start_time); + base::UmaHistogramBoolean("OSCrypt.AsyncInitialization.Result", + success); + }, + base::TimeTicks::Now()))); } void BrowserProcessImpl::CreateIconManager() {
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 61101b6..e4cfec3 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h
@@ -13,8 +13,10 @@ #include <stdint.h> #include <memory> +#include <optional> #include <string> +#include "base/callback_list.h" #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/sequence_checker.h" @@ -471,6 +473,8 @@ application_breadcrumbs_logger_; std::unique_ptr<os_crypt_async::OSCryptAsync> os_crypt_async_; + std::optional<base::CallbackListSubscription> + os_crypt_async_init_subscription_; SEQUENCE_CHECKER(sequence_checker_); };
diff --git a/chrome/browser/browsing_data/counters/autofill_counter_browsertest.cc b/chrome/browser/browsing_data/counters/autofill_counter_browsertest.cc index dacacc7..4a816de 100644 --- a/chrome/browser/browsing_data/counters/autofill_counter_browsertest.cc +++ b/chrome/browser/browsing_data/counters/autofill_counter_browsertest.cc
@@ -61,7 +61,7 @@ const std::string& value) { autofill::FormFieldData field; field.name = base::ASCIIToUTF16(name); - field.value = base::ASCIIToUTF16(value); + field.set_value(base::ASCIIToUTF16(value)); std::vector<autofill::FormFieldData> form_fields; form_fields.push_back(field);
diff --git a/chrome/browser/chrome_service_worker_browsertest.cc b/chrome/browser/chrome_service_worker_browsertest.cc index 481a6b9..fa5dd9649 100644 --- a/chrome/browser/chrome_service_worker_browsertest.cc +++ b/chrome/browser/chrome_service_worker_browsertest.cc
@@ -451,7 +451,7 @@ } // TODO(crbug.com/1395715): The test is flaky. Re-enable it. -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #define MAYBE_SubresourceCountUMA DISABLED_SubresourceCountUMA #else #define MAYBE_SubresourceCountUMA SubresourceCountUMA
diff --git a/chrome/browser/compose/chrome_compose_client_unittest.cc b/chrome/browser/compose/chrome_compose_client_unittest.cc index e14c2cbff..ac26420 100644 --- a/chrome/browser/compose/chrome_compose_client_unittest.cc +++ b/chrome/browser/compose/chrome_compose_client_unittest.cc
@@ -1306,7 +1306,7 @@ // properly removed. TEST_F(ChromeComposeClientTest, TestOpenDialogWithTruncatedSelectedText) { std::u16string input(u".🦄🦄🦄"); - field_data().value = input; + field_data().set_value(input); SetSelectionWithTruncation(input, 6); ShowDialogAndBindMojo(); @@ -1320,7 +1320,7 @@ // Tests that opening the dialog with user selected text will return that text // when the WebUI requests initial state. TEST_F(ChromeComposeClientTest, TestOpenDialogWithSelectedText) { - field_data().value = u"user selected text"; + field_data().set_value(u"user selected text"); SetSelection(u"selected text"); ShowDialogAndBindMojo(); @@ -1336,7 +1336,7 @@ ShowDialogAndBindMojo(); page_handler()->SaveWebUIState("web ui state"); - field_data().value = u"user selected text"; + field_data().set_value(u"user selected text"); SetSelection(u"selected text"); ShowDialogAndBindMojo(); @@ -1858,7 +1858,7 @@ // Show the FRE dialog and end the session by re-opening with selection. ShowDialogAndBindMojo(); - field_data().value = u"user selected text"; + field_data().set_value(u"user selected text"); SetSelection(u"selected text"); ShowDialogAndBindMojo(); histograms().ExpectBucketCount( @@ -2538,7 +2538,7 @@ EXPECT_TRUE(compose_future.Take()); // Reset future for second compose call. // Start a new session with selected text. - field_data().value = u"user selected text"; + field_data().set_value(u"user selected text"); SetSelection(u"selected text"); ShowDialogAndBindMojo();
diff --git a/chrome/browser/devtools/protocol/autofill_handler.cc b/chrome/browser/devtools/protocol/autofill_handler.cc index c79c3d3..7bdd269 100644 --- a/chrome/browser/devtools/protocol/autofill_handler.cc +++ b/chrome/browser/devtools/protocol/autofill_handler.cc
@@ -270,7 +270,7 @@ field_id_to_form_field_data.find(autofill_field->global_id()); const std::u16string filled_value = filled_field_iterator != field_id_to_form_field_data.end() - ? filled_field_iterator->second->value + ? filled_field_iterator->second->value() : u""; filled_fields_to_be_sent_to_devtools->push_back( protocol::Autofill::FilledField::Create()
diff --git a/chrome/browser/devtools/protocol/devtools_autofill_browsertest.cc b/chrome/browser/devtools/protocol/devtools_autofill_browsertest.cc index 0d185ba..b0b72dd 100644 --- a/chrome/browser/devtools/protocol/devtools_autofill_browsertest.cc +++ b/chrome/browser/devtools/protocol/devtools_autofill_browsertest.cc
@@ -488,12 +488,12 @@ // AutofillHandler::OnFillOrPreviewDataModelForm() to obtain the type // predictions. auto form_structure = std::make_unique<FormStructure>(form); - form_structure->field(0)->value = u""; + form_structure->field(0)->set_value(u""); form_structure->field(0)->set_server_predictions( {test::CreateFieldPrediction(NAME_FULL)}); form_structure->field(0)->SetHtmlType(HtmlFieldType::kName, HtmlFieldMode::kShipping); - form_structure->field(1)->value = u""; + form_structure->field(1)->set_value(u""); form_structure->field(1)->set_server_predictions( {test::CreateFieldPrediction(NAME_FULL)}); form_structure->field(1)->SetHtmlType(HtmlFieldType::kUnspecified, @@ -552,13 +552,13 @@ std::string(FieldTypeToDeveloperRepresentationString( af->Type().GetStorableType())))); // Note: we read the value from `FormFieldData`. - EXPECT_THAT(ff, FilledFieldHasAttributeWithValue16("value", ffd->value)); + EXPECT_THAT(ff, FilledFieldHasAttributeWithValue16("value", ffd->value())); EXPECT_THAT(ff, FilledFieldHasAttributeWithValue16( "frameId", base::UTF8ToUTF16( main_frame()->GetDevToolsFrameToken().ToString()))); EXPECT_THAT(ff, - Not(FilledFieldHasAttributeWithValue16("value", af->value))); + Not(FilledFieldHasAttributeWithValue16("value", af->value()))); EXPECT_THAT(ff, FilledFieldHasAttributeWithValue( "htmlType", std::string(autofill::FormControlTypeToString(
diff --git a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.cc b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.cc index 24d50e7..805fa4d 100644 --- a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.cc +++ b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.cc
@@ -6,12 +6,10 @@ #include "base/check_op.h" #include "base/functional/callback.h" -#include "base/i18n/time_formatting.h" #include "base/logging.h" #include "base/metrics/histogram_functions.h" #include "base/task/sequenced_task_runner.h" #include "base/time/time.h" -#include "chrome/browser/enterprise/data_protection/data_protection_page_user_data.h" #include "chrome/browser/interstitials/enterprise_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service.h" @@ -32,6 +30,9 @@ constexpr char kURLVerdictSourceHistogram[] = "Enterprise.DataProtection.URLVerdictSource"; +// This is non-null in tests to install a fake service. +safe_browsing::RealTimeUrlLookupServiceBase* g_lookup_service = nullptr; + content::Page& GetPageFromWebContents(content::WebContents* web_contents) { return web_contents->GetPrimaryMainFrame()->GetPage(); } @@ -50,7 +51,8 @@ DCHECK(user_data); // TODO: Move this logic out of this class and into DataProtectionPageUserData - if (!user_data->watermark_text().empty() && user_data->rt_lookup_response() && + if (!user_data->settings().watermark_text.empty() && + user_data->rt_lookup_response() && !user_data->rt_lookup_response()->threat_info().empty() && user_data->rt_lookup_response()->threat_info(0).verdict_type() == safe_browsing::RTLookupResponse::ThreatInfo::SAFE) { @@ -63,20 +65,20 @@ /*threat_type=*/"", *user_data->rt_lookup_response()); } - std::move(callback).Run(user_data->watermark_text()); + std::move(callback).Run(user_data->settings()); } -void UpdateDataProtectionState( +void OnDoLookupComplete( base::WeakPtr<content::WebContents> web_contents, DataProtectionNavigationObserver::Callback callback, - std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response, - const std::string& watermark_text) { + const std::string& identifier, + std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response) { if (!web_contents) { return; } - DataProtectionPageUserData::UpdateDataProtectionState( - GetPageFromWebContents(web_contents.get()), watermark_text, + DataProtectionPageUserData::UpdateRTLookupResponse( + GetPageFromWebContents(web_contents.get()), identifier, std::move(rt_lookup_response)); RunPendingNavigationCallback(web_contents.get(), std::move(callback)); } @@ -86,14 +88,8 @@ url.SchemeIs(extensions::kExtensionScheme); } -base::Time TimestampToTime(safe_browsing::Timestamp timestamp) { - return base::Time::UnixEpoch() + base::Seconds(timestamp.seconds()) + - base::Nanoseconds(timestamp.nanos()); -} - using LookupCallback = - base::OnceCallback<void(std::unique_ptr<safe_browsing::RTLookupResponse>, - const std::string&)>; + base::OnceCallback<void(std::unique_ptr<safe_browsing::RTLookupResponse>)>; void OnRealTimeLookupComplete( LookupCallback callback, @@ -103,13 +99,11 @@ std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - std::string watermark_text; - if (is_success && rt_lookup_response && - rt_lookup_response->threat_info_size() > 0) { - watermark_text = - GetWatermarkString(identifier, rt_lookup_response->threat_info(0)); + if (!is_success) { + rt_lookup_response.reset(); } - std::move(callback).Run(std::move(rt_lookup_response), watermark_text); + + std::move(callback).Run(std::move(rt_lookup_response)); } void DoLookup(safe_browsing::RealTimeUrlLookupServiceBase* lookup_service, @@ -129,22 +123,6 @@ sessions::SessionTabHelper::IdForTab(web_contents)); } -void DoStringLookup(safe_browsing::RealTimeUrlLookupServiceBase* lookup_service, - const GURL& url, - const std::string& identifier, - DataProtectionNavigationObserver::Callback callback, - content::WebContents* web_contents) { - DoLookup(lookup_service, url, identifier, - base::BindOnce( - [](DataProtectionNavigationObserver::Callback callback, - std::unique_ptr<safe_browsing::RTLookupResponse> response, - const std::string& watermark_text) { - std::move(callback).Run(watermark_text); - }, - std::move(callback)), - web_contents); -} - bool IsEnterpriseLookupEnabled(Profile* profile) { // Some tests return a non-null pointer for the enterprise lookup service, // so we need to defensively check if enterprise lookup is enabled. @@ -173,33 +151,6 @@ } // namespace -std::string GetWatermarkString( - const std::string& identifier, - const safe_browsing::RTLookupResponse::ThreatInfo& threat_info) { - if (!threat_info.has_matched_url_navigation_rule()) { - return std::string(); - } - - const safe_browsing::MatchedUrlNavigationRule& rule = - threat_info.matched_url_navigation_rule(); - if (!rule.has_watermark_message()) { - return std::string(); - } - - const safe_browsing::MatchedUrlNavigationRule::WatermarkMessage& watermark = - rule.watermark_message(); - - std::string watermark_text = base::StrCat( - {identifier, "\n", - base::TimeFormatAsIso8601(TimestampToTime(watermark.timestamp()))}); - - if (!watermark.watermark_message().empty()) { - watermark_text = - base::StrCat({watermark.watermark_message(), "\n", watermark_text}); - } - return watermark_text; -} - // static void DataProtectionNavigationObserver::CreateForNavigationIfNeeded( Profile* profile, @@ -215,7 +166,7 @@ // present. This is needed to handle for example navigating from a // watermarked page to the NTP. if (SkipUrl(navigation_handle->GetURL())) { - std::move(callback).Run(std::string()); + std::move(callback).Run(UrlSettings::None()); return; } @@ -237,7 +188,7 @@ Callback callback) { auto* ud = GetUserData(web_contents); if (ud) { - std::move(callback).Run(ud->watermark_text()); + std::move(callback).Run(ud->settings()); return; } @@ -247,22 +198,49 @@ // If this is a skipped URL, force the view to clear any data protections if // present. This is needed to handle for example navigating from a - // watermarked page to the NTP. + // protected page to the NTP. if (SkipUrl(web_contents->GetLastCommittedURL())) { - std::move(callback).Run(std::string()); + std::move(callback).Run(UrlSettings::None()); return; } - auto* lookup_service = safe_browsing:: - ChromeEnterpriseRealTimeUrlLookupServiceFactory::GetForProfile(profile); + std::string identifier = GetIdentifier(profile); + + auto* lookup_service = + g_lookup_service + ? g_lookup_service + : safe_browsing::ChromeEnterpriseRealTimeUrlLookupServiceFactory:: + GetForProfile(profile); if (lookup_service) { - DoStringLookup(lookup_service, web_contents->GetLastCommittedURL(), - GetIdentifier(profile), std::move(callback), web_contents); + auto lookup_callback = base::BindOnce( + [](const std::string& identifier, + DataProtectionNavigationObserver::Callback callback, + base::WeakPtr<content::WebContents> web_contents, + std::unique_ptr<safe_browsing::RTLookupResponse> response) { + if (web_contents) { + DataProtectionPageUserData::UpdateRTLookupResponse( + GetPageFromWebContents(web_contents.get()), identifier, + std::move(response)); + auto* user_data = GetUserData(web_contents.get()); + DCHECK(user_data); + std::move(callback).Run(user_data->settings()); + } + }, + std::move(identifier), std::move(callback), web_contents->GetWeakPtr()); + + DoLookup(lookup_service, web_contents->GetLastCommittedURL(), + GetIdentifier(profile), std::move(lookup_callback), web_contents); } else { - std::move(callback).Run(std::string()); + std::move(callback).Run(UrlSettings::None()); } } +// static +void DataProtectionNavigationObserver::SetLookupServiceForTesting( + safe_browsing::RealTimeUrlLookupServiceBase* lookup_service) { + g_lookup_service = lookup_service; +} + DataProtectionNavigationObserver::DataProtectionNavigationObserver( content::NavigationHandle& navigation_handle, safe_browsing::RealTimeUrlLookupServiceBase* lookup_service, @@ -296,13 +274,11 @@ DataProtectionNavigationObserver::~DataProtectionNavigationObserver() = default; void DataProtectionNavigationObserver::OnLookupComplete( - std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response, - const std::string& watermark_text) { + std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(!is_from_cache_); rt_lookup_response_ = std::move(rt_lookup_response); - watermark_text_ = watermark_text; } void DataProtectionNavigationObserver::DidRedirectNavigation( @@ -333,8 +309,8 @@ } // If the page already has cached data protection information, use that first. - // Otherwise if `watermark_text_` has been set then use the specified value. - // Finally, ask the the lookup service right now for a lookup. + // Otherwise if `rt_lookup_response_` has been set then use the specified + // value. Finally, ask the the lookup service right now for a lookup. // // The third case could imply a delay between finishing the navigation and // setting the screenshot state correctly. This should only happen when @@ -346,17 +322,17 @@ LogVerdictSource(URLVerdictSource::kPageUserData); RunPendingNavigationCallback(web_contents(), std::move(pending_navigation_callback_)); - } else if (watermark_text_.has_value()) { + } else if (rt_lookup_response_) { LogVerdictSource(URLVerdictSource::kCachedLookupResult); - UpdateDataProtectionState(web_contents()->GetWeakPtr(), - std::move(pending_navigation_callback_), - std::move(rt_lookup_response_), *watermark_text_); + OnDoLookupComplete(web_contents()->GetWeakPtr(), + std::move(pending_navigation_callback_), identifier_, + std::move(rt_lookup_response_)); } else { LogVerdictSource(URLVerdictSource::kPostNavigationLookup); DoLookup( lookup_service_, navigation_handle->GetURL(), identifier_, - base::BindOnce(&UpdateDataProtectionState, web_contents()->GetWeakPtr(), - std::move(pending_navigation_callback_)), + base::BindOnce(&OnDoLookupComplete, web_contents()->GetWeakPtr(), + std::move(pending_navigation_callback_), identifier_), web_contents()); } }
diff --git a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.h b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.h index 427e540..c769242 100644 --- a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.h +++ b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.h
@@ -10,6 +10,7 @@ #include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" +#include "chrome/browser/enterprise/data_protection/data_protection_page_user_data.h" #include "components/safe_browsing/core/common/proto/realtimeapi.pb.h" #include "content/public/browser/navigation_handle_user_data.h" #include "content/public/browser/web_contents_observer.h" @@ -40,7 +41,7 @@ // Callback that is meant to update data protection settings. For now, // it is only accepts a std::string parameter for the watermark string. // change this when adding new data protection settings. - using Callback = base::OnceCallback<void(const std::string&)>; + using Callback = base::OnceCallback<void(const UrlSettings&)>; // Log values for source of realtime URL lookup verdict. This is used to log // metrics as DataProtectionURLVerdictSource, so numeric values must not be @@ -96,13 +97,15 @@ ~DataProtectionNavigationObserver() override; + static void SetLookupServiceForTesting( + safe_browsing::RealTimeUrlLookupServiceBase* lookup_service); + private: friend class content::NavigationHandleUserData< DataProtectionNavigationObserver>; void OnLookupComplete( - std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response, - const std::string& watermark_text); + std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response); // content::WebContentsObserver: void DidRedirectNavigation( @@ -112,11 +115,6 @@ bool is_from_cache_ = false; - // The full watermark string to show over the page. Empty if no watermark - // verdict has been obtained. - // TODO: Remove this value as it is redundant with `rt_lookup_response_`. - std::optional<std::string> watermark_text_; - // The verdict corresponding to `watermark_text_` if it is populated. Used for // reporting. std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response_; @@ -134,12 +132,6 @@ NAVIGATION_HANDLE_USER_DATA_KEY_DECL(); }; -// Return the watermark string to display if present in `threat_info`. Revealed -// for testing -std::string GetWatermarkString( - const std::string& identifier, - const safe_browsing::RTLookupResponse::ThreatInfo& threat_info); - } // namespace enterprise_data_protection #endif // CHROME_BROWSER_ENTERPRISE_DATA_PROTECTION_DATA_PROTECTION_NAVIGATION_OBSERVER_H_
diff --git a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer_unittest.cc b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer_unittest.cc index 89209dec..568c02d8 100644 --- a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer_unittest.cc +++ b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer_unittest.cc
@@ -41,6 +41,10 @@ "chrome-extension://abcdefghijklmnop", }; +content::Page& GetPageFromWebContents(content::WebContents* web_contents) { + return web_contents->GetPrimaryMainFrame()->GetPage(); +} + safe_browsing::RTLookupResponse::ThreatInfo GetTestThreatInfo( std::string watermark_text, int64_t timestamp_seconds) { @@ -84,21 +88,33 @@ callback_task_runner->PostTask( FROM_HERE, - base::BindOnce(std::move(response_callback), - /*is_rt_lookup_successful=*/true, - /*is_cached_response=*/true, std::move(response))); - - if (!on_start_lookup_complete_.is_null()) { - std::move(on_start_lookup_complete_).Run(); - } + base::BindOnce( + [](safe_browsing::RTLookupResponseCallback response_callback, + base::OnceClosure on_start_lookup_complete, + bool is_rt_lookup_successful, + std::unique_ptr<safe_browsing::RTLookupResponse> response) { + std::move(response_callback) + .Run(is_rt_lookup_successful, + /*is_cached_response=*/false, std::move(response)); + if (!on_start_lookup_complete.is_null()) { + std::move(on_start_lookup_complete).Run(); + } + }, + std::move(response_callback), std::move(on_start_lookup_complete_), + is_rt_lookup_successful_, std::move(response))); } void set_on_start_lookup_complete(base::OnceClosure closure) { on_start_lookup_complete_ = std::move(closure); } + void set_is_rt_lookup_successful(bool successful) { + is_rt_lookup_successful_ = successful; + } + private: base::OnceClosure on_start_lookup_complete_; + bool is_rt_lookup_successful_ = true; }; class DataProtectionNavigationObserverTest @@ -154,6 +170,7 @@ } void TearDown() override { + DataProtectionNavigationObserver::SetLookupServiceForTesting(nullptr); SetDMTokenForTesting(policy::DMToken::CreateEmptyToken()); enterprise_connectors::RealtimeReportingClientFactory::GetForProfile( profile()) @@ -193,7 +210,7 @@ simulator->Start(); content::NavigationHandle* navigation_handle = simulator->GetNavigationHandle(); - base::test::TestFuture<const std::string&> future; + base::test::TestFuture<const UrlSettings&> future; base::test::TestFuture<void> future_lookup_complete; lookup_service_.set_on_start_lookup_complete( @@ -212,7 +229,7 @@ // Call DidFinishNavigation() navigation, which should invoke our callback. simulator->Commit(); - std::string watermark_text = future.Get(); + std::string watermark_text = future.Get().watermark_text; Profile* profile = Profile::FromBrowserContext(browser_context()); auto* connectors_service = enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( @@ -221,6 +238,52 @@ "custom_message\n" + connectors_service->GetRealTimeUrlCheckIdentifier() + "\n2024-02-29T04:36:04.000Z"); + + // Value should be cached. + auto* user_data = DataProtectionPageUserData::GetForPage( + GetPageFromWebContents(web_contents())); + ASSERT_TRUE(user_data); + EXPECT_NE(user_data->settings().watermark_text.find("custom_message"), + std::string::npos); +} + +// An invalid watermark response generates no report. +TEST_F(DataProtectionNavigationObserverTest, InvalidResponse_NoReport) { + enterprise_connectors::test::EventReportValidator validator(client_.get()); + validator.ExpectNoReport(); + + auto simulator = content::NavigationSimulator::CreateRendererInitiated( + GURL("https://test"), web_contents()->GetPrimaryMainFrame()); + + // DataProtectionNavigationObserver does not implement DidStartNavigation(), + // this is called by BrowserView. So we simply call Start() and manually + // construct the class using the navigation handle that is provided once + // Start() is called. + simulator->Start(); + content::NavigationHandle* navigation_handle = + simulator->GetNavigationHandle(); + base::test::TestFuture<const UrlSettings&> future; + + base::test::TestFuture<void> future_lookup_complete; + lookup_service_.set_is_rt_lookup_successful(false); + lookup_service_.set_on_start_lookup_complete( + future_lookup_complete.GetCallback()); + + // The DataProtectionNavigationObserver needs to be constructed using + // CreateForNavigationHandle to allow for proper lifetime management of the + // object, since we call DeleteForNavigationHandle() in our + // DidFinishNavigation() override. + enterprise_data_protection::DataProtectionNavigationObserver:: + CreateForNavigationHandle(*navigation_handle, &lookup_service_, + navigation_handle->GetWebContents(), + future.GetCallback()); + EXPECT_TRUE(future_lookup_complete.Wait()); + + // Call DidFinishNavigation() navigation, which should invoke our callback. + simulator->Commit(); + + std::string watermark_text = future.Get().watermark_text; + EXPECT_TRUE(watermark_text.empty()); } TEST_F(DataProtectionNavigationObserverTest, @@ -234,11 +297,11 @@ content::NavigationHandle* navigation_handle = simulator->GetNavigationHandle(); - base::test::TestFuture<const std::string&> future; + base::test::TestFuture<const UrlSettings&> future; DataProtectionNavigationObserver::CreateForNavigationIfNeeded( Profile::FromBrowserContext(browser_context()), navigation_handle, future.GetCallback()); - ASSERT_EQ(future.Get(), std::string()); + ASSERT_EQ(future.Get(), UrlSettings()); } } @@ -248,14 +311,38 @@ for (const auto* url : kSkippedUrls) { NavigateAndCommit(GURL(url)); - base::test::TestFuture<const std::string&> future; + base::test::TestFuture<const UrlSettings&> future; DataProtectionNavigationObserver::GetDataProtectionSettings( Profile::FromBrowserContext(browser_context()), web_contents(), future.GetCallback()); - ASSERT_EQ(future.Get(), std::string()); + ASSERT_EQ(future.Get(), UrlSettings()); } } +TEST_F(DataProtectionNavigationObserverTest, GetDataProtectionSettings) { + enterprise_connectors::test::EventReportValidator validator(client_.get()); + validator.ExpectNoReport(); + DataProtectionNavigationObserver::SetLookupServiceForTesting( + &lookup_service_); + + SetContents(CreateTestWebContents()); + NavigateAndCommit(GURL("https://example.com")); + + base::test::TestFuture<const UrlSettings&> future; + DataProtectionNavigationObserver::GetDataProtectionSettings( + Profile::FromBrowserContext(browser_context()), web_contents(), + future.GetCallback()); + EXPECT_NE(future.Get().watermark_text.find("custom_message"), + std::string::npos); + + // Value should be cached. + auto* user_data = DataProtectionPageUserData::GetForPage( + GetPageFromWebContents(web_contents())); + ASSERT_TRUE(user_data); + EXPECT_NE(user_data->settings().watermark_text.find("custom_message"), + std::string::npos); +} + namespace { struct WatermarkStringParams {
diff --git a/chrome/browser/enterprise/data_protection/data_protection_page_user_data.cc b/chrome/browser/enterprise/data_protection/data_protection_page_user_data.cc index 543b610..73a2df2 100644 --- a/chrome/browser/enterprise/data_protection/data_protection_page_user_data.cc +++ b/chrome/browser/enterprise/data_protection/data_protection_page_user_data.cc
@@ -4,35 +4,95 @@ #include "chrome/browser/enterprise/data_protection/data_protection_page_user_data.h" +#include "base/i18n/time_formatting.h" +#include "base/no_destructor.h" +#include "base/strings/strcat.h" #include "content/public/browser/page.h" namespace enterprise_data_protection { +static base::Time TimestampToTime(safe_browsing::Timestamp timestamp) { + return base::Time::UnixEpoch() + base::Seconds(timestamp.seconds()) + + base::Nanoseconds(timestamp.nanos()); +} + +bool UrlSettings::operator==(const UrlSettings& other) const { + return watermark_text == other.watermark_text && + allow_screenshots == other.allow_screenshots; +} + // static -void DataProtectionPageUserData::UpdateDataProtectionState( +const UrlSettings& UrlSettings::None() { + static base::NoDestructor<UrlSettings> empty; + return *empty.get(); +} + +// static +void DataProtectionPageUserData::UpdateRTLookupResponse( content::Page& page, - const std::string& watermark_text, + const std::string& identifier, std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response) { auto* ud = GetForPage(page); if (ud) { - ud->set_watermark_text(watermark_text); + // UpdateWatermarkStringInSettings() should be called after settings + // the lookup response. ud->set_rt_lookup_response(std::move(rt_lookup_response)); + ud->UpdateWatermarkStringInSettings(identifier); return; } - CreateForPage(page, watermark_text, std::move(rt_lookup_response)); + CreateForPage(page, identifier, UrlSettings(), std::move(rt_lookup_response)); } DataProtectionPageUserData::DataProtectionPageUserData( content::Page& page, - const std::string& watermark_text, + const std::string& identifier, + UrlSettings settings, std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response) : PageUserData(page), - watermark_text_(watermark_text), - rt_lookup_response_(std::move(rt_lookup_response)) {} + settings_(std::move(settings)), + rt_lookup_response_(std::move(rt_lookup_response)) { + UpdateWatermarkStringInSettings(identifier); +} DataProtectionPageUserData::~DataProtectionPageUserData() = default; +void DataProtectionPageUserData::UpdateWatermarkStringInSettings( + const std::string& identifier) { + settings_.watermark_text = + (rt_lookup_response_ && rt_lookup_response_->threat_info_size() > 0) + ? GetWatermarkString(identifier, rt_lookup_response_->threat_info(0)) + : std::string(); +} + PAGE_USER_DATA_KEY_IMPL(DataProtectionPageUserData); +std::string GetWatermarkString( + const std::string& identifier, + const safe_browsing::RTLookupResponse::ThreatInfo& threat_info) { + if (!threat_info.has_matched_url_navigation_rule()) { + return std::string(); + } + + const safe_browsing::MatchedUrlNavigationRule& rule = + threat_info.matched_url_navigation_rule(); + if (!rule.has_watermark_message()) { + return std::string(); + } + + const safe_browsing::MatchedUrlNavigationRule::WatermarkMessage& watermark = + rule.watermark_message(); + + std::string watermark_text = base::StrCat( + {identifier, "\n", + base::TimeFormatAsIso8601(TimestampToTime(watermark.timestamp()))}); + + if (!watermark.watermark_message().empty()) { + watermark_text = + base::StrCat({watermark.watermark_message(), "\n", watermark_text}); + } + + return watermark_text; +} + } // namespace enterprise_data_protection
diff --git a/chrome/browser/enterprise/data_protection/data_protection_page_user_data.h b/chrome/browser/enterprise/data_protection/data_protection_page_user_data.h index 082f982..bdcd03d1 100644 --- a/chrome/browser/enterprise/data_protection/data_protection_page_user_data.h +++ b/chrome/browser/enterprise/data_protection/data_protection_page_user_data.h
@@ -12,6 +12,20 @@ namespace enterprise_data_protection { +// A structure holding all data protection settings for a given URL. +struct UrlSettings { + // The watermark text that should apply to tabs showing this URL. An empty + // string means no watermark should be shown. + std::string watermark_text; + + bool allow_screenshots = true; + + bool operator==(const UrlSettings& other) const; + + // URL settings that imply no data protections are enabled. + static const UrlSettings& None(); +}; + // Page user data attached at the end of a WebContents navigation to remember // the screenshot allow or deny state. This user data is attached in the // DidFinishNavigation() step of the navigation. @@ -23,21 +37,18 @@ class DataProtectionPageUserData : public content::PageUserData<DataProtectionPageUserData> { public: - // Sets the DataProtection settings for the page of the WebContents' primary + // Sets the RT URL lookup response for the page of the WebContents' primary // main RFH. During navigations this should only be called after the page is // ready to be committed, otherwise the state will be saved to an intermediate // Page. - static void UpdateDataProtectionState( + static void UpdateRTLookupResponse( content::Page& page, - const std::string& watermark_text, + const std::string& identifier, std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response); ~DataProtectionPageUserData() override; - void set_watermark_text(const std::string& watermark_text) { - watermark_text_ = watermark_text; - } - const std::string& watermark_text() { return watermark_text_; } + const UrlSettings& settings() { return settings_; } void set_rt_lookup_response( std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response) { @@ -52,15 +63,28 @@ DataProtectionPageUserData( content::Page& page, - const std::string& watermark_text, + const std::string& identifier, + UrlSettings settings, std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response); - std::string watermark_text_; + // Updates the `watermark_text` in `settings_` based on the current + // watermark text in `rt_lookup_response_`. If there is no response or + // if the response does not contain watermark text, the field in + // `settings_` is cleared. + void UpdateWatermarkStringInSettings(const std::string& identifier); + + UrlSettings settings_; std::unique_ptr<safe_browsing::RTLookupResponse> rt_lookup_response_; PAGE_USER_DATA_KEY_DECL(); }; +// Return the watermark string to display if present in `threat_info`. Revealed +// for testing +std::string GetWatermarkString( + const std::string& identifier, + const safe_browsing::RTLookupResponse::ThreatInfo& threat_info); + } // namespace enterprise_data_protection #endif // CHROME_BROWSER_ENTERPRISE_DATA_PROTECTION_DATA_PROTECTION_PAGE_USER_DATA_H_
diff --git a/chrome/browser/enterprise/data_protection/data_protection_page_user_data_unittest.cc b/chrome/browser/enterprise/data_protection/data_protection_page_user_data_unittest.cc index 5245874..418fadb 100644 --- a/chrome/browser/enterprise/data_protection/data_protection_page_user_data_unittest.cc +++ b/chrome/browser/enterprise/data_protection/data_protection_page_user_data_unittest.cc
@@ -35,9 +35,8 @@ std::unique_ptr<content::WebContents> web_contents_; }; -} // namespace - -TEST_F(DataProtectionPageUserDataTest, TestCreateForPage) { +std::unique_ptr<safe_browsing::RTLookupResponse> BuildDummyResponse( + const char* watermark_text) { auto rt_lookup_response = std::make_unique<safe_browsing::RTLookupResponse>(); auto* threat_info = rt_lookup_response->add_threat_info(); threat_info->set_verdict_type( @@ -47,15 +46,25 @@ matched_url_navigation_rule->set_rule_id("test rule id"); matched_url_navigation_rule->set_rule_name("test rule name"); matched_url_navigation_rule->set_matched_url_category("test rule category"); + matched_url_navigation_rule->mutable_watermark_message() + ->set_watermark_message(watermark_text); + return rt_lookup_response; +} + +} // namespace + +TEST_F(DataProtectionPageUserDataTest, TestCreateForPage) { + auto rt_lookup_response = BuildDummyResponse("example"); content::Page& page = web_contents_->GetPrimaryPage(); content::PageUserData< enterprise_data_protection::DataProtectionPageUserData>:: - CreateForPage(page, "example", std::move(rt_lookup_response)); + CreateForPage(page, std::string(), UrlSettings(), + std::move(rt_lookup_response)); auto* ud = enterprise_data_protection::DataProtectionPageUserData::GetForPage(page); - ASSERT_EQ(ud->watermark_text(), "example"); + ASSERT_NE(ud->settings().watermark_text.find("example"), std::string::npos); ASSERT_TRUE(ud->rt_lookup_response()); ASSERT_EQ(ud->rt_lookup_response()->threat_info_size(), 1); @@ -69,4 +78,50 @@ ASSERT_EQ(ud_rule.matched_url_category(), "test rule category"); } +TEST_F(DataProtectionPageUserDataTest, NoRTURLLookupResponse) { + content::Page& page = web_contents_->GetPrimaryPage(); + content::PageUserData< + enterprise_data_protection::DataProtectionPageUserData>:: + CreateForPage(page, std::string(), UrlSettings(), nullptr); + + auto* ud = + enterprise_data_protection::DataProtectionPageUserData::GetForPage(page); + ASSERT_TRUE(ud->settings().watermark_text.empty()); +} + +TEST_F(DataProtectionPageUserDataTest, NoThreatInfo) { + auto rt_lookup_response = std::make_unique<safe_browsing::RTLookupResponse>(); + + content::Page& page = web_contents_->GetPrimaryPage(); + content::PageUserData< + enterprise_data_protection::DataProtectionPageUserData>:: + CreateForPage(page, std::string(), UrlSettings(), + std::move(rt_lookup_response)); + + auto* ud = + enterprise_data_protection::DataProtectionPageUserData::GetForPage(page); + ASSERT_TRUE(ud->settings().watermark_text.empty()); + ASSERT_TRUE(ud->rt_lookup_response()); + ASSERT_EQ(ud->rt_lookup_response()->threat_info_size(), 0); +} + +TEST_F(DataProtectionPageUserDataTest, UpdateRTLookupResponse) { + auto rt_lookup_response = BuildDummyResponse("first"); + + content::Page& page = web_contents_->GetPrimaryPage(); + enterprise_data_protection::DataProtectionPageUserData:: + UpdateRTLookupResponse(page, std::string(), + std::move(rt_lookup_response)); + auto* ud = + enterprise_data_protection::DataProtectionPageUserData::GetForPage(page); + ASSERT_NE(ud->settings().watermark_text.find("first"), std::string::npos); + + rt_lookup_response = BuildDummyResponse("second"); + enterprise_data_protection::DataProtectionPageUserData:: + UpdateRTLookupResponse(page, std::string(), + std::move(rt_lookup_response)); + ud = enterprise_data_protection::DataProtectionPageUserData::GetForPage(page); + ASSERT_NE(ud->settings().watermark_text.find("second"), std::string::npos); +} + } // namespace enterprise_data_protection
diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc index b04c568..630eb43 100644 --- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
@@ -572,8 +572,9 @@ ASSERT_TRUE(RunExtensionTest("webrequest/test_simple")) << message_; } +// TODO(crbug.com/333791060): Parameterized test is flaky on multiple bots. IN_PROC_BROWSER_TEST_P(ExtensionWebRequestApiTestWithContextType, - WebRequestComplex) { + DISABLED_WebRequestComplex) { ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(RunExtensionTest("webrequest/test_complex")) << message_; }
diff --git a/chrome/browser/extensions/subscribe_page_action_browsertest.cc b/chrome/browser/extensions/subscribe_page_action_browsertest.cc index a6ab435..827ee90 100644 --- a/chrome/browser/extensions/subscribe_page_action_browsertest.cc +++ b/chrome/browser/extensions/subscribe_page_action_browsertest.cc
@@ -303,7 +303,9 @@ "element 'desc_0' not found", "This feed contains no entries.", "Error"); } -IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, RSSParseFeedInvalidFeed2) { +// TODO(https://crbug.com/331144174): Test is flaky across multiple builders. +IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, + DISABLED_RSSParseFeedInvalidFeed2) { ASSERT_TRUE(embedded_test_server()->Start()); const Extension* extension = LoadExtension(
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc index 3375bcd..fa2d12a 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc
@@ -72,7 +72,7 @@ } // Trigger only on empty fields. - if (!field.value.empty()) { + if (!field.value().empty()) { LogAutofillInternals("not triggered because field was not empty."); return FastCheckoutTriggerOutcome::kFailureFieldNotEmpty; }
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc index f1fa0a3..1286a07e 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc
@@ -190,7 +190,7 @@ } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_FieldHasValue_ReturnsFalse) { - field_.value = u"value"; + field_.set_value(u"value"); EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kFailureFieldNotEmpty); }
diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn index 03c8eb2..f9510952 100644 --- a/chrome/browser/flags/BUILD.gn +++ b/chrome/browser/flags/BUILD.gn
@@ -64,7 +64,6 @@ sources = [ "android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlagsAnnotationUnitTest.java", "android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithProcessorUnitTest.java", - "android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithoutProcessorUnitTest.java", ] deps = [ ":java",
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java index 742921e..d67398a61 100644 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -780,9 +780,10 @@ // MutableFlagWithSafeDefault instances. /* Alphabetical: */ + public static final MutableFlagWithSafeDefault sAdaptiveButtonInTopToolbarCustomizationV2 = + newMutableFlagWithSafeDefault(ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2, false); public static final MutableFlagWithSafeDefault sAndroidImprovedBookmarks = newMutableFlagWithSafeDefault(ANDROID_IMPROVED_BOOKMARKS, false); - public static final MutableFlagWithSafeDefault sAnimateSuggestionsListAppearance = newMutableFlagWithSafeDefault(ANIMATE_SUGGESTIONS_LIST_APPEARANCE, false); public static final MutableFlagWithSafeDefault sAndroidTabDeclutter = @@ -821,6 +822,8 @@ newMutableFlagWithSafeDefault(TAB_ID_MAP, true); public static final MutableFlagWithSafeDefault sToolbarScrollAblation = newMutableFlagWithSafeDefault(TOOLBAR_SCROLL_ABLATION, false); + public static final MutableFlagWithSafeDefault sTotallyEdgeToEdge = + newMutableFlagWithSafeDefault(TOTALLY_EDGE_TO_EDGE, false); public static final MutableFlagWithSafeDefault sTouchDownTriggerForPrefetch = newMutableFlagWithSafeDefault(OMNIBOX_TOUCH_DOWN_TRIGGER_FOR_PREFETCH, false); public static final MutableFlagWithSafeDefault sVisibleUrlTruncationV2 =
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithoutProcessorUnitTest.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithoutProcessorUnitTest.java deleted file mode 100644 index 282a445..0000000 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithoutProcessorUnitTest.java +++ /dev/null
@@ -1,82 +0,0 @@ -// Copyright 2020 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.chrome.browser.flags; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.robolectric.annotation.Config; - -import org.chromium.base.FeatureList; -import org.chromium.base.test.BaseRobolectricTestRunner; -import org.chromium.base.test.util.Features.DisableFeatures; -import org.chromium.base.test.util.Features.EnableFeatures; - -import java.util.Collections; - -/** - * Tests the behavior of {@link ChromeFeatureList} in Robolectric unit tests when the rule - * Features.JUnitProcessor is NOT present. - */ -@RunWith(BaseRobolectricTestRunner.class) -@Config(manifest = Config.NONE) -public class ChromeFeatureListWithoutProcessorUnitTest { - /** In unit tests, all flags checked must have their value specified. */ - @Test(expected = AssertionError.class) - public void testNoOverridesDefaultDisabled_asserts() { - ChromeFeatureList.isEnabled(ChromeFeatureList.TEST_DEFAULT_DISABLED); - } - - /** In unit tests, all flags checked must have their value specified. */ - @Test(expected = AssertionError.class) - public void testNoOverridesDefaultEnabled_asserts() { - ChromeFeatureList.isEnabled(ChromeFeatureList.TEST_DEFAULT_ENABLED); - } - - /** - * In unit tests without a Features.JUnitProcessor, the EnableFeatures annotation does not work. - */ - @Test(expected = AssertionError.class) - @EnableFeatures(ChromeFeatureList.TEST_DEFAULT_DISABLED) - public void testAnnotationEnabled_asserts() { - ChromeFeatureList.isEnabled(ChromeFeatureList.TEST_DEFAULT_DISABLED); - } - - /** - * In unit tests without a Features.JUnitProcessor, the DisableFeatures annotation does not - * work. - */ - @Test(expected = AssertionError.class) - @DisableFeatures(ChromeFeatureList.TEST_DEFAULT_ENABLED) - public void testAnnotationDisabled_asserts() { - ChromeFeatureList.isEnabled(ChromeFeatureList.TEST_DEFAULT_ENABLED); - } - - /** - * In unit tests without a Features.JUnitProcessor, flags may have their value specified by - * calling {@link FeatureList#setTestFeatures(java.util.Map)}. - */ - @Test - public void testSetTestFeaturesEnabled_returnsEnabled() { - FeatureList.setTestFeatures( - Collections.singletonMap(ChromeFeatureList.TEST_DEFAULT_DISABLED, true)); - assertTrue(ChromeFeatureList.isEnabled(ChromeFeatureList.TEST_DEFAULT_DISABLED)); - FeatureList.setTestFeatures(null); - } - - /** - * In unit tests without a Features.JUnitProcessor, flags may have their value specified by - * calling {@link FeatureList#setTestFeatures(java.util.Map)}. - */ - @Test - public void testSetTestFeaturesDisabled_returnsDisabled() { - FeatureList.setTestFeatures( - Collections.singletonMap(ChromeFeatureList.TEST_DEFAULT_ENABLED, false)); - assertFalse(ChromeFeatureList.isEnabled(ChromeFeatureList.TEST_DEFAULT_ENABLED)); - FeatureList.setTestFeatures(null); - } -}
diff --git a/chrome/browser/nearby_sharing/incoming_frames_reader.cc b/chrome/browser/nearby_sharing/incoming_frames_reader.cc index 1937783d..8d9397f3 100644 --- a/chrome/browser/nearby_sharing/incoming_frames_reader.cc +++ b/chrome/browser/nearby_sharing/incoming_frames_reader.cc
@@ -7,7 +7,7 @@ #include <type_traits> #include "base/task/sequenced_task_runner.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/services/nearby/public/mojom/nearby_decoder.mojom.h" #include "components/cross_device/logging/logging.h"
diff --git a/chrome/browser/nearby_sharing/incoming_frames_reader_unittest.cc b/chrome/browser/nearby_sharing/incoming_frames_reader_unittest.cc index 5a3a49ac..8735bd6 100644 --- a/chrome/browser/nearby_sharing/incoming_frames_reader_unittest.cc +++ b/chrome/browser/nearby_sharing/incoming_frames_reader_unittest.cc
@@ -9,8 +9,8 @@ #include "base/run_loop.h" #include "base/test/bind.h" #include "base/time/time.h" -#include "chrome/browser/nearby_sharing/fake_nearby_connection.h" #include "chrome/services/sharing/public/proto/wire_format.pb.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" #include "chromeos/ash/services/nearby/public/cpp/mock_nearby_process_manager.h" #include "chromeos/ash/services/nearby/public/cpp/mock_nearby_sharing_decoder.h" #include "content/public/test/browser_task_environment.h"
diff --git a/chrome/browser/nearby_sharing/nearby_connection_impl.h b/chrome/browser/nearby_sharing/nearby_connection_impl.h index 287bb84..546f3eaa 100644 --- a/chrome/browser/nearby_sharing/nearby_connection_impl.h +++ b/chrome/browser/nearby_sharing/nearby_connection_impl.h
@@ -5,13 +5,12 @@ #ifndef CHROME_BROWSER_NEARBY_SHARING_NEARBY_CONNECTION_IMPL_H_ #define CHROME_BROWSER_NEARBY_SHARING_NEARBY_CONNECTION_IMPL_H_ -#include "base/memory/raw_ptr.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" - #include <queue> #include <vector> +#include "base/memory/raw_ptr.h" #include "base/sequence_checker.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/services/nearby/public/mojom/nearby_connections_types.mojom.h" class NearbyConnectionsManager;
diff --git a/chrome/browser/nearby_sharing/nearby_connections_manager_impl.cc b/chrome/browser/nearby_sharing/nearby_connections_manager_impl.cc index 6105391..6b3d6e5 100644 --- a/chrome/browser/nearby_sharing/nearby_connections_manager_impl.cc +++ b/chrome/browser/nearby_sharing/nearby_connections_manager_impl.cc
@@ -141,14 +141,13 @@ } ash::nearby::presence::mojom::MetadataPtr MetadataToMojom( - ::nearby::internal::DeviceIdentityMetaData metadata) { + ::nearby::internal::Metadata metadata) { return ash::nearby::presence::mojom::Metadata::New( ash::nearby::presence::proto::DeviceTypeToMojom(metadata.device_type()), - metadata.device_name(), + metadata.account_name(), metadata.device_name(), metadata.user_name(), + metadata.device_profile_url(), std::vector<uint8_t>(metadata.bluetooth_mac_address().begin(), - metadata.bluetooth_mac_address().end()), - std::vector<uint8_t>(metadata.device_id().begin(), - metadata.device_id().end())); + metadata.bluetooth_mac_address().end())); } ash::nearby::presence::mojom::CredentialType CredentialTypeToMojom( @@ -214,8 +213,7 @@ return ash::nearby::presence::mojom::PresenceDevice::New( device.GetEndpointId(), std::move(actions), - /*stable_device_id=*/std::nullopt, - MetadataToMojom(device.GetDeviceIdentityMetadata()), + /*stable_device_id=*/std::nullopt, MetadataToMojom(device.GetMetadata()), device.GetDecryptSharedCredential() ? SharedCredentialToMojom(device.GetDecryptSharedCredential().value()) : nullptr);
diff --git a/chrome/browser/nearby_sharing/nearby_connections_manager_impl_unittest.cc b/chrome/browser/nearby_sharing/nearby_connections_manager_impl_unittest.cc index 690e985..d4e23cb1 100644 --- a/chrome/browser/nearby_sharing/nearby_connections_manager_impl_unittest.cc +++ b/chrome/browser/nearby_sharing/nearby_connections_manager_impl_unittest.cc
@@ -40,9 +40,10 @@ const char kRawAuthenticationToken[] = {0x00, 0x05, 0x04, 0x03, 0x02}; const char kBytePayload[] = {0x08, 0x09, 0x06, 0x04, 0x0f}; const char kBytePayload2[] = {0x0a, 0x0b, 0x0c, 0x0d, 0x0e}; +const char kAccountName[] = "criscros@gmail.com"; +const char kUserName[] = "CrisCrOS"; const char kDeviceName[] = "Cris Cros's Pixel"; -const uint8_t kDeviceId[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}; +const char kDeviceProfileUrl[] = "cris_cros_url"; const int64_t kPayloadId = 689777; const int64_t kPayloadId2 = 777689; const int64_t kPayloadId3 = 986777; @@ -131,24 +132,26 @@ } ash::nearby::presence::mojom::MetadataPtr MetadataToMojom( - ::nearby::internal::DeviceIdentityMetaData metadata) { + ::nearby::internal::Metadata metadata) { return ash::nearby::presence::mojom::Metadata::New( - DeviceTypeToMojom(metadata.device_type()), metadata.device_name(), + DeviceTypeToMojom(metadata.device_type()), metadata.account_name(), + metadata.device_name(), metadata.user_name(), + metadata.device_profile_url(), std::vector<uint8_t>(metadata.bluetooth_mac_address().begin(), - metadata.bluetooth_mac_address().end()), - std::vector<uint8_t>(metadata.device_id().begin(), - metadata.device_id().end())); + metadata.bluetooth_mac_address().end())); } nearby::presence::PresenceDevice CreatePresenceDevice() { - nearby::internal::DeviceIdentityMetaData metadata; + nearby::internal::Metadata metadata; metadata.set_device_type(nearby::internal::DeviceType::DEVICE_TYPE_PHONE); + metadata.set_account_name(kAccountName); + metadata.set_user_name(kUserName); metadata.set_device_name(kDeviceName); + metadata.set_device_profile_url(kDeviceProfileUrl); metadata.set_bluetooth_mac_address((char*)kBluetoothMacAddress); - metadata.set_device_id((char*)kDeviceId); nearby::presence::PresenceDevice presence_device(kRemoteEndpointId); - presence_device.SetDeviceIdentityMetaData(metadata); + presence_device.SetMetadata(metadata); presence_device.AddAction(static_cast<uint32_t>( nearby::presence::ActionBit::kPresenceManagerAction)); @@ -164,8 +167,7 @@ return ash::nearby::presence::mojom::PresenceDevice::New( device.GetEndpointId(), std::move(actions), - /*stable_device_id=*/std::nullopt, - MetadataToMojom(device.GetDeviceIdentityMetadata()), + /*stable_device_id=*/std::nullopt, MetadataToMojom(device.GetMetadata()), /*decrypt_shared_credential=*/nullptr); }
diff --git a/chrome/browser/nearby_sharing/nearby_sharing_service_impl_unittest.cc b/chrome/browser/nearby_sharing/nearby_sharing_service_impl_unittest.cc index 71860c6..4f3c8b29 100644 --- a/chrome/browser/nearby_sharing/nearby_sharing_service_impl_unittest.cc +++ b/chrome/browser/nearby_sharing/nearby_sharing_service_impl_unittest.cc
@@ -36,7 +36,6 @@ #include "chrome/browser/nearby_sharing/constants.h" #include "chrome/browser/nearby_sharing/contacts/fake_nearby_share_contact_manager.h" #include "chrome/browser/nearby_sharing/contacts/nearby_share_contact_manager_impl.h" -#include "chrome/browser/nearby_sharing/fake_nearby_connection.h" #include "chrome/browser/nearby_sharing/fast_initiation/fast_initiation_advertiser.h" #include "chrome/browser/nearby_sharing/fast_initiation/fast_initiation_scanner.h" #include "chrome/browser/nearby_sharing/local_device_data/fake_nearby_share_local_device_data_manager.h" @@ -55,6 +54,7 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" #include "chromeos/ash/components/feature_usage/feature_usage_metrics.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" #include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connections_manager.h" #include "chromeos/ash/components/nearby/common/connections_manager/nearby_connections_manager.h" #include "chromeos/ash/services/nearby/public/cpp/mock_nearby_process_manager.h"
diff --git a/chrome/browser/nearby_sharing/paired_key_verification_runner.h b/chrome/browser/nearby_sharing/paired_key_verification_runner.h index a522fd2..958ccc3 100644 --- a/chrome/browser/nearby_sharing/paired_key_verification_runner.h +++ b/chrome/browser/nearby_sharing/paired_key_verification_runner.h
@@ -16,8 +16,8 @@ #include "chrome/browser/nearby_sharing/certificates/nearby_share_certificate_manager.h" #include "chrome/browser/nearby_sharing/certificates/nearby_share_decrypted_public_certificate.h" #include "chrome/browser/nearby_sharing/incoming_frames_reader.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" #include "chrome/browser/nearby_sharing/share_target.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/services/nearby/public/mojom/nearby_decoder_types.mojom.h" #include "chromeos/ash/services/nearby/public/mojom/nearby_share_settings.mojom.h"
diff --git a/chrome/browser/nearby_sharing/paired_key_verification_runner_unittest.cc b/chrome/browser/nearby_sharing/paired_key_verification_runner_unittest.cc index 42673fe..10b4700 100644 --- a/chrome/browser/nearby_sharing/paired_key_verification_runner_unittest.cc +++ b/chrome/browser/nearby_sharing/paired_key_verification_runner_unittest.cc
@@ -17,10 +17,10 @@ #include "chrome/browser/nearby_sharing/certificates/fake_nearby_share_certificate_manager.h" #include "chrome/browser/nearby_sharing/certificates/nearby_share_decrypted_public_certificate.h" #include "chrome/browser/nearby_sharing/certificates/test_util.h" -#include "chrome/browser/nearby_sharing/fake_nearby_connection.h" #include "chrome/browser/nearby_sharing/incoming_frames_reader.h" #include "chrome/browser/nearby_sharing/share_target.h" #include "chrome/services/sharing/public/proto/wire_format.pb.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" #include "chromeos/ash/services/nearby/public/cpp/mock_nearby_process_manager.h" #include "content/public/test/browser_task_environment.h" #include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/nearby_sharing/public/cpp/BUILD.gn b/chrome/browser/nearby_sharing/public/cpp/BUILD.gn deleted file mode 100644 index 0b01812..0000000 --- a/chrome/browser/nearby_sharing/public/cpp/BUILD.gn +++ /dev/null
@@ -1,22 +0,0 @@ -# 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. - -assert(is_chromeos, "Nearby Share is CrOS only") - -static_library("cpp") { - sources = [ - "nearby_connection.cc", - "nearby_connection.h", - ] - - deps = [ - "//base", - "//chrome/browser/nearby_sharing/common", - "//chromeos/ash/components/nearby/presence:presence", - "//chromeos/ash/services/nearby/public/mojom", - "//third_party/abseil-cpp:absl", - ] - - public_deps = [ "//third_party/nearby:presence_types" ] -}
diff --git a/chrome/browser/nearby_sharing/public/cpp/README.md b/chrome/browser/nearby_sharing/public/cpp/README.md deleted file mode 100644 index 91048c6..0000000 --- a/chrome/browser/nearby_sharing/public/cpp/README.md +++ /dev/null
@@ -1,18 +0,0 @@ -This directory exposes the NearbyConnectionsManager interface as a separate -build target so that `//chrome/browser/ash/login/oobe_quick_start` may depend -on it without creating a dependency cycle. - -``` -//chrome/browser, nearby_sharing - | | - v | -//chrome/browser/ash | - | | - v v -oobe_quick_start -----> //chrome/browser/nearby_sharing/public/cpp -``` - -This is intended as a temporary solution. We plan to refactor the code in -`nearby_sharing` and extract NearbyConnectionsManager, -NearbyConnectionsManagerImpl, and any other code useful outside of the context -of Nearby Share into a reuseable component.
diff --git a/chrome/browser/nearby_sharing/share_target_info.cc b/chrome/browser/nearby_sharing/share_target_info.cc index 6891885..ef3a9b3 100644 --- a/chrome/browser/nearby_sharing/share_target_info.cc +++ b/chrome/browser/nearby_sharing/share_target_info.cc
@@ -3,7 +3,8 @@ // found in the LICENSE file. #include "chrome/browser/nearby_sharing/share_target_info.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" + +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" ShareTargetInfo::ShareTargetInfo() = default;
diff --git a/chrome/browser/optimization_guide/android/DEPS b/chrome/browser/optimization_guide/android/DEPS index 5bbfd42..9ff59f8 100644 --- a/chrome/browser/optimization_guide/android/DEPS +++ b/chrome/browser/optimization_guide/android/DEPS
@@ -1,4 +1,5 @@ include_rules = [ "+content/public/android/java", "+content/public/test", + "+third_party/jni_zero", ]
diff --git a/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridge.java b/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridge.java index 93a4924..aa01aea 100644 --- a/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridge.java +++ b/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuideBridge.java
@@ -9,6 +9,7 @@ import org.jni_zero.CalledByNative; import org.jni_zero.JNINamespace; +import org.jni_zero.JniType; import org.jni_zero.NativeMethods; import org.chromium.base.ThreadUtils; @@ -327,17 +328,17 @@ void canApplyOptimization( long nativeOptimizationGuideBridge, - GURL url, + @JniType("GURL") GURL url, int optimizationType, OptimizationGuideCallback callback); void canApplyOptimizationOnDemand( long nativeOptimizationGuideBridge, - GURL[] urls, + @JniType("std::vector<GURL>") GURL[] urls, int[] optimizationTypes, int requestContext, OnDemandOptimizationGuideCallback callback, - byte[] requestContextMetadata); + @JniType("jni_zero::ByteArrayView") byte[] requestContextMetadata); void onNewPushNotification(long nativeOptimizationGuideBridge, byte[] encodedNotification);
diff --git a/chrome/browser/optimization_guide/android/optimization_guide_bridge.cc b/chrome/browser/optimization_guide/android/optimization_guide_bridge.cc index e60cb5f..c7c0eff9 100644 --- a/chrome/browser/optimization_guide/android/optimization_guide_bridge.cc +++ b/chrome/browser/optimization_guide/android/optimization_guide_bridge.cc
@@ -228,11 +228,11 @@ void OptimizationGuideBridge::CanApplyOptimization( JNIEnv* env, - const JavaParamRef<jobject>& java_gurl, + GURL& url, jint optimization_type, const JavaParamRef<jobject>& java_callback) { optimization_guide_keyed_service_->CanApplyOptimization( - *url::GURLAndroid::ToNativeGURL(env, java_gurl), + url, static_cast<optimization_guide::proto::OptimizationType>( optimization_type), base::BindOnce(&OnOptimizationGuideDecision, @@ -241,23 +241,18 @@ void OptimizationGuideBridge::CanApplyOptimizationOnDemand( JNIEnv* env, - const JavaParamRef<jobjectArray>& java_gurls, + std::vector<GURL>& urls, const JavaParamRef<jintArray>& optimization_types, jint request_context, const JavaParamRef<jobject>& java_callback, - jbyteArray request_context_metadata_serialized) { - // Convert GURLs to native. - std::vector<GURL> urls; - url::GURLAndroid::JavaGURLArrayToGURLVector(env, java_gurls, &urls); - - int bytes_length = env->GetArrayLength(request_context_metadata_serialized); - jbyte* bytes = - env->GetByteArrayElements(request_context_metadata_serialized, nullptr); + jni_zero::ByteArrayView& request_context_metadata_serialized) { proto::RequestContextMetadata request_context_metadata_deserialized; - request_context_metadata_deserialized.ParseFromArray(bytes, bytes_length); + request_context_metadata_deserialized.ParseFromArray( + request_context_metadata_serialized.data(), + request_context_metadata_serialized.size()); std::optional<optimization_guide::proto::RequestContextMetadata> request_context_metadata = - (env->GetArrayLength(request_context_metadata_serialized) == 0) + request_context_metadata_serialized.empty() ? std::nullopt : std::make_optional(request_context_metadata_deserialized);
diff --git a/chrome/browser/optimization_guide/android/optimization_guide_bridge.h b/chrome/browser/optimization_guide/android/optimization_guide_bridge.h index b9626f06..9496b13 100644 --- a/chrome/browser/optimization_guide/android/optimization_guide_bridge.h +++ b/chrome/browser/optimization_guide/android/optimization_guide_bridge.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_OPTIMIZATION_GUIDE_ANDROID_OPTIMIZATION_GUIDE_BRIDGE_H_ #include <jni.h> + #include <vector> #include "base/android/scoped_java_ref.h" @@ -13,6 +14,8 @@ #include "base/memory/raw_ptr.h" #include "components/optimization_guide/proto/hints.pb.h" #include "components/optimization_guide/proto/push_notification.pb.h" +#include "third_party/jni_zero/jni_zero.h" +#include "url/gurl.h" class OptimizationGuideKeyedService; @@ -43,16 +46,16 @@ const base::android::JavaParamRef<jintArray>& joptimization_types); void CanApplyOptimization( JNIEnv* env, - const base::android::JavaParamRef<jobject>& java_gurl, + GURL& url, jint optimization_type, const base::android::JavaParamRef<jobject>& java_callback); void CanApplyOptimizationOnDemand( JNIEnv* env, - const base::android::JavaParamRef<jobjectArray>& java_gurls, + std::vector<GURL>& urls, const base::android::JavaParamRef<jintArray>& joptimization_types, jint request_context, const base::android::JavaParamRef<jobject>& java_callback, - jbyteArray request_context_metadata_serialized); + jni_zero::ByteArrayView& request_context_metadata_serialized); void OnNewPushNotification( JNIEnv* env, const base::android::JavaRef<jbyteArray>& j_encoded_notification);
diff --git a/chrome/browser/os_crypt/os_crypt_async_browsertest.cc b/chrome/browser/os_crypt/os_crypt_async_browsertest.cc index eca319c..1906c1f 100644 --- a/chrome/browser/os_crypt/os_crypt_async_browsertest.cc +++ b/chrome/browser/os_crypt/os_crypt_async_browsertest.cc
@@ -6,13 +6,17 @@ #include "base/functional/bind.h" #include "base/test/bind.h" +#include "base/test/metrics/histogram_tester.h" #include "chrome/browser/browser_process.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/os_crypt/async/browser/os_crypt_async.h" #include "components/os_crypt/async/common/encryptor.h" #include "content/public/test/browser_test.h" -using OSCryptAsyncBrowserTest = InProcessBrowserTest; +class OSCryptAsyncBrowserTest : public InProcessBrowserTest { + protected: + base::HistogramTester histogram_tester_; +}; // Test the basic interface to Encrypt and Decrypt data. IN_PROC_BROWSER_TEST_F(OSCryptAsyncBrowserTest, EncryptDecrypt) { @@ -25,6 +29,12 @@ std::move(instance)); })); ASSERT_TRUE(encryptor); + // These histograms should always have been recorded by the time the + // GetInstance callback above has happened, since the browser registers its + // metrics callback before anything else gets a chance to. + histogram_tester_.ExpectTotalCount("OSCrypt.AsyncInitialization.Time", 1u); + histogram_tester_.ExpectUniqueSample("OSCrypt.AsyncInitialization.Result", + true, 1u); auto ciphertext = encryptor->EncryptString("plaintext"); ASSERT_TRUE(ciphertext);
diff --git a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerCustomizationsUmaUnitTest.java b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerCustomizationsUmaUnitTest.java index 0241196..1187547 100644 --- a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerCustomizationsUmaUnitTest.java +++ b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerCustomizationsUmaUnitTest.java
@@ -38,6 +38,8 @@ import org.chromium.base.FeatureList.TestValues; import org.chromium.base.supplier.Supplier; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.Features.DisableFeatures; +import org.chromium.base.test.util.Features.EnableFeatures; import org.chromium.base.test.util.HistogramWatcher; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; @@ -108,20 +110,20 @@ } @Test + @EnableFeatures(ChromeFeatureList.PARTNER_CUSTOMIZATIONS_UMA) public void testIsEnabled() { - FeatureList.setTestValues(mEnabledTestValues); Assert.assertTrue(PartnerCustomizationsUma.isEnabled()); } @Test + @DisableFeatures(ChromeFeatureList.PARTNER_CUSTOMIZATIONS_UMA) public void testIsEnabled_false() { - FeatureList.setTestValues(mDisabledTestValues); Assert.assertFalse(PartnerCustomizationsUma.isEnabled()); } @Test + @EnableFeatures(ChromeFeatureList.PARTNER_CUSTOMIZATIONS_UMA) public void testOnFinishNativeInitializationEnabled_alreadyEnabled() { - FeatureList.setTestValues(mEnabledTestValues); mPartnerCustomizationsUma.onFinishNativeInitializationOrEnabled( mActivityLifecycleDispatcherMock, () -> mDidCall = true); verifyNoInteractions(mActivityLifecycleDispatcherMock); @@ -129,8 +131,8 @@ } @Test + @DisableFeatures(ChromeFeatureList.PARTNER_CUSTOMIZATIONS_UMA) public void testOnFinishNativeInitializationEnabled_alreadyDisabled() { - FeatureList.setTestValues(mDisabledTestValues); mPartnerCustomizationsUma.onFinishNativeInitializationOrEnabled( mActivityLifecycleDispatcherMock, () -> mDidCall = true); verifyNoInteractions(mActivityLifecycleDispatcherMock); @@ -147,6 +149,8 @@ @Test public void testOnFinishNativeInitializationEnabled_beforeNativeInit() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); mPartnerCustomizationsUma.onFinishNativeInitializationOrEnabled( mActivityLifecycleDispatcherMock, () -> mDidCall = true); NativeInitObserver observer = captureObserverFromLifecycleMock(); @@ -163,6 +167,8 @@ @Test public void testOnFinishNativeInitializationEnabled_beforeNativeInitDisabled() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); mPartnerCustomizationsUma.onFinishNativeInitializationOrEnabled( mActivityLifecycleDispatcherMock, () -> mDidCall = true); NativeInitObserver observer = captureObserverFromLifecycleMock(); @@ -521,6 +527,8 @@ @Test public void testCreateNtpIncorrectlyBeforeCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(NTP_INCORRECTLY, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -548,6 +556,8 @@ @Test public void testCreateNtpCorrectlyBeforeCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(NTP_CORRECTLY, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -575,6 +585,8 @@ @Test public void testCreateNtpUnknownBeforeCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(NTP_UNKNOWN, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted(builder, NOT_CACHED, SOME_DELEGATE, CANCELLED, UNUSED_TIME); @@ -600,6 +612,8 @@ @Test public void testCreatePartnerHomepageBeforeCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(PARTNER_CUSTOM_HOMEPAGE, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -627,6 +641,8 @@ @Test public void testCreateOtherHomepageBeforeCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(OTHER_CUSTOM_HOMEPAGE, false, SOME_DELEGATE); expectInitializationCompleted( @@ -659,6 +675,8 @@ @Test public void testCreateNtpCorrectlyCached() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(NTP_CORRECTLY, CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -686,6 +704,8 @@ @Test public void testCreatePartnerHomepageCached() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(PARTNER_CUSTOM_HOMEPAGE, CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -713,6 +733,8 @@ @Test public void testCreateNtpCorrectlyAfterCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(NTP_CORRECTLY, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -737,6 +759,8 @@ @Test public void testCreatePartnerHomepageAfterCustomization() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(PARTNER_CUSTOM_HOMEPAGE, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted( @@ -765,6 +789,8 @@ @Test public void testCreateInitialTabCalledBeforeCustomizationStarts() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder beforeStartedBuilder = HistogramWatcher.newBuilder() .expectNoRecords( @@ -804,6 +830,8 @@ */ @Test public void testCreateInitialTabCalledMultipleTimes() { + // Unset test values so that FeatureList#isInitialized returns false. + FeatureList.setTestValues(null); HistogramWatcher.Builder builder = expectCustomizationOutcome(PARTNER_CUSTOM_HOMEPAGE, NOT_CACHED, SOME_DELEGATE); expectInitializationCompleted(
diff --git a/chrome/browser/pdf/pdf_extension_accessibility_test.cc b/chrome/browser/pdf/pdf_extension_accessibility_test.cc index 96e1c275..7f1ff1cb 100644 --- a/chrome/browser/pdf/pdf_extension_accessibility_test.cc +++ b/chrome/browser/pdf/pdf_extension_accessibility_test.cc
@@ -44,7 +44,6 @@ #include "content/public/browser/ax_inspect_factory.h" #include "content/public/browser/browser_accessibility_state.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/content_switches.h" #include "content/public/test/accessibility_notification_waiter.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" @@ -58,6 +57,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/context_menu_data/untrustworthy_context_menu_params.h" #include "ui/accessibility/accessibility_features.h" +#include "ui/accessibility/accessibility_switches.h" #include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_enum_util.h" #include "ui/accessibility/ax_features.mojom-features.h"
diff --git a/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_browsertest.cc b/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_browsertest.cc index 88b1d2a8..6ac8eee 100644 --- a/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_browsertest.cc +++ b/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_browsertest.cc
@@ -119,17 +119,22 @@ } }; -// Tests SiteDataCacheFacade with different values of the -// "RunPerformanceManagerOnMainThread" feature. +struct PMThreadingConfiguration { + bool run_on_main_thread; + bool run_on_main_thread_sync; +}; + +// Tests SiteDataCacheFacade in different threading configurations. class SiteDataCacheFacadeBrowserTest : public InProcessBrowserTest, - public ::testing::WithParamInterface<bool> { + public ::testing::WithParamInterface<PMThreadingConfiguration> { using Super = InProcessBrowserTest; protected: SiteDataCacheFacadeBrowserTest() { - scoped_feature_list_.InitWithFeatureState(features::kRunOnMainThread, - GetParam()); + scoped_feature_list_.InitWithFeatureStates( + {{features::kRunOnMainThread, GetParam().run_on_main_thread}, + {features::kRunOnMainThreadSync, GetParam().run_on_main_thread_sync}}); } void SetUpOnMainThread() override { @@ -244,9 +249,18 @@ std::optional<ClearSiteDataOnProfileDestroyed> clear_site_data_; }; -INSTANTIATE_TEST_SUITE_P(All, - SiteDataCacheFacadeBrowserTest, - ::testing::Bool()); +INSTANTIATE_TEST_SUITE_P( + , + SiteDataCacheFacadeBrowserTest, + ::testing::Values( + PMThreadingConfiguration{.run_on_main_thread = false, + .run_on_main_thread_sync = false}, + + PMThreadingConfiguration{.run_on_main_thread = true, + .run_on_main_thread_sync = false}, + + PMThreadingConfiguration{.run_on_main_thread = false, + .run_on_main_thread_sync = true})); // TODO(crbug.com/330771327): This test is consistently failing across multiple // builders. Pre-test: Sets up state before the main test by writing some
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index ce937e8..01506aba 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -185,6 +185,7 @@ #include "chrome/browser/ash/plugin_vm/plugin_vm_pref_names.h" #include "chrome/browser/ash/policy/handlers/app_launch_automation_policy_handler.h" #include "chrome/browser/ash/policy/handlers/configuration_policy_handler_ash.h" +#include "chrome/browser/ash/policy/handlers/contextual_google_integrations_policies_handler.h" #include "chrome/browser/ash/policy/handlers/lacros_availability_policy_handler.h" #include "chrome/browser/ash/policy/handlers/lacros_selection_policy_handler.h" #include "chrome/browser/ash/policy/handlers/multi_screen_capture_policy_handler.h" @@ -2923,6 +2924,9 @@ chrome_schema)); handlers->AddHandler(std::make_unique<DriveFileSyncAvailablePolicyHandler>()); handlers->AddHandler(std::make_unique<ScreenCaptureLocationPolicyHandler>()); + handlers->AddHandler( + std::make_unique<ContextualGoogleIntegrationsPoliciesHandler>( + chrome_schema)); #endif // BUILDFLAG(IS_CHROMEOS_ASH) // On most platforms, there is a legacy policy
diff --git a/chrome/browser/policy/messaging_layer/upload/encrypted_reporting_client.cc b/chrome/browser/policy/messaging_layer/upload/encrypted_reporting_client.cc index 8ba16a77..03df746 100644 --- a/chrome/browser/policy/messaging_layer/upload/encrypted_reporting_client.cc +++ b/chrome/browser/policy/messaging_layer/upload/encrypted_reporting_client.cc
@@ -651,9 +651,7 @@ std::move(callback).Run(base::unexpected( Status(error::DATA_LOSS, base::StrCat( - {"Response code: ", base::NumberToString(response_code), " ", - ::net::GetHttpReasonPhrase( - static_cast<::net::HttpStatusCode>(response_code))})))); + {"Response code: ", base::NumberToString(response_code)})))); return; } if (!response.has_value()) {
diff --git a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsBridge.java b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsBridge.java index 5942f3bb..050b421 100644 --- a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsBridge.java +++ b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsBridge.java
@@ -7,43 +7,46 @@ import org.jni_zero.JNINamespace; import org.jni_zero.NativeMethods; +import org.chromium.chrome.browser.profiles.Profile; + /** Reads and writes preferences related to preloading. */ -// TODO(crbug.com/1410601): Pass in the profile and remove GetActiveUserProfile in C++. @JNINamespace("prefetch") public class PreloadPagesSettingsBridge { /** + * @param profile The {@link Profile} associated with the settings. * @return The current Preload Pages state (off, standard or extended). */ - public static @PreloadPagesState int getState() { - return PreloadPagesSettingsBridgeJni.get().getState(); + public static @PreloadPagesState int getState(Profile profile) { + return PreloadPagesSettingsBridgeJni.get().getState(profile); } /** * Sets the current Preload Pages state. * - * @param mode The desired new Preload Pages state. + * @param profile The {@link Profile} associated with the settings. + * @param state The desired new Preload Pages state. */ - public static void setState(@PreloadPagesState int state) { - PreloadPagesSettingsBridgeJni.get().setState(state); + public static void setState(Profile profile, @PreloadPagesState int state) { + PreloadPagesSettingsBridgeJni.get().setState(profile, state); } /** - * Determines whether the Preload Pages state is controlled by an enterprise - * policy. + * Determines whether the Preload Pages state is controlled by an enterprise policy. * + * @param profile The {@link Profile} associated with the settings. * @return True if the Preload Pages state is managed. */ - public static boolean isNetworkPredictionManaged() { - return PreloadPagesSettingsBridgeJni.get().isNetworkPredictionManaged(); + public static boolean isNetworkPredictionManaged(Profile profile) { + return PreloadPagesSettingsBridgeJni.get().isNetworkPredictionManaged(profile); } @NativeMethods public interface Natives { @PreloadPagesState - int getState(); + int getState(Profile profile); - void setState(@PreloadPagesState int mode); + void setState(Profile profile, @PreloadPagesState int mode); - boolean isNetworkPredictionManaged(); + boolean isNetworkPredictionManaged(Profile profile); } }
diff --git a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragment.java b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragment.java index 5812f5a..12d9c287 100644 --- a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragment.java +++ b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragment.java
@@ -10,6 +10,7 @@ import androidx.annotation.VisibleForTesting; import androidx.preference.Preference; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate; import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher; import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; @@ -30,8 +31,8 @@ /** * @return A summary that describes the current Preload Pages state. */ - public static String getPreloadPagesSummaryString(Context context) { - @PreloadPagesState int preloadPagesState = PreloadPagesSettingsBridge.getState(); + public static String getPreloadPagesSummaryString(Context context, Profile profile) { + @PreloadPagesState int preloadPagesState = PreloadPagesSettingsBridge.getState(profile); if (preloadPagesState == PreloadPagesState.EXTENDED_PRELOADING) { return context.getString(R.string.preload_pages_extended_preloading_title); } @@ -50,7 +51,7 @@ ManagedPreferenceDelegate managedPreferenceDelegate = createManagedPreferenceDelegate(); mPreloadPagesPreference = findPreference(PREF_PRELOAD_PAGES); - mPreloadPagesPreference.init(PreloadPagesSettingsBridge.getState()); + mPreloadPagesPreference.init(PreloadPagesSettingsBridge.getState(getProfile())); mPreloadPagesPreference.setPreloadPagesStateDetailsRequestedListener(this); mPreloadPagesPreference.setManagedPreferenceDelegate(managedPreferenceDelegate); mPreloadPagesPreference.setOnPreferenceChangeListener(this); @@ -91,7 +92,7 @@ String key = preference.getKey(); assert PREF_MANAGED_DISCLAIMER_TEXT.equals(key) || PREF_PRELOAD_PAGES.equals(key) : "Wrong preference key: " + key; - return PreloadPagesSettingsBridge.isNetworkPredictionManaged(); + return PreloadPagesSettingsBridge.isNetworkPredictionManaged(getProfile()); } }; } @@ -101,11 +102,11 @@ String key = preference.getKey(); assert PREF_PRELOAD_PAGES.equals(key) : "Unexpected preference key."; @PreloadPagesState int newState = (int) newValue; - @PreloadPagesState int currentState = PreloadPagesSettingsBridge.getState(); + @PreloadPagesState int currentState = PreloadPagesSettingsBridge.getState(getProfile()); if (newState == currentState) { return true; } - PreloadPagesSettingsBridge.setState(newState); + PreloadPagesSettingsBridge.setState(getProfile(), newState); return true; } }
diff --git a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentTest.java b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentTest.java index 85ae1cb..a26fcb46 100644 --- a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentTest.java +++ b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentTest.java
@@ -24,6 +24,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher; import org.chromium.chrome.browser.init.ChromeBrowserInitializer; +import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.browser_ui.settings.SettingsLauncher; @@ -82,7 +83,10 @@ launchSettingsActivity(); TestThreadUtils.runOnUiThreadBlocking( () -> { - @PreloadPagesState int currentState = PreloadPagesSettingsBridge.getState(); + @PreloadPagesState + int currentState = + PreloadPagesSettingsBridge.getState( + ProfileManager.getLastUsedRegularProfile()); boolean extended_preloading_checked = currentState == PreloadPagesState.EXTENDED_PRELOADING; boolean standard_preloading_checked = @@ -127,7 +131,8 @@ Assert.assertEquals( ASSERT_PRELOAD_PAGES_STATE_NATIVE, PreloadPagesState.EXTENDED_PRELOADING, - PreloadPagesSettingsBridge.getState()); + PreloadPagesSettingsBridge.getState( + ProfileManager.getLastUsedRegularProfile())); // Click the Standard Preloading button. getStandardPreloadingButton().onClick(null); @@ -144,7 +149,8 @@ Assert.assertEquals( ASSERT_PRELOAD_PAGES_STATE_NATIVE, PreloadPagesState.STANDARD_PRELOADING, - PreloadPagesSettingsBridge.getState()); + PreloadPagesSettingsBridge.getState( + ProfileManager.getLastUsedRegularProfile())); // Click the No Preloading button. getNoPreloadingButton().onClick(null); @@ -161,7 +167,8 @@ Assert.assertEquals( ASSERT_PRELOAD_PAGES_STATE_NATIVE, PreloadPagesState.NO_PRELOADING, - PreloadPagesSettingsBridge.getState()); + PreloadPagesSettingsBridge.getState( + ProfileManager.getLastUsedRegularProfile())); }); } @@ -213,7 +220,9 @@ launchSettingsActivity(); TestThreadUtils.runOnUiThreadBlocking( () -> { - Assert.assertTrue(PreloadPagesSettingsBridge.isNetworkPredictionManaged()); + Assert.assertTrue( + PreloadPagesSettingsBridge.isNetworkPredictionManaged( + ProfileManager.getLastUsedRegularProfile())); Assert.assertTrue(mManagedDisclaimerText.isVisible()); Assert.assertFalse(getExtendedPreloadingButton().isEnabled()); Assert.assertFalse(getStandardPreloadingButton().isEnabled());
diff --git a/chrome/browser/prefetch/android/preload_pages_settings_bridge.cc b/chrome/browser/prefetch/android/preload_pages_settings_bridge.cc index 93e0be3..949bd8e 100644 --- a/chrome/browser/prefetch/android/preload_pages_settings_bridge.cc +++ b/chrome/browser/prefetch/android/preload_pages_settings_bridge.cc
@@ -7,35 +7,42 @@ #include "chrome/browser/prefetch/android/jni_headers/PreloadPagesSettingsBridge_jni.h" #include "chrome/browser/prefetch/pref_names.h" #include "chrome/browser/preloading/preloading_prefs.h" -#include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_android.h" #include "components/metrics/metrics_pref_names.h" #include "components/prefs/pref_service.h" namespace { -PrefService* GetPrefService() { - return ProfileManager::GetActiveUserProfile() - ->GetOriginalProfile() - ->GetPrefs(); +PrefService* GetPrefService(const base::android::JavaRef<jobject>& j_profile) { + return ProfileAndroid::FromProfileAndroid(j_profile)->GetPrefs(); } } // namespace namespace prefetch { -static jint JNI_PreloadPagesSettingsBridge_GetState(JNIEnv* env) { - return static_cast<int>(prefetch::GetPreloadPagesState(*GetPrefService())); +static jint JNI_PreloadPagesSettingsBridge_GetState( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& j_profile) { + return static_cast<int>( + prefetch::GetPreloadPagesState(*GetPrefService(j_profile))); } static jboolean JNI_PreloadPagesSettingsBridge_IsNetworkPredictionManaged( - JNIEnv* env) { - return GetPrefService()->IsManagedPreference( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& j_profile) { + return GetPrefService(j_profile)->IsManagedPreference( prefetch::prefs::kNetworkPredictionOptions); } -static void JNI_PreloadPagesSettingsBridge_SetState(JNIEnv* env, jint state) { +static void JNI_PreloadPagesSettingsBridge_SetState( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& j_profile, + jint state) { prefetch::SetPreloadPagesState( - GetPrefService(), static_cast<prefetch::PreloadPagesState>(state)); + GetPrefService(j_profile), + static_cast<prefetch::PreloadPagesState>(state)); } } // namespace prefetch
diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PreloadFragment.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PreloadFragment.java index 07977169..3a81e752 100644 --- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PreloadFragment.java +++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PreloadFragment.java
@@ -47,7 +47,8 @@ } private void initialRadioButtonConfig() { - @PreloadPagesState int preloadPagesState = PreloadPagesSettingsBridge.getState(); + @PreloadPagesState + int preloadPagesState = PreloadPagesSettingsBridge.getState(getProfile()); switch (preloadPagesState) { case (PreloadPagesState.STANDARD_PRELOADING): mStandardPreloading.setChecked(true); @@ -74,9 +75,10 @@ @Override public void onCheckedChanged(RadioGroup radioGroup, int clickedButtonId) { if (clickedButtonId == R.id.standard_option) { - PreloadPagesSettingsBridge.setState(PreloadPagesState.STANDARD_PRELOADING); + PreloadPagesSettingsBridge.setState( + getProfile(), PreloadPagesState.STANDARD_PRELOADING); } else if (clickedButtonId == R.id.disabled_option) { - PreloadPagesSettingsBridge.setState(PreloadPagesState.NO_PRELOADING); + PreloadPagesSettingsBridge.setState(getProfile(), PreloadPagesState.NO_PRELOADING); } else { assert false : "Unknown clickedButtonId " + clickedButtonId; }
diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java index ad48a34c..e0958ce 100644 --- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java +++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java
@@ -45,7 +45,8 @@ @Override public boolean shouldDisplayPreload() { - return PreloadPagesSettingsBridge.getState() == PreloadPagesState.STANDARD_PRELOADING - || PreloadPagesSettingsBridge.getState() == PreloadPagesState.NO_PRELOADING; + return PreloadPagesSettingsBridge.getState(mProfile) + == PreloadPagesState.STANDARD_PRELOADING + || PreloadPagesSettingsBridge.getState(mProfile) == PreloadPagesState.NO_PRELOADING; } }
diff --git a/chrome/browser/privacy_guide/android/javatests/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragmentTest.java b/chrome/browser/privacy_guide/android/javatests/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragmentTest.java index 71f6acc6..e94fb31 100644 --- a/chrome/browser/privacy_guide/android/javatests/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragmentTest.java +++ b/chrome/browser/privacy_guide/android/javatests/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragmentTest.java
@@ -256,7 +256,10 @@ } private void setPreloadStatePG3(@PreloadPagesState int preloadPagesState) { - runOnUiThreadBlocking(() -> PreloadPagesSettingsBridge.setState(preloadPagesState)); + runOnUiThreadBlocking( + () -> + PreloadPagesSettingsBridge.setState( + ProfileManager.getLastUsedRegularProfile(), preloadPagesState)); } private void executeWhileCapturingIntents(Runnable func) {
diff --git a/chrome/browser/privacy_guide/android/junit/src/org/chromium/chrome/browser/privacy_guide/PreloadFragmentTest.java b/chrome/browser/privacy_guide/android/junit/src/org/chromium/chrome/browser/privacy_guide/PreloadFragmentTest.java index 535f4ed..6c7c8f54 100644 --- a/chrome/browser/privacy_guide/android/junit/src/org/chromium/chrome/browser/privacy_guide/PreloadFragmentTest.java +++ b/chrome/browser/privacy_guide/android/junit/src/org/chromium/chrome/browser/privacy_guide/PreloadFragmentTest.java
@@ -6,11 +6,15 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.eq; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.os.Bundle; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentFactory; import androidx.fragment.app.testing.FragmentScenario; import org.junit.After; @@ -31,6 +35,7 @@ import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridgeJni; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesState; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.widget.RadioButtonWithDescription; import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionAndAuxButton; @@ -45,6 +50,7 @@ @Mock private PreloadPagesSettingsBridge.Natives mNativeMock; @Mock private OneshotSupplierImpl<BottomSheetController> mBottomSheetControllerSupplier; + @Mock private Profile mProfile; private FragmentScenario mScenario; private RadioButtonWithDescriptionAndAuxButton mStandardPreloadingButton; @@ -65,10 +71,24 @@ } private void initFragmentWithPreloadState(@PreloadPagesState int state) { - when(mNativeMock.getState()).thenReturn(state); + when(mNativeMock.getState(eq(mProfile))).thenReturn(state); mScenario = FragmentScenario.launchInContainer( - PreloadFragment.class, Bundle.EMPTY, R.style.Theme_MaterialComponents); + PreloadFragment.class, + Bundle.EMPTY, + R.style.Theme_MaterialComponents, + new FragmentFactory() { + @NonNull + @Override + public Fragment instantiate( + @NonNull ClassLoader classLoader, @NonNull String className) { + Fragment fragment = super.instantiate(classLoader, className); + if (fragment instanceof PreloadFragment) { + ((PreloadFragment) fragment).setProfile(mProfile); + } + return fragment; + } + }); mScenario.onFragment( fragment -> { mStandardPreloadingButton = @@ -101,13 +121,13 @@ public void testSelectStandard() { initFragmentWithPreloadState(PreloadPagesState.NO_PRELOADING); mStandardPreloadingButton.performClick(); - verify(mNativeMock).setState(PreloadPagesState.STANDARD_PRELOADING); + verify(mNativeMock).setState(mProfile, PreloadPagesState.STANDARD_PRELOADING); } @Test public void testSelectDisabled() { initFragmentWithPreloadState(PreloadPagesState.STANDARD_PRELOADING); mDisabledPreloadingButton.performClick(); - verify(mNativeMock).setState(PreloadPagesState.NO_PRELOADING); + verify(mNativeMock).setState(mProfile, PreloadPagesState.NO_PRELOADING); } }
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index b225b9d..a8ae9d5 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc
@@ -239,6 +239,10 @@ int size_MB = static_cast<int>(size / kBytesInOneMB); UMA_HISTOGRAM_COUNTS_10000("Profile.TotalSize", size_MB); + size = base::ComputeDirectorySize(path); + size_MB = static_cast<int>(size / kBytesInOneMB); + UMA_HISTOGRAM_COUNTS_10000("Profile.TotalSizeRecursive", size_MB); + size = ComputeFilesSize(path, FILE_PATH_LITERAL("History")); size_MB = static_cast<int>(size / kBytesInOneMB); UMA_HISTOGRAM_COUNTS_10000("Profile.HistorySize", size_MB);
diff --git a/chrome/browser/resources/commerce/BUILD.gn b/chrome/browser/resources/commerce/BUILD.gn index 75da1d7..dae3045 100644 --- a/chrome/browser/resources/commerce/BUILD.gn +++ b/chrome/browser/resources/commerce/BUILD.gn
@@ -3,14 +3,12 @@ build_webui("build") { grd_prefix = "commerce" - static_files = [ - "product_specifications.html", - "product_specifications.css", - ] + static_files = [ "product_specifications/product_specifications.html" ] + # Files holding a Polymer element definition and have an equivalent .html file. web_component_files = [ - "app.ts", - "product_specifications_table.ts", + "product_specifications/app.ts", + "product_specifications/table.ts", ] non_web_component_files = [ "router.ts" ]
diff --git a/chrome/browser/resources/commerce/product_specifications.css b/chrome/browser/resources/commerce/product_specifications.css deleted file mode 100644 index 1b815aa..0000000 --- a/chrome/browser/resources/commerce/product_specifications.css +++ /dev/null
@@ -1,8 +0,0 @@ -/* Copyright 2024 The Chromium Authors - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -body { - margin: 16px; -}
diff --git a/chrome/browser/resources/commerce/app.html b/chrome/browser/resources/commerce/product_specifications/app.html similarity index 100% rename from chrome/browser/resources/commerce/app.html rename to chrome/browser/resources/commerce/product_specifications/app.html
diff --git a/chrome/browser/resources/commerce/app.ts b/chrome/browser/resources/commerce/product_specifications/app.ts similarity index 85% rename from chrome/browser/resources/commerce/app.ts rename to chrome/browser/resources/commerce/product_specifications/app.ts index 68a9e01..882519a 100644 --- a/chrome/browser/resources/commerce/app.ts +++ b/chrome/browser/resources/commerce/product_specifications/app.ts
@@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import './strings.m.js'; -import './product_specifications_table.js'; +import '../strings.m.js'; +import './table.js'; -import type {BrowserProxy} from '//resources/cr_components/commerce/browser_proxy.js'; -import {BrowserProxyImpl} from '//resources/cr_components/commerce/browser_proxy.js'; +import type {BrowserProxy} from 'chrome://resources/cr_components/commerce/browser_proxy.js'; +import {BrowserProxyImpl} from 'chrome://resources/cr_components/commerce/browser_proxy.js'; import {ColorChangeUpdater} from 'chrome://resources/cr_components/color_change_listener/colors_css_updater.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {getTemplate} from './app.html.js'; -import type {TableColumn, TableRow} from './product_specifications_table.js'; -import {Router} from './router.js'; +import {Router} from '../router.js'; +import type {TableColumn, TableRow} from './table.js'; export class ProductSpecificationsElement extends PolymerElement { static get is() {
diff --git a/chrome/browser/resources/commerce/product_specifications.html b/chrome/browser/resources/commerce/product_specifications/product_specifications.html similarity index 70% rename from chrome/browser/resources/commerce/product_specifications.html rename to chrome/browser/resources/commerce/product_specifications/product_specifications.html index cdbf472..887c4d7 100644 --- a/chrome/browser/resources/commerce/product_specifications.html +++ b/chrome/browser/resources/commerce/product_specifications/product_specifications.html
@@ -3,11 +3,14 @@ <head> <meta charset="utf-8"> <title>$i18n{pageTitle}</title> - <link rel="stylesheet" href="./product_specifications.css"> + <style> + body { + margin: 16px; + } + </style> <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> <link rel="stylesheet" href="chrome://theme/colors.css?sets=ui,chrome"> </head> <product-specifications-app></product-specifications-app> - <script type="module" src="app.js"></script> + <script type="module" src="product_specifications/app.js"></script> </html> -
diff --git a/chrome/browser/resources/commerce/product_specifications_table.html b/chrome/browser/resources/commerce/product_specifications/table.html similarity index 100% rename from chrome/browser/resources/commerce/product_specifications_table.html rename to chrome/browser/resources/commerce/product_specifications/table.html
diff --git a/chrome/browser/resources/commerce/product_specifications_table.ts b/chrome/browser/resources/commerce/product_specifications/table.ts similarity index 68% rename from chrome/browser/resources/commerce/product_specifications_table.ts rename to chrome/browser/resources/commerce/product_specifications/table.ts index 4cb31726..c2ed1832 100644 --- a/chrome/browser/resources/commerce/product_specifications_table.ts +++ b/chrome/browser/resources/commerce/product_specifications/table.ts
@@ -1,11 +1,10 @@ // Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import './strings.m.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {getTemplate} from './product_specifications_table.html.js'; +import {getTemplate} from './table.html.js'; /** Describes a row in a ProductSpecs table. */ export interface TableRow { @@ -18,7 +17,7 @@ } /** Element for rendering a ProductSpecs table. */ -export class ProductSpecificationsTable extends PolymerElement { +export class TableElement extends PolymerElement { static get is() { return 'product-specifications-table'; } @@ -29,8 +28,8 @@ static get properties() { return { - columns: {type: Array}, - rows: {type: Array}, + columns: Array, + rows: Array, }; } @@ -40,9 +39,8 @@ declare global { interface HTMLElementTagNameMap { - 'product-specifications-table': ProductSpecificationsTable; + 'product-specifications-table': TableElement; } } -customElements.define( - ProductSpecificationsTable.is, ProductSpecificationsTable); +customElements.define(TableElement.is, TableElement);
diff --git a/chrome/browser/resources/downloads/item.html b/chrome/browser/resources/downloads/item.html index 80a18f9..0cbb834 100644 --- a/chrome/browser/resources/downloads/item.html +++ b/chrome/browser/resources/downloads/item.html
@@ -38,8 +38,6 @@ #content { border-radius: var(--cr-card-border-radius); - display: flex; - flex: none; margin: 6px auto; min-height: 103px; width: var(--downloads-card-width); @@ -50,6 +48,11 @@ box-shadow: var(--cr-card-shadow); } + #main-content { + display: flex; + flex: none; + } + @media (prefers-color-scheme: light) { #content.is-active { background-color: var(--cr-card-background-color); @@ -106,6 +109,11 @@ } } + .item-tray { + flex: none; + width: var(--downloads-card-width); + } + .icon-wrapper { align-self: center; flex: none; @@ -310,169 +318,153 @@ <div id="content" on-dragstart="onDragStart_" class$="[[computeClass_(isActive_, isDangerous_, showProgress_)]]" focus-row-container> - <div id="file-icon-wrapper" class="icon-wrapper" role="img" - aria-label="[[iconAriaLabel_]]" - aria-hidden="[[computeIconAriaHidden_(iconAriaLabel_)]]"> - <img class="icon" id="file-icon" alt="" hidden="[[!useFileIcon_]]" - icon-color$="[[computeIconColor_(isDangerous_, data.dangerType, - useFileIcon_, improvedDownloadWarningsUx_, - displayType_)]]"> - <iron-icon class="icon" hidden="[[useFileIcon_]]" - icon$="[[computeIcon_(isDangerous_, data.dangerType, useFileIcon_, - improvedDownloadWarningsUx_, displayType_)]]" - icon-color$="[[computeIconColor_(isDangerous_, data.dangerType, - useFileIcon_, improvedDownloadWarningsUx_, - displayType_)]]"></iron-icon> - </div> - - <div id="details"> - <div id="title-area" role="gridcell"><!-- - Can't have any line breaks. - --><a is="action-link" id="file-link" href="[[data.url.url]]" - on-click="onFileLinkClick_" focus-row-control - focus-type="fileLink" - hidden="[[!shouldLinkFilename_]]">[[data.fileName]]</a><!-- - Before #name. - --><span id="name" - hidden="[[shouldLinkFilename_]]">[[data.fileName]]</span> - <span id="tag">[[computeTag_(data.state, - data.lastReasonText, - data.fileExternallyRemoved)]]</span> + <div id="main-content"> + <div id="file-icon-wrapper" class="icon-wrapper" role="img" + aria-label="[[iconAriaLabel_]]" + aria-hidden="[[computeIconAriaHidden_(iconAriaLabel_)]]"> + <img class="icon" id="file-icon" alt="" hidden="[[!useFileIcon_]]" + icon-color$="[[computeIconColor_(isDangerous_, data.dangerType, + useFileIcon_, improvedDownloadWarningsUx_, + displayType_)]]"> + <iron-icon class="icon" hidden="[[useFileIcon_]]" + icon$="[[computeIcon_(isDangerous_, data.dangerType, useFileIcon_, + improvedDownloadWarningsUx_, displayType_)]]" + icon-color$="[[computeIconColor_(isDangerous_, data.dangerType, + useFileIcon_, improvedDownloadWarningsUx_, + displayType_)]]"></iron-icon> </div> - <div role="gridcell"> - <a id="url" target="_blank" on-click="onUrlClick_" focus-row-control - focus-type="url">[[getDisplayUrlStr_(data.displayUrl)]]</a> - </div> + <div id="details"> + <div id="title-area" role="gridcell"><!-- + Can't have any line breaks. + --><a is="action-link" id="file-link" href="[[data.url.url]]" + on-click="onFileLinkClick_" focus-row-control + focus-type="fileLink" + hidden="[[!shouldLinkFilename_]]">[[data.fileName]]</a><!-- + Before #name. + --><span id="name" + hidden="[[shouldLinkFilename_]]">[[data.fileName]]</span> + <span id="tag">[[computeTag_(data.state, + data.lastReasonText, + data.fileExternallyRemoved)]]</span> + </div> - <div class="description" role="gridcell" - description-color$="[[iconAndDescriptionColor_(displayType_, - improvedDownloadWarningsUx_)]]" - hidden$="[[!computeDescriptionVisible_(data.*, displayType_, - improvedDownloadWarningsUx_)]]"> - [[computeDescription_( - data.state, - data.dangerType, - data.fileName, - data.progressStatusText, - displayType_, - improvedDownloadWarningsUx_)]] - </div> - - <div class="description" role="gridcell" - hidden="[[!computeSecondLineVisible_(data.state)]]"> - $i18n{asyncScanningDownloadDescSecond} - </div> - - <template is="dom-if" if="[[showProgress_]]"> <div role="gridcell"> - <paper-progress id="progress" - indeterminate="[[isIndeterminate_(data.percent)]]" - value="[[data.percent]]"> - </paper-progress> + <a id="url" target="_blank" on-click="onUrlClick_" focus-row-control + focus-type="url">[[getDisplayUrlStr_(data.displayUrl)]]</a> </div> - </template> - <!-- Show most of the safe control buttons in the old UX only. --> - <template is="dom-if" if="[[!improvedDownloadWarningsUx_]]"> - <div id="safe" class="controls" hidden="[[isDangerous_]]"> - <span role="gridcell" hidden="[[!hasShowInFolderLink_]]"> - <a is="action-link" id="show" on-click="onShowClick_" - focus-row-control - focus-type="show" - title="[[data.filePath]]"> - [[data.showInFolderText]] - </a> - </span> - <template is="dom-if" if="[[data.retry]]"> - <span role="gridcell"> - <cr-button class="action-button" on-click="onRetryClick_" - focus-row-control focus-type="retry"> - $i18n{controlRetry} - </cr-button> - </span> - </template> - <template is="dom-if" if="[[pauseOrResumeText_]]"> - <span role="gridcell"> - <cr-button on-click="onPauseOrResumeClick_" id="pauseOrResume" - focus-row-control focus-type="pauseOrResume"> - [[pauseOrResumeText_]] - </cr-button> - </span> - </template> - <template is="dom-if" if="[[showDeepScan_]]" restamp> - <span role="gridcell"> - <cr-button on-click="onDeepScanClick_" id="deepScan" - class="action-button" focus-row-control focus-type="open"> - [[computeDeepScanControlText_(data.state)]] - </cr-button> - </span> - <span role="gridcell"> - <cr-button on-click="onBypassDeepScanClick_" id="bypassDeepScan" - focus-row-control focus-type="open"> - $i18n{controlBypassDeepScan} - </cr-button> - </span> - </template> - <template is="dom-if" if="[[showCancel_]]"> - <span role="gridcell"> - <cr-button on-click="onCancelClick_" focus-row-control - focus-type="cancel"> - $i18n{controlCancel} - </cr-button> - </span> - </template> - <template is="dom-if" if="[[showOpenAnyway_]]"> - <span role="gridcell"> - <cr-button on-click="onOpenAnywayClick_" id="openAnyway" - focus-row-control focus-type="open"> - $i18n{controlOpenAnyway} - </cr-button> - </span> - </template> + <div class="description" role="gridcell" + description-color$="[[iconAndDescriptionColor_(displayType_, + improvedDownloadWarningsUx_)]]" + hidden$="[[!computeDescriptionVisible_(data.*, displayType_, + improvedDownloadWarningsUx_)]]"> + [[computeDescription_( + data.state, + data.dangerType, + data.fileName, + data.progressStatusText, + displayType_, + improvedDownloadWarningsUx_)]] </div> - </template> - <!-- Only this button should appear for improvedDownloadWarningsUx. --> - <template is="dom-if" if="[[improvedDownloadWarningsUx_]]"> - <div id="safe" class="controls" hidden="[[isDangerous_]]"> - <template is="dom-if" if="[[showDeepScan_]]" restamp> - <span role="gridcell"> - <cr-button on-click="onDeepScanClick_" id="deepScan" - class="action-button" focus-row-control focus-type="open"> - [[computeDeepScanControlText_(data.state)]] - </cr-button> - </span> - </template> + + <div class="description" role="gridcell" + hidden="[[!computeSecondLineVisible_(data.state)]]"> + $i18n{asyncScanningDownloadDescSecond} </div> - </template> - <div id="controlled-by" hidden="[[isDangerous_]]"><!-- - Text populated dynamically. - --></div> - <!-- Show the dangerous control buttons in the old UX only. --> - <template is="dom-if" - if="[[computeShowButtonsForDangerous_(isDangerous_, improvedDownloadWarningsUx_)]]"> - <div id="dangerous" class="controls"> - <!-- Files that enterprise policies allow to be reviewed. --> - <template is="dom-if" if="[[isReviewable_]]"> - <span role="gridcell"> - <cr-button on-click="onDiscardDangerousClick_" - class="action-button" focus-row-control - focus-type="discard"> - $i18n{dangerDiscard} - </cr-button> - </span> - <span role="gridcell"> - <cr-button on-click="onReviewDangerousClick_" focus-row-control - focus-type="save"> - $i18n{dangerReview} - </cr-button> - </span> - </template> + <template is="dom-if" if="[[showProgress_]]"> + <div role="gridcell"> + <paper-progress id="progress" + indeterminate="[[isIndeterminate_(data.percent)]]" + value="[[data.percent]]"> + </paper-progress> + </div> + </template> - <template is="dom-if" if="[[!isReviewable_]]"> - <!-- Dangerous file types (e.g. .exe, .jar). --> - <template is="dom-if" if="[[!isMalware_]]"> + <!-- Show most of the safe control buttons in the old UX only. --> + <template is="dom-if" if="[[!improvedDownloadWarningsUx_]]"> + <div id="safe" class="controls" hidden="[[isDangerous_]]"> + <span role="gridcell" hidden="[[!hasShowInFolderLink_]]"> + <a is="action-link" id="show" on-click="onShowClick_" + focus-row-control + focus-type="show" + title="[[data.filePath]]"> + [[data.showInFolderText]] + </a> + </span> + <template is="dom-if" if="[[data.retry]]"> + <span role="gridcell"> + <cr-button class="action-button" on-click="onRetryClick_" + focus-row-control focus-type="retry"> + $i18n{controlRetry} + </cr-button> + </span> + </template> + <template is="dom-if" if="[[pauseOrResumeText_]]"> + <span role="gridcell"> + <cr-button on-click="onPauseOrResumeClick_" id="pauseOrResume" + focus-row-control focus-type="pauseOrResume"> + [[pauseOrResumeText_]] + </cr-button> + </span> + </template> + <template is="dom-if" if="[[showDeepScan_]]" restamp> + <span role="gridcell"> + <cr-button on-click="onDeepScanClick_" id="deepScan" + class="action-button" focus-row-control focus-type="open"> + [[computeDeepScanControlText_(data.state)]] + </cr-button> + </span> + <span role="gridcell"> + <cr-button on-click="onBypassDeepScanClick_" id="bypassDeepScan" + focus-row-control focus-type="open"> + $i18n{controlBypassDeepScan} + </cr-button> + </span> + </template> + <template is="dom-if" if="[[showCancel_]]"> + <span role="gridcell"> + <cr-button on-click="onCancelClick_" focus-row-control + focus-type="cancel"> + $i18n{controlCancel} + </cr-button> + </span> + </template> + <template is="dom-if" if="[[showOpenAnyway_]]"> + <span role="gridcell"> + <cr-button on-click="onOpenAnywayClick_" id="openAnyway" + focus-row-control focus-type="open"> + $i18n{controlOpenAnyway} + </cr-button> + </span> + </template> + </div> + </template> + <!-- Only this button should appear for improvedDownloadWarningsUx. --> + <template is="dom-if" if="[[improvedDownloadWarningsUx_]]"> + <div id="safe" class="controls" hidden="[[isDangerous_]]"> + <template is="dom-if" if="[[showDeepScan_]]" restamp> + <span role="gridcell"> + <cr-button on-click="onDeepScanClick_" id="deepScan" + class="action-button" focus-row-control focus-type="open"> + [[computeDeepScanControlText_(data.state)]] + </cr-button> + </span> + </template> + </div> + </template> + <div id="controlled-by" hidden="[[isDangerous_]]"><!-- + Text populated dynamically. + --></div> + + <!-- Show the dangerous control buttons in the old UX only. --> + <template is="dom-if" + if="[[computeShowButtonsForDangerous_(isDangerous_, + improvedDownloadWarningsUx_)]]"> + <div id="dangerous" class="controls"> + <!-- Files that enterprise policies allow to be reviewed. --> + <template is="dom-if" if="[[isReviewable_]]"> <span role="gridcell"> <cr-button on-click="onDiscardDangerousClick_" class="action-button" focus-row-control @@ -481,109 +473,143 @@ </cr-button> </span> <span role="gridcell"> - <cr-button on-click="onSaveDangerousClick_" focus-row-control + <cr-button on-click="onReviewDangerousClick_" focus-row-control focus-type="save"> - $i18n{dangerSave} + $i18n{dangerReview} </cr-button> </span> </template> - <!-- Things that safe browsing has determined to be dangerous. --> - <template is="dom-if" if="[[isMalware_]]"> - <span role="gridcell"> - <cr-button on-click="onDiscardDangerousClick_" - class="action-button" - focus-row-control focus-type="discard"> - $i18n{controlRemoveFromList} - </cr-button> - </span> - <span role="gridcell"> - <cr-button on-click="onSaveDangerousClick_" focus-row-control - focus-type="save"> - $i18n{dangerRestore} - </cr-button> - </span> + <template is="dom-if" if="[[!isReviewable_]]"> + <!-- Dangerous file types (e.g. .exe, .jar). --> + <template is="dom-if" if="[[!isMalware_]]"> + <span role="gridcell"> + <cr-button on-click="onDiscardDangerousClick_" + class="action-button" focus-row-control + focus-type="discard"> + $i18n{dangerDiscard} + </cr-button> + </span> + <span role="gridcell"> + <cr-button on-click="onSaveDangerousClick_" focus-row-control + focus-type="save"> + $i18n{dangerSave} + </cr-button> + </span> + </template> + + <!-- Things that safe browsing has determined to be dangerous. --> + <template is="dom-if" if="[[isMalware_]]"> + <span role="gridcell"> + <cr-button on-click="onDiscardDangerousClick_" + class="action-button" + focus-row-control focus-type="discard"> + $i18n{controlRemoveFromList} + </cr-button> + </span> + <span role="gridcell"> + <cr-button on-click="onSaveDangerousClick_" focus-row-control + focus-type="save"> + $i18n{dangerRestore} + </cr-button> + </span> + </template> </template> - </template> + </div> + </template> + </div> + <div class="more-options"> + <!-- Only show the "x" button in the old UX. --> + <template is="dom-if" if="[[!improvedDownloadWarningsUx_]]"> + <div role="gridcell"> + <cr-icon-button class="icon-clear" + style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]" + id="remove-old" title="$i18n{controlRemoveFromList}" + aria-label$="[[controlRemoveFromListAriaLabel_]]" + on-click="onRemoveClick_" focus-row-control focus-type="remove"> + </cr-icon-button> + </div> + </template> + <!-- In improvedDownloadWarnings, show a menu with all the actions. --> + <template is="dom-if" if="[[improvedDownloadWarningsUx_]]"> + <div role="gridcell"> + <cr-icon-button id="more-actions" iron-icon="cr:more-vert" + class="dropdown-trigger" title="$i18n{moreActions}" + on-click="onMoreActionsClick_" aria-haspopup="menu"> + </cr-icon-button> + </div> + <cr-action-menu id="more-actions-menu" + role-description="$i18n{actionMenuDescription}"> + <button class="dropdown-item" on-click="onShowClick_" + hidden="[[!hasShowInFolderLink_]]" id="show-in-folder"> + [[data.showInFolderText]] + </button> + <button class="dropdown-item" on-click="onPauseOrResumeClick_" + hidden="[[!pauseOrResumeText_]]" id="pause-or-resume"> + [[pauseOrResumeText_]] + </button> + <button class="dropdown-item" on-click="onRemoveClick_" + hidden="[[!computeShowRemove_(isDangerous_, showCancel_)]]" + id="remove"> + $i18n{controlDeleteFromHistory} + </button> + <button class="dropdown-item" on-click="onDiscardDangerousClick_" + hidden="[[!computeShowControlsForDangerous_(isDangerous_, + isReviewable_)]]" + id="discard-dangerous"> + $i18n{controlDeleteFromHistory} + </button> + <button class="dropdown-item" on-click="onRetryClick_" + hidden="[[!data.retry]]" id="retry"> + $i18n{controlRetry} + </button> + <button class="dropdown-item" on-click="onDeepScanClick_" + hidden="[[!showDeepScan_]]" id="deep-scan"> + $i18n{controlDeepScan} + </button> + <button class="dropdown-item" on-click="onBypassDeepScanClick_" + hidden="[[!showDeepScan_]]" id="bypass-deep-scan"> + [[computeSaveDangerousLabel_(displayType_)]] + </button> + <button class="dropdown-item" on-click="onCancelClick_" + hidden="[[!showCancel_]]" id="cancel"> + $i18n{controlCancel} + </button> + <button class="dropdown-item" on-click="onOpenAnywayClick_" + hidden="[[!showOpenAnyway_]]" id="open-anyway"> + $i18n{controlOpenAnyway} + </button> + <button class="dropdown-item" on-click="onDiscardDangerousClick_" + hidden="[[!isReviewable_]]" id="reviewable-discard-dangerous"> + $i18n{dangerDiscard} + </button> + <button class="dropdown-item" on-click="onReviewDangerousClick_" + hidden="[[!isReviewable_]]" id="review-dangerous"> + $i18n{dangerReview} + </button> + <!-- TODO(crbug.com/1465966): Learn more for dangerous downloads goes + here. --> + <button class="dropdown-item" on-click="onSaveDangerousClick_" + hidden="[[!computeShowControlsForDangerous_(isDangerous_, + isReviewable_)]]" + id="save-dangerous"> + [[computeSaveDangerousLabel_(displayType_)]] + </button> + </cr-action-menu> + </template> + <div id="incognito" title="$i18n{inIncognito}" hidden="[[!data.otr]]"> </div> - </template> + </div> </div> - <div class="more-options"> - <!-- Only show the "x" button in the old UX. --> - <template is="dom-if" if="[[!improvedDownloadWarningsUx_]]"> - <div role="gridcell"> - <cr-icon-button class="icon-clear" - style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]" - id="remove-old" title="$i18n{controlRemoveFromList}" - aria-label$="[[controlRemoveFromListAriaLabel_]]" - on-click="onRemoveClick_" focus-row-control focus-type="remove"> - </cr-icon-button> - </div> - </template> - <!-- In improvedDownloadWarnings, show a menu with all the actions. --> - <template is="dom-if" if="[[improvedDownloadWarningsUx_]]"> - <div role="gridcell"> - <cr-icon-button id="more-actions" iron-icon="cr:more-vert" - class="dropdown-trigger" title="$i18n{moreActions}" - on-click="onMoreActionsClick_" aria-haspopup="menu"> - </cr-icon-button> - </div> - <cr-action-menu id="more-actions-menu" - role-description="$i18n{actionMenuDescription}"> - <button class="dropdown-item" on-click="onShowClick_" - hidden="[[!hasShowInFolderLink_]]" id="show-in-folder"> - [[data.showInFolderText]] - </button> - <button class="dropdown-item" on-click="onPauseOrResumeClick_" - hidden="[[!pauseOrResumeText_]]" id="pause-or-resume"> - [[pauseOrResumeText_]] - </button> - <button class="dropdown-item" on-click="onRemoveClick_" - hidden="[[!computeShowRemove_(isDangerous_, showCancel_)]]" - id="remove"> - $i18n{controlDeleteFromHistory} - </button> - <button class="dropdown-item" on-click="onDiscardDangerousClick_" - hidden="[[!computeShowControlsForDangerous_(isDangerous_, isReviewable_)]]" - id="discard-dangerous"> - $i18n{controlDeleteFromHistory} - </button> - <button class="dropdown-item" on-click="onRetryClick_" - hidden="[[!data.retry]]" id="retry"> - $i18n{controlRetry} - </button> - <button class="dropdown-item" on-click="onDeepScanClick_" - hidden="[[!showDeepScan_]]" id="deep-scan"> - $i18n{controlDeepScan} - </button> - <button class="dropdown-item" on-click="onBypassDeepScanClick_" - hidden="[[!showDeepScan_]]" id="bypass-deep-scan"> - [[computeSaveDangerousLabel_(displayType_)]] - </button> - <button class="dropdown-item" on-click="onCancelClick_" - hidden="[[!showCancel_]]" id="cancel"> - $i18n{controlCancel} - </button> - <button class="dropdown-item" on-click="onOpenAnywayClick_" - hidden="[[!showOpenAnyway_]]" id="open-anyway"> - $i18n{controlOpenAnyway} - </button> - <button class="dropdown-item" on-click="onDiscardDangerousClick_" - hidden="[[!isReviewable_]]" id="reviewable-discard-dangerous"> - $i18n{dangerDiscard} - </button> - <button class="dropdown-item" on-click="onReviewDangerousClick_" - hidden="[[!isReviewable_]]" id="review-dangerous"> - $i18n{dangerReview} - </button> - <!-- TODO(crbug.com/1465966): Learn more for dangerous downloads goes here. --> - <button class="dropdown-item" on-click="onSaveDangerousClick_" - hidden="[[!computeShowControlsForDangerous_(isDangerous_, isReviewable_)]]" - id="save-dangerous"> - [[computeSaveDangerousLabel_(displayType_)]] - </button> - </cr-action-menu> - </template> - <div id="incognito" title="$i18n{inIncognito}" hidden="[[!data.otr]]"></div> - </div> + <template is="dom-if" if="[[showEsbPromotion]]"> + <!-- TODO(crbug.com/333734490): Replace icon with branded gshield icon. --> + <cr-link-row + id="esb-download-row-promo" + start-icon="downloads:dangerous" + external + on-click="onEsbPromotionClick_" + button-aria-description="$i18n{esbDownloadRowPromoA11y}" + label="$i18n{esbDownloadRowPromoString}"> + </cr-link-row> + </template> </div>
diff --git a/chrome/browser/resources/downloads/item.ts b/chrome/browser/resources/downloads/item.ts index 708c34c..9add134 100644 --- a/chrome/browser/resources/downloads/item.ts +++ b/chrome/browser/resources/downloads/item.ts
@@ -8,6 +8,7 @@ import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; import 'chrome://resources/cr_elements/cr_icons.css.js'; import 'chrome://resources/cr_elements/cr_hidden_style.css.js'; +import 'chrome://resources/cr_elements/cr_link_row/cr_link_row.js'; import 'chrome://resources/cr_elements/icons.html.js'; import 'chrome://resources/cr_elements/cr_shared_vars.css.js'; import 'chrome://resources/js/action_link.js'; @@ -185,6 +186,11 @@ value: () => loadTimeData.getBoolean('improvedDownloadWarningsUX'), }, + showEsbPromotion: { + type: Boolean, + value: false, + }, + useFileIcon_: Boolean, }; } @@ -201,6 +207,7 @@ } data: MojomData; + showEsbPromotion: boolean; private mojoHandler_: PageHandlerInterface|null = null; private controlledBy_: string; private iconAriaLabel_: string; @@ -826,6 +833,11 @@ }); } + private onEsbPromotionClick_() { + assert(!!this.mojoHandler_); + this.mojoHandler_.openEsbSettings(); + } + private onMoreActionsClick_() { assert(this.improvedDownloadWarningsUx_); this.getMoreActionsMenu().showAt(this.getMoreActionsButton());
diff --git a/chrome/browser/resources/downloads/manager.html b/chrome/browser/resources/downloads/manager.html index 1d9cf4a..25aa9aa8 100644 --- a/chrome/browser/resources/downloads/manager.html +++ b/chrome/browser/resources/downloads/manager.html
@@ -115,7 +115,9 @@ <template> <downloads-item data="[[item]]" tabindex$="[[tabIndex]]" iron-list-tab-index="[[tabIndex]]" last-focused="{{lastFocused_}}" - list-blurred="{{listBlurred_}}" focus-row-index="[[index]]"> + list-blurred="{{listBlurred_}}" focus-row-index="[[index]]" + show-esb-promotion="[[shouldShowEsbPromotion_(item, item.isDangerous, + this.firstDangerousItemId_)]]"> </downloads-item> </template> </iron-list>
diff --git a/chrome/browser/resources/downloads/manager.ts b/chrome/browser/resources/downloads/manager.ts index fefd4388..2d4b589e 100644 --- a/chrome/browser/resources/downloads/manager.ts +++ b/chrome/browser/resources/downloads/manager.ts
@@ -93,6 +93,21 @@ value: '', }, + firstDangerousItemId_: { + type: String, + value: '', + }, + + isEligibleForEsbPromo_: { + type: Boolean, + value: false, + }, + + esbDownloadRowPromo_: { + type: Boolean, + value: () => loadTimeData.getBoolean('esbDownloadRowPromo'), + }, + lastFocused_: Object, listBlurred_: Boolean, @@ -109,6 +124,9 @@ private inSearchMode_: boolean; private spinnerActive_: boolean; private bypassDialogItemId_: string; + private firstDangerousItemId_: string; + private esbDownloadRowPromo_: boolean; + private isEligibleForEsbPromo_: boolean; private announcerDebouncer_: Debouncer|null = null; private mojoHandler_: PageHandlerInterface; @@ -168,6 +186,10 @@ const toastManager = getToastManager(); toastManager.shadowRoot!.querySelector<HTMLElement>('#toast')!.onclick = e => this.onToastClicked_(e); + + this.mojoHandler_!.isEligibleForEsbPromo().then((result) => { + this.isEligibleForEsbPromo_ = result.result; + }); } override disconnectedCallback() { @@ -188,6 +210,20 @@ } } + // Evaluates user eligbility for an esb promotion on the most recent dangerous + // download. It does this by traversing the array of downloads and the first + // dangerous download it comes across will have the promotion (guarantees the + // most recent download will have the promo) + private shouldShowEsbPromotion_(item: MojomData): boolean { + if (!this.isEligibleForEsbPromo_ || !this.esbDownloadRowPromo_) { + return false; + } + if (!this.firstDangerousItemId_ && item.isDangerous) { + this.firstDangerousItemId_ = item.id; + } + return this.firstDangerousItemId_ === item.id; + } + private shouldShowBypassWarningDialog_(): boolean { return this.bypassDialogItemId_ !== ''; }
diff --git a/chrome/browser/resources/side_panel/read_anything/app.ts b/chrome/browser/resources/side_panel/read_anything/app.ts index 7ec3b686..f356933 100644 --- a/chrome/browser/resources/side_panel/read_anything/app.ts +++ b/chrome/browser/resources/side_panel/read_anything/app.ts
@@ -304,12 +304,14 @@ setTimeout(() => chrome.readingMode.shouldShowUi(), 0); }); - this.synth.onvoiceschanged = () => { - this.getVoices(/*refresh =*/ true); - }; - this.showLoading(); + if (this.isReadAloudEnabled_) { + this.synth.onvoiceschanged = () => { + this.getVoices(/*refresh =*/ true); + }; + } + document.onselectionchange = () => { // When Read Aloud is playing, user-selection is disabled on the Read // Anything panel, so don't attempt to update selection, as this can
diff --git a/chrome/browser/resources/welcome/BUILD.gn b/chrome/browser/resources/welcome/BUILD.gn index 4e6b08a..a3e82b32 100644 --- a/chrome/browser/resources/welcome/BUILD.gn +++ b/chrome/browser/resources/welcome/BUILD.gn
@@ -75,8 +75,10 @@ "google_apps/google_apps_metrics_proxy.ts", "landing_view_proxy.ts", "navigation_mixin.ts", + "navigation_mixin_lit.ts", "ntp_background/ntp_background_metrics_proxy.ts", "ntp_background/ntp_background_proxy.ts", + "router.ts", "set_as_default/nux_set_as_default_proxy.ts", "shared/bookmark_proxy.ts", "shared/module_metrics_proxy.ts", @@ -87,13 +89,17 @@ # Files that are passed as input to css_to_wrapper(). css_files = [ + "landing_view.css", "shared/action_link_style.css", + "shared/action_link_style_lit.css", "shared/animations.css", + "shared/animations_lit.css", "shared/chooser_shared.css", "shared/navi_colors.css", "shared/navi_colors_lit.css", "shared/onboarding_background.css", "shared/splash_pages_shared.css", + "shared/splash_pages_shared_lit.css", "shared/step_indicator.css", ]
diff --git a/chrome/browser/resources/welcome/google_apps/nux_google_apps.ts b/chrome/browser/resources/welcome/google_apps/nux_google_apps.ts index cb9781ab..8389e918 100644 --- a/chrome/browser/resources/welcome/google_apps/nux_google_apps.ts +++ b/chrome/browser/resources/welcome/google_apps/nux_google_apps.ts
@@ -11,13 +11,14 @@ import '../shared/step_indicator.js'; import '../strings.m.js'; -import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js'; import {getInstance as getAnnouncerInstance} from 'chrome://resources/cr_elements/cr_a11y_announcer/cr_a11y_announcer.js'; +import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {isRTL} from 'chrome://resources/js/util.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {navigateToNextStep, NavigationMixin} from '../navigation_mixin.js'; +import {NavigationMixin} from '../navigation_mixin.js'; +import {navigateToNextStep} from '../router.js'; import type {BookmarkProxy} from '../shared/bookmark_proxy.js'; import {BookmarkBarManager, BookmarkProxyImpl} from '../shared/bookmark_proxy.js'; import {ModuleMetricsManager} from '../shared/module_metrics_proxy.js';
diff --git a/chrome/browser/resources/welcome/landing_view.css b/chrome/browser/resources/welcome/landing_view.css new file mode 100644 index 0000000..8cd5e48 --- /dev/null +++ b/chrome/browser/resources/welcome/landing_view.css
@@ -0,0 +1,27 @@ +/* Copyright 2024 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +/* #css_wrapper_metadata_start + * #type=style-lit + * #import=./shared/animations_lit.css.js + * #import=./shared/splash_pages_shared_lit.css.js + * #import=./shared/action_link_style_lit.css.js + * #scheme=relative + * #include=animations-lit action-link-style-lit splash-pages-shared-lit + * #css_wrapper_metadata_end */ + +onboarding-background { + --animation-delay: 275ms; + flex: 1; + width: 100%; +} + +h1 { + outline: none; +} + +.action-button, +.action-link { + --animation-delay: 150ms; +}
diff --git a/chrome/browser/resources/welcome/landing_view.html b/chrome/browser/resources/welcome/landing_view.html index 4443ee4..64bfeb6 100644 --- a/chrome/browser/resources/welcome/landing_view.html +++ b/chrome/browser/resources/welcome/landing_view.html
@@ -1,19 +1,3 @@ -<style include="animations action-link-style splash-pages-shared"> - onboarding-background { - --animation-delay: 275ms; - flex: 1; - width: 100%; - } - - h1 { - outline: none; - } - - .action-button, - .action-link { - --animation-delay: 150ms; - } -</style> <div id="container"> <onboarding-background id="background" class="fade-in"> </onboarding-background> @@ -22,12 +6,12 @@ <h1 class="fade-in" tabindex="-1">$i18n{landingTitle}</h1> <div class="subheading fade-in">$i18n{landingDescription}</div> </div> - <cr-button class="action-button fade-in" on-click="onNewUserClick_"> + <cr-button class="action-button fade-in" @click="${this.onNewUserClick_}"> $i18n{landingNewUser} </cr-button> - <button class="action-link fade-in" on-click="onExistingUserClick_"> - <span hidden$="[[!signinAllowed_]]">$i18n{landingExistingUser}</span> - <span hidden$="[[signinAllowed_]]">$i18n{skip}</span> + <button class="action-link fade-in" @click="${this.onExistingUserClick_}"> + <span ?hidden="${!this.signinAllowed_}">$i18n{landingExistingUser}</span> + <span ?hidden="${this.signinAllowed_}">$i18n{skip}</span> </button> </div> </div>
diff --git a/chrome/browser/resources/welcome/landing_view.ts b/chrome/browser/resources/welcome/landing_view.ts index a99aaeb..558391f 100644 --- a/chrome/browser/resources/welcome/landing_view.ts +++ b/chrome/browser/resources/welcome/landing_view.ts
@@ -9,12 +9,14 @@ import '../strings.m.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; -import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {CrLitElement} from 'chrome://resources/lit/v3_0/lit.rollup.js'; -import {getTemplate} from './landing_view.html.js'; +import {getCss} from './landing_view.css.js'; +import {getHtml} from './landing_view.html.js'; import type {LandingViewProxy} from './landing_view_proxy.js'; import {LandingViewProxyImpl} from './landing_view_proxy.js'; -import {navigateTo, NavigationMixin, Routes} from './navigation_mixin.js'; +import {NavigationMixinLit} from './navigation_mixin_lit.js'; +import {navigateTo, Routes} from './router.js'; import type {OnboardingBackgroundElement} from './shared/onboarding_background.js'; import {WelcomeBrowserProxyImpl} from './welcome_browser_proxy.js'; @@ -24,7 +26,7 @@ }; } -const LandingViewElementBase = NavigationMixin(PolymerElement); +const LandingViewElementBase = NavigationMixinLit(CrLitElement); /** @polymer */ export class LandingViewElement extends LandingViewElementBase { @@ -32,19 +34,23 @@ return 'landing-view'; } - static get template() { - return getTemplate(); + static override get styles() { + return getCss(); } - static get properties() { + override render() { + return getHtml.bind(this)(); + } + + static override get properties() { return { - signinAllowed_: Boolean, + signinAllowed_: {type: Boolean}, }; } private landingViewProxy_: LandingViewProxy; private finalized_: boolean = false; - private signinAllowed_: boolean; + protected signinAllowed_: boolean; constructor() { super(); @@ -71,7 +77,7 @@ this.landingViewProxy_.recordNavigatedAway(); } - private onExistingUserClick_() { + protected onExistingUserClick_() { this.finalized_ = true; this.landingViewProxy_.recordExistingUser(); if (this.signinAllowed_) { @@ -82,10 +88,11 @@ } } - private onNewUserClick_() { + protected onNewUserClick_() { this.finalized_ = true; this.landingViewProxy_.recordNewUser(); navigateTo(Routes.NEW_USER, 1); } } + customElements.define(LandingViewElement.is, LandingViewElement);
diff --git a/chrome/browser/resources/welcome/navigation_mixin.ts b/chrome/browser/resources/welcome/navigation_mixin.ts index ea56b234..c4534e3 100644 --- a/chrome/browser/resources/welcome/navigation_mixin.ts +++ b/chrome/browser/resources/welcome/navigation_mixin.ts
@@ -2,13 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import '../strings.m.js'; - -import {assert} from 'chrome://resources/js/assert.js'; -import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; -import type {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {afterNextRender, dedupingMixin} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; - /** * @fileoverview The NavigationMixin is in charge of manipulating and * watching window.history.state changes. The page is using the history @@ -19,98 +12,15 @@ * or popping history state without actually changing the path. */ -/** - * Valid route pathnames. - */ -export enum Routes { - LANDING = 'landing', - NEW_USER = 'new-user', - RETURNING_USER = 'returning-user' -} +import '../strings.m.js'; -/** - * Regular expression that captures the leading slash, the content and the - * trailing slash in three different groups. - */ -const CANONICAL_PATH_REGEX: RegExp = /(^\/)([\/-\w]+)(\/$)/; -const path = location.pathname.replace(CANONICAL_PATH_REGEX, '$1$2'); +import {assert} from 'chrome://resources/js/assert.js'; +import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; +import type {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {afterNextRender, dedupingMixin} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -// Sets up history state based on the url path, unless it's already set (e.g. -// when user uses browser-back button to get back on chrome://welcome/...). -if (!history.state || !history.state.route || !history.state.step) { - switch (path) { - case `/${Routes.NEW_USER}`: - history.replaceState({route: Routes.NEW_USER, step: 1}, '', path); - break; - case `/${Routes.RETURNING_USER}`: - history.replaceState({route: Routes.RETURNING_USER, step: 1}, '', path); - break; - default: - history.replaceState( - {route: Routes.LANDING, step: Routes.LANDING}, '', '/'); - } -} - -const routeObservers: Set<NavigationMixinInterface> = new Set(); -let currentRouteElement: NavigationMixinInterface|null; - -// Notifies all the elements that extended NavigationMixin. -function notifyObservers() { - if (currentRouteElement) { - currentRouteElement.onRouteExit(); - currentRouteElement = null; - } - const route = (history.state.route as Routes); - const step = history.state.step; - routeObservers.forEach(observer => { - observer.onRouteChange(route, step); - - // Modules are only attached to DOM if they're for the current route, so - // as long as the id of an element matches up to the current step, it - // means that element is for the current route. - if ((observer as unknown as HTMLElement).id === `step-${step}`) { - currentRouteElement = observer; - } - }); - - // If currentRouteElement is not null, it means there was a new route. - if (currentRouteElement) { - (currentRouteElement as NavigationMixinInterface).notifyRouteEnter(); - } -} - -// Notifies all elements when browser history is popped. -window.addEventListener('popstate', notifyObservers); - -// Notify the active element before unload. -window.addEventListener('beforeunload', () => { - if (currentRouteElement) { - (currentRouteElement as {onRouteUnload: Function}).onRouteUnload(); - } -}); - -export function navigateToNextStep() { - history.pushState( - {route: history.state.route, step: history.state.step + 1}, '', - `/${history.state.route}`); - notifyObservers(); -} - -export function navigateTo(route: Routes, step: number) { - assert([ - Routes.LANDING, - Routes.NEW_USER, - Routes.RETURNING_USER, - ].includes(route)); - - history.pushState( - { - route: route, - step: step, - }, - '', '/' + (route === Routes.LANDING ? '' : route)); - notifyObservers(); -} +import {routeObservers, setCurrentRouteElement} from './router.js'; +import type {Routes} from './router.js'; type Constructor<T> = new (...args: any[]) => T; @@ -149,7 +59,7 @@ // so as long as the id of an element matches up to the current step, // it means that element is for the current route. if (this.id === `step-${step}`) { - currentRouteElement = this; + setCurrentRouteElement(this); this.notifyRouteEnter(); } }
diff --git a/chrome/browser/resources/welcome/navigation_mixin_lit.ts b/chrome/browser/resources/welcome/navigation_mixin_lit.ts new file mode 100644 index 0000000..1348097 --- /dev/null +++ b/chrome/browser/resources/welcome/navigation_mixin_lit.ts
@@ -0,0 +1,116 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/** + * @fileoverview The NavigationMixinLit is in charge of manipulating and + * watching window.history.state changes. The page is using the history + * state object to remember state instead of changing the URL directly, + * because the flow requires that users can use browser-back/forward to + * navigate between steps, without being able to go directly or copy an URL + * that points at a specific step. Using history.state object allows adding + * or popping history state without actually changing the path. + */ + +import '../strings.m.js'; + +import {assert} from 'chrome://resources/js/assert.js'; +import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; +import type {CrLitElement} from 'chrome://resources/lit/v3_0/lit.rollup.js'; + +import {routeObservers, setCurrentRouteElement} from './router.js'; +import type {Routes} from './router.js'; + +type Constructor<T> = new (...args: any[]) => T; + +/** + * Elements can override onRoute(Change|Enter|Exit) to handle route changes. + * Order of hooks being called: + * 1) onRouteExit() on the old route + * 2) onRouteChange() on all subscribed routes + * 3) onRouteEnter() on the new route + */ +export const NavigationMixinLit = + <T extends Constructor<CrLitElement>>(superClass: T): T& + Constructor<NavigationMixinLitInterface> => { + class NavigationMixinLit extends superClass { + static get properties() { + return { + subtitle: String, + }; + } + + subtitle?: string; + + override connectedCallback() { + super.connectedCallback(); + + assert(!routeObservers.has(this)); + routeObservers.add(this); + const route = (history.state.route as Routes); + const step = history.state.step; + + // history state was set when page loaded, so when the element first + // attaches, call the route-change handler to initialize first. + this.onRouteChange(route, step); + + // Modules are only attached to DOM if they're for the current route, + // so as long as the id of an element matches up to the current step, + // it means that element is for the current route. + if (this.id === `step-${step}`) { + setCurrentRouteElement(this); + this.notifyRouteEnter(); + } + } + + /** + * Notifies elements that route was entered and updates the state of the + * app based on the new route. + */ + notifyRouteEnter() { + this.onRouteEnter(); + this.updateFocusForA11y(); + this.updateTitle(); + } + + /** Called to update focus when progressing through the modules. */ + async updateFocusForA11y() { + const header = this.shadowRoot!.querySelector('h1'); + if (header) { + await this.updateComplete; + header.focus(); + } + } + + updateTitle() { + let title = loadTimeData.getString('headerText'); + if (this.subtitle) { + title += ' - ' + this.subtitle; + } + document.title = title; + } + + override disconnectedCallback() { + super.disconnectedCallback(); + assert(routeObservers.delete(this)); + } + + onRouteChange(_route: Routes, _step: number) {} + onRouteEnter() {} + onRouteExit() {} + onRouteUnload() {} + } + + return NavigationMixinLit; + }; + +export interface NavigationMixinLitInterface { + subtitle?: string; + notifyRouteEnter(): void; + updateFocusForA11y(): void; + updateTitle(): void; + onRouteChange(route: Routes, step: number): void; + onRouteEnter(): void; + onRouteExit(): void; + onRouteUnload(): void; +}
diff --git a/chrome/browser/resources/welcome/ntp_background/nux_ntp_background.ts b/chrome/browser/resources/welcome/ntp_background/nux_ntp_background.ts index 038cd40d..057d38e 100644 --- a/chrome/browser/resources/welcome/ntp_background/nux_ntp_background.ts +++ b/chrome/browser/resources/welcome/ntp_background/nux_ntp_background.ts
@@ -12,13 +12,14 @@ import '../shared/step_indicator.js'; import '../strings.m.js'; -import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js'; import {getInstance as getAnnouncerInstance} from 'chrome://resources/cr_elements/cr_a11y_announcer/cr_a11y_announcer.js'; +import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {isRTL} from 'chrome://resources/js/util.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {navigateToNextStep, NavigationMixin} from '../navigation_mixin.js'; +import {NavigationMixin} from '../navigation_mixin.js'; +import {navigateToNextStep} from '../router.js'; import {ModuleMetricsManager} from '../shared/module_metrics_proxy.js'; import type {StepIndicatorModel} from '../shared/nux_types.js';
diff --git a/chrome/browser/resources/welcome/router.ts b/chrome/browser/resources/welcome/router.ts new file mode 100644 index 0000000..3f249bb --- /dev/null +++ b/chrome/browser/resources/welcome/router.ts
@@ -0,0 +1,108 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import {assert} from 'chrome://resources/js/assert.js'; + +import type {NavigationMixinInterface} from './navigation_mixin.js'; + +/** + * Valid route pathnames. + */ +export enum Routes { + LANDING = 'landing', + NEW_USER = 'new-user', + RETURNING_USER = 'returning-user' +} + +export const routeObservers: Set<NavigationMixinInterface> = new Set(); + +let currentRouteElement: NavigationMixinInterface|null; + +export function setCurrentRouteElement(element: NavigationMixinInterface) { + currentRouteElement = element; +} + +// Notifies all the elements that extended NavigationMixin. +function notifyObservers() { + if (currentRouteElement) { + currentRouteElement.onRouteExit(); + currentRouteElement = null; + } + const route = (history.state.route as Routes); + const step = history.state.step; + routeObservers.forEach(observer => { + observer.onRouteChange(route, step); + + // Modules are only attached to DOM if they're for the current route, so + // as long as the id of an element matches up to the current step, it + // means that element is for the current route. + if ((observer as unknown as HTMLElement).id === `step-${step}`) { + currentRouteElement = observer; + } + }); + + // If currentRouteElement is not null, it means there was a new route. + if (currentRouteElement) { + (currentRouteElement as NavigationMixinInterface).notifyRouteEnter(); + } +} + +export function navigateToNextStep() { + history.pushState( + {route: history.state.route, step: history.state.step + 1}, '', + `/${history.state.route}`); + notifyObservers(); +} + +export function navigateTo(route: Routes, step: number) { + assert([ + Routes.LANDING, + Routes.NEW_USER, + Routes.RETURNING_USER, + ].includes(route)); + + history.pushState( + { + route: route, + step: step, + }, + '', '/' + (route === Routes.LANDING ? '' : route)); + notifyObservers(); +} + +function main() { + /** + * Regular expression that captures the leading slash, the content and the + * trailing slash in three different groups. + */ + const CANONICAL_PATH_REGEX: RegExp = /(^\/)([\/-\w]+)(\/$)/; + const path = location.pathname.replace(CANONICAL_PATH_REGEX, '$1$2'); + + // Sets up history state based on the url path, unless it's already set (e.g. + // when user uses browser-back button to get back on chrome://welcome/...). + if (!history.state || !history.state.route || !history.state.step) { + switch (path) { + case `/${Routes.NEW_USER}`: + history.replaceState({route: Routes.NEW_USER, step: 1}, '', path); + break; + case `/${Routes.RETURNING_USER}`: + history.replaceState({route: Routes.RETURNING_USER, step: 1}, '', path); + break; + default: + history.replaceState( + {route: Routes.LANDING, step: Routes.LANDING}, '', '/'); + } + } + + // Notifies all elements when browser history is popped. + window.addEventListener('popstate', notifyObservers); + + // Notify the active element before unload. + window.addEventListener('beforeunload', () => { + if (currentRouteElement) { + (currentRouteElement as {onRouteUnload: Function}).onRouteUnload(); + } + }); +} +main();
diff --git a/chrome/browser/resources/welcome/set_as_default/nux_set_as_default.ts b/chrome/browser/resources/welcome/set_as_default/nux_set_as_default.ts index a4c1b9dd..7771515 100644 --- a/chrome/browser/resources/welcome/set_as_default/nux_set_as_default.ts +++ b/chrome/browser/resources/welcome/set_as_default/nux_set_as_default.ts
@@ -16,7 +16,8 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {navigateToNextStep, NavigationMixin} from '../navigation_mixin.js'; +import {NavigationMixin} from '../navigation_mixin.js'; +import {navigateToNextStep} from '../router.js'; import type {DefaultBrowserInfo, StepIndicatorModel} from '../shared/nux_types.js'; import {getTemplate} from './nux_set_as_default.html.js';
diff --git a/chrome/browser/resources/welcome/shared/action_link_style_lit.css b/chrome/browser/resources/welcome/shared/action_link_style_lit.css new file mode 100644 index 0000000..ddb688d --- /dev/null +++ b/chrome/browser/resources/welcome/shared/action_link_style_lit.css
@@ -0,0 +1,11 @@ +/* Copyright 2024 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +/* #css_wrapper_metadata_start + * #type=style-lit + * #import=chrome://resources/cr_elements/cr_shared_vars.css.js + * #css_wrapper_metadata_end */ + +/* Purposefully empty since this style is generated at build time from the + * equivalent Polymer version. */
diff --git a/chrome/browser/resources/welcome/shared/animations_lit.css b/chrome/browser/resources/welcome/shared/animations_lit.css new file mode 100644 index 0000000..eb431b9 --- /dev/null +++ b/chrome/browser/resources/welcome/shared/animations_lit.css
@@ -0,0 +1,10 @@ +/* Copyright 2024 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +/* #css_wrapper_metadata_start + * #type=style-lit + * #css_wrapper_metadata_end */ + +/* Purposefully empty since this style is generated at build time from the + * equivalent Polymer version. */
diff --git a/chrome/browser/resources/welcome/shared/splash_pages_shared_lit.css b/chrome/browser/resources/welcome/shared/splash_pages_shared_lit.css new file mode 100644 index 0000000..84eade9 --- /dev/null +++ b/chrome/browser/resources/welcome/shared/splash_pages_shared_lit.css
@@ -0,0 +1,13 @@ +/* Copyright 2024 The Chromium Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +/* #css_wrapper_metadata_start + * #type=style-lit + * #import=chrome://resources/cr_elements/cr_shared_vars.css.js + * #import=./navi_colors_lit.css.js + * #include=navi-colors-lit + * #css_wrapper_metadata_end */ + +/* Purposefully empty since this style is generated at build time from the + * equivalent Polymer version. */
diff --git a/chrome/browser/resources/welcome/welcome_app.ts b/chrome/browser/resources/welcome/welcome_app.ts index db1d33e..b4f24f59 100644 --- a/chrome/browser/resources/welcome/welcome_app.ts +++ b/chrome/browser/resources/welcome/welcome_app.ts
@@ -18,7 +18,8 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {NavigationMixin, Routes} from './navigation_mixin.js'; +import {NavigationMixin} from './navigation_mixin.js'; +import {Routes} from './router.js'; import {NuxSetAsDefaultProxyImpl} from './set_as_default/nux_set_as_default_proxy.js'; import {BookmarkBarManager} from './shared/bookmark_proxy.js'; import {getTemplate} from './welcome_app.html.js';
diff --git a/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherCoordinator.java b/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherCoordinator.java index 26923f0..303c95b1 100644 --- a/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherCoordinator.java +++ b/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherCoordinator.java
@@ -383,4 +383,9 @@ private boolean isSurfacePolishEnabled() { return ChromeFeatureList.sSurfacePolish.isEnabled(); } + + @Override + public void openInvitationModal(String invitationId) { + assert false; + } }
diff --git a/chrome/browser/storage_access_api/storage_access_grant_permission_context.cc b/chrome/browser/storage_access_api/storage_access_grant_permission_context.cc index ca564260a..3497738d 100644 --- a/chrome/browser/storage_access_api/storage_access_grant_permission_context.cc +++ b/chrome/browser/storage_access_api/storage_access_grant_permission_context.cc
@@ -320,7 +320,10 @@ /*relying_party_embedder=*/embedding_site, /*identity_provider=*/requesting_site)) { RecordOutcomeSample(RequestOutcome::kAllowedByFedCM); - std::move(callback).Run(CONTENT_SETTING_ALLOW); + fedcm_context->MarkStorageAccessEligible( + /*relying_party_embedder=*/embedding_site, + /*identity_provider=*/requesting_site, + base::BindOnce(std::move(callback), CONTENT_SETTING_ALLOW)); return; } }
diff --git a/chrome/browser/sync/test/integration/autofill_helper.cc b/chrome/browser/sync/test/integration/autofill_helper.cc index aee95e6..a10a6c3 100644 --- a/chrome/browser/sync/test/integration/autofill_helper.cc +++ b/chrome/browser/sync/test/integration/autofill_helper.cc
@@ -233,7 +233,7 @@ for (const AutocompleteKey& key : keys) { FormFieldData field; field.name = key.name(); - field.value = key.value(); + field.set_value(key.value()); form_fields.push_back(field); }
diff --git a/chrome/browser/tab_group_sync/BUILD.gn b/chrome/browser/tab_group_sync/BUILD.gn index ca19cf3e..2cbefbd7 100644 --- a/chrome/browser/tab_group_sync/BUILD.gn +++ b/chrome/browser/tab_group_sync/BUILD.gn
@@ -17,9 +17,54 @@ "//base:base_java", "//build/android:build_java", "//chrome/browser/profiles/android:java", + "//chrome/browser/tab:java", + "//chrome/browser/tab_group:java", + "//chrome/browser/tab_group_sync:java", + "//chrome/browser/tabmodel:java", "//components/saved_tab_groups:java", + "//content/public/android:content_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/jni_zero:jni_zero_java", + "//url:url_java", + ] + } + + android_library("java") { + sources = [ + "android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserver.java", + "android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTracker.java", + ] + + deps = [ + "//base:base_java", + "//chrome/browser/tab:java", + "//chrome/browser/tabmodel:java", + "//components/saved_tab_groups:java", + "//content/public/android:content_java", + "//ui/android:ui_no_recycler_view_java", + "//url:url_java", + ] + } + + robolectric_library("junit") { + sources = [ + "android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserverUnitTest.java", + "android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTrackerUnitTest.java", + ] + deps = [ + ":java", + "//base:base_java", + "//base:base_junit_test_support", + "//chrome/browser/tab:java", + "//chrome/browser/tab_group_sync:java", + "//chrome/browser/tabmodel:java", + "//components/saved_tab_groups:java", + "//content/public/android:content_java", + "//third_party/android_deps:robolectric_all_java", + "//third_party/junit:junit", + "//third_party/mockito:mockito_java", + "//ui/android:ui_java", + "//url:url_java", ] }
diff --git a/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserver.java b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserver.java new file mode 100644 index 0000000..6af28a7 --- /dev/null +++ b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserver.java
@@ -0,0 +1,74 @@ +// Copyright 2024 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.chrome.browser.tab_group_sync; + +import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.tabmodel.TabModelSelector; +import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabObserver; +import org.chromium.components.tab_group_sync.TabGroupSyncService; +import org.chromium.content_public.browser.NavigationHandle; +import org.chromium.ui.base.PageTransition; + +/** + * Observes navigations on every tab in the given tab model. Filters to navigations for tabs in tab + * groups and notifies sync of them. + */ +public class NavigationObserver extends TabModelSelectorTabObserver { + private final TabGroupSyncService mTabGroupSyncService; + private final NavigationTracker mNavigationTracker; + private boolean mEnableObservers; + + /** + * Constructor. + * + * @param tabModelSelector The {@link TabModelSelector} whose tabs are to be observed. + * @param tabGroupSyncService The sync backend to be notified of navigations. + * @param navigationTracker Tracker for identifying sync initiated navigations. + */ + public NavigationObserver( + TabModelSelector tabModelSelector, + TabGroupSyncService tabGroupSyncService, + NavigationTracker navigationTracker) { + super(tabModelSelector); + mTabGroupSyncService = tabGroupSyncService; + mNavigationTracker = navigationTracker; + } + + /** + * Called to enable or disable this observer. When disabled, the navigations will not be + * propagated to sync. Typically invoked when chrome is in the middle of applying remote updates + * to the local tab model. + * + * @param enableObservers Whether to enable the observer. + */ + public void enableObservers(boolean enableObservers) { + mEnableObservers = enableObservers; + } + + @Override + public void onDidFinishNavigationInPrimaryMainFrame( + Tab tab, NavigationHandle navigationHandle) { + if (!mEnableObservers) return; + + // Ignore redirects, incognito, and non-tabgroup tabs. + boolean isRedirect = + (navigationHandle.pageTransition() & PageTransition.IS_REDIRECT_MASK) != 0; + + if (tab.isIncognito() || isRedirect || tab.getTabGroupId() == null) { + return; + } + + // Avoid loops if the navigation was initiated from sync. + if (mNavigationTracker.wasNavigationFromSync(navigationHandle.getUserDataHost())) { + return; + } + + // Propagate the update to sync. We set the position argument as -1 so that it can be + // ignored in native. + int rootId = tab.getRootId(); + mTabGroupSyncService.updateTab( + rootId, tab.getId(), tab.getTitle(), tab.getUrl(), /* position= */ -1); + } +}
diff --git a/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserverUnitTest.java b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserverUnitTest.java new file mode 100644 index 0000000..082fc23f --- /dev/null +++ b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationObserverUnitTest.java
@@ -0,0 +1,188 @@ +// Copyright 2024 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.chrome.browser.tab_group_sync; + +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; +import static org.mockito.Mockito.when; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; +import org.robolectric.annotation.Config; + +import org.chromium.base.Token; +import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.tabmodel.TabModel; +import org.chromium.chrome.browser.tabmodel.TabModelSelector; +import org.chromium.components.tab_group_sync.TabGroupSyncService; +import org.chromium.content_public.browser.NavigationHandle; +import org.chromium.ui.base.PageTransition; +import org.chromium.url.GURL; + +import java.util.ArrayList; +import java.util.List; + +/** Unit tests for the {@link NavigationObserver}. */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class NavigationObserverUnitTest { + @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); + @Mock private Tab mTab; + @Mock private TabGroupSyncService mTabGroupSyncService; + private NavigationObserver mNavigationObserver; + private NavigationTracker mNavigationTracker; + @Mock private TabModelSelector mTabModelSelector; + private List<TabModel> mTabModels = new ArrayList<>(); + private final GURL mTestUrl = new GURL("https://url1.com"); + private final GURL mTestUrl2 = new GURL("https://url2.com"); + private final String mTestTitle = new String("Some title"); + + @Before + public void setUp() { + mTabModels = new ArrayList<>(); + doReturn(mTabModels).when(mTabModelSelector).getModels(); + + mNavigationTracker = new NavigationTracker(); + mNavigationObserver = + new NavigationObserver(mTabModelSelector, mTabGroupSyncService, mNavigationTracker); + } + + private void mockTab( + int tabId, int rootId, String title, GURL url, boolean isIncognito, boolean isGrouped) { + when(mTab.isIncognito()).thenReturn(isIncognito); + when(mTab.getId()).thenReturn(tabId); + when((mTab.getRootId())).thenReturn(rootId); + when(mTab.getTitle()).thenReturn(title); + when(mTab.getUrl()).thenReturn(url); + when(mTab.getTabGroupId()).thenReturn(isGrouped ? new Token(2, 3) : null); + } + + private void simulateNavigation(GURL gurl, int transition) { + NavigationHandle navigation = + NavigationHandle.createForTesting( + gurl, + /* isInPrimaryMainFrame= */ true, + /*isSameDocument*/ false, + /*isRendererInitiated*/ false, + transition, + /* hasUserGesture= */ false, + /* isReload= */ false); + mNavigationObserver.onDidFinishNavigationInPrimaryMainFrame(mTab, navigation); + } + + @Test + public void testNavigationObserverBasic() { + mNavigationObserver.enableObservers(true); + mockTab( + /* tabId= */ 5, + /* rootId= */ 2, + mTestTitle, + mTestUrl, + /* isIncognito= */ false, + /* isGrouped= */ true); + simulateNavigation(mTestUrl, PageTransition.LINK); + verify(mTabGroupSyncService).updateTab(eq(2), eq(5), eq(mTestTitle), eq(mTestUrl), eq(-1)); + } + + @Test + public void testMultipleNavigations() { + mNavigationObserver.enableObservers(true); + mockTab( + /* tabId= */ 5, + /* rootId= */ 2, + mTestTitle, + mTestUrl, + /* isIncognito= */ false, + /* isGrouped= */ true); + simulateNavigation(mTestUrl, PageTransition.LINK); + verify(mTabGroupSyncService).updateTab(eq(2), eq(5), eq(mTestTitle), eq(mTestUrl), eq(-1)); + + mockTab( + /* tabId= */ 6, + /* rootId= */ 3, + mTestTitle, + mTestUrl2, + /* isIncognito= */ false, + /* isGrouped= */ true); + simulateNavigation(mTestUrl, PageTransition.LINK); + verify(mTabGroupSyncService).updateTab(eq(3), eq(6), eq(mTestTitle), eq(mTestUrl2), eq(-1)); + } + + @Test + public void testDisableObserver() { + mNavigationObserver.enableObservers(false); + mockTab( + /* tabId= */ 5, + /* rootId= */ 2, + mTestTitle, + mTestUrl, + /* isIncognito= */ false, + /* isGrouped= */ true); + simulateNavigation(mTestUrl, PageTransition.LINK); + verifyNoInteractions(mTabGroupSyncService); + } + + @Test + public void testIncognito() { + mNavigationObserver.enableObservers(true); + mockTab( + /* tabId= */ 5, + /* rootId= */ 2, + mTestTitle, + mTestUrl, + /* isIncognito= */ true, + /* isGrouped= */ true); + simulateNavigation(mTestUrl, PageTransition.LINK); + verifyNoInteractions(mTabGroupSyncService); + } + + @Test + public void testRedirect() { + mNavigationObserver.enableObservers(true); + mockTab( + /* tabId= */ 5, + /* rootId= */ 2, + mTestTitle, + mTestUrl, + /* isIncognito= */ false, + /* isGrouped= */ true); + simulateNavigation(mTestUrl, PageTransition.SERVER_REDIRECT); + verifyNoInteractions(mTabGroupSyncService); + } + + @Test + public void testSyncInitiatedNavigation() { + mNavigationObserver.enableObservers(true); + mockTab( + /* tabId= */ 5, + /* rootId= */ 2, + mTestTitle, + mTestUrl, + /* isIncognito= */ false, + /* isGrouped= */ true); + + NavigationHandle navigation = + NavigationHandle.createForTesting( + mTestUrl, + /* isInPrimaryMainFrame= */ true, + /*isSameDocument*/ false, + /*isRendererInitiated*/ false, + PageTransition.LINK, + /* hasUserGesture= */ false, + /* isReload= */ false); + mNavigationTracker.setNavigationWasFromSync(navigation.getUserDataHost()); + mNavigationObserver.onDidFinishNavigationInPrimaryMainFrame(mTab, navigation); + + verifyNoInteractions(mTabGroupSyncService); + } +}
diff --git a/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTracker.java b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTracker.java new file mode 100644 index 0000000..c00d305 --- /dev/null +++ b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTracker.java
@@ -0,0 +1,67 @@ +// Copyright 2024 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.chrome.browser.tab_group_sync; + +import android.util.ArraySet; + +import org.chromium.base.UserData; +import org.chromium.base.UserDataHost; + +import java.util.Set; + +/** + * Tracks navigations on that were started from sync. These navigations will be ignored to prevent + * looping notifications back to sync. + */ +public class NavigationTracker { + /** A counter to generate unique IDs to track navigations within a chrome session. */ + private int mRequestIdCounter; + + /** + * The navigations that have been started but yet to complete. When completed, they will be + * cleared from this set. + */ + private final Set<Integer> mPendingNavigations = new ArraySet<>(); + + /** + * Starts tracking a navigation. + * + * @param host The {@link UserDataHost} associated with this navigation. + */ + public void setNavigationWasFromSync(UserDataHost host) { + int nextRequestId = mRequestIdCounter++; + host.setUserData(SyncNavigationUserData.class, new SyncNavigationUserData(nextRequestId)); + mPendingNavigations.add(nextRequestId); + } + + /** + * Checks if a navigation was started from sync. If it was started from sync, the function + * returns true, and removes the navigation from the tracking set. + * + * @param host The {@link UserDataHost} associated with the navigation. + * @return True if this navigation was started from sync, false otherwise. + */ + public boolean wasNavigationFromSync(UserDataHost host) { + SyncNavigationUserData data = host.getUserData(SyncNavigationUserData.class); + if (data == null) return false; + boolean isFromSync = mPendingNavigations.contains(data.mRequestID); + mPendingNavigations.remove(data.mRequestID); + return isFromSync; + } + + /** + * Helper class to attach a request ID along with the navigation so that it can be identified + * later. + */ + private static class SyncNavigationUserData implements UserData { + /** An ID that can be used to track the navigation. */ + private int mRequestID; + + /** Constructor. */ + public SyncNavigationUserData(int requestID) { + this.mRequestID = requestID; + } + } +}
diff --git a/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTrackerUnitTest.java b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTrackerUnitTest.java new file mode 100644 index 0000000..826ac67 --- /dev/null +++ b/chrome/browser/tab_group_sync/android/java/src/org/chromium/chrome/browser/tab_group_sync/NavigationTrackerUnitTest.java
@@ -0,0 +1,41 @@ +// Copyright 2024 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.chrome.browser.tab_group_sync; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.annotation.Config; + +import org.chromium.base.UserDataHost; +import org.chromium.base.test.BaseRobolectricTestRunner; + +/** Unit tests for the {@link NavigationTracker}. */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class NavigationTrackerUnitTest { + private NavigationTracker mNavigationTracker = new NavigationTracker(); + + @Test + public void testSyncInitiatedNavigation() { + UserDataHost userDataHost = new UserDataHost(); + mNavigationTracker.setNavigationWasFromSync(userDataHost); + Assert.assertTrue(mNavigationTracker.wasNavigationFromSync(userDataHost)); + } + + @Test + public void testNotSyncInitiatedNavigation() { + UserDataHost userDataHost = new UserDataHost(); + Assert.assertFalse(mNavigationTracker.wasNavigationFromSync(userDataHost)); + } + + @Test + public void testTrackingResetAfterQuery() { + UserDataHost userDataHost = new UserDataHost(); + mNavigationTracker.setNavigationWasFromSync(userDataHost); + Assert.assertTrue(mNavigationTracker.wasNavigationFromSync(userDataHost)); + Assert.assertFalse(mNavigationTracker.wasNavigationFromSync(userDataHost)); + } +}
diff --git a/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcher.java b/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcher.java index d95f5cd0..414a3264 100644 --- a/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcher.java +++ b/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcher.java
@@ -264,4 +264,12 @@ /** Refresh the tab switcher's tab list to display any out-of-band updates properly. */ void refreshTabList(); + + /** + * Open the invitation modal on top of the tab switcher view when an invitation intent is + * intercepted. + * + * @param invitationId The id of the invitation. + */ + void openInvitationModal(String invitationId); }
diff --git a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc index 6ff1b31..43a49f7 100644 --- a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc +++ b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc
@@ -35,7 +35,7 @@ // value, not the original value. const FormFieldData* form_field = received_form.FindFieldByGlobalId(field_id); return form_field && form_field->IsFocusable() && - SanitizedFieldIsEmpty(form_field->value); + SanitizedFieldIsEmpty(form_field->value()); } } // namespace @@ -330,7 +330,7 @@ bool TouchToFillDelegateAndroidImpl::IsFillingPerfect( const FormStructure& submitted_form) const { return base::ranges::all_of(submitted_form, [](const auto& field) { - return field->value.empty() || field->is_autofilled; + return field->value().empty() || field->is_autofilled; }); } @@ -348,7 +348,7 @@ FieldType::CREDIT_CARD_NUMBER) { return false; } - return !SanitizedFieldIsEmpty(field.value); + return !SanitizedFieldIsEmpty(field.value()); }); }
diff --git a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl_unittest.cc b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl_unittest.cc index e0ad33b..b302733 100644 --- a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl_unittest.cc +++ b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl_unittest.cc
@@ -283,7 +283,7 @@ TEST_P(TouchToFillDelegateAndroidImplPaymentMethodUnitTest, TryToShowTouchToFillFailsForPaymentMethodIfFieldHasValue) { ASSERT_FALSE(touch_to_fill_delegate_->IsShowingTouchToFill()); - form_.fields[0].value = u"Initial value"; + form_.fields[0].set_value(u"Initial value"); TryToShowTouchToFill(/*expected_success=*/false); histogram_tester_.ExpectUniqueSample( @@ -414,7 +414,7 @@ // Set credit card value. // TODO(crbug/1428904): Retrieve the card number field by name here. ASSERT_EQ(form_.fields[1].name, u"cardnumber"); - form_.fields[1].value = u"411111111111"; + form_.fields[1].set_value(u"411111111111"); ASSERT_FALSE(touch_to_fill_delegate_->IsShowingTouchToFill()); TryToShowTouchToFill(/*expected_success=*/false); @@ -432,7 +432,7 @@ // Set card expiration year. // TODO(crbug/1428904): Retrieve the card expiry year field by name here. ASSERT_EQ(form_.fields[3].name, u"ccyear"); - form_.fields[3].value = u"2023"; + form_.fields[3].set_value(u"2023"); ASSERT_FALSE(touch_to_fill_delegate_->IsShowingTouchToFill()); TryToShowTouchToFill(/*expected_success=*/true); @@ -496,7 +496,7 @@ TEST_F(TouchToFillDelegateAndroidImplCreditCardUnitTest, TryToShowTouchToFillToleratesFormattingCharacters) { - form_.fields[0].value = u"____-____-____-____"; + form_.fields[0].set_value(u"____-____-____-____"); TryToShowTouchToFill(/*expected_success=*/true); histogram_tester_.ExpectBucketCount(
diff --git a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_quality_metrics_unittest.cc b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_quality_metrics_unittest.cc index 22da7d7..7086aaf4 100644 --- a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_quality_metrics_unittest.cc +++ b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_quality_metrics_unittest.cc
@@ -87,9 +87,9 @@ for (size_t i = 0; i < fields_have_autofilled_values.size(); i++) { form.fields[i].is_autofilled = fields_have_autofilled_values[i]; CreditCard test_card = test::GetCreditCard(); - form.fields[i].value = field_types[i] != CREDIT_CARD_VERIFICATION_CODE - ? test_card.GetRawInfo(field_types[i]) - : u"123"; + form.fields[i].set_value(field_types[i] != CREDIT_CARD_VERIFICATION_CODE + ? test_card.GetRawInfo(field_types[i]) + : u"123"); } }
diff --git a/chrome/browser/ui/android/edge_to_edge/internal/java/src/org/chromium/chrome/browser/ui/edge_to_edge/TotallyEdgeToEdge.java b/chrome/browser/ui/android/edge_to_edge/internal/java/src/org/chromium/chrome/browser/ui/edge_to_edge/TotallyEdgeToEdge.java index 434158e..d062e95 100644 --- a/chrome/browser/ui/android/edge_to_edge/internal/java/src/org/chromium/chrome/browser/ui/edge_to_edge/TotallyEdgeToEdge.java +++ b/chrome/browser/ui/android/edge_to_edge/internal/java/src/org/chromium/chrome/browser/ui/edge_to_edge/TotallyEdgeToEdge.java
@@ -4,7 +4,6 @@ package org.chromium.chrome.browser.ui.edge_to_edge; -import org.chromium.base.FeatureList; import org.chromium.base.Log; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.flags.ChromeFeatureList; @@ -48,8 +47,7 @@ * @return Whether this Feature is enabled or not. */ static boolean isEnabled() { - return FeatureList.isInitialized() - && ChromeFeatureList.isEnabled(ChromeFeatureList.TOTALLY_EDGE_TO_EDGE); + return ChromeFeatureList.sTotallyEdgeToEdge.isEnabled(); } /**
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java index de0fcea..bc206fa 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java
@@ -501,9 +501,11 @@ } if (mNativeInitialized + && mProfileSupplier.hasValue() && !CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_INSTANT) && DeviceClassManager.enablePrerendering() - && PreloadPagesSettingsBridge.getState() != PreloadPagesState.NO_PRELOADING + && PreloadPagesSettingsBridge.getState(mProfileSupplier.get()) + != PreloadPagesState.NO_PRELOADING && mLocationBarDataProvider.hasTab()) { mOmniboxPrerender.prerenderMaybe( userText,
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediatorTest.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediatorTest.java index 4d7ed92..9128154 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediatorTest.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediatorTest.java
@@ -344,13 +344,17 @@ verify(mPrerenderJni) .initializeForProfile(123L, omniboxPrerenderCaptor.getValue(), profile); - doReturn(PreloadPagesState.NO_PRELOADING).when(mPreloadPagesSettingsJni).getState(); + doReturn(PreloadPagesState.NO_PRELOADING) + .when(mPreloadPagesSettingsJni) + .getState(eq(profile)); mMediator.onSuggestionsChanged("text", true); verify(mPrerenderJni, never()) .prerenderMaybe( anyLong(), any(), anyString(), anyString(), anyLong(), any(), any()); - doReturn(PreloadPagesState.STANDARD_PRELOADING).when(mPreloadPagesSettingsJni).getState(); + doReturn(PreloadPagesState.STANDARD_PRELOADING) + .when(mPreloadPagesSettingsJni) + .getState(eq(profile)); GURL url = JUnitTestGURLs.RED_1; mMediator.setUrl(url, null); doReturn(true).when(mLocationBarDataProvider).hasTab();
diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/UpgradePromoCoordinator.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/UpgradePromoCoordinator.java index 10c9d82..f04c5630 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/UpgradePromoCoordinator.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/UpgradePromoCoordinator.java
@@ -34,7 +34,7 @@ FullscreenSigninCoordinator.Delegate { public interface Delegate { /** Notifies when the user clicked the "add account" button. */ - void addAccount(); + void addAccountInUpgradePromo(); /** * The supplier that supplies whether reading policy value is necessary. See {@link @@ -123,7 +123,7 @@ /** Implements {@link FullscreenSigninCoordinator.Delegate} */ @Override public void addAccount() { - mDelegate.addAccount(); + mDelegate.addAccountInUpgradePromo(); } /** Implements {@link FullscreenSigninCoordinator.Delegate} */ @@ -236,10 +236,6 @@ advanceToNextPage(); } - public void onAccountSelected(String accountName) { - mSigninCoordinator.onAccountSelected(accountName); - } - private void inflateViewSwitcher() { Configuration configuration = mContext.getResources().getConfiguration(); boolean useLandscapeLayout =
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java index 5a495afe..5518b13 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java
@@ -108,8 +108,7 @@ * <p>Must be called with the {@link FeatureList} initialized. */ public static boolean isCustomizationEnabled() { - if (!ChromeFeatureList.isEnabled( - ChromeFeatureList.ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2)) { + if (!ChromeFeatureList.sAdaptiveButtonInTopToolbarCustomizationV2.isEnabled()) { return false; } final int minVersion =
diff --git a/chrome/browser/ui/ash/calendar/calendar_client_impl.cc b/chrome/browser/ui/ash/calendar/calendar_client_impl.cc index f9cc6c64..3c5255d 100644 --- a/chrome/browser/ui/ash/calendar/calendar_client_impl.cc +++ b/chrome/browser/ui/ash/calendar/calendar_client_impl.cc
@@ -8,6 +8,7 @@ #include <utility> #include "ash/constants/ash_pref_names.h" +#include "base/containers/contains.h" #include "base/functional/callback_helpers.h" #include "base/time/time.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" @@ -39,7 +40,10 @@ // 1) Check the Calendar pref. const auto* const pref_service = profile_->GetPrefs(); if (!pref_service || - !pref_service->GetBoolean(prefs::kCalendarIntegrationEnabled)) { + !pref_service->GetBoolean(prefs::kCalendarIntegrationEnabled) || + !base::Contains(pref_service->GetList( + prefs::kContextualGoogleIntegrationsConfiguration), + prefs::kGoogleCalendarIntegrationName)) { return true; }
diff --git a/chrome/browser/ui/ash/calendar/calendar_client_impl_unittest.cc b/chrome/browser/ui/ash/calendar/calendar_client_impl_unittest.cc index 676ceb6..ae6caaf 100644 --- a/chrome/browser/ui/ash/calendar/calendar_client_impl_unittest.cc +++ b/chrome/browser/ui/ash/calendar/calendar_client_impl_unittest.cc
@@ -72,6 +72,21 @@ EXPECT_TRUE(client.IsDisabledByAdmin()); } +TEST_F(CalendarClientImplTest, + IsDisabledByAdmin_NoCalendarInContextualGoogleIntegrationsPref) { + auto prefs = GetDefaultPrefs(); + base::Value::List enabled_integrations; + enabled_integrations.Append(prefs::kGoogleClassroomIntegrationName); + enabled_integrations.Append(prefs::kGoogleTasksIntegrationName); + prefs->SetList(prefs::kContextualGoogleIntegrationsConfiguration, + std::move(enabled_integrations)); + + auto* const profile = CreateTestingProfile(std::move(prefs)); + + const auto client = CalendarClientImpl(profile); + EXPECT_TRUE(client.IsDisabledByAdmin()); +} + TEST_F(CalendarClientImplTest, IsDisabledByAdmin_DisabledCalendarApp) { auto* const profile = CreateTestingProfile(GetDefaultPrefs());
diff --git a/chrome/browser/ui/autofill/payments/card_unmask_prompt_view_browsertest.cc b/chrome/browser/ui/autofill/payments/card_unmask_prompt_view_browsertest.cc index 62be900..e190109b 100644 --- a/chrome/browser/ui/autofill/payments/card_unmask_prompt_view_browsertest.cc +++ b/chrome/browser/ui/autofill/payments/card_unmask_prompt_view_browsertest.cc
@@ -49,7 +49,7 @@ const UserProvidedUnmaskDetails& details) override { details_ = details; } - void OnUnmaskPromptClosed() override {} + void OnUnmaskPromptCancelled() override {} bool ShouldOfferFidoAuth() const override { return false; } base::WeakPtr<TestCardUnmaskDelegate> GetWeakPtr() {
diff --git a/chrome/browser/ui/cocoa/browser_window_mac_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_mac_browsertest.mm index 00cc0d5..b93df93 100644 --- a/chrome/browser/ui/cocoa/browser_window_mac_browsertest.mm +++ b/chrome/browser/ui/cocoa/browser_window_mac_browsertest.mm
@@ -4,10 +4,10 @@ #include "chrome/browser/ui/browser_window.h" -#include <memory> - #import <Cocoa/Cocoa.h> +#include <memory> + #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/lifetime/application_lifetime_desktop.h" #include "chrome/browser/ui/browser_command_controller.h" @@ -16,6 +16,7 @@ #include "components/remote_cocoa/app_shim/native_widget_mac_nswindow.h" #include "content/public/common/content_switches.h" #include "content/public/test/browser_test.h" +#include "ui/accessibility/accessibility_switches.h" #import "ui/base/cocoa/window_size_constants.h" #include "ui/base/test/ns_ax_tree_validator.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_test.cc b/chrome/browser/ui/passwords/manage_passwords_test.cc index 2ea6aaa8..9cce2eb3 100644 --- a/chrome/browser/ui/passwords/manage_passwords_test.cc +++ b/chrome/browser/ui/passwords/manage_passwords_test.cc
@@ -307,7 +307,7 @@ fetcher_.NotifyFetchCompleted(); autofill::FormData submitted_form = observed_form; - submitted_form.fields[1].value = u"new_password"; + submitted_form.fields[1].set_value(u"new_password"); form_manager->ProvisionallySave( submitted_form, &driver_, base::LRUCache<PossibleUsernameFieldIdentifier, PossibleUsernameData>(
diff --git a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_lacros.cc b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_lacros.cc index 7b18915..f51443c 100644 --- a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_lacros.cc +++ b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_lacros.cc
@@ -123,25 +123,23 @@ } void BrowserDesktopWindowTreeHostLacros::OnWindowStateChanged( - ui::PlatformWindowState old_window_show_state, - ui::PlatformWindowState new_window_show_state) { - DesktopWindowTreeHostLacros::OnWindowStateChanged(old_window_show_state, - new_window_show_state); + ui::PlatformWindowState old_state, + ui::PlatformWindowState new_state) { + DesktopWindowTreeHostLacros::OnWindowStateChanged(old_state, new_state); - bool fullscreen_changed = - ui::IsPlatformWindowStateFullscreen(new_window_show_state) || - ui::IsPlatformWindowStateFullscreen(old_window_show_state); - if (old_window_show_state != new_window_show_state && fullscreen_changed) { + bool fullscreen_changed = ui::IsPlatformWindowStateFullscreen(new_state) || + ui::IsPlatformWindowStateFullscreen(old_state); + if (old_state != new_state && fullscreen_changed) { // Update WindowPinTypeKey before triggering BrowserView::ProcessFullscreen. - if (IsPinned(old_window_show_state)) { - CHECK(!IsPinned(new_window_show_state)); + if (IsPinned(old_state)) { + CHECK(!IsPinned(new_state)); desktop_native_widget_aura_->GetNativeWindow()->SetProperty( lacros::kWindowPinTypeKey, chromeos::WindowPinType::kNone); - } else if (IsPinned(new_window_show_state)) { - CHECK(!IsPinned(old_window_show_state)); + } else if (IsPinned(new_state)) { + CHECK(!IsPinned(old_state)); desktop_native_widget_aura_->GetNativeWindow()->SetProperty( lacros::kWindowPinTypeKey, - new_window_show_state == ui::PlatformWindowState::kPinnedFullscreen + new_state == ui::PlatformWindowState::kPinnedFullscreen ? chromeos::WindowPinType::kPinned : chromeos::WindowPinType::kTrustedPinned); }
diff --git a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc index 503ab4e5..3494adc 100644 --- a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc +++ b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc
@@ -334,15 +334,13 @@ } void BrowserDesktopWindowTreeHostLinux::OnWindowStateChanged( - ui::PlatformWindowState old_window_show_state, - ui::PlatformWindowState new_window_show_state) { - DesktopWindowTreeHostLinux::OnWindowStateChanged(old_window_show_state, - new_window_show_state); + ui::PlatformWindowState old_state, + ui::PlatformWindowState new_state) { + DesktopWindowTreeHostLinux::OnWindowStateChanged(old_state, new_state); - bool fullscreen_changed = - ui::IsPlatformWindowStateFullscreen(new_window_show_state) || - ui::IsPlatformWindowStateFullscreen(old_window_show_state); - if (old_window_show_state != new_window_show_state && fullscreen_changed) { + bool fullscreen_changed = ui::IsPlatformWindowStateFullscreen(new_state) || + ui::IsPlatformWindowStateFullscreen(old_state); + if (old_state != new_state && fullscreen_changed) { // If the browser view initiated this state change, // BrowserView::ProcessFullscreen will no-op, so this call is harmless. browser_view_->FullscreenStateChanging();
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 748feb2..f306d538 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -342,11 +342,6 @@ #include "chrome/browser/ui/views/frame/webui_tab_strip_container_view.h" #endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) -#if BUILDFLAG(ENTERPRISE_WATERMARK) -#include "chrome/browser/enterprise/data_protection/data_protection_navigation_observer.h" -#include "chrome/browser/enterprise/watermark/watermark_view.h" -#endif // BUILDFLAG(ENTERPRISE_WATERMARK) - using base::UserMetricsAction; using content::NativeWebKeyboardEvent; using content::WebContents; @@ -2775,7 +2770,7 @@ // regardless of the order in which they execute. if (watermark_view_ && clear_watermark_text_on_page_load_) { - ApplyDataProtectionSettings(web_contents()->GetWeakPtr(), std::string()); + ApplyWatermarkSettings(std::string()); } } @@ -5512,15 +5507,19 @@ void BrowserView::ApplyDataProtectionSettings( base::WeakPtr<content::WebContents> expected_web_contents, - const std::string& watermark_text) { + const enterprise_data_protection::UrlSettings& settings) { // Since retrieving data protections is async, make sure that the view is // still on the right tab before applying the settings. if (!expected_web_contents || web_contents() != expected_web_contents.get()) { return; } + ApplyWatermarkSettings(settings.watermark_text); +} + +void BrowserView::ApplyWatermarkSettings(const std::string& watermark_text) { if (watermark_view_) { - watermark_view_->SetString(std::move(watermark_text)); + watermark_view_->SetString(watermark_text); } // Watermark string should not be changed once the page loads. @@ -5529,15 +5528,15 @@ void BrowserView::DelayApplyDataProtectionSettingsIfEmpty( base::WeakPtr<content::WebContents> expected_web_contents, - const std::string& watermark_text) { + const enterprise_data_protection::UrlSettings& settings) { // Since retrieving data protections is async, make sure that the view is // still on the right tab before applying the settings. if (!expected_web_contents || web_contents() != expected_web_contents.get()) { return; } - if (!watermark_text.empty()) { - ApplyDataProtectionSettings(expected_web_contents, watermark_text); + if (!settings.watermark_text.empty()) { + ApplyDataProtectionSettings(expected_web_contents, settings); } else { // The watermark string should be cleared. Delay that until the page // finishes loading.
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index b799a53b..46cdfe23 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -64,6 +64,7 @@ #include "ui/views/window/client_view.h" #if BUILDFLAG(ENTERPRISE_WATERMARK) +#include "chrome/browser/enterprise/data_protection/data_protection_navigation_observer.h" #include "chrome/browser/enterprise/watermark/watermark_view.h" #endif @@ -1077,7 +1078,8 @@ // safe-browsing's realtime to `watermark_view_`. void ApplyDataProtectionSettings( base::WeakPtr<content::WebContents> expected_web_contents, - const std::string& watermark_text); + const enterprise_data_protection::UrlSettings& settings); + void ApplyWatermarkSettings(const std::string& watermark_text); // Applies data protection settings if there are any to apply, otherwise // delay clearing the data protection settings until the page loads. @@ -1091,7 +1093,7 @@ // `DocumentOnLoadCompletedInPrimaryMainFrame()`. void DelayApplyDataProtectionSettingsIfEmpty( base::WeakPtr<content::WebContents> expected_web_contents, - const std::string& watermark_text); + const enterprise_data_protection::UrlSettings& settings); // The BrowserFrame that hosts this view. raw_ptr<BrowserFrame, DanglingUntriaged> frame_ = nullptr;
diff --git a/chrome/browser/ui/views/tabs/alert_indicator_button.cc b/chrome/browser/ui/views/tabs/alert_indicator_button.cc index 67e3c94..89f4df5 100644 --- a/chrome/browser/ui/views/tabs/alert_indicator_button.cc +++ b/chrome/browser/ui/views/tabs/alert_indicator_button.cc
@@ -453,7 +453,7 @@ if (features::IsChromeRefresh2023()) { icon = &vector_icons::kSerialPortChromeRefreshIcon; } else { - // TODO(https://crbug.com/917204): This icon is too large to fit + // TODO(crbug.com/40607459): This icon is too large to fit // properly as a tab indicator and should be replaced. icon = &vector_icons::kSerialPortIcon; }
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index fc2c639..f43dec09 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -226,7 +226,7 @@ // |title_| paints on top of an opaque region (the tab background) of a // non-opaque layer (the tabstrip's layer), which cannot currently be detected // by the subpixel-rendering opacity check. - // TODO(https://crbug.com/1139395): Improve the check so that this case doen't + // TODO(crbug.com/40725997): Improve the check so that this case doen't // need a manual suppression by detecting cases where the text is painted onto // onto opaque parts of a not-entirely-opaque layer. title_->SetSkipSubpixelRenderingOpacityCheck(true); @@ -621,7 +621,7 @@ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. - // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, + // TODO(crbug.com/41467565): Once Linux/CrOS widget transparency is solved, // remove that case. constexpr int kHoverCardOverlap = 6; if (event.location().y() >= height() - kHoverCardOverlap) { @@ -994,8 +994,8 @@ const int pinned_width = tab_style()->GetPinnedWidth(); const int ideal_delta = width() - pinned_width; const int ideal_x = (pinned_width - visual_width) / 2; - // TODO(crbug.com/533570): This code is broken when the current width is less - // than the pinned width. + // TODO(crbug.com/40436434): This code is broken when the current width is + // less than the pinned width. bounds->set_x( bounds->x() + base::ClampRound(
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc index aeaf2c77..60a7ca12 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -415,7 +415,7 @@ ref->last_point_in_screen_ = start_point_in_screen_; // Detachable tabs are not supported on Mac if the window is an out-of-process // (remote_cocoa) window, i.e. a PWA window. - // TODO(https://crbug.com/1076777): Make detachable tabs work in PWAs on Mac. + // TODO(crbug.com/40128833): Make detachable tabs work in PWAs on Mac. #if BUILDFLAG(IS_MAC) if (ref->source_context_->GetWidget() && remote_cocoa::IsWindowRemote( @@ -2368,7 +2368,7 @@ // If the new tabstrip region is smaller than the old, resize and reposition // the tabs to provide a sense of continuity. if (current_tab_area_width < previous_tab_area_width) { - // TODO(https://crbug.com/1324577): Fix the case where the source window + // TODO(crbug.com/40839358): Fix the case where the source window // spans two monitors horizontally, and IsRTL is true. // `leading_ratio` is the proportion of the previous tab area width which is @@ -2704,8 +2704,8 @@ // window. In this case, since the dragged tabs can't move further right in // the tabstrip, it will never go "beyond" the left_group and therefore // never leave it unless we add this check. See crbug.com/1134376. - // TODO(crbug/1329344): Update this to work better with Tab Scrolling once - // dragging near the end of the tabstrip is cleaner. + // TODO(crbug.com/40842551): Update this to work better with Tab Scrolling + // once dragging near the end of the tabstrip is cleaner. if (tab_bounds_in_drag_context_coords(selected.back()).right() >= attached_context_->TabDragAreaEndX()) { return std::nullopt; @@ -2753,8 +2753,8 @@ const int active_index = model->active_index(); #if BUILDFLAG(IS_MAC) - // TODO(crbug.com/1411448): Remove DumpWithoutCrashing() if Widget::IsClosed() - // check above works. + // TODO(crbug.com/40890295): Remove DumpWithoutCrashing() if + // Widget::IsClosed() check above works. if (!model->ContainsIndex(active_index)) { if (active_index == TabStripModel::kNoTab) { LOG(ERROR) << "TabStripModel of the browser tyring to attach to has no "
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.h b/chrome/browser/ui/views/tabs/tab_drag_controller.h index 5a28b61..beb34697 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.h +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.h
@@ -59,7 +59,8 @@ // Handles dragging tabs while the tabs are attached. `just_attached` should // be true iff this is the first call to MoveAttached after attaching. This // also starts a scroll session if needed. - // TODO(crbug.com/1378679): Make this an observer of the scroll_session class. + // TODO(crbug.com/40875136): Make this an observer of the scroll_session + // class. virtual void MoveAttached(const gfx::Point& point_in_screen, bool just_attached) = 0; // Returns a rect starting from the origin of the first dragged tab
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc index ed17bec7..e2f3f60 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -3239,7 +3239,7 @@ } // Home tab can't be detached. -// TODO(crbug.com/1381358): Enable this test for Linux and Lacros. +// TODO(crbug.com/40245163): Enable this test for Linux and Lacros. #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #define MAYBE_CantDragHomeTab DISABLED_CantDragHomeTab #else @@ -3505,7 +3505,7 @@ // Creates two browsers, drags from first into the second in such a way that // no detaching should happen. -// TODO(crbug.com/1509717): Reenable flaky test. +// TODO(crbug.com/41482323): Reenable flaky test. IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, DISABLED_DragDirectlyToSecondWindow) { // TODO(pkasting): Crashes when detaching browser. https://crbug.com/918733 @@ -3755,7 +3755,7 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) // TODO(mukai): enable this test on Windows and Linux. -// TODO(crbug.com/979013): flaky on Mac +// TODO(crbug.com/41468034): flaky on Mac #define MAYBE_OffsetForDraggingTab DISABLED_OffsetForDraggingTab #else #define MAYBE_OffsetForDraggingTab OffsetForDraggingTab @@ -3767,7 +3767,7 @@ ASSERT_FALSE(TabDragController::IsActive()); } -// TODO(960915): fix flakiness and re-enable this test on mac/linux. +// TODO(crbug.com/41457552): fix flakiness and re-enable this test on mac/linux. IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, DISABLED_OffsetForDraggingDetachedTab) { AddTabsAndResetBrowser(browser(), 1); @@ -4228,7 +4228,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) // Drags from browser to a second display and releases input. -// TODO(crbug.com/1499240): Test is flaky on multiple bots. +// TODO(crbug.com/40940016): Test is flaky on multiple bots. IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest, DISABLED_DragSingleTabToSeparateWindowInSecondDisplay) { AddTabsAndResetBrowser(browser(), 1); @@ -4244,7 +4244,7 @@ start.y() + GetDetachY(tab_strip)); ASSERT_TRUE(second_display.bounds().Contains(target)); - // TODO(crbug.com/990589): Unit tests should be able to simulate mouse input + // TODO(crbug.com/40638870): Unit tests should be able to simulate mouse input // without having to call |CursorManager::SetDisplay|. ash::Shell::Get()->cursor_manager()->SetDisplay(second_display); DragTabAndNotify( @@ -5150,7 +5150,7 @@ ::testing::Values("mouse"))); #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -// TODO(crbug.com/1488094): Enable Multi Display Test on lacros +// TODO(crbug.com/40283516): Enable Multi Display Test on lacros INSTANTIATE_TEST_SUITE_P( TabDragging, DifferentDeviceScaleFactorDisplayTabDragControllerTest,
diff --git a/chrome/browser/ui/views/tabs/tab_group_header.cc b/chrome/browser/ui/views/tabs/tab_group_header.cc index 0e899af5..dd80bef 100644 --- a/chrome/browser/ui/views/tabs/tab_group_header.cc +++ b/chrome/browser/ui/views/tabs/tab_group_header.cc
@@ -327,10 +327,10 @@ // Skip the insetting in TabSlotView::GetAnchorBoundsInScreen(). In this // context insetting makes the anchored bubble partially cut into the tab // outline. - // TODO(crbug.com/1268481): See if the layout of TabGroupHeader can be unified - // with tabs so that bounds do not need to be calculated differently between - // tabs and headers. As of writing this, hover cards to not cut into the tab - // outline but without this change TabGroupEditorBubbleView does. + // TODO(crbug.com/40803556): See if the layout of TabGroupHeader can be + // unified with tabs so that bounds do not need to be calculated differently + // between tabs and headers. As of writing this, hover cards to not cut into + // the tab outline but without this change TabGroupEditorBubbleView does. return View::GetAnchorBoundsInScreen(); } @@ -481,7 +481,7 @@ // radius, taking into account the group underline stroke. const int corner_radius = group_style_->GetChipCornerRadius(); - // TODO(crbug.com/1416895): The math of the layout in this function is done + // TODO(crbug.com/40893761): The math of the layout in this function is done // arithmetically and can be hard to understand. This should instead be done // by a layout manager. const int text_height =
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view_unittest.cc b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view_unittest.cc index bd1bd0c..5ad5c47c 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view_unittest.cc +++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view_unittest.cc
@@ -39,8 +39,8 @@ enum OmitOnPlatforms { kRunOnAllPlatforms = 0, - // TODO(crbug/1267013): Remove once emoji (including modified/joined emoji) - // are supported on Fuchsia. + // TODO(crbug.com/40204305): Remove once emoji (including modified/joined + // emoji) are supported on Fuchsia. kOmitOnFuchsia = 1 << 1, };
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc b/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc index c6e8893..de0f55e 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc
@@ -396,7 +396,7 @@ // CreateHoverCard() above. Regardless, the validity needs to be checked // before the next call. // See: crbug.com/1295601, crbug.com/1322117, crbug.com/1348956 - // TODO(crbug.com/1364303): look into this and figure out what is actually + // TODO(crbug.com/40865488): look into this and figure out what is actually // happening. if (!TargetTabIsValid()) { HideHoverCard();
diff --git a/chrome/browser/ui/views/tabs/tab_search_container.cc b/chrome/browser/ui/views/tabs/tab_search_container.cc index 92d16ed608..45fef392 100644 --- a/chrome/browser/ui/views/tabs/tab_search_container.cc +++ b/chrome/browser/ui/views/tabs/tab_search_container.cc
@@ -79,8 +79,8 @@ int tab_search_button_index = GetIndexOf(tab_search_button_).value(); int index = before_tab_strip ? tab_search_button_index + 1 : tab_search_button_index; - // TODO(1469126): Consider hiding the button when the request has started, - // vs. when the button as clicked. + // TODO(crbug.com/40925230): Consider hiding the button when the request has + // started, vs. when the button as clicked. tab_organization_button_ = AddChildViewAt( std::make_unique<TabOrganizationButton>( tab_strip_controller,
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc index 14d565c..4308001b 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1342,7 +1342,7 @@ const std::optional<int> viewmodel_index = tab_container_->GetModelIndexOf(view); - // TODO(1392523): The viewmodel (as accessed by + // TODO(crbug.com/40880410): The viewmodel (as accessed by // `tab_container_->GetModelIndexOf(Tab*)`) can be out of sync with the actual // TabStripModel when multiple tabs are closed at once. We can check // IsValidModelIndex to avoid crashes or out of bounds issues, but we can't @@ -1456,9 +1456,9 @@ void TabStrip::UpdateAnimationTarget(TabSlotView* tab_slot_view, gfx::Rect target_bounds) { - // TODO(1116121): This may need to do coordinate space transformations if the - // view hierarchy changes so `tab_container_` and `drag_context_` don't share - // spaces. + // TODO(crbug.com/40711732): This may need to do coordinate space + // transformations if the view hierarchy changes so `tab_container_` and + // `drag_context_` don't share spaces. drag_context_->UpdateAnimationTarget(tab_slot_view, target_bounds); } @@ -1625,7 +1625,7 @@ // If tab count changed, all tab groups are collapsed and we have // created a new tab. We need to exit closing mode to resize the new // tab immediately. - // TODO(crbug/1384151): This should be captured along with the + // TODO(crbug.com/40878307): This should be captured along with the // ToggleTabGroup logic, so other callers to // TabStripController::ToggleTabGroupCollapsedState see the same // behavior. @@ -1929,7 +1929,7 @@ // We still need to layout in this case, as the available width may have // changed, which can change layout outcomes (e.g. affecting tab // visibility). See https://crbug.com/1370459. - // TODO(crbug.com/1371301): TabContainer should observe available width + // TODO(crbug.com/40870361): TabContainer should observe available width // changes and invalidate its layout when needed. tab_container_->DeprecatedLayoutImmediately(); }
diff --git a/chrome/browser/ui/views/tabs/tab_strip_scroll_container.cc b/chrome/browser/ui/views/tabs/tab_strip_scroll_container.cc index 3a6afa2..b7f8fb3 100644 --- a/chrome/browser/ui/views/tabs/tab_strip_scroll_container.cc +++ b/chrome/browser/ui/views/tabs/tab_strip_scroll_container.cc
@@ -244,7 +244,7 @@ void TabStripScrollContainer::FrameColorsChanged() { SkColor foreground_enabled_color = tab_strip_->GetTabForegroundColor(TabActive::kInactive); - // TODO(crbug.com/1385859): Get a disabled color that is lighter + // TODO(crbug.com/40879445): Get a disabled color that is lighter // and changes with the frame background color SkColor foreground_disabled_color = GetColorProvider()->GetColor(kColorTabForegroundInactiveFrameInactive);
diff --git a/chrome/browser/ui/views/tabs/tab_strip_scroll_session.cc b/chrome/browser/ui/views/tabs/tab_strip_scroll_session.cc index 433c6c9f..9cbcd3c2 100644 --- a/chrome/browser/ui/views/tabs/tab_strip_scroll_session.cc +++ b/chrome/browser/ui/views/tabs/tab_strip_scroll_session.cc
@@ -84,7 +84,7 @@ } int TabStripScrollSessionWithTimer::CalculateSpeed() { - // TODO(crbug.com/1378735): Use the expected offset at a given time to + // TODO(crbug.com/40875170): Use the expected offset at a given time to // calculate the current offset. This can help with making up // for rounding off the calculation to int in the next call. // Also use the time elapsed to calculate the expected offset. @@ -173,7 +173,7 @@ dragged_tabs_rect_drag_context_coord.origin().x() <= (visible_rect_drag_context_coord.origin().x() + GetScrollableOffset()); - // TODO(crbug.com/1378683): Add case for both maybe scroll left and right. + // TODO(crbug.com/40875138): Add case for both maybe scroll left and right. // This would happen when many tabs are selected. if (maybe_scroll_towards_trailing_tabs) { return TabStripScrollSession::TabScrollDirection::
diff --git a/chrome/browser/ui/webui/ash/settings/pages/files/files_section.cc b/chrome/browser/ui/webui/ash/settings/pages/files/files_section.cc index 2376b1b..e374e09f 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/files/files_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/files/files_section.cc
@@ -276,8 +276,10 @@ const user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile()); - html_source->AddBoolean("isActiveDirectoryUser", - user && user->IsActiveDirectoryUser()); + + // TODO(b/263367348): Remove this "isActiveDirectoryUser" attribute, along + // with all it's usages. AD managed users are no longer supported on ChromeOS. + html_source->AddBoolean("isActiveDirectoryUser", false); if (user && user->GetAccountId().is_valid()) { html_source->AddString(
diff --git a/chrome/browser/ui/webui/ash/settings/pages/main/main_section.cc b/chrome/browser/ui/webui/ash/settings/pages/main/main_section.cc index 2a53f61d..4991fa53 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/main/main_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/main/main_section.cc
@@ -264,8 +264,10 @@ std::string primary_user_email = primary_user->GetDisplayEmail(); html_source->AddString("primaryUserEmail", primary_user_email); - html_source->AddBoolean("isActiveDirectoryUser", - user && user->IsActiveDirectoryUser()); + + // TODO(b/263367348): Remove this "isActiveDirectoryUser" attribute, along + // with all it's usages. AD managed users are no longer supported on ChromeOS. + html_source->AddBoolean("isActiveDirectoryUser", false); html_source->AddBoolean( "isSecondaryUser", user && user->GetAccountId() != primary_user->GetAccountId());
diff --git a/chrome/browser/ui/webui/ash/settings/pages/people/account_manager_ui_handler.cc b/chrome/browser/ui/webui/ash/settings/pages/people/account_manager_ui_handler.cc index f969145..fa31418 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/people/account_manager_ui_handler.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/people/account_manager_ui_handler.cc
@@ -290,25 +290,7 @@ profile_->IsChild(), &gaia_device_account); AccountBuilder device_account; - if (user->IsActiveDirectoryUser()) { - device_account.SetId(user->GetAccountId().GetObjGuid()) - .SetAccountType( - static_cast<int>(account_manager::AccountType::kActiveDirectory)) - .SetEmail(user->GetDisplayEmail()) - .SetFullName(base::UTF16ToUTF8(user->GetDisplayName())) - .SetIsSignedIn(true) - .SetUnmigrated(false); - if (AccountAppsAvailability::IsArcAccountRestrictionsEnabled()) { - device_account.SetIsAvailableInArc(true); - } - gfx::ImageSkia default_icon = - *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( - IDR_LOGIN_DEFAULT_USER); - device_account.SetPic(webui::GetBitmapDataUrl( - default_icon.GetRepresentation(1.0f).GetBitmap())); - } else { - device_account.PopulateFrom(std::move(gaia_device_account)); - } + device_account.PopulateFrom(std::move(gaia_device_account)); if (!device_account.IsEmpty()) { device_account.SetIsDeviceAccount(true); @@ -319,11 +301,6 @@ // Replace space with the non-breaking space. base::ReplaceSubstringsAfterOffset(&organization, 0, " ", " "); device_account.SetOrganization(organization).SetIsManaged(true); - } else if (user->IsActiveDirectoryUser()) { - device_account - .SetOrganization(chrome::enterprise_util::GetDomainFromEmail( - user->GetDisplayEmail())) - .SetIsManaged(true); } else if (profile_->GetProfilePolicyConnector()->IsManaged()) { device_account .SetOrganization(chrome::enterprise_util::GetDomainFromEmail(
diff --git a/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc b/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc index 9dc2b1f..b747354 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc
@@ -547,13 +547,11 @@ l10n_util::GetStringFUTF16(IDS_SETTINGS_ACCOUNT_MANAGER_PAGE_TITLE_V2, user->GetGivenName())); - // Toggles the Chrome OS Account Manager submenu in the People section. + // Toggles the ChromeOS Account Manager submenu in the People section. html_source->AddBoolean("isAccountManagerEnabled", account_manager_facade_ != nullptr); - html_source->AddBoolean( - "isDeviceAccountManaged", - user->IsActiveDirectoryUser() || - profile()->GetProfilePolicyConnector()->IsManaged()); + html_source->AddBoolean("isDeviceAccountManaged", + profile()->GetProfilePolicyConnector()->IsManaged()); html_source->AddBoolean( "secondaryGoogleAccountSigninAllowed",
diff --git a/chrome/browser/ui/webui/ash/smb_shares/smb_share_dialog.cc b/chrome/browser/ui/webui/ash/smb_shares/smb_share_dialog.cc index e69c5b4..7568461 100644 --- a/chrome/browser/ui/webui/ash/smb_shares/smb_share_dialog.cc +++ b/chrome/browser/ui/webui/ash/smb_shares/smb_share_dialog.cc
@@ -72,13 +72,11 @@ AddSmbSharesStrings(source); + // TODO(b/263367348): Remove this "isActiveDirectoryUser" attribute, along + // with all it's usages. AD managed users are no longer supported on ChromeOS. + source->AddBoolean("isActiveDirectoryUser", false); + Profile* const profile = Profile::FromWebUI(web_ui); - const user_manager::User* user = - ProfileHelper::Get()->GetUserByProfile(profile); - - source->AddBoolean("isActiveDirectoryUser", - user && user->IsActiveDirectoryUser()); - const smb_client::SmbService* const smb_service = smb_client::SmbServiceFactory::Get(profile); bool is_kerberos_enabled =
diff --git a/chrome/browser/ui/webui/commerce/product_specifications_ui.cc b/chrome/browser/ui/webui/commerce/product_specifications_ui.cc index cc2982f..b736695 100644 --- a/chrome/browser/ui/webui/commerce/product_specifications_ui.cc +++ b/chrome/browser/ui/webui/commerce/product_specifications_ui.cc
@@ -43,7 +43,7 @@ // Add required resources. webui::SetupWebUIDataSource( source, base::make_span(kCommerceResources, kCommerceResourcesSize), - IDR_COMMERCE_PRODUCT_SPECIFICATIONS_HTML); + IDR_COMMERCE_PRODUCT_SPECIFICATIONS_PRODUCT_SPECIFICATIONS_HTML); source->AddString("message", "Some example content..."); source->AddString("pageTitle", "Compare");
diff --git a/chrome/browser/ui/webui/downloads/downloads_ui.cc b/chrome/browser/ui/webui/downloads/downloads_ui.cc index a81a8226..ed846d8a 100644 --- a/chrome/browser/ui/webui/downloads/downloads_ui.cc +++ b/chrome/browser/ui/webui/downloads/downloads_ui.cc
@@ -165,6 +165,10 @@ {"warningBypassDialogLearnMoreLink", IDS_DOWNLOAD_WARNING_BYPASS_DIALOG_LEARN_MORE_LINK}, {"warningBypassDialogCancel", IDS_CANCEL}, + + // ESB Download Row Promo + {"esbDownloadRowPromoString", IDS_DOWNLOAD_ROW_ESB_PROMOTION}, + {"esbDownloadRowPromoA11y", IDS_DOWNLOAD_ROW_ESB_PROMO_A11Y}, }; source->AddLocalizedStrings(kStrings); @@ -225,6 +229,11 @@ source->AddLocalizedString("toastDeletedFromHistory", IDS_DOWNLOADS_TOAST_DELETED_FROM_HISTORY); + // Download Row ESB Promo: + source->AddBoolean( + "esbDownloadRowPromo", + base::FeatureList::IsEnabled(safe_browsing::kEsbDownloadRowPromo)); + // Build an Accelerator to describe undo shortcut // NOTE: the undo shortcut is also defined in downloads/downloads.html // TODO(crbug/893033): de-duplicate shortcut by moving all shortcut
diff --git a/chrome/browser/ui/webui/nearby_internals/nearby_internals_ui_presence_handler.cc b/chrome/browser/ui/webui/nearby_internals/nearby_internals_ui_presence_handler.cc index 398f4fc..7836dba2 100644 --- a/chrome/browser/ui/webui/nearby_internals/nearby_internals_ui_presence_handler.cc +++ b/chrome/browser/ui/webui/nearby_internals/nearby_internals_ui_presence_handler.cc
@@ -65,10 +65,9 @@ base::Value::Dict PresenceDeviceToDictionary( nearby::presence::PresenceDevice presence_device) { base::Value::Dict dictionary; - dictionary.Set(kDeviceNameKey, - presence_device.GetDeviceIdentityMetadata().device_name()); + dictionary.Set(kDeviceNameKey, presence_device.GetMetadata().device_name()); // TODO(b/277820435): add other device type options. - if (presence_device.GetDeviceIdentityMetadata().device_type() == + if (presence_device.GetMetadata().device_type() == nearby::internal::DeviceType::DEVICE_TYPE_PHONE) { dictionary.Set(kTypeKey, "DEVICE_TYPE_PHONE"); }
diff --git a/chrome/browser/webid/federated_identity_account_keyed_permission_context.cc b/chrome/browser/webid/federated_identity_account_keyed_permission_context.cc index 89dd904e..c89f0a1c 100644 --- a/chrome/browser/webid/federated_identity_account_keyed_permission_context.cc +++ b/chrome/browser/webid/federated_identity_account_keyed_permission_context.cc
@@ -94,6 +94,9 @@ raw_ref<content::BrowserContext>::from_ptr(browser_context)), clock_(base::DefaultClock::GetInstance()) {} +FederatedIdentityAccountKeyedPermissionContext:: + ~FederatedIdentityAccountKeyedPermissionContext() = default; + bool FederatedIdentityAccountKeyedPermissionContext::HasPermission( const url::Origin& relying_party_requester) { for (const auto& object : GetGrantedObjects(relying_party_requester)) { @@ -260,6 +263,23 @@ std::move(new_object)); } + // No need to erase from `storage_access_eligible_connections_` here; it's ok + // if that set is a superset of the actually-granted permissions, since we + // only send the intersection to the network service anyway. Furthermore, it's + // tricky to correctly erase here, since there may be multiple permissions + // with different origins but the same sites. + + SyncSharingPermissionGrantsToNetworkService(std::move(callback)); +} + +void FederatedIdentityAccountKeyedPermissionContext::MarkStorageAccessEligible( + const net::SchemefulSite& relying_party_embedder, + const net::SchemefulSite& identity_provider, + base::OnceClosure callback) { + CHECK(HasPermission(relying_party_embedder, identity_provider)); + storage_access_eligible_connections_.insert( + std::make_pair(relying_party_embedder, identity_provider)); + SyncSharingPermissionGrantsToNetworkService(std::move(callback)); } @@ -359,7 +379,10 @@ object->value.FindString(kRpEmbedderKey); const std::string* idp_origin = object->value.FindString(kSharingIdpKey); - if (!rp_embedder_origin || !idp_origin) { + if (!rp_embedder_origin || !idp_origin || + !storage_access_eligible_connections_.contains( + std::make_pair(net::SchemefulSite(GURL(*rp_embedder_origin)), + net::SchemefulSite(GURL(*idp_origin))))) { continue; }
diff --git a/chrome/browser/webid/federated_identity_account_keyed_permission_context.h b/chrome/browser/webid/federated_identity_account_keyed_permission_context.h index 61f7def..314f42b 100644 --- a/chrome/browser/webid/federated_identity_account_keyed_permission_context.h +++ b/chrome/browser/webid/federated_identity_account_keyed_permission_context.h
@@ -5,17 +5,21 @@ #ifndef CHROME_BROWSER_WEBID_FEDERATED_IDENTITY_ACCOUNT_KEYED_PERMISSION_CONTEXT_H_ #define CHROME_BROWSER_WEBID_FEDERATED_IDENTITY_ACCOUNT_KEYED_PERMISSION_CONTEXT_H_ +#include <string> + #include "components/content_settings/core/common/content_settings_types.h" #include "components/permissions/object_permission_context_base.h" #include "components/webid/federated_identity_data_model.h" -#include <string> - namespace content { class BrowserContext; class ContentSettingsForOneType; } +namespace net { +class SchemefulSite; +} + namespace url { class Origin; } @@ -38,6 +42,8 @@ FederatedIdentityAccountKeyedPermissionContext& operator=( const FederatedIdentityAccountKeyedPermissionContext&) = delete; + ~FederatedIdentityAccountKeyedPermissionContext() override; + // Returns whether the given relying party has any FedCM permission. bool HasPermission(const url::Origin& relying_party_requester); @@ -87,6 +93,14 @@ const std::string& account_id, base::OnceClosure callback); + // Marks the given (site, site) pair as eligible to use FedCM sharing + // permission as a signal for the Storage Access API. This is only valid to + // call for pairs that already have sharing permission. + void MarkStorageAccessEligible( + const net::SchemefulSite& relying_party_embedder, + const net::SchemefulSite& identity_provider, + base::OnceClosure callback); + // permissions::ObjectPermissionContextBase: std::string GetKeyForObject(const base::Value::Dict& object) override; @@ -98,7 +112,8 @@ base::OnceClosure callback); // Converts existing sharing permission grants into (site, site)-keyed content - // settings. + // settings. The returned value only includes permissions for (site, site) + // pairs that were marked "eligible" via `MarkStorageAccessEligible`. ContentSettingsForOneType GetSharingPermissionGrantsAsContentSettings(); private: @@ -117,6 +132,11 @@ base::raw_ref<content::BrowserContext> browser_context_; raw_ptr<base::Clock> clock_; + + // The set of pairs that are eligible for Storage-Access autogrants. + // Keyed by (embedder, identity-provider) pairs. + base::flat_set<std::pair<net::SchemefulSite, net::SchemefulSite>> + storage_access_eligible_connections_; }; #endif // CHROME_BROWSER_WEBID_FEDERATED_IDENTITY_ACCOUNT_KEYED_PERMISSION_CONTEXT_H_
diff --git a/chrome/browser/webid/federated_identity_account_keyed_permission_context_unittest.cc b/chrome/browser/webid/federated_identity_account_keyed_permission_context_unittest.cc index 2e611d89..729429a 100644 --- a/chrome/browser/webid/federated_identity_account_keyed_permission_context_unittest.cc +++ b/chrome/browser/webid/federated_identity_account_keyed_permission_context_unittest.cc
@@ -406,11 +406,22 @@ url::Origin::Create(GURL("https://www.identity_provider.com")); constexpr char account_id[] = "my_account"; + net::SchemefulSite rp_embedder_site(relying_party_embedder); + net::SchemefulSite idp_site(identity_provider); + context()->GrantPermission(relying_party_requester, relying_party_embedder, identity_provider, account_id); - ASSERT_TRUE( - context()->HasPermission(net::SchemefulSite(relying_party_embedder), - net::SchemefulSite(identity_provider))); + ASSERT_TRUE(context()->HasPermission(rp_embedder_site, idp_site)); + + EXPECT_THAT(context()->GetSharingPermissionGrantsAsContentSettings(), + IsEmpty()); + + { + base::test::TestFuture<void> future; + context()->MarkStorageAccessEligible(rp_embedder_site, idp_site, + future.GetCallback()); + ASSERT_TRUE(future.Wait()); + } EXPECT_THAT(context()->GetSharingPermissionGrantsAsContentSettings(), ElementsAre(ContentSettingPatternSource(
diff --git a/chrome/browser/webid/federated_identity_permission_context.cc b/chrome/browser/webid/federated_identity_permission_context.cc index 177fbd9b..5d70fa6 100644 --- a/chrome/browser/webid/federated_identity_permission_context.cc +++ b/chrome/browser/webid/federated_identity_permission_context.cc
@@ -73,6 +73,14 @@ identity_provider); } +void FederatedIdentityPermissionContext::MarkStorageAccessEligible( + const net::SchemefulSite& relying_party_embedder, + const net::SchemefulSite& identity_provider, + base::OnceClosure callback) { + sharing_context_->MarkStorageAccessEligible( + relying_party_embedder, identity_provider, std::move(callback)); +} + void FederatedIdentityPermissionContext::GrantSharingPermission( const url::Origin& relying_party_requester, const url::Origin& relying_party_embedder,
diff --git a/chrome/browser/webid/federated_identity_permission_context.h b/chrome/browser/webid/federated_identity_permission_context.h index ad5e9ee..dbdb2eec 100644 --- a/chrome/browser/webid/federated_identity_permission_context.h +++ b/chrome/browser/webid/federated_identity_permission_context.h
@@ -96,6 +96,14 @@ bool HasSharingPermission(const net::SchemefulSite& relying_party_embedder, const net::SchemefulSite& identity_provider); + // Marks the given (site, site) pair as eligible to use FedCM sharing + // permission as a signal for the Storage Access API. This is only valid to + // call for pairs that already have sharing permission. + void MarkStorageAccessEligible( + const net::SchemefulSite& relying_party_embedder, + const net::SchemefulSite& identity_provider, + base::OnceClosure callback); + // Converts existing sharing permission grants into (site, site)-keyed content // settings. ContentSettingsForOneType GetSharingPermissionGrantsAsContentSettings();
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index 6c7f296..72848c4d 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1712836508-0c9bc8543c3e09349bbd2448b02dda9b0bc6d961-0cd7fd5a210234ac392dd03f2de39854af862f52.profdata +chrome-android32-main-1712858243-e875a31f852d357359e381a97c89857419565193-3fa904321104f394c9fcb26f151037b75a8c2b08.profdata
diff --git a/chrome/build/android-arm64.pgo.txt b/chrome/build/android-arm64.pgo.txt index 03bca79d..d19f9f2 100644 --- a/chrome/build/android-arm64.pgo.txt +++ b/chrome/build/android-arm64.pgo.txt
@@ -1 +1 @@ -chrome-android64-main-1712822373-65a2d3d8ab0b0c0dd0644c1aba71bbe433d7ebb4-e4692f2b47dc3fdc9846ac40c27ddf8249e0ac7e.profdata +chrome-android64-main-1712843862-6dd8306bdb88ceb0bb1fdade706631ec2ff3b236-e9a9111d6325edcd48b79a654bea998ae30e9423.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 0c22d1c7..6287c75 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1712843862-b687b4cfaba2e68ea208e2ca9e710b57d809eb57-e9a9111d6325edcd48b79a654bea998ae30e9423.profdata +chrome-mac-arm-main-1712858243-500e95e842addbb8848e11d170d6ebe260e6bfe6-3fa904321104f394c9fcb26f151037b75a8c2b08.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index 37f2edd2..ae088e4 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1712836508-20453b581698ce42b73c091c9ec24d7f03dcaaf5-0cd7fd5a210234ac392dd03f2de39854af862f52.profdata +chrome-win-arm64-main-1712858243-5018c9b4c39da557c052d8d64790ab6df3379a4a-3fa904321104f394c9fcb26f151037b75a8c2b08.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index a5644a9..fd0c2c4b3 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1712836508-f011cf086186037b665ef361e778619cb1896fb4-0cd7fd5a210234ac392dd03f2de39854af862f52.profdata +chrome-win32-main-1712847529-4bd86f709e99472a0f65af5a2a57d21920907eeb-5b2affeb762a34556bbfb4ed311bd023414bfdcd.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 3047846a3..132f211a 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1712825931-5b3b43f46be8e00c56d691d31207d72ce11e30c2-7e238d35c45fe1783ee51f4e465d54d3fc974f16.profdata +chrome-win64-main-1712836508-5dbafc81f335bbc11c8b784857e0270891687d3f-0cd7fd5a210234ac392dd03f2de39854af862f52.profdata
diff --git a/chrome/installer/mac/internal b/chrome/installer/mac/internal index d827c3b..61d6199 160000 --- a/chrome/installer/mac/internal +++ b/chrome/installer/mac/internal
@@ -1 +1 @@ -Subproject commit d827c3bc161c0c4d1f9159611af274413ea25f27 +Subproject commit 61d619941db56cde7aaec67bd10e3b4277576404
diff --git a/chrome/renderer/autofill/autofill_renderer_browsertest.cc b/chrome/renderer/autofill/autofill_renderer_browsertest.cc index a1c90b4..31d728b2 100644 --- a/chrome/renderer/autofill/autofill_renderer_browsertest.cc +++ b/chrome/renderer/autofill/autofill_renderer_browsertest.cc
@@ -33,10 +33,11 @@ const std::string& name, const std::string& value = "", FormControlType form_control_type = FormControlType::kInputText) { - return AllOf(Field("name", &FormFieldData::name, base::UTF8ToUTF16(name)), - Field("value", &FormFieldData::value, base::UTF8ToUTF16(value)), - Field("form_control_type", &FormFieldData::form_control_type, - form_control_type)); + return AllOf( + Field("name", &FormFieldData::name, base::UTF8ToUTF16(name)), + Property("value", &FormFieldData::value, base::UTF8ToUTF16(value)), + Field("form_control_type", &FormFieldData::form_control_type, + form_control_type)); } auto FormWithFields(auto matcher) {
diff --git a/chrome/renderer/autofill/form_autocomplete_browsertest.cc b/chrome/renderer/autofill/form_autocomplete_browsertest.cc index 078efbcf..a0f47ce 100644 --- a/chrome/renderer/autofill/form_autocomplete_browsertest.cc +++ b/chrome/renderer/autofill/form_autocomplete_browsertest.cc
@@ -164,7 +164,7 @@ const FormData& submitted_form = *(fake_driver.form_submitted()); ASSERT_LE(2U, submitted_form.fields.size()); EXPECT_EQ(u"fname", submitted_form.fields[0].name); - EXPECT_EQ(base::UTF8ToUTF16(fname), submitted_form.fields[0].value); + EXPECT_EQ(base::UTF8ToUTF16(fname), submitted_form.fields[0].value()); EXPECT_EQ(u"lname", submitted_form.fields[1].name); EXPECT_EQ(expect_known_success, fake_driver.known_success()); EXPECT_EQ(expect_submission_source, @@ -182,7 +182,7 @@ const FormData& submitted_form = *(fake_driver.form_submitted()); ASSERT_LE(1U, submitted_form.fields.size()); EXPECT_EQ(u"address", submitted_form.fields[0].name); - EXPECT_EQ(base::UTF8ToUTF16(address), submitted_form.fields[0].value); + EXPECT_EQ(base::UTF8ToUTF16(address), submitted_form.fields[0].value()); EXPECT_EQ(expect_known_success, fake_driver.known_success()); EXPECT_EQ(expect_submission_source, mojo::ConvertTo<SubmissionSource>(fake_driver.submission_source())); @@ -214,14 +214,14 @@ FormFieldData field_data; field_data.name = u"fname"; - field_data.value = u"John"; + field_data.set_value(u"John"); field_data.is_autofilled = true; field_data.renderer_id = form_util::GetFieldRendererId(fname_element); data.fields.push_back(field_data); if (!lname_element.IsNull()) { field_data.name = u"lname"; - field_data.value = u"Smith"; + field_data.set_value(u"Smith"); field_data.is_autofilled = true; field_data.renderer_id = form_util::GetFieldRendererId(lname_element); data.fields.push_back(field_data); @@ -295,20 +295,20 @@ FormFieldData field; field.name = u"fname"; - field.value = u"John"; + field.set_value(u"John"); field.is_autofilled = true; field.renderer_id = form_util::GetFieldRendererId(fname_element); form.fields.push_back(field); field.name = u"lname"; - field.value = u"Smith"; + field.set_value(u"Smith"); field.is_autofilled = true; field.renderer_id = form_util::GetFieldRendererId(lname_element); form.fields.push_back(field); // Additional non-autofillable field. field.name = u"mname"; - field.value = u"James"; + field.set_value(u"James"); field.is_autofilled = false; field.renderer_id = form_util::GetFieldRendererId(mname_element); form.fields.push_back(field); @@ -717,7 +717,7 @@ const FormFieldData* field = fake_driver_.select_control_changed(); ASSERT_TRUE(field); EXPECT_EQ(u"color", field->name); - EXPECT_EQ(u"blue", field->value); + EXPECT_EQ(u"blue", field->value()); } // Parameterized test for submission detection. The parameter dictates whether
diff --git a/chrome/renderer/autofill/form_autofill_browsertest.cc b/chrome/renderer/autofill/form_autofill_browsertest.cc index 7082a04d3..eb65c16 100644 --- a/chrome/renderer/autofill/form_autofill_browsertest.cc +++ b/chrome/renderer/autofill/form_autofill_browsertest.cc
@@ -343,7 +343,7 @@ expected.name_attribute = name_attributes[i]; expected.label = labels[i]; expected.name = names[i]; - expected.value = values[i]; + expected.set_value(values[i]); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; fields.push_back(expected); @@ -477,7 +477,7 @@ : 0; expected.id_attribute = ASCIIToUTF16(field_cases[i].id_attribute); expected.name = expected.id_attribute; - expected.value = ASCIIToUTF16(field_cases[i].initial_value); + expected.set_value(ASCIIToUTF16(field_cases[i].initial_value)); if (expected.form_control_type == FormControlType::kInputText || expected.form_control_type == FormControlType::kInputMonth) { expected.label = ASCIIToUTF16(field_cases[i].initial_value); @@ -487,7 +487,7 @@ expected.autocomplete_attribute = field_cases[i].autocomplete_attribute; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[i]); // Fill the form_data for the field. - form.fields[i].value = ASCIIToUTF16(field_cases[i].autofill_value); + form.fields[i].set_value(ASCIIToUTF16(field_cases[i].autofill_value)); // Set the is_autofilled property for the field. form.fields[i].is_autofilled = field_cases[i].should_be_autofilled; } @@ -710,20 +710,20 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"John"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); EXPECT_FORM_FIELD_DATA_EQUALS(expected, field); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Smith"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"john@example.com"; + expected.set_value(u"john@example.com"); expected.label = u"john@example.com"; expected.autocomplete_attribute = "off"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); @@ -731,7 +731,7 @@ expected.id_attribute = u"phone"; expected.name = expected.id_attribute; - expected.value = u"1.800.555.1234"; + expected.set_value(u"1.800.555.1234"); expected.label = u"1.800.555.1234"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[3]); } @@ -767,7 +767,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"John"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -775,7 +775,7 @@ expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Smith"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -783,7 +783,7 @@ expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"john@example.com"; + expected.set_value(u"john@example.com"); expected.label = u"john@example.com"; expected.autocomplete_attribute = "off"; expected.form_control_type = FormControlType::kInputText; @@ -793,7 +793,7 @@ expected.id_attribute = u"street-address"; expected.name = expected.id_attribute; - expected.value = u"123 Fantasy Ln.\nApt. 42"; + expected.set_value(u"123 Fantasy Ln.\nApt. 42"); expected.label.clear(); expected.form_control_type = FormControlType::kTextArea; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -847,9 +847,9 @@ EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); // Fill the form. - form.fields[0].value = u"Brother"; - form.fields[1].value = u"Jonathan"; - form.fields[2].value = u"brotherj@example.com"; + form.fields[0].set_value(u"Brother"); + form.fields[1].set_value(u"Jonathan"); + form.fields[2].set_value(u"brotherj@example.com"); form.fields[0].is_autofilled = true; form.fields[1].is_autofilled = true; form.fields[2].is_autofilled = true; @@ -873,21 +873,21 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Broth"; + expected.set_value(u"Broth"); expected.max_length = 5; expected.is_autofilled = true; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Jonatha"; + expected.set_value(u"Jonatha"); expected.max_length = 7; expected.is_autofilled = true; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"brotherj@"; + expected.set_value(u"brotherj@"); expected.max_length = 9; expected.is_autofilled = true; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[2]); @@ -934,9 +934,9 @@ EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); // Fill the form. - form.fields[0].value = u"Brother"; - form.fields[1].value = u"Jonathan"; - form.fields[2].value = u"brotherj@example.com"; + form.fields[0].set_value(u"Brother"); + form.fields[1].set_value(u"Jonathan"); + form.fields[2].set_value(u"brotherj@example.com"); ExecuteJavaScriptForTests("document.getElementById('firstname').focus();"); ApplyFieldsAction(input_element.GetDocument(), form.fields, mojom::ActionPersistence::kFill); @@ -955,17 +955,17 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Brother"; + expected.set_value(u"Brother"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Jonathan"; + expected.set_value(u"Jonathan"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"brotherj@example.com"; + expected.set_value(u"brotherj@example.com"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); } @@ -1010,9 +1010,9 @@ EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); // Fill the form. - form.fields[0].value = u"Wyatt"; - form.fields[1].value = u"Earp"; - form.fields[2].value = u"wyatt@example.com"; + form.fields[0].set_value(u"Wyatt"); + form.fields[1].set_value(u"Earp"); + form.fields[2].set_value(u"wyatt@example.com"); ExecuteJavaScriptForTests("document.getElementById('firstname').focus();"); ApplyFieldsAction(input_element.GetDocument(), form.fields, mojom::ActionPersistence::kFill); @@ -1034,17 +1034,17 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Wyatt"; + expected.set_value(u"Wyatt"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Earp"; + expected.set_value(u"Earp"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"wyatt@example.com"; + expected.set_value(u"wyatt@example.com"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); } @@ -1094,9 +1094,9 @@ EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[unowned_offset + 2]); // Fill the form. - form.fields[unowned_offset + 0].value = u"Red"; - form.fields[unowned_offset + 1].value = u"Yellow"; - form.fields[unowned_offset + 2].value = u"Also Yellow"; + form.fields[unowned_offset + 0].set_value(u"Red"); + form.fields[unowned_offset + 1].set_value(u"Yellow"); + form.fields[unowned_offset + 2].set_value(u"Also Yellow"); form.fields[unowned_offset + 0].is_autofilled = true; form.fields[unowned_offset + 1].is_autofilled = true; form.fields[unowned_offset + 2].is_autofilled = true; @@ -1118,19 +1118,19 @@ expected.id_attribute = u"apple"; expected.name = expected.id_attribute; - expected.value = u"Red"; + expected.set_value(u"Red"); expected.is_autofilled = true; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[unowned_offset + 0]); expected.id_attribute = u"banana"; expected.name = expected.id_attribute; - expected.value = u"Yellow"; + expected.set_value(u"Yellow"); expected.is_autofilled = true; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[unowned_offset + 1]); expected.id_attribute = u"cantelope"; expected.name = expected.id_attribute; - expected.value = u"Also Yellow"; + expected.set_value(u"Also Yellow"); expected.is_autofilled = true; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[unowned_offset + 2]); } @@ -1174,7 +1174,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Wy"; + expected.set_value(u"Wy"); if (placeholder_firstname) { expected.label = ASCIIToUTF16(placeholder_firstname); expected.placeholder = ASCIIToUTF16(placeholder_firstname); @@ -1186,14 +1186,14 @@ expected.name = expected.id_attribute; if (initial_lastname) { expected.label = ASCIIToUTF16(initial_lastname); - expected.value = ASCIIToUTF16(initial_lastname); + expected.set_value(ASCIIToUTF16(initial_lastname)); } else if (placeholder_lastname) { expected.label = ASCIIToUTF16(placeholder_lastname); expected.placeholder = ASCIIToUTF16(placeholder_lastname); - expected.value = ASCIIToUTF16(placeholder_lastname); + expected.set_value(ASCIIToUTF16(placeholder_lastname)); } else { expected.label.clear(); - expected.value = u""; + expected.set_value(u""); } expected.is_autofilled = false; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); @@ -1202,22 +1202,22 @@ expected.name = expected.id_attribute; if (initial_email) { expected.label = ASCIIToUTF16(initial_email); - expected.value = ASCIIToUTF16(initial_email); + expected.set_value(ASCIIToUTF16(initial_email)); } else if (placeholder_email) { expected.label = ASCIIToUTF16(placeholder_email); expected.placeholder = ASCIIToUTF16(placeholder_email); - expected.value = ASCIIToUTF16(placeholder_email); + expected.set_value(ASCIIToUTF16(placeholder_email)); } else { expected.label.clear(); - expected.value = u""; + expected.set_value(u""); } expected.is_autofilled = false; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); // Preview the form and verify that the cursor position has been updated. - form.fields[0].value = u"Wyatt"; - form.fields[1].value = u"Earp"; - form.fields[2].value = u"wyatt@example.com"; + form.fields[0].set_value(u"Wyatt"); + form.fields[1].set_value(u"Earp"); + form.fields[2].set_value(u"wyatt@example.com"); form.fields[0].is_autofilled = true; form.fields[1].is_autofilled = true; form.fields[2].is_autofilled = true; @@ -1246,7 +1246,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Wyatt"; + expected.set_value(u"Wyatt"); if (placeholder_firstname) { expected.label = ASCIIToUTF16(placeholder_firstname); expected.placeholder = ASCIIToUTF16(placeholder_firstname); @@ -1259,7 +1259,7 @@ expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Earp"; + expected.set_value(u"Earp"); if (placeholder_lastname) { expected.label = ASCIIToUTF16(placeholder_lastname); expected.placeholder = ASCIIToUTF16(placeholder_lastname); @@ -1272,7 +1272,7 @@ expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"wyatt@example.com"; + expected.set_value(u"wyatt@example.com"); if (placeholder_email) { expected.label = ASCIIToUTF16(placeholder_email); expected.placeholder = ASCIIToUTF16(placeholder_email); @@ -1357,12 +1357,12 @@ ASSERT_EQ(6U, fields.size()); // Preview the form and verify that the cursor position has been updated. - form.fields[0].value = u"Wyatt"; - form.fields[1].value = u"Earpagus"; - form.fields[2].value = u"888-123-4567"; - form.fields[3].value = u"1111-2222-3333-4444"; - form.fields[4].value = u"Montreal"; - form.fields[5].value = u"AA"; + form.fields[0].set_value(u"Wyatt"); + form.fields[1].set_value(u"Earpagus"); + form.fields[2].set_value(u"888-123-4567"); + form.fields[3].set_value(u"1111-2222-3333-4444"); + form.fields[4].set_value(u"Montreal"); + form.fields[5].set_value(u"AA"); form.fields[0].is_autofilled = true; form.fields[1].is_autofilled = true; form.fields[2].is_autofilled = true; @@ -1393,7 +1393,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Wyatt"; + expected.set_value(u"Wyatt"); if (placeholder_firstname) { expected.label = ASCIIToUTF16(placeholder_firstname); expected.placeholder = ASCIIToUTF16(placeholder_firstname); @@ -1408,7 +1408,7 @@ // The last name field is not filled, because there is a value in it. expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Earp"; + expected.set_value(u"Earp"); if (placeholder_lastname) { expected.label = ASCIIToUTF16(placeholder_lastname); expected.placeholder = ASCIIToUTF16(placeholder_lastname); @@ -1422,7 +1422,7 @@ expected.id_attribute = u"phone"; expected.name = expected.id_attribute; - expected.value = u"888-123-4567"; + expected.set_value(u"888-123-4567"); if (placeholder_phone) { expected.label = ASCIIToUTF16(placeholder_phone); expected.placeholder = ASCIIToUTF16(placeholder_phone); @@ -1436,7 +1436,7 @@ expected.id_attribute = u"cc"; expected.name = expected.id_attribute; - expected.value = u"1111-2222-3333-4444"; + expected.set_value(u"1111-2222-3333-4444"); if (placeholder_creditcard) { expected.label = ASCIIToUTF16(placeholder_creditcard); expected.placeholder = ASCIIToUTF16(placeholder_creditcard); @@ -1450,7 +1450,7 @@ expected.id_attribute = u"city"; expected.name = expected.id_attribute; - expected.value = u"Montreal"; + expected.set_value(u"Montreal"); if (placeholder_city) { expected.label = ASCIIToUTF16(placeholder_city); expected.placeholder = ASCIIToUTF16(placeholder_city); @@ -1466,7 +1466,7 @@ expected.id_attribute = u"state"; expected.name_attribute = u"state"; expected.name = expected.name_attribute; - expected.value = u"AA"; + expected.set_value(u"AA"); if (placeholder_state) { expected.label = ASCIIToUTF16(placeholder_state); expected.placeholder = ASCIIToUTF16(placeholder_state); @@ -1522,9 +1522,9 @@ ASSERT_EQ(3U, fields.size()); // Preview the form and verify that the cursor position has been updated. - form.fields[0].value = u"Wyatt"; - form.fields[1].value = u"Earpagus"; - form.fields[2].value = u"susan@smith.com"; + form.fields[0].set_value(u"Wyatt"); + form.fields[1].set_value(u"Earpagus"); + form.fields[2].set_value(u"susan@smith.com"); form.fields[0].is_autofilled = true; form.fields[1].is_autofilled = true; form.fields[2].is_autofilled = false; @@ -1552,7 +1552,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Wyatt"; + expected.set_value(u"Wyatt"); if (placeholder_firstname) { expected.label = ASCIIToUTF16(placeholder_firstname); expected.placeholder = ASCIIToUTF16(placeholder_firstname); @@ -1565,7 +1565,7 @@ expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Earpagus"; + expected.set_value(u"Earpagus"); if (placeholder_lastname) { expected.label = ASCIIToUTF16(placeholder_lastname); expected.placeholder = ASCIIToUTF16(placeholder_lastname); @@ -1579,7 +1579,7 @@ // The email field is not filled, because there is a value in it. expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"john@smith.com"; + expected.set_value(u"john@smith.com"); if (placeholder_email) { expected.label = ASCIIToUTF16(placeholder_email); expected.placeholder = ASCIIToUTF16(placeholder_email); @@ -1633,9 +1633,9 @@ ASSERT_EQ(3U, fields.size()); // Preview the form and verify that the cursor position has been updated. - form.fields[0].value = u"1111-2222-3333-4444"; - form.fields[1].value = u"03/2030"; - form.fields[2].value = u"Susan Smith"; + form.fields[0].set_value(u"1111-2222-3333-4444"); + form.fields[1].set_value(u"03/2030"); + form.fields[2].set_value(u"Susan Smith"); form.fields[0].is_autofilled = true; form.fields[1].is_autofilled = true; form.fields[2].is_autofilled = true; @@ -1666,7 +1666,7 @@ expected.id_attribute = u"cc"; expected.name = expected.id_attribute; - expected.value = u"1111-2222-3333-4444"; + expected.set_value(u"1111-2222-3333-4444"); if (placeholder_creditcard) { expected.label = ASCIIToUTF16(placeholder_creditcard); expected.placeholder = ASCIIToUTF16(placeholder_creditcard); @@ -1679,7 +1679,7 @@ expected.id_attribute = u"expiration_date"; expected.name = expected.id_attribute; - expected.value = u"03/2030"; + expected.set_value(u"03/2030"); if (placeholder_expiration) { expected.label = ASCIIToUTF16(placeholder_expiration); expected.placeholder = ASCIIToUTF16(placeholder_expiration); @@ -1692,7 +1692,7 @@ expected.id_attribute = u"name"; expected.name = expected.id_attribute; - expected.value = u"John Smith"; + expected.set_value(u"John Smith"); if (placeholder_name) { expected.label = ASCIIToUTF16(placeholder_name); expected.placeholder = ASCIIToUTF16(placeholder_name); @@ -1755,9 +1755,9 @@ ASSERT_EQ(3U, fields.size()); // Preview the form and verify that the cursor position has been updated. - form.fields[0].value = u"1111-2222-3333-4444"; - form.fields[1].value = u"03/2030"; - form.fields[2].value = u"Susan Smith"; + form.fields[0].set_value(u"1111-2222-3333-4444"); + form.fields[1].set_value(u"03/2030"); + form.fields[2].set_value(u"Susan Smith"); form.fields[0].is_autofilled = true; form.fields[1].is_autofilled = true; form.fields[2].is_autofilled = true; @@ -1788,7 +1788,7 @@ expected.id_attribute = u"cc"; expected.name = expected.id_attribute; - expected.value = u"1111-2222-3333-4444"; + expected.set_value(u"1111-2222-3333-4444"); if (placeholder_creditcard) { expected.label = ASCIIToUTF16(placeholder_creditcard); expected.placeholder = ASCIIToUTF16(placeholder_creditcard); @@ -1801,7 +1801,7 @@ expected.id_attribute = u"expiration_date"; expected.name = expected.id_attribute; - expected.value = u"03/2030"; + expected.set_value(u"03/2030"); if (placeholder_expiration) { expected.label = ASCIIToUTF16(placeholder_expiration); expected.placeholder = ASCIIToUTF16(placeholder_expiration); @@ -1814,7 +1814,7 @@ expected.id_attribute = u"name"; expected.name = expected.id_attribute; - expected.value = u"John Smith"; + expected.set_value(u"John Smith"); if (placeholder_name) { expected.label = ASCIIToUTF16(placeholder_name); expected.placeholder = ASCIIToUTF16(placeholder_name); @@ -1880,17 +1880,17 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"noAC"; expected.name = expected.id_attribute; - expected.value = u"one"; + expected.set_value(u"one"); expected.label = u"one"; expected.autocomplete_attribute = "off"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); @@ -1898,7 +1898,7 @@ expected.id_attribute = u"notenabled"; expected.name = expected.id_attribute; - expected.value = u"no clear"; + expected.set_value(u"no clear"); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[3]); @@ -1906,13 +1906,13 @@ expected.max_length = 0; expected.id_attribute = u"month"; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[4]); expected.id_attribute = u"month-disabled"; expected.name = expected.id_attribute; - expected.value = u"2012-11"; + expected.set_value(u"2012-11"); expected.label = u"2012-11"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[5]); @@ -1920,18 +1920,18 @@ expected.id_attribute = u"textarea"; expected.max_length = FormFieldData::kDefaultMaxLength; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[6]); expected.id_attribute = u"textarea-disabled"; expected.name = expected.id_attribute; - expected.value = u" Banana!\n "; + expected.set_value(u" Banana!\n "); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[7]); expected.id_attribute = u"textarea-noAC"; expected.name = expected.id_attribute; - expected.value = u"Carrot?"; + expected.set_value(u"Carrot?"); expected.autocomplete_attribute = "off"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[8]); expected.autocomplete_attribute.clear(); @@ -2032,17 +2032,17 @@ expected.is_autofilled = true; expected.id_attribute = u"firstname-billing"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[3]); expected.id_attribute = u"lastname-billing"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[4]); expected.id_attribute = u"city-billing"; expected.name = expected.id_attribute; - expected.value = u"Paris"; + expected.set_value(u"Paris"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[5]); // Verify that the cursor position has been updated. @@ -2096,14 +2096,14 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); @@ -2111,7 +2111,7 @@ expected.id_attribute = u"state"; expected.name_attribute = u"state"; expected.name = expected.name_attribute; - expected.value = u"?"; + expected.set_value(u"?"); expected.form_control_type = FormControlType::kSelectOne; expected.max_length = 0; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); @@ -2378,14 +2378,14 @@ expected.id_attribute = u"element"; expected.name = expected.id_attribute; - expected.value = u""; + expected.set_value(u""); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result1); FormFieldData result2; WebFormControlElementToFormField(WebFormElement(), element, nullptr, {ExtractOption::kValue}, &result2); - expected.value = u"value"; + expected.set_value(u"value"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result2); } @@ -2404,7 +2404,7 @@ FormFieldData expected; expected.id_attribute = u"element"; expected.name = expected.id_attribute; - expected.value = u"value"; + expected.set_value(u"value"); expected.form_control_type = FormControlType::kInputText; expected.autocomplete_attribute = "off"; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -2426,7 +2426,7 @@ FormFieldData expected; expected.id_attribute = u"element"; expected.name = expected.id_attribute; - expected.value = u"value"; + expected.set_value(u"value"); expected.form_control_type = FormControlType::kInputText; expected.max_length = 5; EXPECT_FORM_FIELD_DATA_EQUALS(expected, result); @@ -2448,7 +2448,7 @@ FormFieldData expected; expected.id_attribute = u"element"; expected.name = expected.id_attribute; - expected.value = u"value"; + expected.set_value(u"value"); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; expected.is_autofilled = true; @@ -2473,7 +2473,7 @@ FormFieldData expected; expected.id_attribute = u"checkbox"; expected.name = expected.id_attribute; - expected.value = u"mail"; + expected.set_value(u"mail"); expected.form_control_type = FormControlType::kInputCheckbox; expected.max_length = 0; expected.is_autofilled = true; @@ -2486,7 +2486,7 @@ {ExtractOption::kValue}, &result); expected.id_attribute = u"radio"; expected.name = expected.id_attribute; - expected.value = u"male"; + expected.set_value(u"male"); expected.form_control_type = FormControlType::kInputRadio; expected.max_length = 0; expected.is_autofilled = true; @@ -2515,20 +2515,20 @@ expected.max_length = 0; expected.form_control_type = FormControlType::kSelectOne; - expected.value = u"CA"; + expected.set_value(u"CA"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result1); FormFieldData result2; WebFormControlElementToFormField( WebFormElement(), element, nullptr, {ExtractOption::kValue, ExtractOption::kOptionText}, &result2); - expected.value = u"California"; + expected.set_value(u"California"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result2); FormFieldData result3; WebFormControlElementToFormField(WebFormElement(), element, nullptr, {ExtractOption::kOptions}, &result3); - expected.value = u""; + expected.set_value(u""); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result3); ASSERT_EQ(2U, result3.options.size()); @@ -2569,7 +2569,7 @@ expected.is_visible = true; expected.text_direction = base::i18n::LEFT_TO_RIGHT; - expected.value = u"CA"; + expected.set_value(u"CA"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result1); } @@ -2660,9 +2660,9 @@ FormFieldData result_with_value; WebFormControlElementToFormField(WebFormElement(), element, nullptr, {ExtractOption::kValue}, &result_with_value); - expected.value = + expected.set_value( u"This element's value\n" - u"spans multiple lines."; + u"spans multiple lines."); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result_with_value); } @@ -2688,7 +2688,7 @@ FormFieldData result_with_value; WebFormControlElementToFormField(WebFormElement(), element, nullptr, {ExtractOption::kValue}, &result_with_value); - expected.value = u"2011-12"; + expected.set_value(u"2011-12"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result_with_value); } @@ -2711,7 +2711,7 @@ expected.id_attribute = u"password"; expected.name = expected.id_attribute; expected.form_control_type = FormControlType::kInputPassword; - expected.value = u"secret"; + expected.set_value(u"secret"); EXPECT_FORM_FIELD_DATA_EQUALS(expected, result); } @@ -2989,7 +2989,7 @@ FormFieldData expected; expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"First name:"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -2997,7 +2997,7 @@ expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Last name:"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -3005,7 +3005,7 @@ expected.id_attribute = u"street-address"; expected.name = expected.id_attribute; - expected.value = u"123 Fantasy Ln.\nApt. 42"; + expected.set_value(u"123 Fantasy Ln.\nApt. 42"); expected.label = u"Address:"; expected.form_control_type = FormControlType::kTextArea; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -3013,7 +3013,7 @@ expected.id_attribute = u"state"; expected.name = expected.id_attribute; - expected.value = u"CA"; + expected.set_value(u"CA"); expected.label = u"State:"; expected.form_control_type = FormControlType::kSelectOne; expected.max_length = 0; @@ -3021,7 +3021,7 @@ expected.id_attribute = u"password"; expected.name = expected.id_attribute; - expected.value = u"secret"; + expected.set_value(u"secret"); expected.label = u"Password:"; expected.form_control_type = FormControlType::kInputPassword; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -3029,7 +3029,7 @@ expected.id_attribute = u"month"; expected.name = expected.id_attribute; - expected.value = u"2011-12"; + expected.set_value(u"2011-12"); expected.label = u"Card expiration:"; expected.form_control_type = FormControlType::kInputMonth; expected.max_length = 0; @@ -3286,19 +3286,19 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"John"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Smith"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"john@example.com"; + expected.set_value(u"john@example.com"); expected.label = u"john@example.com"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); @@ -3312,19 +3312,19 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"Jack"; + expected.set_value(u"Jack"); expected.label = u"Jack"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Adams"; + expected.set_value(u"Adams"); expected.label = u"Adams"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"jack@example.com"; + expected.set_value(u"jack@example.com"); expected.label = u"jack@example.com"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[2]); } @@ -3370,25 +3370,25 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"John"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Smith"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"john@example.com"; + expected.set_value(u"john@example.com"); expected.label = u"john@example.com"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); expected.id_attribute = u"telephone"; expected.name = expected.id_attribute; - expected.value = u"12345"; + expected.set_value(u"12345"); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[3]); @@ -3427,19 +3427,19 @@ expected.id_attribute = u"second_firstname"; expected.name = expected.id_attribute; - expected.value = u"Bob"; + expected.set_value(u"Bob"); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[0]); expected.id_attribute = u"second_lastname"; expected.name = expected.id_attribute; - expected.value = u"Hope"; + expected.set_value(u"Hope"); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[1]); expected.id_attribute = u"second_email"; expected.name = expected.id_attribute; - expected.value = u"bobhope@example.com"; + expected.set_value(u"bobhope@example.com"); expected.label.clear(); EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields2[2]); } @@ -4001,7 +4001,7 @@ expected.name_attribute = u""; expected.label = u"* First Name"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; fields.push_back(expected); @@ -4010,7 +4010,7 @@ expected.name_attribute = u""; expected.label = u"* Middle Name"; expected.name = expected.id_attribute; - expected.value = u"Joe"; + expected.set_value(u"Joe"); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; fields.push_back(expected); @@ -4019,7 +4019,7 @@ expected.name_attribute = u""; expected.label = u"* Last Name"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; fields.push_back(expected); @@ -4028,7 +4028,7 @@ expected.name_attribute = u""; expected.label = u"* Country"; expected.name = expected.id_attribute; - expected.value = u"US"; + expected.set_value(u"US"); expected.form_control_type = FormControlType::kSelectOne; expected.max_length = 0; fields.push_back(expected); @@ -4037,7 +4037,7 @@ expected.name_attribute = u""; expected.label = u"* Email"; expected.name = expected.id_attribute; - expected.value = u"john@example.com"; + expected.set_value(u"john@example.com"); expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; fields.push_back(expected); @@ -5077,7 +5077,7 @@ std::u16string type = i == 0 ? u"text" : i == 2 ? u"select_option" : u"selectlist_option"; - form.fields[i].value = u"undo_" + type + u"_1"; + form.fields[i].set_value(u"undo_" + type + u"_1"); form.fields[i].is_autofilled = false; undo_fields.push_back(form.fields[i]); } @@ -5384,7 +5384,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"John"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -5392,7 +5392,7 @@ expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Smith"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -5400,7 +5400,7 @@ expected.id_attribute = u"country"; expected.name = expected.id_attribute; - expected.value = u"Albania"; + expected.set_value(u"Albania"); expected.label.clear(); expected.form_control_type = FormControlType::kSelectOne; expected.max_length = 0; @@ -5418,7 +5418,7 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"John"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -5426,7 +5426,7 @@ expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Smith"; expected.form_control_type = FormControlType::kInputText; expected.max_length = FormFieldData::kDefaultMaxLength; @@ -5434,7 +5434,7 @@ expected.id_attribute = u"country"; expected.name = expected.id_attribute; - expected.value = u"AL"; + expected.set_value(u"AL"); expected.label.clear(); expected.form_control_type = FormControlType::kSelectOne; expected.max_length = 0; @@ -5467,19 +5467,19 @@ expected.id_attribute = u"firstname"; expected.name = expected.id_attribute; - expected.value = u"John"; + expected.set_value(u"John"); expected.label = u"First name:"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[0]); expected.id_attribute = u"lastname"; expected.name = expected.id_attribute; - expected.value = u"Smith"; + expected.set_value(u"Smith"); expected.label = u"Last name:"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); expected.id_attribute = u"email"; expected.name = expected.id_attribute; - expected.value = u"john@example.com"; + expected.set_value(u"john@example.com"); expected.label = u"Email:"; EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); }
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc index 9c78cca..bad4ec47 100644 --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -355,8 +355,9 @@ bool FormHasFieldWithValue(const autofill::FormData& form, const std::u16string& value) { for (const auto& field : form.fields) { - if (field.value == value) + if (field.value() == value) { return true; + } if (field.user_input == value) return true; }
diff --git a/chrome/renderer/autofill/password_generation_agent_browsertest.cc b/chrome/renderer/autofill/password_generation_agent_browsertest.cc index 32de616e..a0c7ce5 100644 --- a/chrome/renderer/autofill/password_generation_agent_browsertest.cc +++ b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
@@ -635,10 +635,10 @@ ASSERT_TRUE(fake_driver_.form_data_maybe_submitted().has_value()); EXPECT_THAT(FindFieldById(*fake_driver_.form_data_maybe_submitted(), "first_password"), - testing::Field(&FormFieldData::value, edited_password)); + testing::Property(&FormFieldData::value, edited_password)); EXPECT_THAT(FindFieldById(*fake_driver_.form_data_maybe_submitted(), "second_password"), - testing::Field(&FormFieldData::value, edited_password)); + testing::Property(&FormFieldData::value, edited_password)); base::RunLoop().RunUntilIdle(); testing::Mock::VerifyAndClearExpectations(&fake_pw_client_); @@ -654,10 +654,10 @@ ASSERT_TRUE(fake_driver_.form_data_maybe_submitted().has_value()); EXPECT_THAT(FindFieldById(*fake_driver_.form_data_maybe_submitted(), "first_password"), - testing::Field(&FormFieldData::value, std::u16string())); + testing::Property(&FormFieldData::value, std::u16string())); EXPECT_THAT(FindFieldById(*fake_driver_.form_data_maybe_submitted(), "second_password"), - testing::Field(&FormFieldData::value, std::u16string())); + testing::Property(&FormFieldData::value, std::u16string())); } TEST_F(PasswordGenerationAgentTest, EditingEventsTest) {
diff --git a/chrome/services/sharing/nearby/nearby_connections.cc b/chrome/services/sharing/nearby/nearby_connections.cc index 1c90e15..2002363c 100644 --- a/chrome/services/sharing/nearby/nearby_connections.cc +++ b/chrome/services/sharing/nearby/nearby_connections.cc
@@ -602,9 +602,8 @@ } else { std::unique_ptr<presence::PresenceDevice> presence_device = std::make_unique<presence::PresenceDevice>(endpoint_id); - presence_device->SetDeviceIdentityMetaData( - ash::nearby::presence::MetadataFromMojom( - remote_device->metadata.get())); + presence_device->SetMetadata(ash::nearby::presence::MetadataFromMojom( + remote_device->metadata.get())); endpoint_id_to_presence_device_map.insert_or_assign( endpoint_id, std::move(presence_device)); }
diff --git a/chrome/services/sharing/nearby/nearby_connections_unittest.cc b/chrome/services/sharing/nearby/nearby_connections_unittest.cc index 3a98a7f..64e3805f 100644 --- a/chrome/services/sharing/nearby/nearby_connections_unittest.cc +++ b/chrome/services/sharing/nearby/nearby_connections_unittest.cc
@@ -55,10 +55,10 @@ const char kEndpointId[] = "ABCD"; const size_t kEndpointIdLength = 4u; const char kEndpointInfo[] = {0x0d, 0x07, 0x07, 0x07, 0x07}; +const char kAccountName[] = "criscros@gmail.com"; +const char kUserName[] = "CrisCrOS"; const char kDeviceName[] = "Cris Cros's Pixel"; -const std::vector<uint8_t> kDeviceId = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, - 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, - 0x89, 0xab, 0xcd, 0xef}; +const char kDeviceProfileUrl[] = "cris_cros_url"; const char kRemoteEndpointInfo[] = {0x0d, 0x07, 0x06, 0x08, 0x09}; const char kAuthenticationToken[] = "authentication_token"; const char kRawAuthenticationToken[] = {0x00, 0x05, 0x04, 0x03, 0x02}; @@ -120,12 +120,14 @@ return endpoint_data; } -nearby::internal::DeviceIdentityMetaData CreateMetadata() { - nearby::internal::DeviceIdentityMetaData metadata; +nearby::internal::Metadata CreateMetadata() { + nearby::internal::Metadata metadata; metadata.set_device_type(nearby::internal::DeviceType::DEVICE_TYPE_PHONE); + metadata.set_account_name(kAccountName); + metadata.set_user_name(kUserName); metadata.set_device_name(kDeviceName); + metadata.set_device_profile_url(kDeviceProfileUrl); metadata.set_bluetooth_mac_address((char*)kBluetoothMacAddress); - metadata.set_device_id(std::string(kDeviceId.begin(), kDeviceId.end())); return metadata; } @@ -700,26 +702,6 @@ reject_connection_run_loop.Run(); } - void VerifyRemoteDevice( - const PresenceDevicePtr& remote_device, - const nearby::presence::PresenceDevice& expected_device) { - EXPECT_EQ(remote_device->endpoint_id, kEndpointId); - EXPECT_EQ(remote_device->metadata->device_name, - expected_device.GetDeviceIdentityMetadata().device_name()); - - auto mac_addr_str = - std::string(remote_device->metadata->bluetooth_mac_address.begin(), - remote_device->metadata->bluetooth_mac_address.end()); - EXPECT_EQ( - mac_addr_str, - expected_device.GetDeviceIdentityMetadata().bluetooth_mac_address()); - - auto device_id_str = std::string(remote_device->metadata->device_id.begin(), - remote_device->metadata->device_id.end()); - EXPECT_EQ(device_id_str, - expected_device.GetDeviceIdentityMetadata().device_id()); - } - protected: base::test::TaskEnvironment task_environment_; mojo::Remote<mojom::NearbyConnections> remote_; @@ -1638,7 +1620,7 @@ TEST_F(NearbyConnectionsTest, RequestConnectionV3Initiated) { nearby::presence::PresenceDevice presence_device(kEndpointId); - presence_device.SetDeviceIdentityMetaData(CreateMetadata()); + presence_device.SetMetadata(CreateMetadata()); PresenceDevicePtr presence_device_mojom = ash::nearby::presence::BuildPresenceMojomDevice(presence_device); EXPECT_EQ(presence_device_mojom->endpoint_id, @@ -1649,7 +1631,15 @@ fake_connection_listener_v3.initiated_cb = base::BindLambdaForTesting([&](PresenceDevicePtr remote_device, mojom::InitialConnectionInfoV3Ptr info) { - VerifyRemoteDevice(remote_device, presence_device); + EXPECT_EQ(remote_device->endpoint_id, kEndpointId); + EXPECT_EQ(remote_device->metadata->device_name, + presence_device.GetMetadata().device_name()); + EXPECT_EQ(remote_device->metadata->account_name, + presence_device.GetMetadata().account_name()); + EXPECT_EQ(remote_device->metadata->user_name, + presence_device.GetMetadata().user_name()); + EXPECT_EQ(remote_device->metadata->device_profile_url, + presence_device.GetMetadata().device_profile_url()); EXPECT_EQ(info->authentication_status, mojom::AuthenticationStatus::kSuccess); @@ -1664,7 +1654,7 @@ TEST_F(NearbyConnectionsTest, RequestConnectionV3FailtoAuthenticate) { nearby::presence::PresenceDevice presence_device(kEndpointId); - presence_device.SetDeviceIdentityMetaData(CreateMetadata()); + presence_device.SetMetadata(CreateMetadata()); PresenceDevicePtr presence_device_mojom = ash::nearby::presence::BuildPresenceMojomDevice(presence_device); EXPECT_EQ(presence_device_mojom->endpoint_id, @@ -1675,7 +1665,15 @@ fake_connection_listener_v3.initiated_cb = base::BindLambdaForTesting([&](PresenceDevicePtr remote_device, mojom::InitialConnectionInfoV3Ptr info) { - VerifyRemoteDevice(remote_device, presence_device); + EXPECT_EQ(remote_device->endpoint_id, kEndpointId); + EXPECT_EQ(remote_device->metadata->device_name, + presence_device.GetMetadata().device_name()); + EXPECT_EQ(remote_device->metadata->account_name, + presence_device.GetMetadata().account_name()); + EXPECT_EQ(remote_device->metadata->user_name, + presence_device.GetMetadata().user_name()); + EXPECT_EQ(remote_device->metadata->device_profile_url, + presence_device.GetMetadata().device_profile_url()); EXPECT_EQ(info->authentication_status, mojom::AuthenticationStatus::kFailure); @@ -1690,7 +1688,7 @@ TEST_F(NearbyConnectionsTest, AcceptConnectionV3) { nearby::presence::PresenceDevice presence_device(kEndpointId); - presence_device.SetDeviceIdentityMetaData(CreateMetadata()); + presence_device.SetMetadata(CreateMetadata()); PresenceDevicePtr presence_device_mojom = ash::nearby::presence::BuildPresenceMojomDevice(presence_device); EXPECT_EQ(presence_device_mojom->endpoint_id, @@ -1701,7 +1699,15 @@ fake_connection_listener_v3.initiated_cb = base::BindLambdaForTesting([&](PresenceDevicePtr remote_device, mojom::InitialConnectionInfoV3Ptr info) { - VerifyRemoteDevice(remote_device, presence_device); + EXPECT_EQ(remote_device->endpoint_id, kEndpointId); + EXPECT_EQ(remote_device->metadata->device_name, + presence_device.GetMetadata().device_name()); + EXPECT_EQ(remote_device->metadata->account_name, + presence_device.GetMetadata().account_name()); + EXPECT_EQ(remote_device->metadata->user_name, + presence_device.GetMetadata().user_name()); + EXPECT_EQ(remote_device->metadata->device_profile_url, + presence_device.GetMetadata().device_profile_url()); EXPECT_EQ(info->authentication_status, mojom::AuthenticationStatus::kSuccess); @@ -1732,7 +1738,7 @@ TEST_F(NearbyConnectionsTest, RejectConnectionV3) { nearby::presence::PresenceDevice presence_device(kEndpointId); - presence_device.SetDeviceIdentityMetaData(CreateMetadata()); + presence_device.SetMetadata(CreateMetadata()); PresenceDevicePtr presence_device_mojom = ash::nearby::presence::BuildPresenceMojomDevice(presence_device); EXPECT_EQ(presence_device_mojom->endpoint_id, @@ -1750,7 +1756,7 @@ TEST_F(NearbyConnectionsTest, DisconnectFromDeviceV3) { nearby::presence::PresenceDevice presence_device(kEndpointId); - presence_device.SetDeviceIdentityMetaData(CreateMetadata()); + presence_device.SetMetadata(CreateMetadata()); PresenceDevicePtr presence_device_mojom = ash::nearby::presence::BuildPresenceMojomDevice(presence_device); EXPECT_EQ(presence_device_mojom->endpoint_id, @@ -1761,7 +1767,14 @@ fake_connection_listener_v3.initiated_cb = base::BindLambdaForTesting([&](PresenceDevicePtr remote_device, mojom::InitialConnectionInfoV3Ptr info) { - VerifyRemoteDevice(remote_device, presence_device); + EXPECT_EQ(remote_device->metadata->device_name, + presence_device.GetMetadata().device_name()); + EXPECT_EQ(remote_device->metadata->account_name, + presence_device.GetMetadata().account_name()); + EXPECT_EQ(remote_device->metadata->user_name, + presence_device.GetMetadata().user_name()); + EXPECT_EQ(remote_device->metadata->device_profile_url, + presence_device.GetMetadata().device_profile_url()); EXPECT_EQ(info->authentication_status, mojom::AuthenticationStatus::kSuccess); @@ -1824,7 +1837,7 @@ TEST_F(NearbyConnectionsTest, BandwidthChangedV3CallbackSucceeds) { nearby::presence::PresenceDevice presence_device(kEndpointId); - presence_device.SetDeviceIdentityMetaData(CreateMetadata()); + presence_device.SetMetadata(CreateMetadata()); PresenceDevicePtr presence_device_mojom = ash::nearby::presence::BuildPresenceMojomDevice(presence_device); EXPECT_EQ(presence_device_mojom->endpoint_id,
diff --git a/chrome/services/sharing/nearby/nearby_presence.cc b/chrome/services/sharing/nearby/nearby_presence.cc index c46540c2..571382b7 100644 --- a/chrome/services/sharing/nearby/nearby_presence.cc +++ b/chrome/services/sharing/nearby/nearby_presence.cc
@@ -150,9 +150,8 @@ // to only set metadata, and not to generate credentials. Generating // credentials is only called during the first time flow or when device // metadata changes (e.g. the user's name). - presence_service_->UpdateDeviceIdentityMetaData( - MetadataFromMojom(metadata.get()), - /*regen_credentials=*/false, + presence_service_->UpdateLocalDeviceMetadata( + MetadataFromMojom(metadata.get()), /*regen_credentials=*/false, /*manager_app_id=*/kChromeOSManagerAppId, /*identity_types=*/ {::nearby::internal::IdentityType::IDENTITY_TYPE_PRIVATE}, @@ -164,9 +163,8 @@ void NearbyPresence::UpdateLocalDeviceMetadataAndGenerateCredentials( mojom::MetadataPtr metadata, UpdateLocalDeviceMetadataAndGenerateCredentialsCallback callback) { - presence_service_->UpdateDeviceIdentityMetaData( - MetadataFromMojom(metadata.get()), - /*regen_credentials=*/true, + presence_service_->UpdateLocalDeviceMetadata( + MetadataFromMojom(metadata.get()), /*regen_credentials=*/true, /*manager_app_id=*/kChromeOSManagerAppId, /*identity_types=*/ {::nearby::internal::IdentityType::IDENTITY_TYPE_PRIVATE},
diff --git a/chrome/services/sharing/nearby/nearby_presence_conversions.cc b/chrome/services/sharing/nearby/nearby_presence_conversions.cc index acaa603..63b7e10 100644 --- a/chrome/services/sharing/nearby/nearby_presence_conversions.cc +++ b/chrome/services/sharing/nearby/nearby_presence_conversions.cc
@@ -55,27 +55,27 @@ } } -::nearby::internal::DeviceIdentityMetaData MetadataFromMojom( - mojom::Metadata* metadata) { - ::nearby::internal::DeviceIdentityMetaData proto; +::nearby::internal::Metadata MetadataFromMojom(mojom::Metadata* metadata) { + ::nearby::internal::Metadata proto; proto.set_device_type(DeviceTypeFromMojom(metadata->device_type)); + proto.set_account_name(metadata->account_name); + proto.set_user_name(metadata->user_name); proto.set_device_name(metadata->device_name); + proto.set_user_name(metadata->user_name); + proto.set_device_profile_url(metadata->device_profile_url); proto.set_bluetooth_mac_address( std::string(metadata->bluetooth_mac_address.begin(), metadata->bluetooth_mac_address.end())); - proto.set_device_id( - std::string(metadata->device_id.begin(), metadata->device_id.end())); return proto; } -mojom::MetadataPtr MetadataToMojom( - ::nearby::internal::DeviceIdentityMetaData metadata) { +mojom::MetadataPtr MetadataToMojom(::nearby::internal::Metadata metadata) { return mojom::Metadata::New( - DeviceTypeToMojom(metadata.device_type()), metadata.device_name(), + DeviceTypeToMojom(metadata.device_type()), metadata.account_name(), + metadata.device_name(), metadata.user_name(), + metadata.device_profile_url(), std::vector<uint8_t>(metadata.bluetooth_mac_address().begin(), - metadata.bluetooth_mac_address().end()), - std::vector<uint8_t>(metadata.device_id().begin(), - metadata.device_id().end())); + metadata.bluetooth_mac_address().end())); } mojom::IdentityType ConvertIdentityTypeToMojom( @@ -292,8 +292,7 @@ // TODO(b/276642472): Properly plumb type and stable_device_id. return mojom::PresenceDevice::New( device.GetEndpointId(), std::move(actions), - /*stable_device_id=*/std::nullopt, - MetadataToMojom(device.GetDeviceIdentityMetadata()), + /*stable_device_id=*/std::nullopt, MetadataToMojom(device.GetMetadata()), device.GetDecryptSharedCredential() ? SharedCredentialToMojom(device.GetDecryptSharedCredential().value()) : nullptr);
diff --git a/chrome/services/sharing/nearby/nearby_presence_conversions.h b/chrome/services/sharing/nearby/nearby_presence_conversions.h index 91b5beba8..4cb7032 100644 --- a/chrome/services/sharing/nearby/nearby_presence_conversions.h +++ b/chrome/services/sharing/nearby/nearby_presence_conversions.h
@@ -19,10 +19,8 @@ mojom::PresenceDeviceType DeviceTypeToMojom( ::nearby::internal::DeviceType device_type); -::nearby::internal::DeviceIdentityMetaData MetadataFromMojom( - mojom::Metadata* metadata); -mojom::MetadataPtr MetadataToMojom( - ::nearby::internal::DeviceIdentityMetaData metadata); +::nearby::internal::Metadata MetadataFromMojom(mojom::Metadata* metadata); +mojom::MetadataPtr MetadataToMojom(::nearby::internal::Metadata metadata); mojom::IdentityType ConvertIdentityTypeToMojom( ::nearby::internal::IdentityType identity_type);
diff --git a/chrome/services/sharing/nearby/nearby_presence_unittest.cc b/chrome/services/sharing/nearby/nearby_presence_unittest.cc index f2f6a84..c075c978 100644 --- a/chrome/services/sharing/nearby/nearby_presence_unittest.cc +++ b/chrome/services/sharing/nearby/nearby_presence_unittest.cc
@@ -27,9 +27,7 @@ const char kDeviceName[] = "Test's Chromebook"; const char kAccountName[] = "test.tester@gmail.com"; -const std::vector<uint8_t> kDeviceId = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, - 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, - 0x89, 0xab, 0xcd, 0xef}; +const char kProfileUrl[] = "https://example.com"; const std::vector<uint8_t> kSecretId1 = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11}; const std::vector<uint8_t> kSecretId2 = {0x22, 0x22, 0x22, 0x22, 0x22, 0x22}; const std::vector<uint8_t> kSecretId3 = {0x33, 0x33, 0x33, 0x33, 0x33, 0x33}; @@ -41,16 +39,16 @@ ash::nearby::presence::mojom::MetadataPtr BuildTestMetadata() { ash::nearby::presence::mojom::MetadataPtr metadata = ash::nearby::presence::mojom::Metadata::New(); + metadata->account_name = kAccountName; metadata->device_name = kDeviceName; - metadata->device_id = kDeviceId; + metadata->device_profile_url = kProfileUrl; return metadata; } -::nearby::internal::DeviceIdentityMetaData BuildTestPresenceClientMetadata() { - ::nearby::internal::DeviceIdentityMetaData metadata; - metadata.set_device_name(kDeviceName); +::nearby::internal::Metadata BuildTestPresenceClientMetadata() { + ::nearby::internal::Metadata metadata; metadata.set_bluetooth_mac_address(kMacAddress); - metadata.set_device_id(std::string(kDeviceId.begin(), kDeviceId.end())); + metadata.set_device_name(kDeviceName); return metadata; } @@ -240,8 +238,7 @@ } EXPECT_TRUE(was_on_scan_started_called); - EXPECT_EQ(last_device_found_name_, - device.GetDeviceIdentityMetadata().device_name()); + EXPECT_EQ(last_device_found_name_, device.GetMetadata().device_name()); EXPECT_EQ(1, num_devices_found_); } @@ -269,8 +266,7 @@ } EXPECT_TRUE(was_on_scan_started_called); - EXPECT_EQ(last_device_changed_name_, - device.GetDeviceIdentityMetadata().device_name()); + EXPECT_EQ(last_device_changed_name_, device.GetMetadata().device_name()); EXPECT_EQ(1, num_devices_changed_); } @@ -298,19 +294,18 @@ } EXPECT_TRUE(was_on_scan_started_called); - EXPECT_EQ(last_device_lost_name_, - device.GetDeviceIdentityMetadata().device_name()); + EXPECT_EQ(last_device_lost_name_, device.GetMetadata().device_name()); EXPECT_EQ(1, num_devices_lost_); } TEST_F(NearbyPresenceTest, RunUpdateLocalDeviceMetadata) { nearby_presence_->UpdateLocalDeviceMetadata(BuildTestMetadata()); - ::nearby::internal::DeviceIdentityMetaData local_device_metadata = - fake_presence_service_->GetDeviceIdentityMetaData(); + ::nearby::internal::Metadata local_device_metadata = + fake_presence_service_->GetLocalDeviceMetadata(); + EXPECT_EQ(kAccountName, local_device_metadata.account_name()); EXPECT_EQ(kDeviceName, local_device_metadata.device_name()); - EXPECT_EQ(std::string(kDeviceId.begin(), kDeviceId.end()), - local_device_metadata.device_id()); + EXPECT_EQ(kProfileUrl, local_device_metadata.device_profile_url()); } TEST_F(NearbyPresenceTest,
diff --git a/chrome/services/sharing/nearby/platform/ble_v2_gatt_server.h b/chrome/services/sharing/nearby/platform/ble_v2_gatt_server.h index a882e9b..b41f0b5 100644 --- a/chrome/services/sharing/nearby/platform/ble_v2_gatt_server.h +++ b/chrome/services/sharing/nearby/platform/ble_v2_gatt_server.h
@@ -67,7 +67,6 @@ OnLocalCharacteristicReadCallback callback) override; std::unique_ptr<BluetoothAdapter> bluetooth_adapter_; - base::flat_map<Uuid, std::unique_ptr<GattService>> uuid_to_gatt_service_map_; mojo::SharedRemote<bluetooth::mojom::Adapter> adapter_remote_; mojo::Receiver<bluetooth::mojom::GattServiceObserver> gatt_service_observer_{
diff --git a/chrome/services/sharing/nearby/test_support/fake_adapter.cc b/chrome/services/sharing/nearby/test_support/fake_adapter.cc index cb9a55b..9f7d4f0a 100644 --- a/chrome/services/sharing/nearby/test_support/fake_adapter.cc +++ b/chrome/services/sharing/nearby/test_support/fake_adapter.cc
@@ -247,6 +247,13 @@ should_advertisement_registration_succeed; } +void FakeAdapter::IsLeScatternetDualRoleSupported( + IsLeScatternetDualRoleSupportedCallback callback) { + // TODO(b/311430390): Implement when BleV2Medium calls + // IsLeScatternetDualRoleSupported() on the Adapter Mojo Remote. + NOTIMPLEMENTED(); +} + void FakeAdapter::SetShouldDiscoverySucceed(bool should_discovery_succeed) { should_discovery_succeed_ = should_discovery_succeed; }
diff --git a/chrome/services/sharing/nearby/test_support/fake_adapter.h b/chrome/services/sharing/nearby/test_support/fake_adapter.h index 09aa57a..044e2a1 100644 --- a/chrome/services/sharing/nearby/test_support/fake_adapter.h +++ b/chrome/services/sharing/nearby/test_support/fake_adapter.h
@@ -52,6 +52,8 @@ const device::BluetoothUUID& service_id, mojo::PendingRemote<mojom::GattServiceObserver> observer, CreateLocalGattServiceCallback callback) override; + void IsLeScatternetDualRoleSupported( + IsLeScatternetDualRoleSupportedCallback callback) override; void SetAdvertisementDestroyedCallback(base::OnceClosure callback); const std::vector<uint8_t>* GetRegisteredAdvertisementServiceData(
diff --git a/chrome/services/sharing/nearby/test_support/fake_gatt_service.h b/chrome/services/sharing/nearby/test_support/fake_gatt_service.h index 8587d91..b7a3951 100644 --- a/chrome/services/sharing/nearby/test_support/fake_gatt_service.h +++ b/chrome/services/sharing/nearby/test_support/fake_gatt_service.h
@@ -15,6 +15,7 @@ public: using ValueCallback = base::OnceCallback<void( bluetooth::mojom::LocalCharacteristicReadResultPtr)>; + FakeGattService(); FakeGattService(const FakeGattService&) = delete; FakeGattService& operator=(const FakeGattService&) = delete;
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 27fe0f4..0b62ee0 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -819,8 +819,6 @@ "../browser/enterprise/connectors/analysis/mock_file_transfer_analysis_delegate.h", "../browser/enterprise/connectors/analysis/source_destination_test_util.cc", "../browser/enterprise/connectors/analysis/source_destination_test_util.h", - "../browser/nearby_sharing/fake_nearby_connection.cc", - "../browser/nearby_sharing/fake_nearby_connection.h", "../browser/ui/ash/clipboard_history_test_util.cc", "../browser/ui/ash/clipboard_history_test_util.h", "../browser/ui/webui/ash/login/fake_app_launch_splash_screen_handler.cc", @@ -874,7 +872,6 @@ "//chrome/browser/ash:print_job_info_proto", "//chrome/browser/ash/crosapi", "//chrome/browser/ash/system_web_apps/test_support", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/browser/ui/ash/system_web_apps", "//chromeos/ash/components/attestation:test_support", "//chromeos/ash/components/cryptohome", @@ -882,6 +879,7 @@ "//chromeos/ash/components/dbus/concierge", "//chromeos/ash/components/dbus/shill", "//chromeos/ash/components/disks:test_support", + "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/ash/components/standalone_browser:test_support", "//chromeos/ash/components/system", "//chromeos/dbus/power", @@ -8683,7 +8681,6 @@ "//chrome/browser/nearby_sharing/local_device_data:unit_tests", "//chrome/browser/nearby_sharing/logging:unit_tests", "//chrome/browser/nearby_sharing/proto:tachyon_proto", - "//chrome/browser/nearby_sharing/public/cpp", "//chrome/browser/policy:onc", "//chrome/browser/policy:unit_tests", "//chrome/browser/push_notification:push_notification",
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java index 9b7f2118..37b36cf5 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java
@@ -40,6 +40,7 @@ import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesState; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.Tab.LoadUrlResult; @@ -251,16 +252,14 @@ public void setNetworkPredictionEnabled(final boolean enabled) { InstrumentationRegistry.getInstrumentation() .runOnMainSync( - new Runnable() { - @Override - public void run() { - if (enabled) { - PreloadPagesSettingsBridge.setState( - PreloadPagesState.STANDARD_PRELOADING); - } else { - PreloadPagesSettingsBridge.setState( - PreloadPagesState.NO_PRELOADING); - } + () -> { + Profile profile = ProfileManager.getLastUsedRegularProfile(); + if (enabled) { + PreloadPagesSettingsBridge.setState( + profile, PreloadPagesState.STANDARD_PRELOADING); + } else { + PreloadPagesSettingsBridge.setState( + profile, PreloadPagesState.NO_PRELOADING); } }); }
diff --git a/chrome/test/data/webui/BUILD.gn b/chrome/test/data/webui/BUILD.gn index 27cfbba0..97cf52f 100644 --- a/chrome/test/data/webui/BUILD.gn +++ b/chrome/test/data/webui/BUILD.gn
@@ -26,7 +26,7 @@ "access_code_cast/access_code_cast_browsertest.cc", "bookmarks/bookmarks_browsertest.cc", "chrome_timeticks_browsertest.cc", - "commerce/product_specifications_browsertest.cc", + "commerce/product_specifications/product_specifications_browsertest.cc", "commerce_internals/commerce_internals_browsertest.cc", "cr_components/cr_components_browsertest.cc", "cr_elements/cr_elements_browsertest.cc",
diff --git a/chrome/test/data/webui/bluetooth_internals/test_utils.js b/chrome/test/data/webui/bluetooth_internals/test_utils.js index bb710b2..f8b2520 100644 --- a/chrome/test/data/webui/bluetooth_internals/test_utils.js +++ b/chrome/test/data/webui/bluetooth_internals/test_utils.js
@@ -192,6 +192,10 @@ return {result: null}; } + async isLeScatternetDualRoleSupported() { + return false; + } + setTestConnectResult(connectResult) { this.connectResult_ = connectResult; }
diff --git a/chrome/test/data/webui/commerce/BUILD.gn b/chrome/test/data/webui/commerce/BUILD.gn index 63eac2d..882de2b8 100644 --- a/chrome/test/data/webui/commerce/BUILD.gn +++ b/chrome/test/data/webui/commerce/BUILD.gn
@@ -5,7 +5,10 @@ import("../build_webui_tests.gni") build_webui_tests("build") { - files = [ "product_specifications_app_test.ts" ] + files = [ + "product_specifications/app_test.ts", + "product_specifications/table_test.ts", + ] ts_path_mappings = [ "chrome://compare/*|" + rebase_path("$root_gen_dir/chrome/browser/resources/commerce/tsc/*",
diff --git a/chrome/test/data/webui/commerce/product_specifications_app_test.ts b/chrome/test/data/webui/commerce/product_specifications/app_test.ts similarity index 94% rename from chrome/test/data/webui/commerce/product_specifications_app_test.ts rename to chrome/test/data/webui/commerce/product_specifications/app_test.ts index 5bdf7352..449e676 100644 --- a/chrome/test/data/webui/commerce/product_specifications_app_test.ts +++ b/chrome/test/data/webui/commerce/product_specifications/app_test.ts
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'chrome://compare/app.js'; +import 'chrome://compare/product_specifications/app.js'; -import type {ProductSpecificationsElement} from 'chrome://compare/app.js'; +import type {ProductSpecificationsElement} from 'chrome://compare/product_specifications/app.js'; import {Router} from 'chrome://compare/router.js'; import {BrowserProxyImpl} from 'chrome://resources/cr_components/commerce/browser_proxy.js'; import {assertArrayEquals, assertEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {flushTasks} from 'chrome://webui-test/polymer_test_util.js'; import {TestMock} from 'chrome://webui-test/test_mock.js'; -suite('ProductSpecificationsAppTest', () => { +suite('AppTest', () => { const shoppingServiceApi = TestMock.fromClass(BrowserProxyImpl); const router = TestMock.fromClass(Router);
diff --git a/chrome/test/data/webui/commerce/product_specifications_browsertest.cc b/chrome/test/data/webui/commerce/product_specifications/product_specifications_browsertest.cc similarity index 80% rename from chrome/test/data/webui/commerce/product_specifications_browsertest.cc rename to chrome/test/data/webui/commerce/product_specifications/product_specifications_browsertest.cc index 3341f9ce..e8f1b615 100644 --- a/chrome/test/data/webui/commerce/product_specifications_browsertest.cc +++ b/chrome/test/data/webui/commerce/product_specifications/product_specifications_browsertest.cc
@@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/common/webui_url_constants.h" #include "chrome/test/base/web_ui_mocha_browser_test.h" #include "components/commerce/core/commerce_constants.h" #include "components/commerce/core/commerce_feature_list.h" @@ -23,5 +22,9 @@ }; IN_PROC_BROWSER_TEST_F(ProductSpecificationsTest, App) { - RunTest("commerce/product_specifications_app_test.js", "mocha.run()"); + RunTest("commerce/product_specifications/app_test.js", "mocha.run()"); +} + +IN_PROC_BROWSER_TEST_F(ProductSpecificationsTest, Table) { + RunTest("commerce/product_specifications/table_test.js", "mocha.run()"); }
diff --git a/chrome/test/data/webui/commerce/product_specifications/table_test.ts b/chrome/test/data/webui/commerce/product_specifications/table_test.ts new file mode 100644 index 0000000..3903488 --- /dev/null +++ b/chrome/test/data/webui/commerce/product_specifications/table_test.ts
@@ -0,0 +1,59 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'chrome://compare/product_specifications/table.js'; + +import type {TableElement} from 'chrome://compare/product_specifications/table.js'; +import {assertEquals} from 'chrome://webui-test/chai_assert.js'; +import {waitAfterNextRender} from 'chrome://webui-test/polymer_test_util.js'; + +suite('ProductSpecificationsTableTest', () => { + let tableElement: TableElement; + + setup(async () => { + document.body.innerHTML = window.trustedTypes!.emptyHTML; + tableElement = document.createElement('product-specifications-table'); + document.body.appendChild(tableElement); + }); + + test('product columns show the correct data', async () => { + // Arrange. + const title1 = 'foo'; + const title2 = 'bar'; + + // Act. + tableElement.columns = [{title: title1}, {title: title2}]; + await waitAfterNextRender(tableElement); + + // Assert. + const columnTitles = + tableElement.shadowRoot!.querySelectorAll('.col .col-card'); + assertEquals(2, columnTitles.length); + assertEquals(title1, columnTitles[0]!.textContent); + assertEquals(title2, columnTitles[1]!.textContent); + }); + + test('product rows show the correct data', async () => { + // Arrange. + const row1 = {title: 'foo', values: ['foo1', 'foo2']}; + const row2 = {title: 'bar', values: ['bar2']}; + + // Act. + tableElement.rows = [row1, row2]; + await waitAfterNextRender(tableElement); + + // Assert. + const rowHeaders = + tableElement.shadowRoot!.querySelectorAll('.row .row-header'); + assertEquals(2, rowHeaders.length); + assertEquals(row1.title, rowHeaders[0]!.textContent); + assertEquals(row2.title, rowHeaders[1]!.textContent); + const rowContents = + tableElement.shadowRoot!.querySelectorAll('.row .row-content'); + assertEquals(3, rowContents.length); + assertEquals(row1.values[0], rowContents[0]!.textContent); + assertEquals(row1.values[1], rowContents[1]!.textContent); + assertEquals(row2.values[0], rowContents[2]!.textContent); + }); +});
diff --git a/chrome/test/data/webui/downloads/item_test.ts b/chrome/test/data/webui/downloads/item_test.ts index 23f18a98..c6b5696 100644 --- a/chrome/test/data/webui/downloads/item_test.ts +++ b/chrome/test/data/webui/downloads/item_test.ts
@@ -631,4 +631,44 @@ assertTrue(toastManager.slottedHidden); assertFalse(item.getMoreActionsMenu().open); }); + + test('ESBDownloadRowPromoShownAndClicked', async () => { + const item = document.createElement('downloads-item'); + document.body.innerHTML = window.trustedTypes!.emptyHTML; + document.body.appendChild(item); + item.showEsbPromotion = true; + item.set('data', createDownload({ + dangerType: DangerType.kDangerousFile, + fileExternallyRemoved: false, + hideDate: true, + state: State.kDangerous, + isDangerous: true, + url: stringToMojoUrl('http://evil.com'), + })); + flush(); + const esbPromo = + item.shadowRoot!.querySelector<HTMLElement>('#esb-download-row-promo'); + assertTrue(!!esbPromo); + assertTrue(isVisible(esbPromo)); + esbPromo.click(); + await testDownloadsProxy.handler.whenCalled('openEsbSettings'); + }); + + test('ESBDownloadRowPromoNotShown', () => { + const item = document.createElement('downloads-item'); + document.body.innerHTML = window.trustedTypes!.emptyHTML; + document.body.appendChild(item); + item.showEsbPromotion = false; + item.set('data', createDownload({ + dangerType: DangerType.kDangerousFile, + fileExternallyRemoved: false, + hideDate: true, + state: State.kDangerous, + isDangerous: true, + url: stringToMojoUrl('http://evil.com'), + })); + flush(); + const esbPromo = item.shadowRoot!.querySelector('#esb-download-row-promo'); + assertFalse(isVisible(esbPromo)); + }); });
diff --git a/chrome/test/data/webui/downloads/manager_test.ts b/chrome/test/data/webui/downloads/manager_test.ts index dc933f2..d66f673 100644 --- a/chrome/test/data/webui/downloads/manager_test.ts +++ b/chrome/test/data/webui/downloads/manager_test.ts
@@ -348,4 +348,57 @@ flush(); assertFalse(isVisible(dialog)); }); + + test( + 'shouldShowEsbPromotion returns true on first dangerous download', + async () => { + document.body.removeChild(manager); + loadTimeData.overrideValues({esbDownloadRowPromo: true}); + testBrowserProxy.handler.setEligbleForEsbPromo(true); + manager = document.createElement('downloads-manager'); + document.body.appendChild(manager); + const dangerousDownload = createDownload({ + dangerType: DangerType.kDangerousFile, + state: State.kDangerous, + isDangerous: true, + }); + callbackRouterRemote.insertItems(0, [dangerousDownload]); + await callbackRouterRemote.$.flushForTesting(); + flush(); + + const item = manager.shadowRoot!.querySelector('downloads-item'); + assertTrue(!!item); + assertTrue(item.showEsbPromotion); + }); + + test( + 'shouldShowEsbPromotion returns true on most recent dangerous download', + async () => { + document.body.removeChild(manager); + loadTimeData.overrideValues({esbDownloadRowPromo: true}); + testBrowserProxy.handler.setEligbleForEsbPromo(true); + manager = document.createElement('downloads-manager'); + document.body.appendChild(manager); + const dangerousDownload = createDownload({ + dangerType: DangerType.kDangerousFile, + state: State.kDangerous, + isDangerous: true, + id: 'dangerousdownload1', + }); + const dangerousDownloadTwo = createDownload({ + dangerType: DangerType.kDangerousFile, + state: State.kDangerous, + isDangerous: true, + url: stringToMojoUrl('http://evil.com'), + id: 'dangerousdownload2', + }); + callbackRouterRemote.insertItems( + 0, [dangerousDownload, dangerousDownloadTwo]); + await callbackRouterRemote.$.flushForTesting(); + flush(); + const itemList = manager.shadowRoot!.querySelectorAll('downloads-item'); + assertEquals(itemList.length, 2); + assertTrue(itemList[0]!.showEsbPromotion); + assertFalse(itemList[1]!.showEsbPromotion); + }); });
diff --git a/chrome/test/data/webui/downloads/test_support.ts b/chrome/test/data/webui/downloads/test_support.ts index b31fc9e..1f75def 100644 --- a/chrome/test/data/webui/downloads/test_support.ts +++ b/chrome/test/data/webui/downloads/test_support.ts
@@ -23,8 +23,11 @@ } class FakePageHandler implements PageHandlerInterface { + private eligibleForEsbPromo_: boolean = false; private callbackRouterRemote_: PageRemote; private callTracker_: TestBrowserProxy = new TestBrowserProxy([ + 'openEsbSettings', + 'isEligibleForEsbPromo', 'recordCancelBypassWarningPrompt', 'recordOpenBypassWarningPrompt', 'remove', @@ -68,6 +71,10 @@ this.callTracker_.methodCalled('saveSuspiciousRequiringGesture', id); } + openEsbSettings() { + this.callTracker_.methodCalled('openEsbSettings'); + } + getDownloads(_searchTerms: string[]) {} openFileRequiringGesture(_id: string) {} drag(_id: string) {} @@ -85,9 +92,12 @@ reviewDangerousRequiringGesture(_id: string) {} deepScan(_id: string) {} bypassDeepScanRequiringGesture(_id: string) {} - openEsbSettings() {} async isEligibleForEsbPromo(): Promise<{result: boolean}> { - return {result: false}; + this.callTracker_.methodCalled('isEligibleForEsbPromo'); + return {result: this.eligibleForEsbPromo_}; + } + setEligbleForEsbPromo(eligible: boolean) { + this.eligibleForEsbPromo_ = eligible; } }
diff --git a/chrome/test/data/webui/new_tab_page/new_tab_page_a11y_browsertest.cc b/chrome/test/data/webui/new_tab_page/new_tab_page_a11y_browsertest.cc index b4bce341..66235a9 100644 --- a/chrome/test/data/webui/new_tab_page/new_tab_page_a11y_browsertest.cc +++ b/chrome/test/data/webui/new_tab_page/new_tab_page_a11y_browsertest.cc
@@ -8,8 +8,8 @@ #include "chrome/test/base/web_ui_mocha_browser_test.h" #include "components/search/ntp_features.h" #include "content/public/browser/browser_accessibility_state.h" -#include "content/public/common/content_switches.h" #include "content/public/test/browser_test.h" +#include "ui/accessibility/accessibility_switches.h" #include "ui/accessibility/ax_mode.h" class NewTabPageA11yBrowserTest : public WebUIMochaBrowserTest {
diff --git a/chrome/test/data/webui/welcome/navigation_mixin_test.ts b/chrome/test/data/webui/welcome/navigation_mixin_test.ts index 09d465e7..07fb21b9 100644 --- a/chrome/test/data/webui/welcome/navigation_mixin_test.ts +++ b/chrome/test/data/webui/welcome/navigation_mixin_test.ts
@@ -6,7 +6,8 @@ import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {eventToPromise} from 'chrome://webui-test/test_util.js'; -import {navigateTo, navigateToNextStep, NavigationMixin, Routes} from 'chrome://welcome/navigation_mixin.js'; +import {NavigationMixin} from 'chrome://welcome/navigation_mixin.js'; +import {navigateTo, navigateToNextStep, Routes} from 'chrome://welcome/router.js'; suite('NavigationBehaviorTest', function() { class TestElement extends NavigationMixin
diff --git a/chrome/test/data/webui/welcome/welcome_app_test.ts b/chrome/test/data/webui/welcome/welcome_app_test.ts index 5068088..fecf647 100644 --- a/chrome/test/data/webui/welcome/welcome_app_test.ts +++ b/chrome/test/data/webui/welcome/welcome_app_test.ts
@@ -7,7 +7,7 @@ import {assertEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {waitBeforeNextRender} from 'chrome://webui-test/polymer_test_util.js'; import {LandingViewProxyImpl} from 'chrome://welcome/landing_view_proxy.js'; -import {navigateTo, Routes} from 'chrome://welcome/navigation_mixin.js'; +import {navigateTo, Routes} from 'chrome://welcome/router.js'; import {NuxSetAsDefaultProxyImpl} from 'chrome://welcome/set_as_default/nux_set_as_default_proxy.js'; import {BookmarkProxyImpl} from 'chrome://welcome/shared/bookmark_proxy.js'; import type {DefaultBrowserInfo} from 'chrome://welcome/shared/nux_types.js';
diff --git a/chromeos/ash/components/data_migration/BUILD.gn b/chromeos/ash/components/data_migration/BUILD.gn index 45d2ed97..b7b5420 100644 --- a/chromeos/ash/components/data_migration/BUILD.gn +++ b/chromeos/ash/components/data_migration/BUILD.gn
@@ -39,7 +39,7 @@ ":pending_file_transfer_queue", ":rts_receiver", "//base", - "//chrome/browser/nearby_sharing/public/cpp", + "//chromeos/ash/components/nearby/common/connections_manager:connections_manager", ] } @@ -67,7 +67,6 @@ ":file_receiver", ":pending_file_transfer_queue", "//base", - "//chrome/browser/nearby_sharing/public/cpp:cpp", "//chromeos/ash/components/nearby/common/connections_manager:connections_manager", ] } @@ -90,7 +89,6 @@ deps = [ ":pending_file_transfer_queue", "//base", - "//chrome/browser/nearby_sharing/public/cpp:cpp", "//chromeos/ash/components/nearby/common/connections_manager:connections_manager", ] } @@ -142,7 +140,6 @@ "//base", "//base/test:test_support", "//chrome/browser", - "//chrome/browser/nearby_sharing/public/cpp:cpp", "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/ash/services/nearby/public/mojom", "//testing/gmock",
diff --git a/chromeos/ash/components/data_migration/file_transfer.cc b/chromeos/ash/components/data_migration/file_transfer.cc index c9dcabd0..ca95ea9 100644 --- a/chromeos/ash/components/data_migration/file_transfer.cc +++ b/chromeos/ash/components/data_migration/file_transfer.cc
@@ -10,9 +10,9 @@ #include "base/path_service.h" #include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" #include "chromeos/ash/components/data_migration/constants.h" #include "chromeos/ash/components/data_migration/pending_file_transfer_queue.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" namespace data_migration {
diff --git a/chromeos/ash/components/data_migration/rts_receiver.cc b/chromeos/ash/components/data_migration/rts_receiver.cc index 6102acc..74b4594 100644 --- a/chromeos/ash/components/data_migration/rts_receiver.cc +++ b/chromeos/ash/components/data_migration/rts_receiver.cc
@@ -10,8 +10,8 @@ #include "base/functional/bind.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" #include "chromeos/ash/components/data_migration/pending_file_transfer_queue.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" namespace data_migration {
diff --git a/chromeos/ash/components/data_migration/rts_receiver_unittest.cc b/chromeos/ash/components/data_migration/rts_receiver_unittest.cc index b07cef1..b1e7848 100644 --- a/chromeos/ash/components/data_migration/rts_receiver_unittest.cc +++ b/chromeos/ash/components/data_migration/rts_receiver_unittest.cc
@@ -11,7 +11,6 @@ #include "base/test/task_environment.h" #include "base/test/test_future.h" #include "chrome/browser/nearby_sharing/nearby_connections_manager_impl.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" #include "chromeos/ash/components/data_migration/constants.h" #include "chromeos/ash/components/data_migration/pending_file_transfer_queue.h" #include "chromeos/ash/components/data_migration/testing/connection_barrier.h"
diff --git a/chromeos/ash/components/nearby/common/connections_manager/BUILD.gn b/chromeos/ash/components/nearby/common/connections_manager/BUILD.gn index fddb885b..ef6beb41 100644 --- a/chromeos/ash/components/nearby/common/connections_manager/BUILD.gn +++ b/chromeos/ash/components/nearby/common/connections_manager/BUILD.gn
@@ -8,6 +8,8 @@ source_set("connections_manager") { sources = [ + "nearby_connection.cc", + "nearby_connection.h", "nearby_connections_manager.cc", "nearby_connections_manager.h", ] @@ -15,7 +17,6 @@ deps = [ "//base", "//chrome/browser/nearby_sharing/common", - "//chrome/browser/nearby_sharing/public/cpp:cpp", "//chromeos/ash/components/nearby/presence:presence", "//chromeos/ash/services/nearby/public/mojom", "//third_party/abseil-cpp:absl", @@ -28,6 +29,8 @@ testonly = true sources = [ + "fake_nearby_connection.cc", + "fake_nearby_connection.h", "fake_nearby_connections_manager.cc", "fake_nearby_connections_manager.h", ]
diff --git a/chromeos/ash/components/nearby/common/connections_manager/DEPS b/chromeos/ash/components/nearby/common/connections_manager/DEPS deleted file mode 100644 index dc25b90..0000000 --- a/chromeos/ash/components/nearby/common/connections_manager/DEPS +++ /dev/null
@@ -1,3 +0,0 @@ -include_rules = [ - "+chrome/browser/nearby_sharing/public/cpp/nearby_connection.h", -] \ No newline at end of file
diff --git a/chrome/browser/nearby_sharing/fake_nearby_connection.cc b/chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.cc similarity index 94% rename from chrome/browser/nearby_sharing/fake_nearby_connection.cc rename to chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.cc index f71cb4e..332d9b96 100644 --- a/chrome/browser/nearby_sharing/fake_nearby_connection.cc +++ b/chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.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 "chrome/browser/nearby_sharing/fake_nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h" FakeNearbyConnection::FakeNearbyConnection() = default; FakeNearbyConnection::~FakeNearbyConnection() {
diff --git a/chrome/browser/nearby_sharing/fake_nearby_connection.h b/chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h similarity index 72% rename from chrome/browser/nearby_sharing/fake_nearby_connection.h rename to chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h index 60100b9..44437a87f 100644 --- a/chrome/browser/nearby_sharing/fake_nearby_connection.h +++ b/chromeos/ash/components/nearby/common/connections_manager/fake_nearby_connection.h
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_NEARBY_SHARING_FAKE_NEARBY_CONNECTION_H_ -#define CHROME_BROWSER_NEARBY_SHARING_FAKE_NEARBY_CONNECTION_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_NEARBY_COMMON_CONNECTIONS_MANAGER_FAKE_NEARBY_CONNECTION_H_ +#define CHROMEOS_ASH_COMPONENTS_NEARBY_COMMON_CONNECTIONS_MANAGER_FAKE_NEARBY_CONNECTION_H_ #include <queue> #include <vector> -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" class FakeNearbyConnection : public NearbyConnection { public: @@ -39,4 +39,4 @@ base::OnceClosure disconnect_listener_; }; -#endif // CHROME_BROWSER_NEARBY_SHARING_FAKE_NEARBY_CONNECTION_H_ +#endif // CHROMEOS_ASH_COMPONENTS_NEARBY_COMMON_CONNECTIONS_MANAGER_FAKE_NEARBY_CONNECTION_H_
diff --git a/chrome/browser/nearby_sharing/public/cpp/nearby_connection.cc b/chromeos/ash/components/nearby/common/connections_manager/nearby_connection.cc similarity index 79% rename from chrome/browser/nearby_sharing/public/cpp/nearby_connection.cc rename to chromeos/ash/components/nearby/common/connections_manager/nearby_connection.cc index 58d4c6f6..cf31bb84 100644 --- a/chrome/browser/nearby_sharing/public/cpp/nearby_connection.cc +++ b/chromeos/ash/components/nearby/common/connections_manager/nearby_connection.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 "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" NearbyConnection::NearbyConnection() = default;
diff --git a/chrome/browser/nearby_sharing/public/cpp/nearby_connection.h b/chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h similarity index 86% rename from chrome/browser/nearby_sharing/public/cpp/nearby_connection.h rename to chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h index d2017896..955a155df 100644 --- a/chrome/browser/nearby_sharing/public/cpp/nearby_connection.h +++ b/chromeos/ash/components/nearby/common/connections_manager/nearby_connection.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 CHROME_BROWSER_NEARBY_SHARING_PUBLIC_CPP_NEARBY_CONNECTION_H_ -#define CHROME_BROWSER_NEARBY_SHARING_PUBLIC_CPP_NEARBY_CONNECTION_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_NEARBY_COMMON_CONNECTIONS_MANAGER_NEARBY_CONNECTION_H_ +#define CHROMEOS_ASH_COMPONENTS_NEARBY_COMMON_CONNECTIONS_MANAGER_NEARBY_CONNECTION_H_ #include <stdint.h> @@ -50,4 +50,4 @@ base::WeakPtrFactory<NearbyConnection> weak_ptr_factory_{this}; }; -#endif // CHROME_BROWSER_NEARBY_SHARING_PUBLIC_CPP_NEARBY_CONNECTION_H_ +#endif // CHROMEOS_ASH_COMPONENTS_NEARBY_COMMON_CONNECTIONS_MANAGER_NEARBY_CONNECTION_H_
diff --git a/chromeos/ash/components/nearby/common/connections_manager/nearby_connections_manager.h b/chromeos/ash/components/nearby/common/connections_manager/nearby_connections_manager.h index 5584b59..6f6d50fd 100644 --- a/chromeos/ash/components/nearby/common/connections_manager/nearby_connections_manager.h +++ b/chromeos/ash/components/nearby/common/connections_manager/nearby_connections_manager.h
@@ -14,7 +14,7 @@ #include "base/files/file_path.h" #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/nearby_sharing/public/cpp/nearby_connection.h" +#include "chromeos/ash/components/nearby/common/connections_manager/nearby_connection.h" #include "chromeos/ash/components/nearby/presence/nearby_presence_service.h" #include "chromeos/ash/services/nearby/public/mojom/nearby_connections_types.mojom.h" #include "chromeos/ash/services/nearby/public/mojom/nearby_share_settings.mojom.h"
diff --git a/chromeos/ash/components/nearby/presence/conversions/proto_conversions.cc b/chromeos/ash/components/nearby/presence/conversions/proto_conversions.cc index db512621..02a22c5 100644 --- a/chromeos/ash/components/nearby/presence/conversions/proto_conversions.cc +++ b/chromeos/ash/components/nearby/presence/conversions/proto_conversions.cc
@@ -8,16 +8,21 @@ namespace ash::nearby::presence::proto { -::nearby::internal::DeviceIdentityMetaData BuildMetadata( +::nearby::internal::Metadata BuildMetadata( ::nearby::internal::DeviceType device_type, + const std::string& account_name, const std::string& device_name, - const std::string& mac_address, - const std::string& device_id) { - ::nearby::internal::DeviceIdentityMetaData proto; + const std::string& user_name, + const std::string& profile_url, + const std::string& mac_address) { + ::nearby::internal::Metadata proto; proto.set_device_type(device_type); + proto.set_account_name(account_name); + proto.set_user_name(user_name); proto.set_device_name(device_name); + proto.set_user_name(user_name); + proto.set_device_profile_url(profile_url); proto.set_bluetooth_mac_address(mac_address); - proto.set_device_id(device_id); return proto; } @@ -82,14 +87,13 @@ } } -mojom::MetadataPtr MetadataToMojom( - ::nearby::internal::DeviceIdentityMetaData metadata) { +mojom::MetadataPtr MetadataToMojom(::nearby::internal::Metadata metadata) { return mojom::Metadata::New( - DeviceTypeToMojom(metadata.device_type()), metadata.device_name(), + DeviceTypeToMojom(metadata.device_type()), metadata.account_name(), + metadata.device_name(), metadata.user_name(), + metadata.device_profile_url(), std::vector<uint8_t>(metadata.bluetooth_mac_address().begin(), - metadata.bluetooth_mac_address().end()), - std::vector<uint8_t>(metadata.device_id().begin(), - metadata.device_id().end())); + metadata.bluetooth_mac_address().end())); } ::nearby::internal::LocalCredential::PrivateKey PrivateKeyFromMojom(
diff --git a/chromeos/ash/components/nearby/presence/conversions/proto_conversions.h b/chromeos/ash/components/nearby/presence/conversions/proto_conversions.h index b46acd8..31baba5 100644 --- a/chromeos/ash/components/nearby/presence/conversions/proto_conversions.h +++ b/chromeos/ash/components/nearby/presence/conversions/proto_conversions.h
@@ -17,18 +17,19 @@ namespace ash::nearby::presence::proto { -::nearby::internal::DeviceIdentityMetaData BuildMetadata( +::nearby::internal::Metadata BuildMetadata( ::nearby::internal::DeviceType device_type, + const std::string& account_name, const std::string& device_name, - const std::string& mac_address, - const std::string& device_id); + const std::string& user_name, + const std::string& profile_url, + const std::string& mac_address); mojom::PresenceDeviceType DeviceTypeToMojom( ::nearby::internal::DeviceType device_type); mojom::PublicCredentialType PublicCredentialTypeToMojom( ::nearby::presence::PublicCredentialType public_credential_type); -mojom::MetadataPtr MetadataToMojom( - ::nearby::internal::DeviceIdentityMetaData metadata); +mojom::MetadataPtr MetadataToMojom(::nearby::internal::Metadata metadata); mojom::PrivateKeyPtr PrivateKeyToMojom( ::nearby::internal::LocalCredential::PrivateKey private_key);
diff --git a/chromeos/ash/components/nearby/presence/conversions/proto_conversions_unittest.cc b/chromeos/ash/components/nearby/presence/conversions/proto_conversions_unittest.cc index ff15914..22ac5b3 100644 --- a/chromeos/ash/components/nearby/presence/conversions/proto_conversions_unittest.cc +++ b/chromeos/ash/components/nearby/presence/conversions/proto_conversions_unittest.cc
@@ -10,9 +10,11 @@ namespace { +const std::string kUserEmail = "testtester@gmail.com"; const std::string kDeviceName = "Test's Chromebook"; +const std::string kUserName = "Test Tester"; +const std::string kProfileUrl = "https://example.com"; const std::string kMacAddress = "1A:2B:3C:4D:5E:6F"; -const std::string kDeviceId = "DeviceId"; const std::string kDusi = "11"; const std::string AdvertisementSigningKeyCertificateAlias = "NearbySharingYWJjZGVmZ2hpamtsbW5vcA"; @@ -81,15 +83,19 @@ class ProtoConversionsTest : public testing::Test {}; TEST_F(ProtoConversionsTest, BuildMetadata) { - ::nearby::internal::DeviceIdentityMetaData metadata = BuildMetadata( + ::nearby::internal::Metadata metadata = BuildMetadata( /*device_type=*/::nearby::internal::DeviceType::DEVICE_TYPE_LAPTOP, + /*account_name=*/kUserEmail, /*device_name=*/kDeviceName, - /*mac_address=*/kMacAddress, - /*device_id=*/kDeviceId); + /*user_name=*/kUserName, + /*profile_url=*/kProfileUrl, + /*mac_address=*/kMacAddress); + EXPECT_EQ(kUserEmail, metadata.account_name()); EXPECT_EQ(kDeviceName, metadata.device_name()); + EXPECT_EQ(kUserName, metadata.user_name()); + EXPECT_EQ(kProfileUrl, metadata.device_profile_url()); EXPECT_EQ(kMacAddress, metadata.bluetooth_mac_address()); - EXPECT_EQ(kDeviceId, metadata.device_id()); } TEST_F(ProtoConversionsTest, DeviceTypeToMojo) { @@ -111,18 +117,21 @@ } TEST_F(ProtoConversionsTest, MetadataToMojom) { - ::nearby::internal::DeviceIdentityMetaData metadata = BuildMetadata( + ::nearby::internal::Metadata metadata = BuildMetadata( /*device_type=*/::nearby::internal::DeviceType::DEVICE_TYPE_LAPTOP, + /*account_name=*/kUserEmail, /*device_name=*/kDeviceName, - /*mac_address=*/kMacAddress, - /*device_id=*/kDeviceId); + /*user_name=*/kUserName, + /*profile_url=*/kProfileUrl, + /*mac_address=*/kMacAddress); mojom::MetadataPtr mojo = MetadataToMojom(metadata); + EXPECT_EQ(kUserEmail, mojo->account_name); EXPECT_EQ(kDeviceName, mojo->device_name); + EXPECT_EQ(kUserName, mojo->user_name); + EXPECT_EQ(kProfileUrl, mojo->device_profile_url); EXPECT_EQ(kMacAddress, std::string(mojo->bluetooth_mac_address.begin(), mojo->bluetooth_mac_address.end())); - EXPECT_EQ(kDeviceId, - std::string(mojo->device_id.begin(), mojo->device_id.end())); } TEST_F(ProtoConversionsTest, IdentityTypeFromMojom) {
diff --git a/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.cc b/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.cc index 4af6d3f..c1d0dd1 100644 --- a/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.cc +++ b/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.cc
@@ -26,8 +26,7 @@ return device_id_; } -::nearby::internal::DeviceIdentityMetaData -FakeLocalDeviceDataProvider::GetDeviceMetadata() { +::nearby::internal::Metadata FakeLocalDeviceDataProvider::GetDeviceMetadata() { return metadata_; } @@ -59,7 +58,7 @@ } void FakeLocalDeviceDataProvider::SetDeviceMetadata( - ::nearby::internal::DeviceIdentityMetaData metadata) { + ::nearby::internal::Metadata metadata) { metadata_ = metadata; }
diff --git a/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.h b/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.h index 7559343..b5bccc3 100644 --- a/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.h +++ b/chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.h
@@ -12,7 +12,7 @@ namespace nearby::internal { class SharedCredential; -class DeviceIdentityMetaData; +class Metadata; } // namespace nearby::internal namespace ash::nearby::presence { @@ -32,7 +32,7 @@ const std::vector<::nearby::internal::SharedCredential>& shared_credentials) override; std::string GetDeviceId() override; - ::nearby::internal::DeviceIdentityMetaData GetDeviceMetadata() override; + ::nearby::internal::Metadata GetDeviceMetadata() override; std::string GetAccountName() override; void SaveUserRegistrationInfo(const std::string& display_name, const std::string& image_url) override; @@ -41,7 +41,7 @@ void SetHaveSharedCredentialsChanged(bool have_shared_credentials_changed); void SetDeviceId(std::string device_id); - void SetDeviceMetadata(::nearby::internal::DeviceIdentityMetaData metadata); + void SetDeviceMetadata(::nearby::internal::Metadata metadata); void SetAccountName(std::string account_name); void SetUpdatePersistedSharedCredentialsCallback(base::OnceClosure callback); void SetHaveSharedCredentialsChangedCallback(base::OnceClosure callback); @@ -56,7 +56,7 @@ bool is_registration_complete_ = false; bool user_info_saved_ = false; std::string device_id_; - ::nearby::internal::DeviceIdentityMetaData metadata_; + ::nearby::internal::Metadata metadata_; std::string account_name_; base::OnceClosure on_persist_credentials_callback_; base::OnceClosure have_shared_credentials_changed_callback_;
diff --git a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider.h b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider.h index 6d76409..aa512af 100644 --- a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider.h +++ b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider.h
@@ -10,7 +10,7 @@ namespace nearby::internal { class SharedCredential; -class DeviceIdentityMetaData; +class Metadata; } // namespace nearby::internal namespace ash::nearby::presence { @@ -33,12 +33,12 @@ const std::vector<::nearby::internal::SharedCredential>& new_shared_credentials) = 0; - // Returns the unique device identifier if it exists. If not, generates a + // Returns the unique device identifier if it exists. If not,generates a // unique device identifier, persists to prefs, and returns it. virtual std::string GetDeviceId() = 0; - // Constructs and returns metadata for the local device. - virtual ::nearby::internal::DeviceIdentityMetaData GetDeviceMetadata() = 0; + // Constructs and returns a Metadata object for the local device. + virtual ::nearby::internal::Metadata GetDeviceMetadata() = 0; // Returns the cacancolized account name for the user. virtual std::string GetAccountName() = 0;
diff --git a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.cc b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.cc index 3a769f96..9a734ad 100644 --- a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.cc +++ b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.cc
@@ -4,7 +4,6 @@ #include "chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.h" -#include "base/base64url.h" #include "base/containers/contains.h" #include "base/rand_util.h" #include "base/strings/string_util.h" @@ -15,23 +14,22 @@ #include "components/prefs/pref_service.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_manager.h" -#include "crypto/random.h" #include "google_apis/gaia/gaia_auth_util.h" #include "ui/base/l10n/l10n_util.h" #include "ui/chromeos/devicetype_utils.h" namespace { -// The device ID stored in `::nearby::internal::DeviceIdentityMetaData` -// is a 128-bit integer, represented by a byte (8-bits) array. -// This length of 16 is thus derived by dividing 128 by 8. -const size_t kDeviceIdLength = 16; +// Using the alphanumeric characters below, this provides 36^10 unique device +// IDs. Note that the uniqueness requirement is not global; the IDs are only +// used to differentiate between devices associated with a single GAIA account. +const size_t kDeviceIdLength = 10; -std::string GenerateDeviceId() { - std::vector<uint8_t> device_id_bytes = - crypto::RandBytesAsVector(kDeviceIdLength); - return std::string(device_id_bytes.begin(), device_id_bytes.end()); -} +// Possible characters used in a randomly generated device ID. +constexpr std::array<char, 36> kAlphaNumericChars = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; } // namespace @@ -82,18 +80,45 @@ } std::string LocalDeviceDataProviderImpl::GetDeviceId() { - auto decoded_device_id = FetchAndDecodeDeviceId(); + std::string id = + pref_service_->GetString(prefs::kNearbyPresenceDeviceIdPrefName); - if (!decoded_device_id) { - decoded_device_id = GenerateDeviceId(); - EncodeAndPersistDeviceId(decoded_device_id.value()); + // If the local device ID has already been generated, then return it. If this + // this is the first time `GetDeviceID` has been called, then generate the + // local device ID, persist it, and return it to callers. + if (!id.empty()) { + return id; } - return decoded_device_id.value(); + for (size_t i = 0; i < kDeviceIdLength; ++i) { + id += kAlphaNumericChars[base::RandGenerator(kAlphaNumericChars.size())]; + } + + pref_service_->SetString(prefs::kNearbyPresenceDeviceIdPrefName, id); + return id; } -::nearby::internal::DeviceIdentityMetaData -LocalDeviceDataProviderImpl::GetDeviceMetadata() { +std::string LocalDeviceDataProviderImpl::GetDeviceName() const { + // TODO(b/283987579): When NP Settings page is implemented, check for any + // changes to the user set device name. + std::u16string device_type = ui::GetChromeOSDeviceName(); + + const CoreAccountInfo account_info = + identity_manager_->GetPrimaryAccountInfo(signin::ConsentLevel::kSignin); + std::string given_name = + identity_manager_->FindExtendedAccountInfo(account_info).given_name; + + if (given_name.empty()) { + return base::UTF16ToUTF8(device_type); + } + + std::string device_name = + l10n_util::GetStringFUTF8(IDS_NEARBY_PRESENCE_DEVICE_NAME, + base::UTF8ToUTF16(given_name), device_type); + return device_name; +} + +::nearby::internal::Metadata LocalDeviceDataProviderImpl::GetDeviceMetadata() { std::string user_name = pref_service_->GetString(prefs::kNearbyPresenceUserNamePrefName); std::string profile_url = @@ -111,9 +136,11 @@ // broadcasting is not supported. return proto::BuildMetadata( /*device_type=*/::nearby::internal::DeviceType::DEVICE_TYPE_CHROMEOS, + /*account_name=*/GetAccountName(), /*device_name=*/GetDeviceName(), - /*mac_address=*/std::string(), - /*device_id=*/GetDeviceId()); + /*user_name=*/user_name, + /*profile_url=*/profile_url, + /*mac_address=*/std::string()); } std::string LocalDeviceDataProviderImpl::GetAccountName() { @@ -152,52 +179,4 @@ completed); } -std::string LocalDeviceDataProviderImpl::GetDeviceName() const { - // TODO(b/283987579): When NP Settings page is implemented, check for any - // changes to the user set device name. - std::u16string device_type = ui::GetChromeOSDeviceName(); - - const CoreAccountInfo account_info = - identity_manager_->GetPrimaryAccountInfo(signin::ConsentLevel::kSignin); - std::string given_name = - identity_manager_->FindExtendedAccountInfo(account_info).given_name; - - if (given_name.empty()) { - return base::UTF16ToUTF8(device_type); - } - - std::string device_name = - l10n_util::GetStringFUTF8(IDS_NEARBY_PRESENCE_DEVICE_NAME, - base::UTF8ToUTF16(given_name), device_type); - return device_name; -} - -std::optional<std::string> -LocalDeviceDataProviderImpl::FetchAndDecodeDeviceId() { - std::string encoded_device_id = - pref_service_->GetString(prefs::kNearbyPresenceDeviceIdPrefName); - if (encoded_device_id.empty()) { - return std::nullopt; - } - - std::string decoded_device_id; - if (!base::Base64UrlDecode(encoded_device_id, - base::Base64UrlDecodePolicy::REQUIRE_PADDING, - &decoded_device_id)) { - return std::nullopt; - } - - return decoded_device_id; -} - -void LocalDeviceDataProviderImpl::EncodeAndPersistDeviceId( - std::string raw_device_id_bytes) { - std::string encoded_device_id; - base::Base64UrlEncode(raw_device_id_bytes, - base::Base64UrlEncodePolicy::INCLUDE_PADDING, - &encoded_device_id); - pref_service_->SetString(prefs::kNearbyPresenceDeviceIdPrefName, - encoded_device_id); -} - } // namespace ash::nearby::presence
diff --git a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.h b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.h index a3fb8f0..18326f7 100644 --- a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.h +++ b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.h
@@ -35,7 +35,7 @@ const std::vector<::nearby::internal::SharedCredential>& new_shared_credentials) override; std::string GetDeviceId() override; - ::nearby::internal::DeviceIdentityMetaData GetDeviceMetadata() override; + ::nearby::internal::Metadata GetDeviceMetadata() override; std::string GetAccountName() override; void SaveUserRegistrationInfo(const std::string& display_name, const std::string& image_url) override; @@ -48,9 +48,6 @@ // just the device type. std::string GetDeviceName() const; - std::optional<std::string> FetchAndDecodeDeviceId(); - void EncodeAndPersistDeviceId(std::string raw_device_id_bytes); - const raw_ptr<PrefService> pref_service_; const raw_ptr<signin::IdentityManager> identity_manager_; };
diff --git a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl_unittest.cc b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl_unittest.cc index f3a133a..0426b99 100644 --- a/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl_unittest.cc +++ b/chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl_unittest.cc
@@ -67,10 +67,15 @@ TEST_F(LocalDeviceDataProviderImplTest, DeviceId) { CreateDataProvider(); + // A 10-character alphanumeric ID is automatically generated if one doesn't + // already exist. std::string id = local_device_data_provider_->GetDeviceId(); - EXPECT_EQ(16u, id.size()); + EXPECT_EQ(10u, id.size()); + for (const char c : id) { + EXPECT_TRUE(absl::ascii_isalnum(static_cast<unsigned char>(c))); + } - // Ensure the ID is persisted. + // The ID is persisted. DestroyDataProvider(); CreateDataProvider(); EXPECT_EQ(id, local_device_data_provider_->GetDeviceId()); @@ -101,7 +106,7 @@ // Assume that without the given name, the device name is just the // device type. - ::nearby::internal::DeviceIdentityMetaData metadata = + ::nearby::internal::Metadata metadata = local_device_data_provider_->GetDeviceMetadata(); EXPECT_EQ(base::UTF16ToUTF8(ui::GetChromeOSDeviceName()), metadata.device_name()); @@ -117,6 +122,9 @@ metadata.device_name()); // Confirm the other fields are expected. + EXPECT_EQ(kCanocalizedUserEmail, metadata.account_name()); + EXPECT_EQ(kUserName, metadata.user_name()); + EXPECT_EQ(kProfileUrl, metadata.device_profile_url()); EXPECT_EQ(::nearby::internal::DeviceType::DEVICE_TYPE_CHROMEOS, metadata.device_type()); EXPECT_EQ(std::string(), metadata.bluetooth_mac_address());
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc index 601b7b2..3eb7f06 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc
@@ -34,6 +34,7 @@ namespace { +const std::string kUserEmail = "testtester@gmail.com"; const std::string kDeviceName = "Test's Chromebook"; const std::string kUserName = "Test Tester"; const std::string kProfileUrl = "https://example.com"; @@ -44,11 +45,6 @@ base::Seconds(0), base::Seconds(15), base::Seconds(30), base::Minutes(1), base::Minutes(2), base::Minutes(5), base::Minutes(10)}; constexpr int kServerCommunicationMaxAttempts = 5; -const std::vector<uint8_t> kBluetoothMacAddress = {0x12, 0x34, 0x56, - 0x78, 0x9a, 0xbc}; -const std::vector<uint8_t> kMetadataDeviceId = { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}; const long kId1 = 111; const long kId2 = 222; const long kId3 = 333; @@ -78,14 +74,14 @@ return shared_credentials; } -::nearby::internal::DeviceIdentityMetaData BuildTestMetadata() { +::nearby::internal::Metadata BuildTestMetadata() { return ash::nearby::presence::proto::BuildMetadata( /*device_type=*/::nearby::internal::DeviceType::DEVICE_TYPE_CHROMEOS, + /*account_name=*/kUserEmail, /*device_name=*/kDeviceName, - /*bluetooth_mac_address=*/ - std::string(kBluetoothMacAddress.begin(), kBluetoothMacAddress.end()), - /*device_id=*/ - std::string(kMetadataDeviceId.begin(), kMetadataDeviceId.end())); + /*user_name=*/kUserName, + /*profile_url=*/kProfileUrl, + /*mac_address=*/std::string()); } } // namespace @@ -138,10 +134,6 @@ // Simulate first time registration flow. fake_local_device_data_provider_->SetRegistrationComplete(false); - // Even before registration, the LocalDeviceDataProvider can provide - // all fields in its Metadata. Simulate that. - fake_local_device_data_provider_->SetDeviceMetadata(BuildTestMetadata()); - // Simulate the device id which will be generated in a call to // |GetDeviceId|. fake_local_device_data_provider_->SetDeviceId(kDeviceId); @@ -231,6 +223,7 @@ void SimulateDeviceAlreadyRegistered() { // Simulate that it is not first time registration flow. fake_local_device_data_provider_->SetRegistrationComplete(true); + fake_local_device_data_provider_->SetDeviceMetadata(BuildTestMetadata()); fake_local_device_data_provider_->SaveUserRegistrationInfo( /*display_name=*/kUserName, /*image_url=*/kProfileUrl); } @@ -357,11 +350,12 @@ auto* local_device_metadata = fake_nearby_presence_.GetLocalDeviceMetadata(); EXPECT_TRUE(local_device_metadata); + EXPECT_EQ(kProfileUrl, local_device_metadata->device_profile_url); + EXPECT_EQ(kUserName, local_device_metadata->user_name); + EXPECT_EQ(kUserEmail, local_device_metadata->account_name); EXPECT_EQ(mojom::PresenceDeviceType::kChromeos, local_device_metadata->device_type); EXPECT_EQ(kDeviceName, local_device_metadata->device_name); - EXPECT_EQ(kBluetoothMacAddress, local_device_metadata->bluetooth_mac_address); - EXPECT_EQ(kMetadataDeviceId, local_device_metadata->device_id); } TEST_F(NearbyPresenceCredentialManagerImplTest, RegistrationSuccess) {
diff --git a/chromeos/ash/components/nearby/presence/nearby_presence_service_impl.cc b/chromeos/ash/components/nearby/presence/nearby_presence_service_impl.cc index f32f78d..616795d 100644 --- a/chromeos/ash/components/nearby/presence/nearby_presence_service_impl.cc +++ b/chromeos/ash/components/nearby/presence/nearby_presence_service_impl.cc
@@ -45,25 +45,26 @@ } } -::nearby::internal::DeviceIdentityMetaData ConvertMetadataFromMojom( +::nearby::internal::Metadata ConvertMetadataFromMojom( ash::nearby::presence::mojom::Metadata* metadata) { - ::nearby::internal::DeviceIdentityMetaData proto; + ::nearby::internal::Metadata proto; proto.set_device_type(ConvertMojomDeviceType(metadata->device_type)); + proto.set_account_name(metadata->account_name); + proto.set_user_name(metadata->user_name); proto.set_device_name(metadata->device_name); + proto.set_user_name(metadata->user_name); + proto.set_device_profile_url(metadata->device_profile_url); proto.set_bluetooth_mac_address( std::string(metadata->bluetooth_mac_address.begin(), metadata->bluetooth_mac_address.end())); - proto.set_device_id( - std::string(metadata->device_id.begin(), metadata->device_id.end())); return proto; } ::nearby::presence::PresenceDevice BuildPresenceDevice( ash::nearby::presence::mojom::PresenceDevicePtr device) { ::nearby::presence::PresenceDevice presence_device(device->endpoint_id); - presence_device.SetDeviceIdentityMetaData( - ConvertMetadataFromMojom(device->metadata.get())); + presence_device.SetMetadata(ConvertMetadataFromMojom(device->metadata.get())); for (auto action : device->actions) { presence_device.AddAction(static_cast<uint32_t>(action)); }
diff --git a/chromeos/ash/components/nearby/presence/nearby_presence_service_impl_unittest.cc b/chromeos/ash/components/nearby/presence/nearby_presence_service_impl_unittest.cc index 2d1518c..a6e2efb 100644 --- a/chromeos/ash/components/nearby/presence/nearby_presence_service_impl_unittest.cc +++ b/chromeos/ash/components/nearby/presence/nearby_presence_service_impl_unittest.cc
@@ -26,15 +26,15 @@ namespace ash::nearby::presence { -const char kDeviceName[] = "DeviceName"; +const char kAccountName[] = "Pepper@gmail.com"; +const char kDeviceName[] = "Pepper's Request"; +const char kDeviceProfileUrl[] = "some_url"; const char kEndpointId[] = "00000001"; const char kStableDeviceId[] = "00000002"; +const char kUserName[] = "Pepper"; const char kMalformedTypeId[] = "not_nearby_presence"; const char kMalformedClientId[] = "not_nearby"; const std::vector<uint8_t> kMacAddress = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11}; -const std::vector<uint8_t> kDeviceId = {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, - 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, - 0x89, 0xab, 0xcd, 0xef}; const mojom::ActionType kAction1 = mojom::ActionType::kInstantTetheringAction; const mojom::ActionType kAction2 = mojom::ActionType::kActiveUnlockAction; const mojom::ActionType kAction3 = mojom::ActionType::kPhoneHubAction; @@ -153,7 +153,8 @@ mojom::PresenceDevice::New( kEndpointId, actions, kStableDeviceId, mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, - kDeviceName, kMacAddress, kDeviceId), + kAccountName, kDeviceName, kUserName, + kDeviceProfileUrl, kMacAddress), /*decrypt_shared_credential=*/nullptr)); run_loop.Run(); } @@ -261,8 +262,9 @@ fake_nearby_presence_.ReturnScanObserver()->OnDeviceChanged( mojom::PresenceDevice::New( kEndpointId, actions, kStableDeviceId, - mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, kDeviceName, - kMacAddress, kDeviceId), + mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, + kAccountName, kDeviceName, kUserName, + kDeviceProfileUrl, kMacAddress), /*decrypt_shared_credential=*/nullptr)); run_loop.Run(); } @@ -297,8 +299,9 @@ fake_nearby_presence_.ReturnScanObserver()->OnDeviceLost( mojom::PresenceDevice::New( kEndpointId, actions, kStableDeviceId, - mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, kDeviceName, - kMacAddress, kDeviceId), + mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, + kAccountName, kDeviceName, kUserName, + kDeviceProfileUrl, kMacAddress), /*decrypt_shared_credential=*/nullptr)); run_loop.Run(); } @@ -335,8 +338,9 @@ fake_nearby_presence_.ReturnScanObserver()->OnDeviceFound( mojom::PresenceDevice::New( kEndpointId, actions, kStableDeviceId, - mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, kDeviceName, - kMacAddress, kDeviceId), + mojom::Metadata::New(mojom::PresenceDeviceType::kPhone, + kAccountName, kDeviceName, kUserName, + kDeviceProfileUrl, kMacAddress), /*decrypt_shared_credential=*/nullptr)); // Allow the ScanObserver function to finish before checking EXPECTs.
diff --git a/chromeos/ash/components/quick_start/BUILD.gn b/chromeos/ash/components/quick_start/BUILD.gn index e02bcd6..3182bc2c 100644 --- a/chromeos/ash/components/quick_start/BUILD.gn +++ b/chromeos/ash/components/quick_start/BUILD.gn
@@ -38,7 +38,7 @@ public_deps = [ ":quick_start" ] deps = [ "//base", - "//chrome/browser/nearby_sharing/public/cpp", + "//chromeos/ash/components/nearby/common/connections_manager", "//chromeos/ash/services/nearby/public/mojom:mojom", "//components/cbor", "//crypto",
diff --git a/chromeos/ash/components/quick_start/quick_start_metrics.cc b/chromeos/ash/components/quick_start/quick_start_metrics.cc index 828ba1a..0173c8e 100644 --- a/chromeos/ash/components/quick_start/quick_start_metrics.cc +++ b/chromeos/ash/components/quick_start/quick_start_metrics.cc
@@ -81,6 +81,47 @@ constexpr const char kGaiaAuthenticationDurationHistogramName[] = "QuickStart.GaiaAuthentication.Duration"; constexpr const char kScreenOpened[] = "QuickStart.ScreenOpened"; +constexpr const char kScreenNameAddChild[] = "QuickStart.ScreenClosed.AddChild"; +constexpr const char + kScreenNameCheckingForUpdateAndDeterminingDeviceConfiguration[] = + "QuickStart.ScreenClosed." + "CheckingForUpdateAndDeterminingDeviceConfiguration"; +constexpr const char kScreenNameChooseChromebookSetup[] = + "QuickStart.ScreenClosed.ChooseChromebookSetup"; +constexpr const char kScreenNameConsumerUpdate[] = + "QuickStart.ScreenClosed.ConsumerUpdate"; +constexpr const char kScreenNameGaiaInfoScreen[] = + "QuickStart.ScreenClosed.GaiaInfoScreen"; +constexpr const char kScreenNameGaiaScreen[] = + "QuickStart.ScreenClosed.GaiaScreen"; +constexpr const char kScreenNameNetworkScreen[] = + "QuickStart.ScreenClosed.Other"; +constexpr const char kScreenNameNone[] = "QuickStart.ScreenClosed.None"; +constexpr const char kScreenNameOther[] = "QuickStart.ScreenClosed.Other"; +constexpr const char kScreenNameQSComplete[] = + "QuickStart.ScreenClosed.QSComplete"; +constexpr const char kScreenNameQSConnectingToWifi[] = + "QuickStart.ScreenClosed.QSConnectingToWifi"; +constexpr const char kScreenNameQSResumingConnectionAfterUpdate[] = + "QuickStart.ScreenClosed.QSResumingConnectionAfterUpdate"; +constexpr const char kScreenNameQSSelectGoogleAccount[] = + "QuickStart.ScreenClosed.QSSelectGoogleAccount"; +constexpr const char kScreenNameQSSetUpWithAndroidPhone[] = + "QuickStart.ScreenClosed.QSSetUpWithAndroidPhone"; +constexpr const char kScreenNameQSWifiCredentialsReceived[] = + "QuickStart.ScreenClosed.QSWifiCredentialsReceived"; +constexpr const char kScreenNameReviewPrivacyAndTerms[] = + "QuickStart.ScreenClosed.ReviewPrivacyAndTerms"; +constexpr const char kScreenNameSetupDevicePIN[] = + "QuickStart.ScreenClosed.SetupDevicePIN"; +constexpr const char kScreenNameUnifiedSetup[] = + "QuickStart.ScreenClosed.UnifiedSetup"; +constexpr const char kScreenNameWelcomeScreen[] = + "QuickStart.ScreenClosed.WelcomeScreen"; +constexpr const char kScreenNameQSGettingGoogleAccountInfo[] = + "QuickStart.ScreenClosed.QSGettingGoogleAccountInfo"; +constexpr const char kScreenNameQSCreatingAccount[] = + "QuickStart.ScreenClosed.QSCreatingAccount"; std::string MapMessageTypeToMetric( QuickStartMetrics::MessageType message_type) { @@ -104,6 +145,56 @@ } } +std::string MapScreenNameToMetric(QuickStartMetrics::ScreenName screen_name) { + switch (screen_name) { + case QuickStartMetrics::ScreenName::kNone: + return kScreenNameNone; + case QuickStartMetrics::ScreenName::kWelcomeScreen: + return kScreenNameWelcomeScreen; + case QuickStartMetrics::ScreenName::kNetworkScreen: + return kScreenNameNetworkScreen; + case QuickStartMetrics::ScreenName::kGaiaScreen: + return kScreenNameGaiaScreen; + case QuickStartMetrics::ScreenName::kQSSetUpWithAndroidPhone: + return kScreenNameQSSetUpWithAndroidPhone; + case QuickStartMetrics::ScreenName::kQSConnectingToWifi: + return kScreenNameQSConnectingToWifi; + case QuickStartMetrics::ScreenName:: + kCheckingForUpdateAndDeterminingDeviceConfiguration: + return kScreenNameCheckingForUpdateAndDeterminingDeviceConfiguration; + case QuickStartMetrics::ScreenName::kChooseChromebookSetup: + return kScreenNameChooseChromebookSetup; + case QuickStartMetrics::ScreenName::kConsumerUpdate: + return kScreenNameConsumerUpdate; + case QuickStartMetrics::ScreenName::kQSResumingConnectionAfterUpdate: + return kScreenNameQSResumingConnectionAfterUpdate; + case QuickStartMetrics::ScreenName::kQSGettingGoogleAccountInfo: + return kScreenNameQSGettingGoogleAccountInfo; + case QuickStartMetrics::ScreenName::kQSComplete: + return kScreenNameQSComplete; + case QuickStartMetrics::ScreenName::kSetupDevicePIN: + return kScreenNameSetupDevicePIN; + case QuickStartMetrics::ScreenName::kAddChild: + return kScreenNameAddChild; + case QuickStartMetrics::ScreenName::kReviewPrivacyAndTerms: + return kScreenNameReviewPrivacyAndTerms; + case QuickStartMetrics::ScreenName::kUnifiedSetup: + return kScreenNameUnifiedSetup; + case QuickStartMetrics::ScreenName::kGaiaInfoScreen: + return kScreenNameGaiaInfoScreen; + case QuickStartMetrics::ScreenName::kQSWifiCredentialsReceived: + return kScreenNameQSWifiCredentialsReceived; + case QuickStartMetrics::ScreenName::kQSSelectGoogleAccount: + return kScreenNameQSSelectGoogleAccount; + case QuickStartMetrics::ScreenName::kQSCreatingAccount: + return kScreenNameQSCreatingAccount; + case QuickStartMetrics::ScreenName::kOther: + [[fallthrough]]; + default: + return kScreenNameOther; + } +} + } // namespace // static @@ -130,21 +221,6 @@ } // static -void QuickStartMetrics::RecordScreenOpened(ScreenName screen) { - // TODO(b/298042953): Add metric for previous screen. - base::UmaHistogramEnumeration(kScreenOpened, screen); -} - -// static -void QuickStartMetrics::RecordScreenClosed( - ScreenName screen, - int32_t session_id, - base::Time timestamp, - std::optional<ScreenName> previous_screen) { - // TODO(b/298042953): Add metric for screen duration. -} - -// static void QuickStartMetrics::RecordWifiTransferResult( bool succeeded, std::optional<WifiTransferResultFailureReason> failure_reason) { @@ -186,6 +262,18 @@ challenge_bytes_fetch_timer_.reset(); } +void QuickStartMetrics::RecordScreenOpened(ScreenName screen) { + base::UmaHistogramEnumeration(kScreenOpened, screen); + screen_opened_view_duration_timer_ = std::make_unique<base::ElapsedTimer>(); +} + +void QuickStartMetrics::RecordScreenClosed(ScreenName screen) { + // TODO(b/298042953): Add ScreenClosedReason + base::UmaHistogramTimes(MapScreenNameToMetric(screen) + ".ViewDuration", + screen_opened_view_duration_timer_->Elapsed()); + screen_opened_view_duration_timer_.reset(); +} + void QuickStartMetrics::RecordAttestationCertificateRequested() { CHECK(!attestation_certificate_timer_) << "Only 1 attestation certificate request can be active at a time";
diff --git a/chromeos/ash/components/quick_start/quick_start_metrics.h b/chromeos/ash/components/quick_start/quick_start_metrics.h index 02e4bcc..5532aed 100644 --- a/chromeos/ash/components/quick_start/quick_start_metrics.h +++ b/chromeos/ash/components/quick_start/quick_start_metrics.h
@@ -48,7 +48,9 @@ // transfer succeeds. kQSSelectGoogleAccount = 19, // Quick Start UI informing user to confirm // account on phone. - kMaxValue = kQSSelectGoogleAccount + kQSCreatingAccount = 20, // Quick Start UI attempting to login with + // transferred account details. + kMaxValue = kQSCreatingAccount }; enum class ExitReason { @@ -206,13 +208,6 @@ static MessageType MapResponseToMessageType( QuickStartResponseType response_type); - static void RecordScreenOpened(ScreenName screen); - - static void RecordScreenClosed(ScreenName screen, - int32_t session_id, - base::Time timestamp, - std::optional<ScreenName> previous_screen); - static void RecordWifiTransferResult( bool succeeded, std::optional<WifiTransferResultFailureReason> failure_reason); @@ -236,6 +231,10 @@ const QuickStartMetrics& operator=(const QuickStartMetrics&) = delete; virtual ~QuickStartMetrics(); + void RecordScreenOpened(ScreenName screen); + + void RecordScreenClosed(ScreenName screen); + // Records the start of an attempt to fetch challenge bytes from Gaia. // Challenge bytes are later used to generate a Remote Attestation certificate // and a FIDO assertion. @@ -293,6 +292,8 @@ std::unique_ptr<base::ElapsedTimer> fast_pair_advertising_timer_; std::optional<AdvertisingMethod> fast_pair_advertising_method_; + std::unique_ptr<base::ElapsedTimer> screen_opened_view_duration_timer_; + // Timer to keep track of handshake duration. Should be constructed when // the handshake starts and destroyed when the handshake finishes. std::unique_ptr<base::ElapsedTimer> handshake_elapsed_timer_;
diff --git a/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.cc b/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.cc index 0623e55..7fefbb1 100644 --- a/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.cc +++ b/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.cc
@@ -14,12 +14,70 @@ namespace ash { namespace { + WifiP2PController* g_wifi_p2p_controller = nullptr; + +WifiP2PController::OperationResult ShillResultToEnum( + const std::string& shill_result_code) { + if (shill_result_code == shill::kCreateP2PGroupResultSuccess || + shill_result_code == shill::kConnectToP2PGroupResultSuccess) { + return WifiP2PController::OperationResult::kSuccess; + } + if (shill_result_code == shill::kCreateP2PGroupResultNotAllowed || + shill_result_code == shill::kConnectToP2PGroupResultNotAllowed) { + return WifiP2PController::OperationResult::kNotAllowed; + } + if (shill_result_code == shill::kCreateP2PGroupResultNotSupported || + shill_result_code == shill::kConnectToP2PGroupResultNotSupported) { + return WifiP2PController::OperationResult::kNotSupported; + } + if (shill_result_code == + shill::kCreateP2PGroupResultConcurrencyNotSupported || + shill_result_code == + shill::kConnectToP2PGroupResultConcurrencyNotSupported) { + return WifiP2PController::OperationResult::kConcurrencyNotSupported; + } + if (shill_result_code == shill::kCreateP2PGroupResultTimeout || + shill_result_code == shill::kConnectToP2PGroupResultTimeout) { + return WifiP2PController::OperationResult::kTimeout; + } + if (shill_result_code == shill::kCreateP2PGroupResultFrequencyNotSupported || + shill_result_code == + shill::kConnectToP2PGroupResultFrequencyNotSupported) { + return WifiP2PController::OperationResult::kFrequencyNotSupported; + } + if (shill_result_code == shill::kCreateP2PGroupResultBadSSID || + shill_result_code == shill::kCreateP2PGroupResultInvalidArguments || + shill_result_code == shill::kConnectToP2PGroupResultInvalidArguments) { + return WifiP2PController::OperationResult::kInvalidArguments; + } + if (shill_result_code == shill::kCreateP2PGroupResultOperationInProgress || + shill_result_code == shill::kConnectToP2PGroupResultOperationInProgress) { + return WifiP2PController::OperationResult::kOperationInProgress; + } + if (shill_result_code == shill::kCreateP2PGroupResultOperationFailed || + shill_result_code == shill::kConnectToP2PGroupResultOperationFailed) { + return WifiP2PController::OperationResult::kOperationFailed; + } + if (shill_result_code == shill::kConnectToP2PGroupResultAuthFailure) { + return WifiP2PController::OperationResult::kAuthFailure; + } + if (shill_result_code == shill::kConnectToP2PGroupResultGroupNotFound) { + return WifiP2PController::OperationResult::kGroupNotFound; + } + if (shill_result_code == shill::kConnectToP2PGroupResultAlreadyConnected) { + return WifiP2PController::OperationResult::kAlreadyConnected; + } + + NET_LOG(ERROR) << "Unexpected result code: " << shill_result_code; + return WifiP2PController::OperationResult::kUnknownError; +} + } // namespace -WifiP2PController::WifiP2PController() {} +WifiP2PController::WifiP2PController() = default; -WifiP2PController::~WifiP2PController() {} +WifiP2PController::~WifiP2PController() = default; void WifiP2PController::Init() { ShillManagerClient::Get()->SetProperty( @@ -64,4 +122,162 @@ return g_wifi_p2p_controller; } +void WifiP2PController::CreateWifiP2PGroup(const std::string& ssid, + const std::string& passphrase, + WifiP2PGroupCallback callback) { + auto callback_split = base::SplitOnceCallback(std::move(callback)); + ShillManagerClient::Get()->CreateP2PGroup( + ShillManagerClient::CreateP2PGroupParameter{ + ssid, + passphrase, + /*frequency=*/std::nullopt, + }, + base::BindOnce(&WifiP2PController::OnCreateOrConnectP2PGroupSuccess, + weak_ptr_factory_.GetWeakPtr(), /*create_group=*/true, + std::move(callback_split.first)), + base::BindOnce(&WifiP2PController::OnCreateOrConnectP2PGroupFailure, + weak_ptr_factory_.GetWeakPtr(), + std::move(callback_split.second))); +} + +void WifiP2PController::OnCreateOrConnectP2PGroupSuccess( + bool create_group, + WifiP2PGroupCallback callback, + base::Value::Dict result_dict) { + NET_LOG(EVENT) << "CreateOrConnectP2PGroup operation succeeded with result: " + << result_dict; + + const std::string* result_code = + result_dict.FindString(shill::kP2PResultCode); + if (!result_code) { + std::move(callback).Run(OperationResult::kInvalidResultCode, + /*metadata=*/std::nullopt); + return; + } + + const OperationResult result = ShillResultToEnum(*result_code); + if (result != OperationResult::kSuccess) { + std::move(callback).Run(result, /*metadata=*/std::nullopt); + return; + } + + std::optional<int> shill_id = result_dict.FindInt(shill::kP2PDeviceShillID); + if (!shill_id) { + NET_LOG(ERROR) << "Missing shill_id in Wifi direct operation response when " + "result code is success"; + std::move(callback).Run(OperationResult::kInvalidResultCode, + /*metadata=*/std::nullopt); + return; + } + + ShillManagerClient::Get()->GetProperties(base::BindOnce( + &WifiP2PController::GetP2PGroupMetadata, weak_ptr_factory_.GetWeakPtr(), + *shill_id, create_group, std::move(callback))); +} + +void WifiP2PController::GetP2PGroupMetadata( + int shill_id, + bool is_owner, + WifiP2PGroupCallback callback, + std::optional<base::Value::Dict> properties) { + if (!properties) { + NET_LOG(ERROR) << "Error getting Shill manager properties."; + std::move(callback).Run(OperationResult::kInvalidGroupProperties, + /*metadata=*/std::nullopt); + return; + } + + base::Value::List* entry_list = + properties->FindList(is_owner ? shill::kP2PGroupInfosProperty + : shill::kP2PClientInfosProperty); + if (!entry_list || entry_list->size() == 0) { + std::move(callback).Run(OperationResult::kInvalidGroupProperties, + /*metadata=*/std::nullopt); + return; + } + + if (entry_list->size() > 1) { + NET_LOG(ERROR) << "Found more than one P2P group info."; + } + + for (const auto& entry : *entry_list) { + if (!entry.is_dict()) { + continue; + } + + auto& entry_dict = entry.GetDict(); + std::optional<int> entry_shill_id = + entry_dict.FindInt(is_owner ? shill::kP2PGroupInfoShillIDProperty + : shill::kP2PClientInfoShillIDProperty); + std::optional<int> entry_frequency = + entry_dict.FindInt(is_owner ? shill::kP2PGroupInfoFrequencyProperty + : shill::kP2PClientInfoFrequencyProperty); + std::optional<int> entry_network_id = + entry_dict.FindInt(is_owner ? shill::kP2PGroupInfoNetworkIDProperty + : shill::kP2PClientInfoNetworkIDProperty); + if (!entry_shill_id) { + NET_LOG(ERROR) << "Missing shill id in Wifi Direct group"; + continue; + } + if (*entry_shill_id != shill_id) { + NET_LOG(EVENT) << "Found mis-match Wifi Direct group with shill_id: " + << *entry_shill_id << ", skipped."; + continue; + } + if (!entry_frequency) { + NET_LOG(ERROR) << "Missing frequency property in Wifi Direct group"; + std::move(callback).Run(OperationResult::kInvalidGroupProperties, + /*metadata=*/std::nullopt); + return; + } + if (!entry_network_id) { + NET_LOG(ERROR) << "Missing network id property in Wifi Direct group"; + std::move(callback).Run(OperationResult::kInvalidGroupProperties, + /*metadata=*/std::nullopt); + return; + } + + std::move(callback).Run( + OperationResult::kSuccess, + WifiDirectConnectionMetadata{shill_id, + static_cast<uint32_t>(*entry_frequency), + *entry_network_id}); + return; + } + + NET_LOG(ERROR) << "Did not find the matched P2P group info with shill_id: " + << shill_id; + std::move(callback).Run(OperationResult::kInvalidGroupProperties, + /*metadata=*/std::nullopt); +} + +void WifiP2PController::OnCreateOrConnectP2PGroupFailure( + WifiP2PGroupCallback callback, + const std::string& error_name, + const std::string& error_message) { + NET_LOG(ERROR) << "Create or connect to P2PGroup failed due to DBus error: " + << error_name << ", message: " << error_message; + std::move(callback).Run(OperationResult::kDBusError, + /*metadata=*/std::nullopt); +} + +void WifiP2PController::ConnectToWifiP2PGroup(const std::string& ssid, + const std::string& passphrase, + std::optional<uint32_t> frequency, + WifiP2PGroupCallback callback) { + auto callback_split = base::SplitOnceCallback(std::move(callback)); + ShillManagerClient::Get()->ConnectToP2PGroup( + ShillManagerClient::ConnectP2PGroupParameter{ + ssid, + passphrase, + frequency, + }, + base::BindOnce(&WifiP2PController::OnCreateOrConnectP2PGroupSuccess, + weak_ptr_factory_.GetWeakPtr(), /*create_group=*/false, + std::move(callback_split.first)), + base::BindOnce(&WifiP2PController::OnCreateOrConnectP2PGroupFailure, + weak_ptr_factory_.GetWeakPtr(), + std::move(callback_split.second))); +} + } // namespace ash
diff --git a/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.h b/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.h index db61881..397cb37 100644 --- a/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.h +++ b/chromeos/ash/components/wifi_p2p/wifi_p2p_controller.h
@@ -36,6 +36,70 @@ // Returns true if the global instance has been initialized. static bool IsInitialized(); + // Wifi direct group metadata includes: shill_id and frequency. + struct WifiDirectConnectionMetadata { + // Unique ID to identify the Wifi direct group. + int shill_id; + // The operating frequency of the Wifi direct group network. + uint32_t frequency; + // Unique ID to identify the network in Patchpanel. + int network_id; + }; + + enum OperationResult { + kSuccess, + // Wifi direct is disallowed in platform per Manager.P2PAllowed. + kNotAllowed, + // Wifi direct operation is not supported in the platform. + kNotSupported, + // Creating Wifi direct interface is not possible with existing interfaces. + kConcurrencyNotSupported, + // The requested refruency is not supported. + kFrequencyNotSupported, + // Wifi direct group rejects the authentication attempt. + kAuthFailure, + // Didn't discover the Wifi direct group. + kGroupNotFound, + // Already connected to the Wifi direct group. + kAlreadyConnected, + // Wifi direct operation is already in progress. + kOperationInProgress, + // Invalid arguments. + kInvalidArguments, + // Wifi direct operation timed out. + kTimeout, + // Wifi direct operation response has an invalid result code. + kInvalidResultCode, + // Wifi direct group miss or has invalid properties. + kInvalidGroupProperties, + // Wifi direct operation failure. + kOperationFailed, + // Wifi direct operation failed due to DBus error. + kDBusError, + // Unknown error. + kUnknownError, + }; + + // Return callback for the CreateWifiP2PGroup or ConnectToWifiP2PGroup + // methods. + using WifiP2PGroupCallback = base::OnceCallback<void( + OperationResult result, + std::optional<WifiDirectConnectionMetadata> metadata)>; + + // Create a Wifi P2P group with the given `ssid` and `passphrase`. + void CreateWifiP2PGroup(const std::string& ssid, + const std::string& passphrase, + WifiP2PGroupCallback callback); + + // Connect to a Wifi P2P group with given `ssid` and `passphrase`. If + // `frequency` is provided, the operation will fail if no group found at the + // specified frequency. If it is omitted, the system will scan full supported + // channels to find the group. + void ConnectToWifiP2PGroup(const std::string& ssid, + const std::string& passphrase, + std::optional<uint32_t> frequency, + WifiP2PGroupCallback callback); + private: WifiP2PController(); WifiP2PController(const WifiP2PController&) = delete; @@ -44,6 +108,18 @@ void Init(); + void OnCreateOrConnectP2PGroupSuccess(bool create_group, + WifiP2PGroupCallback callback, + base::Value::Dict result); + + void OnCreateOrConnectP2PGroupFailure(WifiP2PGroupCallback callback, + const std::string& error_name, + const std::string& error_message); + void GetP2PGroupMetadata(int shill_id, + bool is_owner, + WifiP2PGroupCallback callback, + std::optional<base::Value::Dict> properties); + // Callback when set shill manager property operation failed. void OnSetManagerPropertyFailure(const std::string& property_name, const std::string& error_name,
diff --git a/chromeos/ash/components/wifi_p2p/wifi_p2p_controller_unittest.cc b/chromeos/ash/components/wifi_p2p/wifi_p2p_controller_unittest.cc index efb3497..189eab8 100644 --- a/chromeos/ash/components/wifi_p2p/wifi_p2p_controller_unittest.cc +++ b/chromeos/ash/components/wifi_p2p/wifi_p2p_controller_unittest.cc
@@ -9,6 +9,7 @@ #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "base/values.h" +#include "chromeos/ash/components/dbus/shill/fake_shill_manager_client.h" #include "chromeos/ash/components/dbus/shill/shill_clients.h" #include "chromeos/ash/components/dbus/shill/shill_manager_client.h" #include "testing/gtest/include/gtest/gtest.h" @@ -18,10 +19,25 @@ class WifiP2PControllerTest : public ::testing::Test { public: + struct WifiP2POperationTestResult { + WifiP2PController::OperationResult result; + std::optional<WifiP2PController::WifiDirectConnectionMetadata> metadata; + }; + void SetUp() override { shill_clients::InitializeFakes(); } void TearDown() override { shill_clients::Shutdown(); } + void Init(bool enable_flag = true) { + if (enable_flag) { + feature_list_.InitAndEnableFeature(features::kWifiDirect); + } else { + feature_list_.InitAndDisableFeature(features::kWifiDirect); + } + WifiP2PController::Initialize(); + base::RunLoop().RunUntilIdle(); + } + void OnGetManagerCallback(const std::string& property_name, bool expected_value, std::optional<base::Value::Dict> result) { @@ -38,6 +54,43 @@ EXPECT_EQ(expected_value, *actual_value); } + WifiP2POperationTestResult CreateP2PGroup(const std::string& ssid, + const std::string& passphrase) { + WifiP2POperationTestResult test_result; + base::RunLoop run_loop; + WifiP2PController::Get()->CreateWifiP2PGroup( + ssid, passphrase, + base::BindLambdaForTesting( + [&](WifiP2PController::OperationResult result, + std::optional<WifiP2PController::WifiDirectConnectionMetadata> + metadata) { + test_result.result = result; + test_result.metadata = metadata; + run_loop.Quit(); + })); + base::RunLoop().RunUntilIdle(); + return test_result; + } + + WifiP2POperationTestResult ConnectP2PGroup(const std::string& ssid, + const std::string& passphrase, + uint32_t frequency) { + WifiP2POperationTestResult test_result; + base::RunLoop run_loop; + WifiP2PController::Get()->ConnectToWifiP2PGroup( + ssid, passphrase, frequency, + base::BindLambdaForTesting( + [&](WifiP2PController::OperationResult result, + std::optional<WifiP2PController::WifiDirectConnectionMetadata> + metadata) { + test_result.result = result; + test_result.metadata = metadata; + run_loop.Quit(); + })); + base::RunLoop().RunUntilIdle(); + return test_result; + } + protected: base::test::TaskEnvironment task_environment_{ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; @@ -45,27 +98,111 @@ }; TEST_F(WifiP2PControllerTest, FeatureEnabled) { - feature_list_.InitAndEnableFeature(features::kWifiDirect); - WifiP2PController::Initialize(); - base::RunLoop().RunUntilIdle(); + Init(); ShillManagerClient::Get()->GetProperties( base::BindOnce(&WifiP2PControllerTest::OnGetManagerCallback, base::Unretained(this), shill::kP2PAllowedProperty, /*expected_value=*/true)); WifiP2PController::Shutdown(); - base::RunLoop().RunUntilIdle(); } TEST_F(WifiP2PControllerTest, FeatureDisabled) { - feature_list_.InitAndDisableFeature(features::kWifiDirect); - WifiP2PController::Initialize(); - base::RunLoop().RunUntilIdle(); + Init(/*enable_flag=*/false); ShillManagerClient::Get()->GetProperties( base::BindOnce(&WifiP2PControllerTest::OnGetManagerCallback, base::Unretained(this), shill::kP2PAllowedProperty, /*expected_value=*/false)); WifiP2PController::Shutdown(); - base::RunLoop().RunUntilIdle(); +} + +TEST_F(WifiP2PControllerTest, CreateP2PGroupSuccess) { + Init(); + + ShillManagerClient::Get() + ->GetTestInterface() + ->SetSimulateCreateP2PGroupResult(FakeShillSimulatedResult::kSuccess, + shill::kCreateP2PGroupResultSuccess); + const WifiP2POperationTestResult& result_arguments = + CreateP2PGroup("ssid", "passphrase"); + EXPECT_EQ(result_arguments.result, + WifiP2PController::OperationResult::kSuccess); + ASSERT_TRUE(result_arguments.metadata); + EXPECT_EQ(result_arguments.metadata->shill_id, 0); + EXPECT_EQ(result_arguments.metadata->frequency, 1000u); + EXPECT_EQ(result_arguments.metadata->network_id, 1); + + WifiP2PController::Shutdown(); +} + +TEST_F(WifiP2PControllerTest, CreateP2PGroupFailure_InvalidArguments) { + Init(); + + ShillManagerClient::Get() + ->GetTestInterface() + ->SetSimulateCreateP2PGroupResult( + FakeShillSimulatedResult::kSuccess, + shill::kCreateP2PGroupResultInvalidArguments); + const WifiP2POperationTestResult& result_arguments = + CreateP2PGroup("ssid", "passphrase"); + EXPECT_EQ(result_arguments.result, + WifiP2PController::OperationResult::kInvalidArguments); + EXPECT_FALSE(result_arguments.metadata); + + WifiP2PController::Shutdown(); +} + +TEST_F(WifiP2PControllerTest, CreateP2PGroupFailure_DBusError) { + Init(); + + ShillManagerClient::Get() + ->GetTestInterface() + ->SetSimulateCreateP2PGroupResult(FakeShillSimulatedResult::kFailure, + std::string()); + const WifiP2POperationTestResult& result_arguments = + CreateP2PGroup("ssid", "passphrase"); + EXPECT_EQ(result_arguments.result, + WifiP2PController::OperationResult::kDBusError); + EXPECT_FALSE(result_arguments.metadata); + + WifiP2PController::Shutdown(); +} + +TEST_F(WifiP2PControllerTest, ConnectToP2PGroupSuccess) { + Init(); + + ShillManagerClient::Get() + ->GetTestInterface() + ->SetSimulateConnectToP2PGroupResult( + FakeShillSimulatedResult::kSuccess, + shill::kConnectToP2PGroupResultSuccess); + const WifiP2POperationTestResult& result_arguments = + ConnectP2PGroup("ssid", "passphrase", /*frequency=*/5200u); + EXPECT_EQ(result_arguments.result, + WifiP2PController::OperationResult::kSuccess); + ASSERT_TRUE(result_arguments.metadata); + EXPECT_EQ(result_arguments.metadata->shill_id, 0); + EXPECT_EQ(result_arguments.metadata->frequency, 5200u); + EXPECT_EQ(result_arguments.metadata->network_id, 1); + + WifiP2PController::Shutdown(); +} + +TEST_F(WifiP2PControllerTest, + ConnectToP2PGroupFailure_ConcurrencyNotSupported) { + Init(); + + ShillManagerClient::Get() + ->GetTestInterface() + ->SetSimulateConnectToP2PGroupResult( + FakeShillSimulatedResult::kSuccess, + shill::kConnectToP2PGroupResultConcurrencyNotSupported); + const WifiP2POperationTestResult& result_arguments = + ConnectP2PGroup("ssid", "passphrase", /*frequency=*/5200u); + EXPECT_EQ(result_arguments.result, + WifiP2PController::OperationResult::kConcurrencyNotSupported); + EXPECT_FALSE(result_arguments.metadata); + + WifiP2PController::Shutdown(); } } // namespace ash
diff --git a/chromeos/ash/services/nearby/public/mojom/nearby_presence.mojom b/chromeos/ash/services/nearby/public/mojom/nearby_presence.mojom index 92574d67..945c0d2 100644 --- a/chromeos/ash/services/nearby/public/mojom/nearby_presence.mojom +++ b/chromeos/ash/services/nearby/public/mojom/nearby_presence.mojom
@@ -80,14 +80,18 @@ // The metadata of a device. This struct should always match // //third_party/nearby/src/internal/proto/metadata.proto. struct Metadata { + // The type of the device. PresenceDeviceType device_type; + // The account name of the account who owns the device. + string account_name; + // The name of the local device to be returned through credentials. string device_name; + // The name of the user who owns the device. + string user_name; + // The profile url of the device. + string device_profile_url; + // The Bluetooth MAC address of the device. array<uint8> bluetooth_mac_address; - - // Maps to the DeviceIdentityMetaData proto message's `device_id` field. - // device_id type `bytes` and represents a 128-bit integer. Thus this byte - // (8-bits) array field should always be of length 16. - array<uint8> device_id; }; // A mojo conversion of the CredentialType enum, which is defined in
diff --git a/chromeos/chromeos_strings.grd b/chromeos/chromeos_strings.grd index 41851ee..49c7e09 100644 --- a/chromeos/chromeos_strings.grd +++ b/chromeos/chromeos_strings.grd
@@ -6383,6 +6383,9 @@ <message name="IDS_INPUT_OVERLAY_BUTTON_OPTIONS_DELETE_TOOLTIP_TEXT" desc="The tooltip text for the trash button within Game Controls so that users know what the button does."> Delete </message> + <message name="IDS_INPUT_OVERLAY_BUTTON_OPTIONS_A11Y_LABEL" desc="A11y label for the button options menu. Spoken by screen readers when the button options gets focus but not visually rendered."> + Button options + </message> <message name="IDS_INPUT_OVERLAY_BUTTON_OPTIONS_EDIT_INFO" desc="The text directly below the title of the Button Options Menu explaining that you can choose keyboard keys for the current mobile game."> Place controls on game actions to play with keyboard keys </message> @@ -6437,6 +6440,9 @@ <message name="IDS_INPUT_OVERLAY_BUTTON_PLACEMENT_A11Y_LABEL" desc="A11y label for button placement mode. Spoken by screen readers when in button placement mode but not visually rendered."> Use arrow keys to move this control to the game action you want. Use the enter key to place the control. Use the escape key to cancel. </message> + <message name="IDS_INPUT_OVERLAY_EDITING_LIST_A11Y_LABEL" desc="A11y label for the editing list. Spoken by screen readers when the editing list gets focus but not visually rendered."> + Controls panel + </message> <message name="IDS_INPUT_OVERLAY_EDITING_LIST_FIRST_CONTROL_LABEL" desc="The label to the left of the '+' button in the row below the title in the Game Controls editor menu without having created any buttons."> Create first control </message>
diff --git a/chromeos/chromeos_strings_grd/IDS_INPUT_OVERLAY_BUTTON_OPTIONS_A11Y_LABEL.png.sha1 b/chromeos/chromeos_strings_grd/IDS_INPUT_OVERLAY_BUTTON_OPTIONS_A11Y_LABEL.png.sha1 new file mode 100644 index 0000000..481c180 --- /dev/null +++ b/chromeos/chromeos_strings_grd/IDS_INPUT_OVERLAY_BUTTON_OPTIONS_A11Y_LABEL.png.sha1
@@ -0,0 +1 @@ +2641671c891abedf0e9d3d058d169799d8fa2227 \ No newline at end of file
diff --git a/chromeos/chromeos_strings_grd/IDS_INPUT_OVERLAY_EDITING_LIST_A11Y_LABEL.png.sha1 b/chromeos/chromeos_strings_grd/IDS_INPUT_OVERLAY_EDITING_LIST_A11Y_LABEL.png.sha1 new file mode 100644 index 0000000..bd29573 --- /dev/null +++ b/chromeos/chromeos_strings_grd/IDS_INPUT_OVERLAY_EDITING_LIST_A11Y_LABEL.png.sha1
@@ -0,0 +1 @@ +b5656141e689785a841a34246418b681c82532e8 \ No newline at end of file
diff --git a/chromeos/profiles/arm.afdo.newest.txt b/chromeos/profiles/arm.afdo.newest.txt index 1300856..467d05d 100644 --- a/chromeos/profiles/arm.afdo.newest.txt +++ b/chromeos/profiles/arm.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-arm-none-125-6312.79-1711971985-benchmark-125.0.6407.0-r2-redacted.afdo.xz +chromeos-chrome-arm-none-125-6312.79-1711971985-benchmark-125.0.6412.0-r3-redacted.afdo.xz
diff --git a/chromeos/profiles/atom.afdo.newest.txt b/chromeos/profiles/atom.afdo.newest.txt index 123cf0b..70b9b14 100644 --- a/chromeos/profiles/atom.afdo.newest.txt +++ b/chromeos/profiles/atom.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-atom-125-6367.24-1712572414-benchmark-125.0.6407.0-r2-redacted.afdo.xz +chromeos-chrome-amd64-atom-125-6367.24-1712572414-benchmark-125.0.6412.0-r3-redacted.afdo.xz
diff --git a/chromeos/profiles/bigcore.afdo.newest.txt b/chromeos/profiles/bigcore.afdo.newest.txt index 7008e0dd..16afaecd 100644 --- a/chromeos/profiles/bigcore.afdo.newest.txt +++ b/chromeos/profiles/bigcore.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-bigcore-125-6367.24-1712570444-benchmark-125.0.6407.0-r2-redacted.afdo.xz +chromeos-chrome-amd64-bigcore-125-6367.24-1712570444-benchmark-125.0.6412.0-r3-redacted.afdo.xz
diff --git a/clank b/clank index c6b38390..aa5f216 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit c6b38390c572e804afcf74bab326e370b0f22598 +Subproject commit aa5f21626312b2ea0e263e4a5fcaab6708c729f3
diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/components/android_autofill/browser/android_autofill_manager.cc index 7d339bac..300dc4e 100644 --- a/components/android_autofill/browser/android_autofill_manager.cc +++ b/components/android_autofill/browser/android_autofill_manager.cc
@@ -214,7 +214,7 @@ std::erase_if(form.fields, [&](const FormFieldData& field) { // The renderer doesn't fill such fields, and therefore they can be removed // from here to reduce IPC traffic and avoid accidental filling. - return !field.is_autofilled || field.value.empty(); + return !field.is_autofilled || field.value().empty(); }); driver().ApplyFormAction(mojom::FormActionType::kFill, action_persistence, form, triggered_origin, {});
diff --git a/components/android_autofill/browser/autofill_provider_android.cc b/components/android_autofill/browser/autofill_provider_android.cc index b8f9825..7335d07 100644 --- a/components/android_autofill/browser/autofill_provider_android.cc +++ b/components/android_autofill/browser/autofill_provider_android.cc
@@ -410,7 +410,7 @@ // TODO(crbug.com/1478934): Investigate whether the update of the value // is needed - why would it have changed? - form_->OnFormFieldDidChange(field_info.index, field.value); + form_->OnFormFieldDidChange(field_info.index, field.value()); field_info.bounds = ToClientAreaBound(bounding_box); bridge_->OnTextFieldDidScroll(field_info); @@ -505,7 +505,7 @@ return; } // Propagate the changed values to Java. - form_->OnFormFieldDidChange(field_info.index, field.value); + form_->OnFormFieldDidChange(field_info.index, field.value()); field_info.bounds = ToClientAreaBound(bounding_box); bridge_->OnFormFieldDidChange(field_info); }
diff --git a/components/android_autofill/browser/autofill_provider_android_unittest.cc b/components/android_autofill/browser/autofill_provider_android_unittest.cc index fd8f78ae..885e046 100644 --- a/components/android_autofill/browser/autofill_provider_android_unittest.cc +++ b/components/android_autofill/browser/autofill_provider_android_unittest.cc
@@ -554,12 +554,12 @@ // Simulate a value change. EXPECT_CALL(provider_bridge(), OnFormFieldDidChange(EqualsFieldInfo(/*index=*/1))); - form.fields[1].value = form.fields[1].value + u"x"; + form.fields[1].set_value(form.fields[1].value() + u"x"); android_autofill_manager().SimulateOnTextFieldDidChange(form, form.fields[1]); // The `FormDataAndroid` object owned by the provider is also updated. ASSERT_TRUE(test_api(autofill_provider()).form()); - EXPECT_EQ(test_api(autofill_provider()).form()->form().fields[1].value, - form.fields[1].value); + EXPECT_EQ(test_api(autofill_provider()).form()->form().fields[1].value(), + form.fields[1].value()); } // Tests that value changes in a form that is not part of the current Autofill @@ -578,7 +578,7 @@ // Simulate a value change in a different form. EXPECT_CALL(provider_bridge(), OnFormFieldDidChange).Times(0); - form2.fields[1].value = form2.fields[1].value + u"x"; + form2.fields[1].set_value(form2.fields[1].value() + u"x"); android_autofill_manager().SimulateOnTextFieldDidChange(form2, form2.fields[1]); }
diff --git a/components/android_autofill/browser/form_data_android_unittest.cc b/components/android_autofill/browser/form_data_android_unittest.cc index ca2f8c95..9c5d273 100644 --- a/components/android_autofill/browser/form_data_android_unittest.cc +++ b/components/android_autofill/browser/form_data_android_unittest.cc
@@ -192,7 +192,7 @@ // Forms with similar fields are similar. f = af.form(); - f.fields.front().value = f.fields.front().value + u"x"; + f.fields.front().set_value(f.fields.front().value() + u"x"); EXPECT_TRUE(af.SimilarFormAs(f)); // Forms with fields that are not similar, are not similar either. @@ -280,7 +280,7 @@ size_t index = 100; // Value is not part of a field similarity check, so this field is similar to // af.form().fields[1]. - f.fields[1].value = u"some value"; + f.fields[1].set_value(u"some value"); EXPECT_TRUE(af.GetSimilarFieldIndex(f.fields[1], &index)); EXPECT_EQ(index, 1u); @@ -305,7 +305,7 @@ EXPECT_CALL(*field_bridges()[0], UpdateValue).Times(0); EXPECT_CALL(*field_bridges()[1], UpdateValue(kNewValue)); form_android.OnFormFieldDidChange(1, kNewValue); - EXPECT_EQ(form_android.form().fields[1].value, kNewValue); + EXPECT_EQ(form_android.form().fields[1].value(), kNewValue); } // Tests that the calls to update field types are propagated to the fields.
diff --git a/components/android_autofill/browser/form_field_data_android.cc b/components/android_autofill/browser/form_field_data_android.cc index 519c8154..e26d2a8 100644 --- a/components/android_autofill/browser/form_field_data_android.cc +++ b/components/android_autofill/browser/form_field_data_android.cc
@@ -71,7 +71,7 @@ } void FormFieldDataAndroid::OnFormFieldDidChange(std::u16string_view value) { - field_->value = std::u16string(value); + field_->set_value(std::u16string(value)); field_->is_autofilled = false; bridge_->UpdateValue(value); }
diff --git a/components/android_autofill/browser/form_field_data_android_bridge_impl.cc b/components/android_autofill/browser/form_field_data_android_bridge_impl.cc index ee0397c..f20bb3e 100644 --- a/components/android_autofill/browser/form_field_data_android_bridge_impl.cc +++ b/components/android_autofill/browser/form_field_data_android_bridge_impl.cc
@@ -71,7 +71,7 @@ ScopedJavaLocalRef<jobject> obj = Java_FormFieldData_createFormFieldData( env, ConvertUTF16ToJavaString(env, field.name), ConvertUTF16ToJavaString(env, field.label), - ConvertUTF16ToJavaString(env, field.value), + ConvertUTF16ToJavaString(env, field.value()), ConvertUTF8ToJavaString(env, field.autocomplete_attribute), field.should_autocomplete, ConvertUTF16ToJavaString(env, field.placeholder), @@ -116,7 +116,7 @@ if (ScopedJavaLocalRef<jstring> jvalue = Java_FormFieldData_getValue(env, obj); !jvalue.is_null()) { - field.value = ConvertJavaStringToUTF16(env, jvalue); + field.set_value(ConvertJavaStringToUTF16(env, jvalue)); } }
diff --git a/components/android_autofill/browser/form_field_data_android_unittest.cc b/components/android_autofill/browser/form_field_data_android_unittest.cc index 057c701..1418491 100644 --- a/components/android_autofill/browser/form_field_data_android_unittest.cc +++ b/components/android_autofill/browser/form_field_data_android_unittest.cc
@@ -110,7 +110,7 @@ EXPECT_CALL(bridge(), UpdateValue(kSampleValue)); field_android.OnFormFieldDidChange(kSampleValue); EXPECT_FALSE(field.is_autofilled); - EXPECT_EQ(field.value, kSampleValue); + EXPECT_EQ(field.value(), kSampleValue); } // Tests that updating the field visibility calls the Java bridge and also
diff --git a/components/autofill/content/browser/content_autofill_driver_unittest.cc b/components/autofill/content/browser/content_autofill_driver_unittest.cc index 378caea..d4dbcdc 100644 --- a/components/autofill/content/browser/content_autofill_driver_unittest.cc +++ b/components/autofill/content/browser/content_autofill_driver_unittest.cc
@@ -84,7 +84,7 @@ MATCHER(EqualsFillData, "") { FormFieldData lhs_field = std::get<0>(arg); FormFieldData::FillData rhs_field = std::get<1>(arg); - return lhs_field.value == rhs_field.value && + return lhs_field.value() == rhs_field.value && lhs_field.renderer_id == rhs_field.renderer_id && lhs_field.host_form_id == rhs_field.host_form_id && lhs_field.section == rhs_field.section && @@ -714,7 +714,7 @@ url::Origin triggered_origin; for (FormFieldData& field : address_form().fields) { field.origin = triggered_origin; - field.value = u"dummy_value"; + field.set_value(u"dummy_value"); } base::RunLoop run_loop; agent().SetQuitLoopClosure(run_loop.QuitClosure()); @@ -737,11 +737,11 @@ url::Origin triggered_origin; for (FormFieldData& field : address_form().fields) { field.origin = triggered_origin; - field.value = u"dummy_value"; + field.set_value(u"dummy_value"); } ASSERT_TRUE(base::ranges::all_of( address_form().fields, - [](const FormFieldData& field) { return !field.value.empty(); })); + [](const FormFieldData& field) { return !field.value().empty(); })); base::RunLoop run_loop; agent().SetQuitLoopClosure(run_loop.QuitClosure()); driver().browser_events().ApplyFormAction(
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc index 4c25bc72..23bc3726 100644 --- a/components/autofill/content/renderer/autofill_agent.cc +++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -1509,7 +1509,7 @@ form_util::GetFieldRendererId(element), &FormFieldData::renderer_id); it != provisionally_saved_form()->fields.end()) { - it->value = element.Value().Utf16(); + it->set_value(element.Value().Utf16()); it->is_autofilled = element.IsAutofilled(); } }
diff --git a/components/autofill/content/renderer/autofill_agent_browsertest.cc b/components/autofill/content/renderer/autofill_agent_browsertest.cc index d021f3b..e1db418 100644 --- a/components/autofill/content/renderer/autofill_agent_browsertest.cc +++ b/components/autofill/content/renderer/autofill_agent_browsertest.cc
@@ -662,8 +662,8 @@ GetWebElementById("text_id").DynamicTo<blink::WebFormControlElement>(); ASSERT_FALSE(field.IsNull()); - std::u16string prior_value = form.fields[0].value; - form.fields[0].value = form.fields[0].value + u"AUTOFILLED"; + std::u16string prior_value = form.fields[0].value(); + form.fields[0].set_value(form.fields[0].value() + u"AUTOFILLED"); form.fields[0].is_autofilled = true; ASSERT_EQ(field.GetAutofillState(), blink::WebAutofillState::kNotFilled); @@ -728,7 +728,7 @@ ASSERT_TRUE(provisionally_saved_form.has_value()); EXPECT_EQ(provisionally_saved_form->renderer_id, form_id); ASSERT_EQ(1u, provisionally_saved_form->fields.size()); - EXPECT_EQ(u"user-set value", provisionally_saved_form->fields[0].value); + EXPECT_EQ(u"user-set value", provisionally_saved_form->fields[0].value()); ExecuteJavaScriptForTests( R"(document.forms[0].elements[0].value = 'js-set value';)"); @@ -739,7 +739,7 @@ ASSERT_TRUE(provisionally_saved_form.has_value()); EXPECT_EQ(provisionally_saved_form->renderer_id, form_id); ASSERT_EQ(1u, provisionally_saved_form->fields.size()); - EXPECT_EQ(u"js-set value", provisionally_saved_form->fields[0].value); + EXPECT_EQ(u"js-set value", provisionally_saved_form->fields[0].value()); } // Test that AutofillAgent::ApplyFormAction(mojom::ActionPersistence::kFill) @@ -760,7 +760,7 @@ blink::WebFormElement(), field, &autofill_agent().field_data_manager(), {form_util::ExtractOption::kValue}, &form_field); - form_field.value = u"autofilled"; + form_field.set_value(u"autofilled"); form_field.is_autofilled = true; ASSERT_EQ(field.GetAutofillState(), blink::WebAutofillState::kNotFilled); @@ -775,7 +775,7 @@ AutofillAgentTestApi(&autofill_agent()).provisionally_saved_form(); ASSERT_TRUE(provisionally_saved_form.has_value()); ASSERT_EQ(1u, provisionally_saved_form->fields.size()); - EXPECT_EQ(u"autofilled", provisionally_saved_form->fields[0].value); + EXPECT_EQ(u"autofilled", provisionally_saved_form->fields[0].value()); } // Test that AutofillAgent::ApplyFormAction(mojom::ActionPersistence::kFill) @@ -802,7 +802,7 @@ {form_util::ExtractOption::kValue}); ASSERT_EQ(1u, form.fields.size()); - form.fields[0].value = u"autofilled"; + form.fields[0].set_value(u"autofilled"); form.fields[0].is_autofilled = true; ASSERT_EQ(field.GetAutofillState(), blink::WebAutofillState::kNotFilled); @@ -815,7 +815,7 @@ AutofillAgentTestApi(&autofill_agent()).provisionally_saved_form(); ASSERT_TRUE(provisionally_saved_form.has_value()); ASSERT_EQ(1u, provisionally_saved_form->fields.size()); - EXPECT_EQ(u"autofilled", provisionally_saved_form->fields[0].value); + EXPECT_EQ(u"autofilled", provisionally_saved_form->fields[0].value()); } TEST_P(AutofillAgentSubmissionTest, @@ -1035,7 +1035,7 @@ } for (FormFieldData& field : form->fields) { - field.value = field.id_attribute + u" autofilled"; + field.set_value(field.id_attribute + u" autofilled"); field.is_autofilled = true; }
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc index c443fdb..7fa4c42 100644 --- a/components/autofill/content/renderer/form_autofill_util.cc +++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -2064,7 +2064,7 @@ } } - field->value = std::move(value).substr(0, kMaxStringLength); + field->set_value(std::move(value).substr(0, kMaxStringLength)); field->selected_text = element.SelectedText().Utf16().substr(0, kMaxSelectedTextLength); @@ -2085,7 +2085,7 @@ // deemed acceptable. if (field->form_control_type == FormControlType::kInputPassword || !ScriptModifiedUsernameOrCreditCardNumberAcceptable( - field->value, user_input, *field_data_manager)) { + field->value(), user_input, *field_data_manager)) { field->user_input = user_input.substr(0, kMaxStringLength); } } @@ -2208,8 +2208,9 @@ // inserts whitespace at the right places and it ignores "display:none" // subtrees), but is significantly more expensive because it triggers a // layout. - field.value = content_editable.TextContentAbridged(kMaxStringLength).Utf16(); - DCHECK_LE(field.value.length(), kMaxStringLength); + field.set_value( + content_editable.TextContentAbridged(kMaxStringLength).Utf16()); + DCHECK_LE(field.value().length(), kMaxStringLength); field.selected_text = content_editable.SelectedText().Utf16().substr(0, kMaxSelectedTextLength); return form;
diff --git a/components/autofill/content/renderer/form_autofill_util_browsertest.cc b/components/autofill/content/renderer/form_autofill_util_browsertest.cc index 4042afe..726ca04 100644 --- a/components/autofill/content/renderer/form_autofill_util_browsertest.cc +++ b/components/autofill/content/renderer/form_autofill_util_browsertest.cc
@@ -1942,7 +1942,8 @@ EXPECT_EQ(field.id_attribute, u"my-id"); EXPECT_EQ(field.name_attribute, u"my-name"); EXPECT_EQ(field.css_classes, u"my-class"); - EXPECT_EQ(field.value, u"\n This is the textContent!\n "); + EXPECT_EQ(field.value(), + u"\n This is the textContent!\n "); } TEST_F(FormAutofillUtilsTest, FindFormForContentEditableAbridgedSuccess) { @@ -1970,9 +1971,9 @@ EXPECT_EQ(field.name_attribute, u"my-name"); EXPECT_EQ(field.css_classes, u"my-class"); // Only extract 1024 characters from the div. - EXPECT_EQ(field.value.length(), 1024u); + EXPECT_EQ(field.value().length(), 1024u); EXPECT_EQ( - field.value, + field.value(), u"3." u"14159265358979323846264338327950288419716939937510582097494459230781640" u"62862089986280348253421170679821480865132823066470938446095505822317253"
diff --git a/components/autofill/content/renderer/form_cache.cc b/components/autofill/content/renderer/form_cache.cc index d5217cf..92e58f2 100644 --- a/components/autofill/content/renderer/form_cache.cc +++ b/components/autofill/content/renderer/form_cache.cc
@@ -450,9 +450,9 @@ void FormCache::SaveInitialValues(base::span<const FormFieldData> fields) { for (const FormFieldData& field : fields) { if (field.form_control_type == FormControlType::kSelectOne) { - initial_select_values_.insert({field.renderer_id, field.value}); + initial_select_values_.insert({field.renderer_id, field.value()}); } else if (field.form_control_type == FormControlType::kSelectList) { - initial_selectlist_values_.insert({field.renderer_id, field.value}); + initial_selectlist_values_.insert({field.renderer_id, field.value()}); } else if (form_util::IsCheckable(field.form_control_type)) { initial_checked_state_.insert( {field.renderer_id,
diff --git a/components/autofill/content/renderer/form_cache_browsertest.cc b/components/autofill/content/renderer/form_cache_browsertest.cc index 166d976..094cf91f 100644 --- a/components/autofill/content/renderer/form_cache_browsertest.cc +++ b/components/autofill/content/renderer/form_cache_browsertest.cc
@@ -434,7 +434,7 @@ FormFieldData* value_to_fill = FindFieldByName( values_to_fill, field_to_fill.element->NameForAutofill()); ASSERT_TRUE(value_to_fill != nullptr); - value_to_fill->value = field_to_fill.value; + value_to_fill->set_value(field_to_fill.value); value_to_fill->is_autofilled = true; }
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc index cb363bb3..370aef5 100644 --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -468,7 +468,7 @@ for (const auto& [field_id, field_data] : manager.field_data_map()) { const std::optional<std::u16string>& value = field_data.first; FieldPropertiesMask properties = field_data.second; - if ((properties & kFilledOrTyped) && value == field.value) { + if ((properties & kFilledOrTyped) && value == field.value()) { field.properties_mask |= properties & kFilledOrTyped; break; } @@ -550,7 +550,7 @@ continue; if (username_index != i && password_index != i && - form_data.fields[i].value.empty()) { + form_data.fields[i].value().empty()) { return mojom::SubmissionReadinessState::kEmptyFields; } number_of_visible_elements++;
diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc index 183491639..3e5b435 100644 --- a/components/autofill/core/browser/autocomplete_history_manager.cc +++ b/components/autofill/core/browser/autocomplete_history_manager.cc
@@ -82,18 +82,18 @@ field.form_control_type == FormControlType::kTextArea || field.form_control_type == FormControlType::kContentEditable || IsInAutofillSuggestionsDisabledExperiment()) { - SendSuggestions({}, QueryHandler(field.global_id(), field.value, + SendSuggestions({}, QueryHandler(field.global_id(), field.value(), std::move(on_suggestions_returned))); return true; } if (profile_database_) { auto query_handle = profile_database_->GetFormValuesForElementName( - field.name, field.value, kMaxAutocompleteMenuItems, this); + field.name, field.value(), kMaxAutocompleteMenuItems, this); // We can simply insert, since |query_handle| is always unique. pending_queries_.insert( - {query_handle, QueryHandler(field.global_id(), field.value, + {query_handle, QueryHandler(field.global_id(), field.value(), std::move(on_suggestions_returned))}); return true; } @@ -298,13 +298,13 @@ // We don't want to save a trimmed string, but we want to make sure that the // value is neither empty nor only whitespaces. bool is_value_valid = base::ranges::any_of( - field.value, std::not_fn(base::IsUnicodeWhitespace<char16_t>)); + field.value(), std::not_fn(base::IsUnicodeWhitespace<char16_t>)); return is_value_valid && IsMeaningfulFieldName(field.name) && !field.name.empty() && field.IsTextInputElement() && !field.IsPasswordInputElement() && field.form_control_type != FormControlType::kInputNumber && - field.should_autocomplete && !IsValidCreditCardNumber(field.value) && - !IsSSN(field.value) && + field.should_autocomplete && !IsValidCreditCardNumber(field.value()) && + !IsSSN(field.value()) && (field.properties_mask & kUserTyped || field.is_focusable) && field.role != FormFieldData::RoleAttribute::kPresentation; }
diff --git a/components/autofill/core/browser/autocomplete_history_manager_unittest.cc b/components/autofill/core/browser/autocomplete_history_manager_unittest.cc index 9de402f..c0f803d 100644 --- a/components/autofill/core/browser/autocomplete_history_manager_unittest.cc +++ b/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
@@ -135,7 +135,7 @@ FormFieldData valid_cc; valid_cc.label = u"Credit Card"; valid_cc.name = u"ccnum"; - valid_cc.value = u"4012888888881881"; + valid_cc.set_value(u"4012888888881881"); valid_cc.properties_mask |= kUserTyped; valid_cc.form_control_type = FormControlType::kInputText; form.fields.push_back(valid_cc); @@ -159,7 +159,7 @@ FormFieldData invalid_cc; invalid_cc.label = u"Credit Card"; invalid_cc.name = u"ccnum"; - invalid_cc.value = u"4580123456789012"; + invalid_cc.set_value(u"4580123456789012"); invalid_cc.properties_mask |= kUserTyped; invalid_cc.form_control_type = FormControlType::kInputText; form.fields.push_back(invalid_cc); @@ -180,7 +180,7 @@ FormFieldData ssn; ssn.label = u"Social Security Number"; ssn.name = u"ssn"; - ssn.value = u"078-05-1120"; + ssn.set_value(u"078-05-1120"); ssn.properties_mask |= kUserTyped; ssn.form_control_type = FormControlType::kInputText; form.fields.push_back(ssn); @@ -202,7 +202,7 @@ FormFieldData search_field; search_field.label = u"Search"; search_field.name = u"search"; - search_field.value = u"my favorite query"; + search_field.set_value(u"my favorite query"); search_field.properties_mask |= kUserTyped; search_field.form_control_type = FormControlType::kInputSearch; form.fields.push_back(search_field); @@ -223,7 +223,7 @@ FormFieldData search_field; search_field.label = u"Search"; search_field.name = u"search"; - search_field.value = u"my favorite query"; + search_field.set_value(u"my favorite query"); search_field.properties_mask |= kUserTyped; search_field.form_control_type = FormControlType::kInputSearch; form.fields.push_back(search_field); @@ -247,7 +247,7 @@ // Empty value. search_field.label = u"Search"; search_field.name = u"search"; - search_field.value = u""; + search_field.set_value(u""); search_field.properties_mask |= kUserTyped; search_field.form_control_type = FormControlType::kInputSearch; form.fields.push_back(search_field); @@ -255,7 +255,7 @@ // Single whitespace. search_field.label = u"Search2"; search_field.name = u"other search"; - search_field.value = u" "; + search_field.set_value(u" "); search_field.properties_mask |= kUserTyped; search_field.form_control_type = FormControlType::kInputSearch; form.fields.push_back(search_field); @@ -263,7 +263,7 @@ // Multiple whitespaces. search_field.label = u"Search3"; search_field.name = u"other search"; - search_field.value = u" "; + search_field.set_value(u" "); search_field.properties_mask |= kUserTyped; search_field.form_control_type = FormControlType::kInputSearch; form.fields.push_back(search_field); @@ -288,7 +288,7 @@ FormFieldData field; field.label = u"Something esoteric"; field.name = u"esoterica"; - field.value = u"a truly esoteric value, I assure you"; + field.set_value(u"a truly esoteric value, I assure you"); field.properties_mask |= kUserTyped; field.form_control_type = FormControlType::kInputText; field.should_autocomplete = false; @@ -313,7 +313,7 @@ FormFieldData search_field; search_field.label = u"Search"; search_field.name = u"search"; - search_field.value = u"my favorite query"; + search_field.set_value(u"my favorite query"); search_field.properties_mask |= kUserTyped; search_field.form_control_type = FormControlType::kInputSearch; form.fields.push_back(search_field); @@ -338,7 +338,7 @@ FormFieldData search_field; search_field.label = u"Search"; search_field.name = u"search"; - search_field.value = u"my favorite query"; + search_field.set_value(u"my favorite query"); search_field.form_control_type = FormControlType::kInputSearch; search_field.properties_mask |= kUserTyped; search_field.is_focusable = false; @@ -363,7 +363,7 @@ FormFieldData field; field.label = u"Something esoteric"; field.name = u"esoterica"; - field.value = u"a truly esoteric value, I assure you"; + field.set_value(u"a truly esoteric value, I assure you"); field.properties_mask |= kUserTyped; field.form_control_type = FormControlType::kInputText; field.role = FormFieldData::RoleAttribute::kPresentation; @@ -461,7 +461,7 @@ GetMockedDbResults(expected_values); EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -491,7 +491,7 @@ // Only expect a call when the name is not filtered out. EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .Times(0); @@ -515,7 +515,7 @@ // Only expect a call when the name is not filtered out. EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .Times(0); @@ -545,7 +545,7 @@ // Expect a call because the name is not filtered. EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -576,7 +576,7 @@ // Expect a call because the name is not filtered. EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -605,7 +605,7 @@ GetMockedDbResults(expected_values); EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -635,13 +635,13 @@ int mocked_db_query_id = 100; std::vector<AutocompleteEntry> expected_values = { - GetAutocompleteEntry(test_field_.name, test_field_.value)}; + GetAutocompleteEntry(test_field_.name, test_field_.value())}; std::unique_ptr<WDTypedResult> mocked_results = GetMockedDbResults(expected_values); EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -674,7 +674,7 @@ GetMockedDbResults(expected_values); EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -720,7 +720,7 @@ GetMockedDbResults(expected_values); EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -765,7 +765,7 @@ GetMockedDbResults(expected_values_second); EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id_first)) .WillOnce(Return(mocked_db_query_id_second)); @@ -815,7 +815,7 @@ // Simulate a request for autocomplete suggestions. EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id)); @@ -857,7 +857,7 @@ int mocked_db_query_id = 100; EXPECT_CALL(*web_data_service_, - GetFormValuesForElementName(test_field_.name, test_field_.value, + GetFormValuesForElementName(test_field_.name, test_field_.value(), _, autocomplete_manager_.get())) .WillOnce(Return(mocked_db_query_id));
diff --git a/components/autofill/core/browser/autofill_field.cc b/components/autofill/core/browser/autofill_field.cc index 1bc104c..6904a88 100644 --- a/components/autofill/core/browser/autofill_field.cc +++ b/components/autofill/core/browser/autofill_field.cc
@@ -410,7 +410,7 @@ } bool AutofillField::IsEmpty() const { - return value.empty(); + return value().empty(); } FieldSignature AutofillField::GetFieldSignature() const {
diff --git a/components/autofill/core/browser/autofill_form_test_utils.cc b/components/autofill/core/browser/autofill_form_test_utils.cc index 18d1fb16..fcd880a 100644 --- a/components/autofill/core/browser/autofill_form_test_utils.cc +++ b/components/autofill/core/browser/autofill_form_test_utils.cc
@@ -115,7 +115,7 @@ ff.name = *fd.name; } if (fd.value) { - ff.value = *fd.value; + ff.set_value(*fd.value); } if (fd.placeholder) { ff.placeholder = *fd.placeholder;
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc index 63f8b391..f6fe57e 100644 --- a/components/autofill/core/browser/autofill_manager.cc +++ b/components/autofill/core/browser/autofill_manager.cc
@@ -372,7 +372,7 @@ bounding_box, timestamp) .Then(NotifyObserversCallback( &Observer::OnAfterTextFieldDidChange, form.global_id(), - field.global_id(), field.value))); + field.global_id(), field.value()))); } void AutofillManager::OnTextFieldDidScroll(const FormData& form,
diff --git a/components/autofill/core/browser/autofill_merge_unittest.cc b/components/autofill/core/browser/autofill_merge_unittest.cc index ad21c8a2..1742219 100644 --- a/components/autofill/core/browser/autofill_merge_unittest.cc +++ b/components/autofill/core/browser/autofill_merge_unittest.cc
@@ -200,7 +200,7 @@ FormFieldData field; field.label = field_type; field.name = field_type; - field.value = value; + field.set_value(value); field.form_control_type = FormControlType::kInputText; field.is_focusable = true; form.fields.push_back(field);
diff --git a/components/autofill/core/browser/autofill_suggestion_generator.cc b/components/autofill/core/browser/autofill_suggestion_generator.cc index 575dcca..0db06c7 100644 --- a/components/autofill/core/browser/autofill_suggestion_generator.cc +++ b/components/autofill/core/browser/autofill_suggestion_generator.cc
@@ -1031,7 +1031,7 @@ // triggering field's value. const std::u16string field_value_for_filtering = trigger_source != AutofillSuggestionTriggerSource::kManualFallbackAddress - ? trigger_field.value + ? trigger_field.value() : u""; std::vector<raw_ptr<const AutofillProfile, VectorExperimental>> profiles_to_suggest = GetProfilesToSuggest( @@ -1384,7 +1384,7 @@ std::vector<CreditCard> cards_to_suggest = GetOrderedCardsToSuggest( trigger_field, trigger_field_type, /*suppress_disused_cards=*/ - SanitizeCreditCardFieldValue(trigger_field.value).empty() && + SanitizeCreditCardFieldValue(trigger_field.value()).empty() && trigger_source != AutofillSuggestionTriggerSource::kManualFallbackPayments, /*prefix_match=*/!is_manual_fallback_for_non_credit_card_field, @@ -1636,7 +1636,7 @@ } std::vector<CreditCard> cards_to_suggest; std::u16string field_contents = - base::i18n::ToLower(SanitizeCreditCardFieldValue(trigger_field.value)); + base::i18n::ToLower(SanitizeCreditCardFieldValue(trigger_field.value())); for (const CreditCard* credit_card : available_cards) { std::u16string suggested_value = credit_card->GetInfo(trigger_field_type, personal_data().app_locale());
diff --git a/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc b/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc index 52924524..60be45a 100644 --- a/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc +++ b/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc
@@ -2215,7 +2215,7 @@ // Create a triggering field those value prefix-matches `profile1`, but not // `profile2`. FormFieldData triggering_field; - triggering_field.value = profile1.GetRawInfo(NAME_FIRST); + triggering_field.set_value(profile1.GetRawInfo(NAME_FIRST)); ASSERT_FALSE(profile2.GetRawInfo(NAME_FIRST) .starts_with(profile1.GetRawInfo(NAME_FIRST))); @@ -3645,7 +3645,7 @@ personal_data().AddServerCreditCard(CreateServerCard()); FormFieldData field_data; - field_data.value = u"$$$"; + field_data.set_value(u"$$$"); bool with_offer; bool with_cvc; autofill_metrics::CardMetadataLoggingContext metadata_logging_context;
diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/components/autofill/core/browser/browser_autofill_manager.cc index 0dd8e9e2..322c07d 100644 --- a/components/autofill/core/browser/browser_autofill_manager.cc +++ b/components/autofill/core/browser/browser_autofill_manager.cc
@@ -240,7 +240,7 @@ continue; } std::u16string value; - base::TrimWhitespace(field.value, base::TRIM_ALL, &value); + base::TrimWhitespace(field.value(), base::TRIM_ALL, &value); if (value.empty()) { continue; } @@ -625,7 +625,7 @@ bool is_card_number_field = autofill_field->Type().GetStorableType() == CREDIT_CARD_NUMBER && - base::ContainsOnlyChars(CreditCard::StripSeparators(field.value), + base::ContainsOnlyChars(CreditCard::StripSeparators(field.value()), u"0123456789"); if (!is_card_number_field) { @@ -637,7 +637,7 @@ } static const int kShowScanCreditCardMaxValueLength = 6; - return field.value.size() <= kShowScanCreditCardMaxValueLength; + return field.value().size() <= kShowScanCreditCardMaxValueLength; } bool BrowserAutofillManager::ShouldShowCardsFromAccountOption( @@ -801,7 +801,7 @@ } if (plus_address_delegate && plus_address_delegate->IsPlusAddress( - base::UTF16ToUTF8(autofill_field->value))) { + base::UTF16ToUTF8(autofill_field->value()))) { // Similarly to CVC, any plus addresses needn't be saved to autocomplete. // Note that the feature is experimental, and `plus_address_delegate` // will be null if the feature is not enabled (it's disabled by default). @@ -1030,7 +1030,7 @@ // If the user types into the same field multiple times, repeated // TypingFieldLogEvents are coalesced. autofill_field->AppendLogEventIfNotRepeated(TypingFieldLogEvent{ - .has_value_after_typing = ToOptionalBoolean(!field.value.empty())}); + .has_value_after_typing = ToOptionalBoolean(!field.value().empty())}); UpdatePendingForm(form); @@ -1737,7 +1737,7 @@ LOG_AF(change) << "Old value structure: '" << StructureOfString(old_value.substr(0, 80)) << "'" << Br{}; LOG_AF(change) << "New value structure: '" - << StructureOfString(field.value.substr(0, 80)) << "'"; + << StructureOfString(field.value().substr(0, 80)) << "'"; LOG_AF(log_manager()) << LoggingScope::kWebsiteModifiedFieldValue << LogMessage::kJavaScriptChangedAutofilledValue << Br{} << Tag{"table"} << Tr{} << GetFieldNumber() @@ -1758,7 +1758,7 @@ // We are interested in reporting the events where JavaScript resets an // autofilled value immediately after filling. For a reset, the value // needs to be empty. - if (!field.value.empty()) { + if (!field.value().empty()) { return; } @@ -2471,7 +2471,7 @@ AutofillSuggestionTriggerSource::kManualFallbackPlusAddresses) { *suggestions = client().GetPlusAddressDelegate()->GetSuggestions( client().GetLastCommittedPrimaryMainFrameOrigin(), - client().IsOffTheRecord(), field.value, trigger_source); + client().IsOffTheRecord(), field.value(), trigger_source); return; } @@ -2565,7 +2565,7 @@ std::vector<Suggestion> plus_address_suggestions = client().GetPlusAddressDelegate()->GetSuggestions( client().GetLastCommittedPrimaryMainFrameOrigin(), - client().IsOffTheRecord(), field.value, trigger_source); + client().IsOffTheRecord(), field.value(), trigger_source); suggestions->insert( suggestions->cbegin(), std::make_move_iterator(plus_address_suggestions.begin()), @@ -2676,7 +2676,7 @@ std::optional<AlternativeStateNameMap::CanonicalStateName> canonical_state_name_from_text = AlternativeStateNameMap::GetCanonicalStateName( - base::UTF16ToUTF8(country_code), field->value); + base::UTF16ToUTF8(country_code), field->value()); if (canonical_state_name_from_text && canonical_state_name_from_text.value() ==
diff --git a/components/autofill/core/browser/browser_autofill_manager_unittest.cc b/components/autofill/core/browser/browser_autofill_manager_unittest.cc index 7f521d7..46e206942f 100644 --- a/components/autofill/core/browser/browser_autofill_manager_unittest.cc +++ b/components/autofill/core/browser/browser_autofill_manager_unittest.cc
@@ -523,7 +523,7 @@ SCOPED_TRACE(expected_label); EXPECT_EQ(UTF8ToUTF16(expected_label), field.label); EXPECT_EQ(UTF8ToUTF16(expected_name), field.name); - EXPECT_EQ(UTF8ToUTF16(expected_value), field.value); + EXPECT_EQ(UTF8ToUTF16(expected_value), field.value()); EXPECT_EQ(expected_form_control_type, field.form_control_type); } @@ -2347,7 +2347,7 @@ FormsSeen({form}); FormFieldData field = form.fields[1]; - field.value = u" "; + field.set_value(u" "); GetAutofillSuggestions(form, field); // Test that we sent the right values to the external delegate. @@ -2369,7 +2369,7 @@ FormsSeen({form}); FormFieldData field = form.fields[1]; - field.value = u"____-____-____-____"; + field.set_value(u"____-____-____-____"); GetAutofillSuggestions(form, field); // Test that we sent the right values to the external delegate. external_delegate()->CheckSuggestions( @@ -2390,7 +2390,7 @@ FormsSeen({form}); FormFieldData field = form.fields[1]; - field.value = std::u16string({0x200E, 0x200F}); + field.set_value(std::u16string({0x200E, 0x200F})); GetAutofillSuggestions(form, field); // Test that we sent the right values to the external delegate. @@ -2420,7 +2420,7 @@ FormsSeen({form}); FormFieldData field = form.fields[1]; - field.value = u"5255-66__-____-____"; + field.set_value(u"5255-66__-____-____"); GetAutofillSuggestions(form, field); // Test that we sent the right value to the external delegate. @@ -2678,7 +2678,7 @@ FormsSeen({form}); FormFieldData field = form.fields[1]; - field.value = u"12345678"; + field.set_value(u"12345678"); GetAutofillSuggestions(form, field); external_delegate()->CheckNoSuggestions(field.global_id()); @@ -2800,7 +2800,7 @@ // Query with name prefix for card0 returns card0. { FormFieldData field = form.fields[0]; - field.value = u"B"; + field.set_value(u"B"); GetAutofillSuggestions(form, field); external_delegate()->CheckSuggestions( @@ -2816,7 +2816,7 @@ // Query with name prefix for card1 returns card1. { FormFieldData field = form.fields[0]; - field.value = u"Cl"; + field.set_value(u"Cl"); GetAutofillSuggestions(form, field); external_delegate()->CheckSuggestions( @@ -2831,7 +2831,7 @@ // Query with name prefix for card2 returns card2. { FormFieldData field = form.fields[0]; - field.value = u"Jo"; + field.set_value(u"Jo"); GetAutofillSuggestions(form, field); external_delegate()->CheckSuggestions( @@ -3154,7 +3154,7 @@ GetAutofillSuggestions(form, field); // Simulate user typing into field (due to the ablation we would not fill). - field.value = u"Unknown User"; + field.set_value(u"Unknown User"); browser_autofill_manager_->OnTextFieldDidChange(form, field, gfx::RectF(), base::TimeTicks::Now()); @@ -3374,7 +3374,7 @@ FormFieldData& field = form.fields[0]; field.is_autofilled = true; - field.value = u"Elvis"; + field.set_value(u"Elvis"); GetAutofillSuggestions(form, field); // Test that we sent the right values to the external delegate. external_delegate()->CheckSuggestions( @@ -3763,11 +3763,11 @@ // Michael will be overridden with Elvis because Autofill is triggered from // the first field. - form.fields[0].value = u"Michael"; + form.fields[0].set_value(u"Michael"); form.fields[0].properties_mask |= kUserTyped; // Jackson will be preserved, only override the first field. - form.fields[2].value = u"Jackson"; + form.fields[2].set_value(u"Jackson"); form.fields[2].properties_mask |= kUserTyped; // Fill the address data. @@ -4111,7 +4111,7 @@ FormFieldData field = form.fields[0]; // Simulate editing the first field. - field.value = u"Michael"; + field.set_value(u"Michael"); browser_autofill_manager_->OnTextFieldDidChange(form, field, gfx::RectF(), base::TimeTicks::Now()); @@ -4995,7 +4995,7 @@ FormData form = CreateTestAddressFormData(); FormFieldData* addr1_field = form.FindFieldByName(u"addr1"); ASSERT_TRUE(addr1_field != nullptr); - addr1_field->value = u"Enter your address"; + addr1_field->set_value(u"Enter your address"); FormsSeen({form}); @@ -5003,7 +5003,7 @@ FormData response_data = FillAutofillFormDataAndGetResults(form, *addr1_field, kElvisProfileGuid); // Set the address field's value back to the default value. - response_data.fields[3].value = u"Enter your address"; + response_data.fields[3].set_value(u"Enter your address"); // Simulate form submission. The profile should not be updated with the // meaningless default value of the street address field. @@ -5027,7 +5027,7 @@ FormFieldData* state_field = form.FindFieldByName(u"state"); ASSERT_TRUE(state_field != nullptr); state_field->form_control_type = form_control_type; - state_field->value = base::UTF8ToUTF16(GetElvisAddressFillData().state); + state_field->set_value(base::UTF8ToUTF16(GetElvisAddressFillData().state)); test->FormsSeen({form}); @@ -5040,9 +5040,9 @@ ->ClearFields({ADDRESS_HOME_STATE}); test->FormSubmitted(response_data); // Expect that the profile was updated with the value of the state select. - EXPECT_EQ(state_field->value, test->personal_data() - .GetProfileByGUID(kElvisProfileGuid) - ->GetRawInfo(ADDRESS_HOME_STATE)); + EXPECT_EQ(state_field->value(), test->personal_data() + .GetProfileByGUID(kElvisProfileGuid) + ->GetRawInfo(ADDRESS_HOME_STATE)); } // Test that we save form data when a <select> in the form contains the @@ -5157,7 +5157,7 @@ // Once the form is cached, fill the values. EXPECT_EQ(form.fields.size(), expected_values.size()); for (size_t i = 0; i < expected_values.size(); i++) { - form.fields[i].value = expected_values[i]; + form.fields[i].set_value(expected_values[i]); } browser_autofill_manager_->SetExpectedSubmittedFieldTypes(expected_types); @@ -5245,9 +5245,9 @@ // The fields are edited after calling FormsSeen on them. This is because // default values are not used for upload comparisons. - form.fields[0].value = u"Elvis"; - form.fields[1].value = u"Presley"; - form.fields[2].value = u"theking@gmail.com"; + form.fields[0].set_value(u"Elvis"); + form.fields[1].set_value(u"Presley"); + form.fields[2].set_value(u"theking@gmail.com"); // Simulate editing a field. browser_autofill_manager_->OnTextFieldDidChange( form, form.fields.front(), gfx::RectF(), base::TimeTicks::Now()); @@ -5295,9 +5295,9 @@ // The fields are edited after calling FormsSeen on them. This is because // default values are not used for upload comparisons. - form.fields[0].value = u"Elvis"; - form.fields[1].value = u"Presley"; - form.fields[2].value = u"theking@gmail.com"; + form.fields[0].set_value(u"Elvis"); + form.fields[1].set_value(u"Presley"); + form.fields[2].set_value(u"theking@gmail.com"); // Simulate editing a field. browser_autofill_manager_->OnTextFieldDidChange( form, form.fields.front(), gfx::RectF(), base::TimeTicks::Now()); @@ -5345,9 +5345,9 @@ browser_autofill_manager_->SetExpectedObservedSubmission(false); // Form was autofilled with user data. - form.fields[0].value = u"Elvis"; - form.fields[1].value = u"Presley"; - form.fields[2].value = u"theking@gmail.com"; + form.fields[0].set_value(u"Elvis"); + form.fields[1].set_value(u"Presley"); + form.fields[2].set_value(u"theking@gmail.com"); browser_autofill_manager_->OnDidFillAutofillFormData(form, base::TimeTicks::Now()); @@ -5423,7 +5423,7 @@ // Verify whether suggestions are populated correctly for one of the middle // credit card number fields when filled partially. FormFieldData number_field = form.fields[3]; - number_field.value = u"901"; + number_field.set_value(u"901"); // Get the suggestions for already filled credit card |number_field|. GetAutofillSuggestions(form, number_field); @@ -5485,13 +5485,13 @@ // Manually fill out |form| so we can use it in OnFormSubmitted. for (auto& field : form.fields) { if (field.name == u"cardnumber") - field.value = u"4012888888881881"; + field.set_value(u"4012888888881881"); else if (field.name == u"nameoncard") - field.value = u"John H Dillinger"; + field.set_value(u"John H Dillinger"); else if (field.name == u"ccmonth") - field.value = u"01"; + field.set_value(u"01"); else if (field.name == u"ccyear") - field.value = u"2017"; + field.set_value(u"2017"); } CardUnmaskDelegate::UserProvidedUnmaskDetails details; @@ -6710,7 +6710,7 @@ Suggestion::Icon::kNoIcon, PopupItemId::kMixedFormMessage)}); // Pretend user started typing and make sure we no longer set suggestions. - form.fields[0].value = u"Michael"; + form.fields[0].set_value(u"Michael"); form.fields[0].properties_mask |= kUserTyped; GetAutofillSuggestions(form, form.fields[0]); external_delegate()->CheckNoSuggestions(form.fields[0].global_id()); @@ -7312,8 +7312,8 @@ void SimulateOverrideFieldByJavaScript(size_t field_index, const std::u16string& new_value) { - std::u16string old_value = fill_data_.fields[field_index].value; - fill_data_.fields[field_index].value = new_value; + std::u16string old_value = fill_data_.fields[field_index].value(); + fill_data_.fields[field_index].set_value(new_value); browser_autofill_manager_->OnJavaScriptChangedAutofilledValue( fill_data_, fill_data_.fields[field_index], old_value); } @@ -7395,7 +7395,7 @@ } void SimulateTypingFirstNameIntoFirstField() { - form_.fields[0].value = u"Elvis"; + form_.fields[0].set_value(u"Elvis"); browser_autofill_manager_->OnTextFieldDidChange( form_, form_.fields[0], gfx::RectF(), base::TimeTicks::Now()); } @@ -7431,7 +7431,7 @@ browser_autofill_manager_->OnFocusNoLongerOnForm(true); // 3. Simulate typing into second field - form_.fields[1].value = u"Presley"; + form_.fields[1].set_value(u"Presley"); browser_autofill_manager_->OnTextFieldDidChange( form_, form_.fields[1], gfx::RectF(), base::TimeTicks::Now()); @@ -7736,7 +7736,7 @@ // First, note the field with the empty value. FormsSeen({form}); // Then fill in the dummy plus address. - form.fields[0].value = base::UTF8ToUTF16(kDummyPlusAddress); + form.fields[0].set_value(base::UTF8ToUTF16(kDummyPlusAddress)); // Submit the form, capturing it as it is passed to the autocomplete history // manager. The first field should not be autocomplete eligible.
diff --git a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding.cc b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding.cc index 74729cc..d664b27 100644 --- a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding.cc +++ b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding.cc
@@ -156,7 +156,7 @@ // possible_type was determined by a valid email address found within the // field's content. The kAutofillUploadVotesForFieldsWithEmail feature // handles this scenario. - if (type == EMAIL_ADDRESS && IsValidEmailAddress(field->value) && + if (type == EMAIL_ADDRESS && IsValidEmailAddress(field->value()) && base::FeatureList::IsEnabled( features::kAutofillUploadVotesForFieldsWithEmail)) { continue;
diff --git a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding_unittest.cc b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding_unittest.cc index d96b7dc..fb31286 100644 --- a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding_unittest.cc +++ b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_encoding_unittest.cc
@@ -1496,9 +1496,9 @@ nullptr); // Simulate user changed non-pre-filled field value. - form_structure.field(0)->value = u"John"; + form_structure.field(0)->set_value(u"John"); // Simulate user changed pre-filled field value. - form_structure.field(2)->value = u"changed@example.com"; + form_structure.field(2)->set_value(u"changed@example.com"); // Sets `initial_value_changed` on `form_structure::fields_`. form_structure.RetrieveFromCache(
diff --git a/components/autofill/core/browser/crowdsourcing/determine_possible_field_types.cc b/components/autofill/core/browser/crowdsourcing/determine_possible_field_types.cc index 7150404..795d9fef 100644 --- a/components/autofill/core/browser/crowdsourcing/determine_possible_field_types.cc +++ b/components/autofill/core/browser/crowdsourcing/determine_possible_field_types.cc
@@ -26,7 +26,7 @@ const std::u16string& value) { for (const auto& field : form_structure) { std::u16string trimmed_value; - base::TrimWhitespace(field->value, base::TRIM_ALL, &trimmed_value); + base::TrimWhitespace(field->value(), base::TRIM_ALL, &trimmed_value); if (trimmed_value == value) { return field.get(); } @@ -82,7 +82,7 @@ DCHECK_EQ(1u, type_set.size()); std::u16string trimmed_value; - base::TrimWhitespace(field->value, base::TRIM_ALL, &trimmed_value); + base::TrimWhitespace(field->value(), base::TRIM_ALL, &trimmed_value); // Skip the field if it can be confused with a expiration year. if (!found_explicit_expiration_year_field && @@ -138,7 +138,7 @@ std::u16string value; // Note: in case of a <select><option value="A">B</option></select>, the // `field.value` stores "B". - base::TrimWhitespace(field.value, base::TRIM_ALL, &value); + base::TrimWhitespace(field.value(), base::TRIM_ALL, &value); for (const AutofillProfile& profile : profiles) { profile.GetMatchingTypes(value, app_locale, &matching_types);
diff --git a/components/autofill/core/browser/form_autofill_history.cc b/components/autofill/core/browser/form_autofill_history.cc index 84a2db71..4120f15 100644 --- a/components/autofill/core/browser/form_autofill_history.cc +++ b/components/autofill/core/browser/form_autofill_history.cc
@@ -77,7 +77,7 @@ .field_filling_entries .emplace(field->global_id(), FieldFillingEntry( - field->value, field->is_autofilled, + field->value(), field->is_autofilled, autofill_field->autofill_source_profile_guid(), autofill_field->autofilled_type())) .second;
diff --git a/components/autofill/core/browser/form_autofill_history_unittest.cc b/components/autofill/core/browser/form_autofill_history_unittest.cc index 32e5337a..eae08ec 100644 --- a/components/autofill/core/browser/form_autofill_history_unittest.cc +++ b/components/autofill/core/browser/form_autofill_history_unittest.cc
@@ -90,7 +90,7 @@ AddFormFilling(/*is_refill=*/false); // Modify the first name filling to simulate a refill. - filled_fields_[0].value = u"some-other-first-name"; + filled_fields_[0].set_value(u"some-other-first-name"); FieldGlobalId last_name_id = AddNewFieldFilling( "last name", "last name", "some-other-last-name", FormControlType::kInputText, NAME_LAST, /*is_autofilled=*/true);
diff --git a/components/autofill/core/browser/form_data_importer.cc b/components/autofill/core/browser/form_data_importer.cc index af71028..e807b26 100644 --- a/components/autofill/core/browser/form_data_importer.cc +++ b/components/autofill/core/browser/form_data_importer.cc
@@ -494,7 +494,7 @@ // Go through each |form| field and attempt to constitute a valid profile. for (const AutofillField* const field : section_fields) { std::u16string value; - base::TrimWhitespace(field->value, base::TRIM_ALL, &value); + base::TrimWhitespace(field->value(), base::TRIM_ALL, &value); // If we don't know the type of the field, or the user hasn't entered any // information into the field, then skip it. @@ -1005,7 +1005,7 @@ FieldType field_type = autofill_type.GetStorableType(); - std::u16string value_view = field->value; + std::u16string value_view = field->value(); std::u16string_view user_input_view = base::TrimWhitespace(field->user_input, base::TRIM_ALL); if (base::FeatureList::IsEnabled( @@ -1065,7 +1065,7 @@ const AutofillField& field) { // The value of interest is `field->value` or `field->user_input`. std::u16string_view value_view = - base::TrimWhitespace(field.value, base::TRIM_ALL); + base::TrimWhitespace(field.value(), base::TRIM_ALL); std::u16string_view user_input_view = base::TrimWhitespace(field.user_input, base::TRIM_ALL); if (!user_input_view.empty() && @@ -1151,14 +1151,14 @@ Iban candidate_iban; for (const auto& field : form) { - if (!field->IsFieldFillable() || field->value.empty()) { + if (!field->IsFieldFillable() || field->value().empty()) { continue; } AutofillType autofill_type = field->Type(); if (autofill_type.GetStorableType() == IBAN_VALUE && - Iban::IsValid(field->value)) { - candidate_iban.SetInfo(autofill_type, field->value, app_locale_); + Iban::IsValid(field->value())) { + candidate_iban.SetInfo(autofill_type, field->value(), app_locale_); break; } }
diff --git a/components/autofill/core/browser/form_data_importer_unittest.cc b/components/autofill/core/browser/form_data_importer_unittest.cc index cfd39f8..17f8ddf1 100644 --- a/components/autofill/core/browser/form_data_importer_unittest.cc +++ b/components/autofill/core/browser/form_data_importer_unittest.cc
@@ -1319,7 +1319,7 @@ // Change the value of the email field. ASSERT_EQ(form_structure->field(2)->Type().GetStorableType(), EMAIL_ADDRESS); - form_structure->field(2)->value = u"bogus"; + form_structure->field(2)->set_value(u"bogus"); // Verify that there was no import. ImportAddressProfileAndVerifyImportOfNoProfile(*form_structure); @@ -1598,7 +1598,7 @@ FormData hidden_second_form = form_data; for (FormFieldData& field : hidden_second_form.fields) { // Reset the values and make the field non focusable. - field.value = u""; + field.set_value(u""); field.is_focusable = false; } @@ -4351,7 +4351,7 @@ GetObservedFieldValues_SkipFieldsFilledWithFallback) { AutofillField field; field.SetTypeTo(AutofillType(NAME_FIRST)); - field.value = u"First"; + field.set_value(u"First"); const AutofillField* field_ptr = &field; base::flat_map<FieldType, std::u16string> observed_field_types = @@ -4380,7 +4380,7 @@ Mode mode = Mode::kDefaultValue) { AutofillField& f = test_api(form_).PushField(); f.set_server_predictions({test::CreateFieldPrediction(field_type)}); - f.value = std::move(value); + f.set_value(std::move(value)); f.is_autofilled = mode == Mode::kAutofilled; f.is_user_edited = mode == Mode::kUserEdited; }
diff --git a/components/autofill/core/browser/form_filler.cc b/components/autofill/core/browser/form_filler.cc index 251ea8b..85a7258 100644 --- a/components/autofill/core/browser/form_filler.cc +++ b/components/autofill/core/browser/form_filler.cc
@@ -183,7 +183,7 @@ // TODO(b/40227496): 'autofill_field.value' should be the initial value of // the field. `form_field.value` should be the current value. if ((field.properties_mask & kUserTyped) && - (!field.value.empty() || !autofill_field.value.empty()) && + (!field.value().empty() || !autofill_field.value().empty()) && !is_trigger_field) { return FieldFillingSkipReason::kUserFilledFields; } @@ -251,7 +251,7 @@ // TODO(b/40227496): 'autofill_field.value' should be the initial value of // the field. if (!is_trigger_field && !autofill_field.IsSelectOrSelectListElement() && - !autofill_field.value.empty() && + !autofill_field.value().empty() && (IsNotAPlaceholder(autofill_field) || IsMeaningfullyPreFilled(autofill_field))) { return FieldFillingSkipReason::kValuePrefilled; @@ -392,7 +392,7 @@ const FormAutofillHistory::FieldFillingEntry& previous_state = operation.GetFieldFillingEntry(field.global_id()); // Update the FormFieldData to be sent for the renderer. - field.value = previous_state.value; + field.set_value(previous_state.value); field.is_autofilled = previous_state.is_autofilled; // Update the cached AutofillField in the browser. @@ -446,7 +446,7 @@ autofill_field->is_autofilled = true; autofill_field->AppendLogEventIfNotRepeated(FillFieldLogEvent{ .fill_event_id = GetNextFillEventId(), - .had_value_before_filling = ToOptionalBoolean(!field.value.empty()), + .had_value_before_filling = ToOptionalBoolean(!field.value().empty()), .autofill_skipped_status = FieldFillingSkipReason::kNotSkipped, .was_autofilled_before_security_policy = ToOptionalBoolean(true), .had_value_after_filling = ToOptionalBoolean(true), @@ -585,7 +585,7 @@ *form_structure, *autofill_field, !autofill_field->IsSelectElement()); } - const bool has_value_before = !result_form.fields[i].value.empty(); + const bool has_value_before = !result_form.fields[i].value().empty(); // Log when the suggestion is selected and log on non-checkable fields that // skip filling. if (skip_reasons[autofill_field->global_id()] != @@ -664,7 +664,7 @@ action_persistence, &failure_to_fill); const bool autofilled_value_did_not_change = form.fields[i].is_autofilled && result_form.fields[i].is_autofilled && - form.fields[i].value == result_form.fields[i].value; + form.fields[i].value() == result_form.fields[i].value(); if (is_newly_autofilled && !autofilled_value_did_not_change) { newly_filled_field_ids.insert(result_form.fields[i].global_id()); } else if (is_newly_autofilled) { @@ -675,7 +675,7 @@ FieldFillingSkipReason::kNoValueToFill; } - const bool has_value_after = !result_form.fields[i].value.empty(); + const bool has_value_after = !result_form.fields[i].value().empty(); const bool is_autofilled_before = form.fields[i].is_autofilled; const bool is_autofilled_after = result_form.fields[i].is_autofilled; @@ -951,7 +951,7 @@ if (old_value.length() != kSupportedLength) { return; } - if (old_value == field.value) { + if (old_value == field.value()) { return; } static constexpr char16_t kFormatRegEx[] = @@ -963,7 +963,7 @@ DCHECK_EQ(old_groups.size(), 4u); std::vector<std::u16string> new_groups; - if (!MatchesRegex<kFormatRegEx>(field.value, &new_groups)) { + if (!MatchesRegex<kFormatRegEx>(field.value(), &new_groups)) { return; } DCHECK_EQ(new_groups.size(), 4u); @@ -979,7 +979,7 @@ old_year / 100 != new_year) { return; } - std::u16string refill_value = field.value; + std::u16string refill_value = field.value(); CHECK(refill_value.size() >= 2); refill_value[refill_value.size() - 1] = '0' + (old_year % 10); refill_value[refill_value.size() - 2] = '0' + ((old_year % 100) / 10); @@ -1054,7 +1054,7 @@ } return false; } - field_data.value = filling_content.value_to_fill; + field_data.set_value(filling_content.value_to_fill); field_data.force_override = filling_content.value_is_an_override; if (failure_to_fill) {
diff --git a/components/autofill/core/browser/form_filler_unittest.cc b/components/autofill/core/browser/form_filler_unittest.cc index 003c502..73c63a4 100644 --- a/components/autofill/core/browser/form_filler_unittest.cc +++ b/components/autofill/core/browser/form_filler_unittest.cc
@@ -102,12 +102,12 @@ }; MATCHER_P(HasValue, value, "") { - return arg.value == value; + return arg.value() == value; } // Takes a FormFieldData argument. MATCHER_P(AutofilledWith, value, "") { - return arg.is_autofilled && arg.value == value; + return arg.is_autofilled && arg.value() == value; } // Takes an AutofillField argument. @@ -299,7 +299,7 @@ EXPECT_THAT(filled_form.fields[0], AutofilledWith(profile.GetInfo(NAME_FIRST, kAppLocale))); EXPECT_FALSE(filled_form.fields[1].is_autofilled); - EXPECT_TRUE(filled_form.fields[1].value.empty()); + EXPECT_TRUE(filled_form.fields[1].value().empty()); } // Test that the correct section is filled. @@ -402,7 +402,7 @@ AutofilledWith(profile.GetInfo(EMAIL_ADDRESS, kAppLocale))); expect_hash(filled_form.fields[2], std::nullopt); EXPECT_FALSE(filled_form.fields[3].is_autofilled); - EXPECT_EQ(filled_form.fields[3].value, form.fields[3].value); + EXPECT_EQ(filled_form.fields[3].value(), form.fields[3].value()); expect_hash(filled_form.fields[3], base::FastHash(base::UTF16ToUTF8( profile.GetInfo(kSkippedType, kAppLocale)))); @@ -448,9 +448,9 @@ EXPECT_THAT(filled_form.fields[1], AutofilledWith(profile.GetInfo(NAME_LAST, kAppLocale))); EXPECT_FALSE(filled_form.fields[2].is_autofilled); - EXPECT_EQ(filled_form.fields[2].value, form.fields[2].value); + EXPECT_EQ(filled_form.fields[2].value(), form.fields[2].value()); EXPECT_FALSE(filled_form.fields[3].is_autofilled); - EXPECT_EQ(filled_form.fields[3].value, form.fields[3].value); + EXPECT_EQ(filled_form.fields[3].value(), form.fields[3].value()); EXPECT_THAT(filled_form.fields[4], AutofilledWith(kToBeFilledState)); } @@ -651,7 +651,7 @@ CREDIT_CARD_NAME_FULL, kAppLocale))); EXPECT_THAT(filled_form.fields[1], AutofilledWith(credit_card.GetInfo( CREDIT_CARD_NUMBER, kAppLocale))); - EXPECT_EQ(filled_form.fields[2].value, GetParam().expected_filled_date); + EXPECT_EQ(filled_form.fields[2].value(), GetParam().expected_filled_date); EXPECT_FALSE(filled_form.fields[3].is_autofilled); } @@ -704,7 +704,7 @@ << i; } EXPECT_FALSE(filled_form.fields[19].is_autofilled); - EXPECT_TRUE(filled_form.fields[19].value.empty()); + EXPECT_TRUE(filled_form.fields[19].value().empty()); } // Test that we correctly fill a credit card form with first and last cardholder @@ -730,7 +730,7 @@ AutofilledWith(credit_card.GetInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, kAppLocale))); EXPECT_FALSE(filled_form.fields[5].is_autofilled); - EXPECT_TRUE(filled_form.fields[5].value.empty()); + EXPECT_TRUE(filled_form.fields[5].value().empty()); } // Test that only filled selection boxes are counted for the type filling limit. @@ -770,7 +770,7 @@ EXPECT_THAT(filled_form.fields[i], AutofilledWith(u"US")) << i; } EXPECT_FALSE(filled_form.fields[30].is_autofilled); - EXPECT_TRUE(filled_form.fields[30].value.empty()); + EXPECT_TRUE(filled_form.fields[30].value().empty()); } // Test that fields with the autocomplete attribute set to off are filled. @@ -880,11 +880,11 @@ EXPECT_THAT(filled_form.fields[1], AutofilledWith(expired_card.GetInfo( CREDIT_CARD_NUMBER, kAppLocale))); EXPECT_FALSE(filled_form.fields[2].is_autofilled); - EXPECT_TRUE(filled_form.fields[2].value.empty()); + EXPECT_TRUE(filled_form.fields[2].value().empty()); EXPECT_FALSE(filled_form.fields[3].is_autofilled); - EXPECT_TRUE(filled_form.fields[3].value.empty()); + EXPECT_TRUE(filled_form.fields[3].value().empty()); EXPECT_FALSE(filled_form.fields[4].is_autofilled); - EXPECT_TRUE(filled_form.fields[4].value.empty()); + EXPECT_TRUE(filled_form.fields[4].value().empty()); } TEST_F(FormFillerTest, PreviewCreditCardForm_VirtualCard) { @@ -912,11 +912,11 @@ std::u16string expected_cvc = CreditCard::GetMidlineEllipsisPlainDots(/*num_dots=*/3); - EXPECT_EQ(filled_form.fields[0].value, expected_cardholder_name); - EXPECT_EQ(filled_form.fields[1].value, expected_card_number); - EXPECT_EQ(filled_form.fields[2].value, expected_exp_month); - EXPECT_EQ(filled_form.fields[3].value, expected_exp_year); - EXPECT_EQ(filled_form.fields[4].value, expected_cvc); + EXPECT_EQ(filled_form.fields[0].value(), expected_cardholder_name); + EXPECT_EQ(filled_form.fields[1].value(), expected_card_number); + EXPECT_EQ(filled_form.fields[2].value(), expected_exp_month); + EXPECT_EQ(filled_form.fields[3].value(), expected_exp_year); + EXPECT_EQ(filled_form.fields[4].value(), expected_cvc); } // Test that unfocusable fields aren't filled, except for <select> fields (but @@ -945,9 +945,9 @@ EXPECT_THAT(filled_form.fields[0], AutofilledWith(profile.GetInfo(NAME_FULL, kAppLocale))); EXPECT_FALSE(filled_form.fields[1].is_autofilled); - EXPECT_TRUE(filled_form.fields[1].value.empty()); + EXPECT_TRUE(filled_form.fields[1].value().empty()); EXPECT_FALSE(filled_form.fields[2].is_autofilled); - EXPECT_TRUE(filled_form.fields[2].value.empty()); + EXPECT_TRUE(filled_form.fields[2].value().empty()); EXPECT_THAT(filled_form.fields[3], AutofilledWith(u"US")); } @@ -976,11 +976,11 @@ EXPECT_THAT(filled_form.fields[0], AutofilledWith(profile.GetRawInfo(ADDRESS_HOME_COUNTRY))); EXPECT_FALSE(filled_form.fields[1].is_autofilled); - EXPECT_TRUE(filled_form.fields[1].value.empty()); + EXPECT_TRUE(filled_form.fields[1].value().empty()); EXPECT_FALSE(filled_form.fields[2].is_autofilled); - EXPECT_TRUE(filled_form.fields[2].value.empty()); + EXPECT_TRUE(filled_form.fields[2].value().empty()); EXPECT_FALSE(filled_form.fields[3].is_autofilled); - EXPECT_TRUE(filled_form.fields[3].value.empty()); + EXPECT_TRUE(filled_form.fields[3].value().empty()); EXPECT_THAT(filled_form.fields[4], AutofilledWith(profile.GetInfo(EMAIL_ADDRESS, kAppLocale))); @@ -988,30 +988,30 @@ filled_form = FillAutofillFormData(form, form.fields[1], &profile); ASSERT_EQ(filled_form.fields.size(), 5u); EXPECT_FALSE(filled_form.fields[0].is_autofilled); - EXPECT_TRUE(filled_form.fields[0].value.empty()); + EXPECT_TRUE(filled_form.fields[0].value().empty()); EXPECT_THAT(filled_form.fields[1], AutofilledWith(profile.GetInfo(ADDRESS_HOME_LINE1, kAppLocale))); EXPECT_FALSE(filled_form.fields[2].is_autofilled); - EXPECT_TRUE(filled_form.fields[2].value.empty()); + EXPECT_TRUE(filled_form.fields[2].value().empty()); EXPECT_FALSE(filled_form.fields[3].is_autofilled); - EXPECT_TRUE(filled_form.fields[3].value.empty()); + EXPECT_TRUE(filled_form.fields[3].value().empty()); EXPECT_FALSE(filled_form.fields[4].is_autofilled); - EXPECT_TRUE(filled_form.fields[4].value.empty()); + EXPECT_TRUE(filled_form.fields[4].value().empty()); // Fill the credit card portion of the billing section. CreditCard credit_card = test::GetCreditCard(); filled_form = FillAutofillFormData(form, form.fields[2], &credit_card); ASSERT_EQ(filled_form.fields.size(), 5u); EXPECT_FALSE(filled_form.fields[0].is_autofilled); - EXPECT_TRUE(filled_form.fields[0].value.empty()); + EXPECT_TRUE(filled_form.fields[0].value().empty()); EXPECT_FALSE(filled_form.fields[1].is_autofilled); - EXPECT_TRUE(filled_form.fields[1].value.empty()); + EXPECT_TRUE(filled_form.fields[1].value().empty()); EXPECT_THAT(filled_form.fields[2], AutofilledWith(credit_card.GetInfo( CREDIT_CARD_NAME_FULL, kAppLocale))); EXPECT_THAT(filled_form.fields[3], AutofilledWith(credit_card.GetInfo( CREDIT_CARD_NUMBER, kAppLocale))); EXPECT_FALSE(filled_form.fields[4].is_autofilled); - EXPECT_TRUE(filled_form.fields[4].value.empty()); + EXPECT_TRUE(filled_form.fields[4].value().empty()); } // Test that we correctly fill a form that has a single logical section with @@ -1051,7 +1051,7 @@ ASSERT_EQ(filled_form.fields.size(), 2u); EXPECT_THAT(filled_form.fields[0], AutofilledWith(profile.GetInfo(NAME_FULL, kAppLocale))); - EXPECT_TRUE(filled_form.fields[1].value.empty()); + EXPECT_TRUE(filled_form.fields[1].value().empty()); } // Test that we correctly fill a previously autofilled credit card form. @@ -1073,7 +1073,7 @@ ASSERT_EQ(filled_form.fields.size(), 2u); EXPECT_THAT(filled_form.fields[0], AutofilledWith(credit_card.GetInfo( CREDIT_CARD_NAME_FULL, kAppLocale))); - EXPECT_TRUE(filled_form.fields[1].value.empty()); + EXPECT_TRUE(filled_form.fields[1].value().empty()); } // Test that we correctly fill a partly manually filled address form. @@ -1085,10 +1085,10 @@ {.role = NAME_LAST, .autocomplete_attribute = "family-name"}}}); // Michael will be overridden with Elvis because Autofill is triggered from // the first field. - form.fields[0].value = u"Michael"; + form.fields[0].set_value(u"Michael"); form.fields[0].properties_mask |= kUserTyped; // Jackson will be preserved. - form.fields[2].value = u"Jackson"; + form.fields[2].set_value(u"Jackson"); form.fields[2].properties_mask |= kUserTyped; FormsSeen({form}); @@ -1114,10 +1114,10 @@ .autocomplete_attribute = "cc-number"}}}); // Michael will be overridden with Elvis because Autofill is triggered from // the first field. - form.fields[0].value = u"Michael"; + form.fields[0].set_value(u"Michael"); form.fields[0].properties_mask |= kUserTyped; // Jackson will be preserved. - form.fields[1].value = u"Jackson"; + form.fields[1].set_value(u"Jackson"); form.fields[1].properties_mask |= kUserTyped; FormsSeen({form}); @@ -1181,19 +1181,19 @@ form_with_us_number_max_length, form_with_us_number_max_length.fields.front(), &profile); ASSERT_EQ(4u, filled_form1.fields.size()); - EXPECT_EQ(u"1", filled_form1.fields[0].value); - EXPECT_EQ(u"650", filled_form1.fields[1].value); - EXPECT_EQ(u"555", filled_form1.fields[2].value); - EXPECT_EQ(u"4567", filled_form1.fields[3].value); + EXPECT_EQ(u"1", filled_form1.fields[0].value()); + EXPECT_EQ(u"650", filled_form1.fields[1].value()); + EXPECT_EQ(u"555", filled_form1.fields[2].value()); + EXPECT_EQ(u"4567", filled_form1.fields[3].value()); FormData filled_form2 = FillAutofillFormData(form_with_autocompletetype, form_with_autocompletetype.fields.front(), &profile); ASSERT_EQ(4u, filled_form2.fields.size()); - EXPECT_EQ(u"1", filled_form2.fields[0].value); - EXPECT_EQ(u"650", filled_form2.fields[1].value); - EXPECT_EQ(u"555", filled_form2.fields[2].value); - EXPECT_EQ(u"4567", filled_form2.fields[3].value); + EXPECT_EQ(u"1", filled_form2.fields[0].value()); + EXPECT_EQ(u"650", filled_form2.fields[1].value()); + EXPECT_EQ(u"555", filled_form2.fields[2].value()); + EXPECT_EQ(u"4567", filled_form2.fields[3].value()); // For other countries, fill prefix and suffix fields with best effort. profile.SetRawInfo(ADDRESS_HOME_COUNTRY, u"GB"); @@ -1202,19 +1202,19 @@ form_with_us_number_max_length, form_with_us_number_max_length.fields.front(), &profile); ASSERT_EQ(4u, filled_form3.fields.size()); - EXPECT_EQ(u"4", filled_form3.fields[0].value); - EXPECT_EQ(u"700", filled_form3.fields[1].value); - EXPECT_EQ(u"95", filled_form3.fields[2].value); - EXPECT_EQ(u"4321", filled_form3.fields[3].value); + EXPECT_EQ(u"4", filled_form3.fields[0].value()); + EXPECT_EQ(u"700", filled_form3.fields[1].value()); + EXPECT_EQ(u"95", filled_form3.fields[2].value()); + EXPECT_EQ(u"4321", filled_form3.fields[3].value()); FormData filled_form4 = FillAutofillFormData(form_with_autocompletetype, form_with_autocompletetype.fields.front(), &profile); ASSERT_EQ(4u, filled_form4.fields.size()); - EXPECT_EQ(u"44", filled_form4.fields[0].value); - EXPECT_EQ(u"7700", filled_form4.fields[1].value); - EXPECT_EQ(u"95", filled_form4.fields[2].value); - EXPECT_EQ(u"4321", filled_form4.fields[3].value); + EXPECT_EQ(u"44", filled_form4.fields[0].value()); + EXPECT_EQ(u"7700", filled_form4.fields[1].value()); + EXPECT_EQ(u"95", filled_form4.fields[2].value()); + EXPECT_EQ(u"4321", filled_form4.fields[3].value()); } TEST_F(FormFillerTest, FillPhoneNumber_ForPhonePrefixOrSuffix) { @@ -1287,13 +1287,13 @@ FillAutofillFormData(form, form.fields.front(), &profile); // Verify only the first complete set of phone number fields are filled. ASSERT_EQ(7u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"1", filled_form.fields[1].value); - EXPECT_EQ(u"650", filled_form.fields[2].value); - EXPECT_EQ(u"5554567", filled_form.fields[3].value); - EXPECT_EQ(std::u16string(), filled_form.fields[4].value); - EXPECT_EQ(std::u16string(), filled_form.fields[5].value); - EXPECT_EQ(std::u16string(), filled_form.fields[6].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"1", filled_form.fields[1].value()); + EXPECT_EQ(u"650", filled_form.fields[2].value()); + EXPECT_EQ(u"5554567", filled_form.fields[3].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[4].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[5].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[6].value()); } TEST_F(FormFillerTest, FillFirstPhoneNumber_WholeNumbers) { @@ -1312,9 +1312,9 @@ FillAutofillFormData(form, form.fields.front(), &profile); // Verify only the first complete set of phone number fields are filled. ASSERT_EQ(3u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"6505554567", filled_form.fields[1].value); - EXPECT_EQ(std::u16string(), filled_form.fields[2].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[1].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[2].value()); } TEST_F(FormFillerTest, FillFirstPhoneNumber_FillPartsOnceOnly) { @@ -1336,10 +1336,10 @@ // Verify only the first complete set of phone number fields are filled, // and phone components are not filled more than once. ASSERT_EQ(4u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"1", filled_form.fields[1].value); - EXPECT_EQ(std::u16string(), filled_form.fields[2].value); - EXPECT_EQ(u"6505554567", filled_form.fields[3].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"1", filled_form.fields[1].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[2].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[3].value()); } // Verify when extension is misclassified, and there is a complete @@ -1360,9 +1360,9 @@ FillAutofillFormData(form, form.fields.front(), &profile); // Verify the misclassified extension field is not filled. ASSERT_EQ(3u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"5554567", filled_form.fields[1].value); - EXPECT_EQ(std::u16string(), filled_form.fields[2].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"5554567", filled_form.fields[1].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[2].value()); } // Verify that phone number fields annotated with the autocomplete attribute @@ -1382,8 +1382,8 @@ FillAutofillFormData(form, form.fields.front(), &profile); // Verify that we fill with best effort. ASSERT_EQ(2U, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"650", filled_form.fields[1].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"650", filled_form.fields[1].value()); } // When the focus is on second phone field explicitly, we will fill the @@ -1404,9 +1404,9 @@ // Verify when the second phone number field is being focused, we fill // that field *AND* the first phone number field. ASSERT_EQ(3u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"6505554567", filled_form.fields[1].value); - EXPECT_EQ(u"6505554567", filled_form.fields[2].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[1].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[2].value()); } TEST_F(FormFillerTest, FillFirstPhoneNumber_HiddenFieldShouldNotCount) { @@ -1425,9 +1425,9 @@ FillAutofillFormData(form, form.fields.front(), &profile); // Verify hidden/non-focusable phone field is set to only_fill_when_focused. ASSERT_EQ(3u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(std::u16string(), filled_form.fields[1].value); - EXPECT_EQ(u"6505554567", filled_form.fields[2].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[1].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[2].value()); } // Tests that only hidden/presentational select fields are filled. @@ -1485,23 +1485,23 @@ FormData filled_form = FillAutofillFormData(form, form.fields[0], &profile); // Verify first section is filled with rationalization. ASSERT_EQ(6u, filled_form.fields.size()); - EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value); - EXPECT_EQ(u"6505554567", filled_form.fields[1].value); - EXPECT_EQ(std::u16string(), filled_form.fields[2].value); - EXPECT_EQ(std::u16string(), filled_form.fields[3].value); - EXPECT_EQ(std::u16string(), filled_form.fields[4].value); - EXPECT_EQ(std::u16string(), filled_form.fields[5].value); + EXPECT_EQ(u"John H. Doe", filled_form.fields[0].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[1].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[2].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[3].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[4].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[5].value()); // Fill the second section. filled_form = FillAutofillFormData(form, form.fields[3], &profile); // Verify second section is filled with rationalization. ASSERT_EQ(6u, filled_form.fields.size()); - EXPECT_EQ(std::u16string(), filled_form.fields[0].value); - EXPECT_EQ(std::u16string(), filled_form.fields[1].value); - EXPECT_EQ(std::u16string(), filled_form.fields[2].value); - EXPECT_EQ(u"John H. Doe", filled_form.fields[3].value); - EXPECT_EQ(u"6505554567", filled_form.fields[4].value); - EXPECT_EQ(std::u16string(), filled_form.fields[5].value); + EXPECT_EQ(std::u16string(), filled_form.fields[0].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[1].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[2].value()); + EXPECT_EQ(u"John H. Doe", filled_form.fields[3].value()); + EXPECT_EQ(u"6505554567", filled_form.fields[4].value()); + EXPECT_EQ(std::u16string(), filled_form.fields[5].value()); } // Test that we can still fill a form when a field has been removed from it. @@ -1679,7 +1679,7 @@ FormData filled_form = FillAutofillFormData(form, form.fields[0], &profile); // Simulate editing the first field. - filled_form.fields[0].value = u""; + filled_form.fields[0].set_value(u""); browser_autofill_manager_->OnTextFieldDidChange( filled_form, filled_form.fields[0], gfx::RectF(), base::TimeTicks::Now()); @@ -1766,7 +1766,7 @@ // Simulate that JavaScript modifies the expiration date field. FormData form_after_js_modification = first_fill_data; - form_after_js_modification.fields[2].value = test_case.exp_date_from_js; + form_after_js_modification.fields[2].set_value(test_case.exp_date_from_js); browser_autofill_manager_->OnJavaScriptChangedAutofilledValue( form_after_js_modification, form_after_js_modification.fields[2], u"04/2999");
diff --git a/components/autofill/core/browser/form_forest.cc b/components/autofill/core/browser/form_forest.cc index ed88395d..5095b85 100644 --- a/components/autofill/core/browser/form_forest.cc +++ b/components/autofill/core/browser/form_forest.cc
@@ -601,7 +601,7 @@ renderer_form->fields.push_back(browser_field); if (!IsSafeToFill(renderer_form->fields.back())) { - renderer_form->fields.back().value = u""; + renderer_form->fields.back().set_value(u""); } else { result.safe_fields.insert(browser_field.global_id()); }
diff --git a/components/autofill/core/browser/form_forest_test_api.cc b/components/autofill/core/browser/form_forest_test_api.cc index 836fe47..85416ac78 100644 --- a/components/autofill/core/browser/form_forest_test_api.cc +++ b/components/autofill/core/browser/form_forest_test_api.cc
@@ -107,8 +107,8 @@ if (!field.name_attribute.empty()) { os << prefix << " Name " << field.name_attribute << std::endl; } - if (!field.value.empty()) { - os << prefix << " Value " << field.value << std::endl; + if (!field.value().empty()) { + os << prefix << " Value " << field.value() << std::endl; } if (!field.label.empty()) { os << prefix << " Label "
diff --git a/components/autofill/core/browser/form_forest_unittest.cc b/components/autofill/core/browser/form_forest_unittest.cc index 96542bf9..3aab709 100644 --- a/components/autofill/core/browser/form_forest_unittest.cc +++ b/components/autofill/core/browser/form_forest_unittest.cc
@@ -79,7 +79,7 @@ Field("origin", &FormFieldData::origin, exp.origin), Field("form_control_type", &FormFieldData::form_control_type, exp.form_control_type), - Field("value", &FormFieldData::value, exp.value), + Property("value", &FormFieldData::value, exp.value()), Field("label", &FormFieldData::label, exp.label), Field("host_form_signature", &FormFieldData::host_form_signature, exp.host_form_signature)); @@ -161,13 +161,13 @@ CHECK_GT(form.fields.size() / 6, 0u); for (size_t i = 0; i < form.fields.size() / 6; ++i) { std::bitset<6> bitset(profile.value() + i); - form.fields[6 * i + 0].value = bitset.test(0) ? u"Jane" : u"John"; - form.fields[6 * i + 1].value = bitset.test(1) ? u"Doe" : u"Average"; - form.fields[6 * i + 2].value = - bitset.test(2) ? u"4444333322221111" : u"4444444444444444"; - form.fields[6 * i + 3].value = bitset.test(3) ? u"01" : u"12"; - form.fields[6 * i + 4].value = bitset.test(4) ? u"2083" : u"2087"; - form.fields[6 * i + 5].value = bitset.test(5) ? u"123" : u"456"; + form.fields[6 * i + 0].set_value(bitset.test(0) ? u"Jane" : u"John"); + form.fields[6 * i + 1].set_value(bitset.test(1) ? u"Doe" : u"Average"); + form.fields[6 * i + 2].set_value(bitset.test(2) ? u"4444333322221111" + : u"4444444444444444"); + form.fields[6 * i + 3].set_value(bitset.test(3) ? u"01" : u"12"); + form.fields[6 * i + 4].set_value(bitset.test(4) ? u"2083" : u"2087"); + form.fields[6 * i + 5].set_value(bitset.test(5) ? u"123" : u"456"); } return form; } @@ -1544,10 +1544,10 @@ WithValues(GetMockedForm("child2"), Profile(2))}; // Clear sensitive fields: the credit card number (field index 2) and CVC // (field index 5) in the two main-origin forms. - expectation[0].fields[2].value = u""; - expectation[0].fields[5].value = u""; - expectation[1].fields[2].value = u""; - expectation[1].fields[5].value = u""; + expectation[0].fields[2].set_value(u""); + expectation[0].fields[5].set_value(u""); + expectation[1].fields[2].set_value(u""); + expectation[1].fields[5].set_value(u""); EXPECT_THAT(GetRendererFormsOfBrowserForm("main", Origin(kIframeUrl), FieldTypeMap("main")), UnorderedArrayEquals(expectation));
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc index fd40360..0909067 100644 --- a/components/autofill/core/browser/form_structure.cc +++ b/components/autofill/core/browser/form_structure.cc
@@ -487,7 +487,7 @@ // the `value` represents the initial value found at page load and needs // to be preserved. if (!field->IsSelectOrSelectListElement()) { - field->value = cached_field->value; + field->set_value(cached_field->value()); } break; case RetrieveFromCacheReason::kFormImport: @@ -498,11 +498,11 @@ // Since a website can prefill country and state values based on // GeoIP, we want to hold on to these values. const bool same_value_as_on_page_load = - field->value == cached_field->value; + field->value() == cached_field->value(); const bool had_type = cached_field->Type().GetStorableType() > FieldType::UNKNOWN_TYPE || !cached_field->possible_types().empty(); - if (!cached_field->value.empty() && + if (!cached_field->value().empty() && !field->IsSelectOrSelectListElement() && had_type) { field->set_initial_value_changed(!same_value_as_on_page_load); } @@ -511,7 +511,7 @@ field->server_type() != ADDRESS_HOME_STATE; if (!field->IsSelectOrSelectListElement() && same_value_as_on_page_load && field_is_neither_state_nor_country) { - field->value = std::u16string(); + field->set_value(std::u16string()); } break; }
diff --git a/components/autofill/core/browser/form_structure_unittest.cc b/components/autofill/core/browser/form_structure_unittest.cc index 57f8d49..3f64484 100644 --- a/components/autofill/core/browser/form_structure_unittest.cc +++ b/components/autofill/core/browser/form_structure_unittest.cc
@@ -1290,7 +1290,7 @@ field.label = std::u16string(); field.name = u"Submit"; - field.value = u"continue"; + field.set_value(u"continue"); field.form_control_type = FormControlType::kInputText; field.renderer_id = test::MakeFieldRendererId(); form.fields.push_back(field);
diff --git a/components/autofill/core/browser/form_types_unittest.cc b/components/autofill/core/browser/form_types_unittest.cc index 58ba4e6..d9104de3 100644 --- a/components/autofill/core/browser/form_types_unittest.cc +++ b/components/autofill/core/browser/form_types_unittest.cc
@@ -24,7 +24,7 @@ autofill::FormFieldData CreateFieldWithValue(std::u16string value) { FormFieldData field; - field.value = value; + field.set_value(value); return field; }
diff --git a/components/autofill/core/browser/iban_manager.cc b/components/autofill/core/browser/iban_manager.cc index 68384fc7..f47d252 100644 --- a/components/autofill/core/browser/iban_manager.cc +++ b/components/autofill/core/browser/iban_manager.cc
@@ -118,12 +118,12 @@ OnSuggestionsReturnedCallback on_suggestions_returned) { // If the input box content equals any of the available IBANs, then // assume the IBAN has been filled, and don't show any suggestions. - if (!field.value.empty() && - base::Contains(ibans, field.value, &Iban::value)) { + if (!field.value().empty() && + base::Contains(ibans, field.value(), &Iban::value)) { return; } - FilterIbansToSuggest(field.value, ibans); + FilterIbansToSuggest(field.value(), ibans); if (ibans.empty()) { return;
diff --git a/components/autofill/core/browser/iban_manager_unittest.cc b/components/autofill/core/browser/iban_manager_unittest.cc index c2ab1a0..548ed65 100644 --- a/components/autofill/core/browser/iban_manager_unittest.cc +++ b/components/autofill/core/browser/iban_manager_unittest.cc
@@ -234,7 +234,7 @@ SetUpLocalIban("CH56 0483 5012 3456 7800 9", kNickname_1)); AutofillField test_field; - test_field.value = u"CH5604835012345678009"; + test_field.set_value(u"CH5604835012345678009"); SuggestionsContext context = GetIbanFocusedSuggestionsContext(test_field); // The field contains value matches existing IBAN already, so check that we do @@ -259,7 +259,7 @@ Suggestion iban_suggestion_3 = SetUpFooterManagePaymentMethods(); AutofillField test_field; - test_field.value = u"CH"; + test_field.set_value(u"CH"); SuggestionsContext context = GetIbanFocusedSuggestionsContext(test_field); // Setting up mock to verify that the handler is returned a list of @@ -281,7 +281,7 @@ EXPECT_TRUE(iban_manager_.OnGetSingleFieldSuggestions( test_field, autofill_client_, mock_callback.Get(), context)); - test_field.value = u"CH5604"; + test_field.set_value(u"CH5604"); // Setting up mock to verify that the handler is returned only one // IBAN-based suggestion whose prefix matches `prefix_`. Only one of the two @@ -300,7 +300,7 @@ EXPECT_TRUE(iban_manager_.OnGetSingleFieldSuggestions( test_field, autofill_client_, mock_callback.Get(), context)); - test_field.value = u"AB56"; + test_field.set_value(u"AB56"); // Verify that the handler is not triggered because no IBAN suggestions match // the given prefix. @@ -331,7 +331,7 @@ Suggestion footer_suggestion = SetUpFooterManagePaymentMethods(); AutofillField test_field; - test_field.value = u"CH"; + test_field.set_value(u"CH"); SuggestionsContext context = GetIbanFocusedSuggestionsContext(test_field); // Expect that a list of IBAN suggestions whose prefixes match input field is @@ -371,7 +371,7 @@ Suggestion footer_suggestion = SetUpFooterManagePaymentMethods(); AutofillField test_field; - test_field.value = u"CH567"; + test_field.set_value(u"CH567"); SuggestionsContext context = GetIbanFocusedSuggestionsContext(test_field); // Expect that only one of the two IBANs should stay because the other will be @@ -433,7 +433,7 @@ EXPECT_TRUE(iban_manager_.OnGetSingleFieldSuggestions( test_field, autofill_client_, mock_callback.Get(), context)); - test_field.value = u"AB567"; + test_field.set_value(u"AB567"); // Expect that all server IBANs are returned because the count of input // character is less than `kFieldLengthLimitOnServerIbanSuggestion`. @@ -475,7 +475,7 @@ Suggestion footer_suggestion = SetUpFooterManagePaymentMethods(); AutofillField test_field; - test_field.value = u"AB5678"; + test_field.set_value(u"AB5678"); SuggestionsContext context = GetIbanFocusedSuggestionsContext(test_field); // Expect that no suggestions are returned because length of input field @@ -539,7 +539,7 @@ SetUpLocalIban(test::kIbanValue, kNickname_0); AutofillField test_field; - test_field.value = std::u16string(test::kIbanValue16); + test_field.set_value(std::u16string(test::kIbanValue16)); // Set the field type to any type than "IBAN_VALUE". SuggestionsContext context = GetIbanFocusedSuggestionsContext( test_field, CREDIT_CARD_VERIFICATION_CODE); @@ -693,7 +693,7 @@ AutofillField test_field; // Input a prefix that does not have any matching IBAN value so that no IBAN // suggestions will be shown. - test_field.value = u"XY"; + test_field.set_value(u"XY"); SuggestionsContext context = GetIbanFocusedSuggestionsContext(test_field); MockSuggestionsReturnedCallback mock_callback;
diff --git a/components/autofill/core/browser/merchant_promo_code_manager.cc b/components/autofill/core/browser/merchant_promo_code_manager.cc index 108a2c5b..e0c30e5 100644 --- a/components/autofill/core/browser/merchant_promo_code_manager.cc +++ b/components/autofill/core/browser/merchant_promo_code_manager.cc
@@ -146,7 +146,7 @@ // If the input box content equals any of the available promo codes, then // assume the promo code has been filled, and don't show any suggestions. for (const AutofillOfferData* promo_code_offer : promo_code_offers) { - if (field.value == base::ASCIIToUTF16(promo_code_offer->GetPromoCode())) { + if (field.value() == base::ASCIIToUTF16(promo_code_offer->GetPromoCode())) { std::move(on_suggestions_returned).Run(field.global_id(), {}); return; }
diff --git a/components/autofill/core/browser/merchant_promo_code_manager_unittest.cc b/components/autofill/core/browser/merchant_promo_code_manager_unittest.cc index b573f9e0..375f953 100644 --- a/components/autofill/core/browser/merchant_promo_code_manager_unittest.cc +++ b/components/autofill/core/browser/merchant_promo_code_manager_unittest.cc
@@ -420,8 +420,8 @@ SuggestionsContext context; context.form_structure = &form_structure; AddPromoCodeFocusedFieldToSuggestionsContext(&context); - test_field_.value = base::ASCIIToUTF16(SetUpPromoCodeOffer( - last_committed_origin_url, GURL("https://offer-details-url.com/"))); + test_field_.set_value(base::ASCIIToUTF16(SetUpPromoCodeOffer( + last_committed_origin_url, GURL("https://offer-details-url.com/")))); // The field contains the promo code already, so check that we do not return // suggestions to the handler.
diff --git a/components/autofill/core/browser/metrics/autofill_metrics.cc b/components/autofill/core/browser/metrics/autofill_metrics.cc index 0d0292a5..a56c0e8 100644 --- a/components/autofill/core/browser/metrics/autofill_metrics.cc +++ b/components/autofill/core/browser/metrics/autofill_metrics.cc
@@ -505,8 +505,9 @@ // only_fill_when_focused set to true. bool DuplicatedFilling(const FormStructure& form, const AutofillField& field) { for (const auto& form_field : form) { - if (field.value == form_field->value && form_field->is_autofilled) + if (field.value() == form_field->value() && form_field->is_autofilled) { return true; + } } return false; } @@ -1188,11 +1189,11 @@ void AutofillMetrics::LogEmailFieldPredictionMetrics( const AutofillField& field) { // If the field has no value, there is no need to record any of the metrics. - if (field.value.empty()) { + if (field.value().empty()) { return; } - bool is_valid_email = IsValidEmailAddress(field.value); + bool is_valid_email = IsValidEmailAddress(field.value()); bool is_email_prediction = field.Type().GetStorableType() == EMAIL_ADDRESS; if (is_email_prediction) {
diff --git a/components/autofill/core/browser/metrics/autofill_metrics_test_base.h b/components/autofill/core/browser/metrics/autofill_metrics_test_base.h index 1161dbd..cb420b3 100644 --- a/components/autofill/core/browser/metrics/autofill_metrics_test_base.h +++ b/components/autofill/core/browser/metrics/autofill_metrics_test_base.h
@@ -110,7 +110,7 @@ void SimulateUserChangedTextField(const FormData& form, FormFieldData& field, base::TimeTicks timestamp = {}) { - SimulateUserChangedTextFieldTo(form, field, field.value + u"_changed", + SimulateUserChangedTextFieldTo(form, field, field.value() + u"_changed", timestamp); } @@ -123,9 +123,9 @@ const std::u16string& new_value, base::TimeTicks timestamp = {}) { // Assert that the field is actually set to a different value. - ASSERT_NE(field.value, new_value); + ASSERT_NE(field.value(), new_value); field.is_autofilled = false; - field.value = new_value; + field.set_value(new_value); autofill_manager().OnTextFieldDidChange(form, field, gfx::RectF(), timestamp); }
diff --git a/components/autofill/core/browser/metrics/autofill_metrics_unittest.cc b/components/autofill/core/browser/metrics/autofill_metrics_unittest.cc index e8fd6cca..f2a492d 100644 --- a/components/autofill/core/browser/metrics/autofill_metrics_unittest.cc +++ b/components/autofill/core/browser/metrics/autofill_metrics_unittest.cc
@@ -4925,9 +4925,9 @@ CreateTestFormField("Phone", "phone", "", FormControlType::kInputText)}); FormData filled_form = empty_form; - filled_form.fields[0].value = u"Elvis Aaron Presley"; - filled_form.fields[1].value = u"theking@gmail.com"; - filled_form.fields[2].value = u"12345678901"; + filled_form.fields[0].set_value(u"Elvis Aaron Presley"); + filled_form.fields[1].set_value(u"theking@gmail.com"); + filled_form.fields[2].set_value(u"12345678901"); // Fill additional form. FormData second_form = empty_form; @@ -4937,10 +4937,10 @@ "Second Phone", "second_phone", "", FormControlType::kInputText)); // Fill the field values for form submission. - second_form.fields[0].value = u"Elvis Aaron Presley"; - second_form.fields[1].value = u"theking@gmail.com"; - second_form.fields[2].value = u"12345678901"; - second_form.fields[3].value = u"51512345678"; + second_form.fields[0].set_value(u"Elvis Aaron Presley"); + second_form.fields[1].set_value(u"theking@gmail.com"); + second_form.fields[2].set_value(u"12345678901"); + second_form.fields[3].set_value(u"51512345678"); // Expect only form load metrics to be logged if the form is submitted without // user interaction. @@ -5945,7 +5945,7 @@ TEST_F(AutofillMetricsTest, AutocompleteOneTimeCodeFormFilledDuration) { FormData form = CreateForm({CreateTestFormField( "", "", "", FormControlType::kInputPassword, "one-time-code")}); - form.fields[0].value = u"123456"; + form.fields[0].set_value(u"123456"); { base::HistogramTester histogram_tester; @@ -6185,9 +6185,9 @@ auto index_it = type_to_index.find(fill_type); ASSERT_NE(index_it, type_to_index.end()); FormFieldData& field = form_.fields[index_it->second]; - field.value = fill_type != CREDIT_CARD_VERIFICATION_CODE - ? fill_data().credit_card.GetRawInfo(fill_type) - : fill_data().cvc; + field.set_value(fill_type != CREDIT_CARD_VERIFICATION_CODE + ? fill_data().credit_card.GetRawInfo(fill_type) + : fill_data().cvc); field.is_autofilled = is_autofilled; field.properties_mask = (field.properties_mask & ~kUserTyped) | (is_user_typed ? kUserTyped : 0);
diff --git a/components/autofill/core/browser/metrics/placeholder_metrics_unittest.cc b/components/autofill/core/browser/metrics/placeholder_metrics_unittest.cc index 248b3b0..8805add 100644 --- a/components/autofill/core/browser/metrics/placeholder_metrics_unittest.cc +++ b/components/autofill/core/browser/metrics/placeholder_metrics_unittest.cc
@@ -181,8 +181,8 @@ cached_form->field(2)->set_may_use_prefilled_placeholder(true); cached_form->field(3)->set_may_use_prefilled_placeholder(false); cached_form->field(4)->set_may_use_prefilled_placeholder(false); - form.fields[2].value = u"changed"; - form.fields[3].value = u"changed"; + form.fields[2].set_value(u"changed"); + form.fields[3].set_value(u"changed"); SubmitForm(form); ResetDriverToCommitMetrics(); @@ -262,7 +262,7 @@ SeeForm(); ClassifyThePreFilledFieldAsPlaceholder(); FillTestProfile(form_); - form_.fields[1].value = kPreFilledValue; + form_.fields[1].set_value(kPreFilledValue); SubmitFormAndExpect(AutofillPreFilledValueStatus:: kPreFilledValueWasManuallyRestoredAfterAutofill); } @@ -282,7 +282,7 @@ TEST_F(PlaceholderMetricsValueStatusTest, ValueChangedToEmpty) { SeeForm(); FillTestProfile(form_); - form_.fields[1].value = u""; + form_.fields[1].set_value(u""); SubmitFormAndExpect( AutofillPreFilledValueStatus::kPreFilledValueChangedToEmpty); } @@ -291,9 +291,9 @@ ValueChangedToWhatWouldHaveBeenFilled) { SeeForm(); FillTestProfile(form_); - form_.fields[1].value = personal_data() - .GetProfileByGUID(kTestProfileId) - ->GetRawInfo(kPreFilledType); + form_.fields[1].set_value(personal_data() + .GetProfileByGUID(kTestProfileId) + ->GetRawInfo(kPreFilledType)); SubmitFormAndExpect(AutofillPreFilledValueStatus:: kPreFilledValueChangedToWhatWouldHaveBeenFilled); } @@ -303,9 +303,9 @@ SeeForm(); FillTestProfile(form_); FillProfileByGUID(form_, kTestProfile2Id); - form_.fields[1].value = personal_data() - .GetProfileByGUID(kTestProfile2Id) - ->GetRawInfo(kPreFilledType); + form_.fields[1].set_value(personal_data() + .GetProfileByGUID(kTestProfile2Id) + ->GetRawInfo(kPreFilledType)); SubmitFormAndExpect(AutofillPreFilledValueStatus:: kPreFilledValueChangedToWhatWouldHaveBeenFilled); } @@ -315,9 +315,9 @@ SeeForm(); ClassifyThePreFilledFieldAsPlaceholder(); FillTestProfile(form_); - form_.fields[1].value = personal_data() - .GetProfileByGUID(kTestProfile2Id) - ->GetRawInfo(kPreFilledType); + form_.fields[1].set_value(personal_data() + .GetProfileByGUID(kTestProfile2Id) + ->GetRawInfo(kPreFilledType)); ; SubmitFormAndExpect(AutofillPreFilledValueStatus:: kPreFilledValueChangedToCorrespondingFieldType); @@ -326,7 +326,7 @@ TEST_F(PlaceholderMetricsValueStatusTest, ValueChangedToAnyOtherValue) { SeeForm(); FillTestProfile(form_); - form_.fields[1].value = u"any other value"; + form_.fields[1].set_value(u"any other value"); SubmitFormAndExpect(AutofillPreFilledValueStatus::kPreFilledValueChanged); }
diff --git a/components/autofill/core/browser/metrics/quality_metrics.cc b/components/autofill/core/browser/metrics/quality_metrics.cc index 6d12d45..5c50dcc 100644 --- a/components/autofill/core/browser/metrics/quality_metrics.cc +++ b/components/autofill/core/browser/metrics/quality_metrics.cc
@@ -141,7 +141,7 @@ LogPreFilledFieldStatus(form_type_name, field->initial_value_changed(), type.GetStorableType()); LogPreFilledValueChanged(form_type_name, field->initial_value_changed(), - field->value, field->field_log_events(), + field->value(), field->field_log_events(), field->possible_types(), type.GetStorableType(), field->is_autofilled); LogPreFilledFieldClassifications(
diff --git a/components/autofill/core/browser/metrics/quality_metrics_unittest.cc b/components/autofill/core/browser/metrics/quality_metrics_unittest.cc index a07738c..76b1880 100644 --- a/components/autofill/core/browser/metrics/quality_metrics_unittest.cc +++ b/components/autofill/core/browser/metrics/quality_metrics_unittest.cc
@@ -902,14 +902,15 @@ // The `FormFieldData::label_source` of the fields is set manually, since // this test doesn't run label inference. FormFieldData name_field; - name_field.value = profile.GetInfo(NAME_FULL, personal_data().app_locale()); + name_field.set_value( + profile.GetInfo(NAME_FULL, personal_data().app_locale())); name_field.label_source = FormFieldData::LabelSource::kUnknown; FormFieldData street_field; - street_field.value = u"unknown"; + street_field.set_value(u"unknown"); street_field.label_source = FormFieldData::LabelSource::kForId; FormFieldData country_field; - country_field.value = - profile.GetInfo(ADDRESS_HOME_COUNTRY, personal_data().app_locale()); + country_field.set_value( + profile.GetInfo(ADDRESS_HOME_COUNTRY, personal_data().app_locale())); country_field.label_source = FormFieldData::LabelSource::kLabelTag; const FormData form = CreateForm({name_field, street_field, country_field}); autofill_manager().AddSeenForm( @@ -957,7 +958,7 @@ // email). { base::HistogramTester histogram_tester; - form.fields[2].value = u"notemailtext"; + form.fields[2].set_value(u"notemailtext"); FillTestProfile(form); SubmitForm(form); @@ -968,7 +969,7 @@ // Check that the metric is not recorded for empty values. { base::HistogramTester histogram_tester; - form.fields[2].value = u""; + form.fields[2].set_value(u""); FillTestProfile(form); SubmitForm(form); histogram_tester.ExpectTotalCount(precision_histogram, 0); @@ -1021,7 +1022,7 @@ // Check that the metric is not recorded for empty values. { base::HistogramTester histogram_tester; - form.fields[2].value = u""; + form.fields[2].set_value(u""); FillTestProfile(form); SubmitForm(form); histogram_tester.ExpectTotalCount(precision_histogram, 0);
diff --git a/components/autofill/core/browser/metrics/shadow_prediction_metrics_unittest.cc b/components/autofill/core/browser/metrics/shadow_prediction_metrics_unittest.cc index aec9985..cbc1035 100644 --- a/components/autofill/core/browser/metrics/shadow_prediction_metrics_unittest.cc +++ b/components/autofill/core/browser/metrics/shadow_prediction_metrics_unittest.cc
@@ -149,8 +149,8 @@ TEST_F(AutofillShadowPredictionMetricsTest, SubmissionWithoutShadowPredictions) { FormData form = GetFormWith2Fields(autofill_client_->form_origin()); - form.fields[0].value = u"Elvis Aaron Presley"; // A known `NAME_FULL`. - form.fields[1].value = u"buddy@gmail.com"; // A known `EMAIL_ADDRESS`. + form.fields[0].set_value(u"Elvis Aaron Presley"); // A known `NAME_FULL`. + form.fields[1].set_value(u"buddy@gmail.com"); // A known `EMAIL_ADDRESS`. std::vector<FieldType> heuristic_types = {NAME_FULL, EMAIL_ADDRESS}; std::vector<FieldType> server_types = {NAME_FULL, EMAIL_ADDRESS}; @@ -179,8 +179,8 @@ TEST_F(AutofillShadowPredictionMetricsTest, SubmissionWithAgreeingShadowPredictions) { FormData form = GetFormWith2Fields(autofill_client_->form_origin()); - form.fields[0].value = u"Elvis Aaron Presley"; // A known `NAME_FULL`. - form.fields[1].value = u"buddy@gmail.com"; // A known `EMAIL_ADDRESS`. + form.fields[0].set_value(u"Elvis Aaron Presley"); // A known `NAME_FULL`. + form.fields[1].set_value(u"buddy@gmail.com"); // A known `EMAIL_ADDRESS`. std::vector<FieldType> server_types = {NAME_FULL, EMAIL_ADDRESS}; @@ -216,8 +216,8 @@ constexpr HeuristicSource source = HeuristicSource::kDefault; FormData form = GetFormWith2Fields(autofill_client_->form_origin()); - form.fields[0].value = u"Elvis Aaron Presley"; // A known `NAME_FULL`. - form.fields[1].value = u"buddy@gmail.com"; // A known `EMAIL_ADDRESS`. + form.fields[0].set_value(u"Elvis Aaron Presley"); // A known `NAME_FULL`. + form.fields[1].set_value(u"buddy@gmail.com"); // A known `EMAIL_ADDRESS`. std::vector<FieldType> server_types = {NAME_FULL, EMAIL_ADDRESS};
diff --git a/components/autofill/core/browser/payments/card_unmask_delegate.h b/components/autofill/core/browser/payments/card_unmask_delegate.h index a45db9f..cd97550 100644 --- a/components/autofill/core/browser/payments/card_unmask_delegate.h +++ b/components/autofill/core/browser/payments/card_unmask_delegate.h
@@ -38,8 +38,10 @@ virtual void OnUnmaskPromptAccepted( const UserProvidedUnmaskDetails& details) = 0; - // Called when the unmask prompt is closed (e.g., cancelled). - virtual void OnUnmaskPromptClosed() = 0; + // Called when the unmask prompt is cancelled. This specifically refers to the + // flow being aborted, and is not invoked when the prompt is closed after card + // unmask flow is finished successfully. + virtual void OnUnmaskPromptCancelled() = 0; // Returns whether or not the user, while on the CVC prompt, should be // offered to switch to FIDO authentication for card unmasking. This will
diff --git a/components/autofill/core/browser/payments/credit_card_save_manager.cc b/components/autofill/core/browser/payments/credit_card_save_manager.cc index eae4315..de8789c 100644 --- a/components/autofill/core/browser/payments/credit_card_save_manager.cc +++ b/components/autofill/core/browser/payments/credit_card_save_manager.cc
@@ -250,13 +250,14 @@ for (const auto& field : submitted_form) { const bool is_valid_cvc = IsValidCreditCardSecurityCode( - field->value, upload_request_.card.network()); + field->value(), upload_request_.card.network()); if (field->Type().GetStorableType() == CREDIT_CARD_VERIFICATION_CODE) { found_cvc_field_ = true; - if (!field->value.empty()) + if (!field->value().empty()) { found_value_in_cvc_field_ = true; + } if (is_valid_cvc) { - upload_request_.cvc = field->value; + upload_request_.cvc = field->value(); break; } } else if (is_valid_cvc &&
diff --git a/components/autofill/core/browser/payments/credit_card_save_manager_unittest.cc b/components/autofill/core/browser/payments/credit_card_save_manager_unittest.cc index ec506f85..c66ebae 100644 --- a/components/autofill/core/browser/payments/credit_card_save_manager_unittest.cc +++ b/components/autofill/core/browser/payments/credit_card_save_manager_unittest.cc
@@ -319,19 +319,19 @@ FormData* form) { for (FormFieldData& field : form->fields) { if (base::EqualsASCII(field.name, "firstname")) - field.value = ASCIIToUTF16(first_name); + field.set_value(ASCIIToUTF16(first_name)); else if (base::EqualsASCII(field.name, "lastname")) - field.value = ASCIIToUTF16(last_name); + field.set_value(ASCIIToUTF16(last_name)); else if (base::EqualsASCII(field.name, "addr1")) - field.value = u"123 Maple"; + field.set_value(u"123 Maple"); else if (base::EqualsASCII(field.name, "city")) - field.value = u"Dallas"; + field.set_value(u"Dallas"); else if (base::EqualsASCII(field.name, "state")) - field.value = u"Texas"; + field.set_value(u"Texas"); else if (base::EqualsASCII(field.name, "zipcode")) - field.value = ASCIIToUTF16(zip_code); + field.set_value(ASCIIToUTF16(zip_code)); else if (base::EqualsASCII(field.name, "country")) - field.value = ASCIIToUTF16(country); + field.set_value(ASCIIToUTF16(country)); } } @@ -344,9 +344,9 @@ FormsSeen(forms); // Edit the data, and submit. - form.fields[1].value = u"4111111111111111"; - form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - form.fields[3].value = ASCIIToUTF16(test::NextYear()); + form.fields[1].set_value(u"4111111111111111"); + form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); FormSubmitted(form); EXPECT_TRUE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); } @@ -501,9 +501,9 @@ FormsSeen(forms); // Edit the data, and submit. - form.fields[1].value = u"4111111111111111"; - form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - form.fields[3].value = ASCIIToUTF16(test::NextYear()); + form.fields[1].set_value(u"4111111111111111"); + form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); FormSubmitted(form); EXPECT_TRUE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); } @@ -519,9 +519,9 @@ // Edit the data, and submit. std::string card("4408041234567890"); ASSERT_FALSE(autofill::IsValidCreditCardNumber(ASCIIToUTF16(card))); - form.fields[1].value = ASCIIToUTF16(card); - form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - form.fields[3].value = ASCIIToUTF16(test::NextYear()); + form.fields[1].set_value(ASCIIToUTF16(card)); + form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); FormSubmitted(form); EXPECT_FALSE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); } @@ -542,11 +542,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -578,11 +578,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -653,11 +653,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a expiration date, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_FALSE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -685,12 +685,12 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane"; - credit_card_form.fields[1].value = u"Doe"; - credit_card_form.fields[2].value = u"4111111111111111"; - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[4].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[5].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane"); + credit_card_form.fields[1].set_value(u"Doe"); + credit_card_form.fields[2].set_value(u"4111111111111111"); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[4].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[5].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_TRUE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -1195,11 +1195,11 @@ // Edit the data, and submit. const char* const card_number = "4111111111111111"; - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = ASCIIToUTF16(card_number); - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(ASCIIToUTF16(card_number)); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_TRUE(credit_card_save_manager_->CreditCardWasUploaded()); @@ -1223,11 +1223,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1259,11 +1259,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // CVC MISSING + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // CVC MISSING base::HistogramTester histogram_tester; @@ -1299,11 +1299,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"1234"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"1234"); base::HistogramTester histogram_tester; @@ -1357,12 +1357,12 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // CVC MISSING - credit_card_form.fields[5].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // CVC MISSING + credit_card_form.fields[5].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1410,10 +1410,10 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); base::HistogramTester histogram_tester; @@ -1467,11 +1467,11 @@ FormsSeen({credit_card_form}); // Enter an invalid cvc in "Random Field" and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"1234"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"1234"); base::HistogramTester histogram_tester; @@ -1525,11 +1525,11 @@ FormsSeen({credit_card_form}); // Enter a valid cvc in "Random Field" and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1585,11 +1585,11 @@ FormsSeen({credit_card_form}); // Enter a valid cvc in "Random Field" and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1620,11 +1620,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1669,11 +1669,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1707,11 +1707,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // CVC MISSING + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // CVC MISSING base::HistogramTester histogram_tester; @@ -1749,10 +1749,10 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a name, and submit. - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -1790,11 +1790,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_FALSE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -1819,11 +1819,11 @@ FormData credit_card_form = CreateTestCreditCardFormData(); FormsSeen(std::vector<FormData>(1, credit_card_form)); - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_FALSE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -1859,11 +1859,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); // Confirm that client_behavior_signals vector does contain the @@ -1891,11 +1891,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); // Confirm that client_behavior_signals vector does contain the @@ -1921,11 +1921,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data with empty CVC, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); FormSubmitted(credit_card_form); // Confirm that client_behavior_signals vector does not contain the @@ -1951,11 +1951,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); // Confirm that client_behavior_signals vector does not contain the @@ -1985,11 +1985,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); // Confirm that client_behavior_signals vector does not contain the @@ -2013,10 +2013,10 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a name, and submit. - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2071,11 +2071,11 @@ ExpectFillableFormParsedUkm(3 /* num_fillable_forms_parsed */); // Edit the data and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2120,11 +2120,11 @@ FormsSeen({credit_card_form}); // Edit the data and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2169,11 +2169,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2213,11 +2213,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2260,11 +2260,11 @@ // Edit the data, but use the name with a middle initial *and* period, and // submit. - credit_card_form.fields[0].value = u"Jane W. Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane W. Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2301,11 +2301,11 @@ FormsSeen({credit_card_form}); // Edit the data, but do not use middle initial. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2338,11 +2338,11 @@ FormsSeen({credit_card_form}); // Edit the name by adding a middle name. - credit_card_form.fields[0].value = u"John Quincy Adams"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Quincy Adams"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2382,11 +2382,11 @@ FormsSeen({credit_card_form}); // Edit the name by removing middle name. - credit_card_form.fields[0].value = u"John Adams"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Adams"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2435,11 +2435,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but use yet another name, and submit. - credit_card_form.fields[0].value = u"Different Person"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Different Person"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2492,11 +2492,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but use yet another name, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2527,10 +2527,10 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a name, and submit. - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2564,11 +2564,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but include a conflicting name, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2601,11 +2601,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2635,11 +2635,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2667,11 +2667,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2715,10 +2715,10 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a name, and submit. - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2763,11 +2763,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but include a conflicting name, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -2810,10 +2810,10 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a name, and submit. - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // With the offer-to-save decision deferred to Google Payments, Payments can // still decide to allow saving despite the missing name. @@ -2861,11 +2861,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a expiration date, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); // With the offer-to-save decision deferred to Google Payments, Payments can // still decide to allow saving despite the missing expiration date. @@ -2878,11 +2878,11 @@ credit_card_save_manager_->should_request_expiration_date_from_user_); // Edit the data, include a expiration date, and submit this time. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); // Verify the |credit_card_save_manager_| is NOT requesting expiration date. @@ -2917,11 +2917,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a expiration date, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); @@ -2958,11 +2958,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, but don't include a expiration date, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); // With the offer-to-save decision deferred to Google Payments, Payments can // still decide to allow saving despite the missing expiration date. @@ -2996,11 +2996,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u""); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -3027,11 +3027,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u""); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -3066,11 +3066,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -3105,11 +3105,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u""; - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u""); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -3143,11 +3143,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = u""; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(u""); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -3181,11 +3181,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u"09"; - credit_card_form.fields[3].value = u"2000"; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u"09"); + credit_card_form.fields[3].set_value(u"2000"); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -3221,11 +3221,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data with 2 digit year and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u"01"; - credit_card_form.fields[3].value = u"10"; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u"01"); + credit_card_form.fields[3].set_value(u"10"); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -3265,11 +3265,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -3311,11 +3311,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Local save prompt should not be shown as there is already masked // card with same |TypeAndLastFourDigits|. @@ -3330,11 +3330,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and check what detected_values for an upload save would be. FormSubmitted(credit_card_form); @@ -3360,11 +3360,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3381,11 +3381,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3409,11 +3409,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3437,11 +3437,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bits. @@ -3466,11 +3466,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Miles Prower"; // Conflict! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u"Miles Prower"); // Conflict! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and check what detected_values for an upload save would be. FormSubmitted(credit_card_form); @@ -3494,11 +3494,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3526,11 +3526,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and check what detected_values for an upload save would be. FormSubmitted(credit_card_form); @@ -3551,11 +3551,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3579,11 +3579,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3606,11 +3606,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3634,11 +3634,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3661,11 +3661,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bit. @@ -3693,11 +3693,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Submit the form and ensure the detected_values for an upload save contained // the expected bits. @@ -3730,11 +3730,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Miles Prower"; // Conflict! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Miles Prower"); // Conflict! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Submit the form and ensure the detected_values for an upload save contained // the expected bits. @@ -3776,11 +3776,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name set - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC set + credit_card_form.fields[0].set_value(u""); // No name set + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC set // Submit the form and ensure the detected_values for an upload save contained // the expected bits. @@ -3817,11 +3817,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC! + credit_card_form.fields[0].set_value(u""); // No name! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC! base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -3874,11 +3874,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"John Smith"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"John Smith"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -3910,11 +3910,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC! + credit_card_form.fields[0].set_value(u""); // No name! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC! base::HistogramTester histogram_tester; @@ -3942,11 +3942,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC! + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC! base::HistogramTester histogram_tester; @@ -3984,11 +3984,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u""); // No name! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4033,11 +4033,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Miles Prower"; // Conflict! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Miles Prower"); // Conflict! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4084,11 +4084,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4139,11 +4139,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4184,11 +4184,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u""; // No name! - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u""; // No CVC! + credit_card_form.fields[0].set_value(u""); // No name! + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u""); // No CVC! base::HistogramTester histogram_tester; @@ -4246,11 +4246,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4284,11 +4284,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4338,11 +4338,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4377,11 +4377,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Confirm that upload happened and that no experiment flag state was sent in // the request. @@ -4407,11 +4407,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Confirm that the preflight request contained // kUploadPaymentMethodBillableServiceNumber in the request. @@ -4439,11 +4439,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Confirm that the preflight request contained billing customer number in the // request. @@ -4466,11 +4466,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Confirm that the preflight request contained the correct UploadCardSource. FormSubmitted(credit_card_form); @@ -4497,11 +4497,11 @@ ExpectFillableFormParsedUkm(1 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4544,11 +4544,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4585,11 +4585,11 @@ ExpectFillableFormParsedUkm(1 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4633,11 +4633,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4680,11 +4680,11 @@ ExpectFillableFormParsedUkm(1 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4729,11 +4729,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4780,12 +4780,12 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane"; - credit_card_form.fields[1].value = u"Doe"; - credit_card_form.fields[2].value = u"4111111111111111"; - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[4].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[5].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane"); + credit_card_form.fields[1].set_value(u"Doe"); + credit_card_form.fields[2].set_value(u"4111111111111111"); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[4].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[5].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4826,12 +4826,12 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane"; - credit_card_form.fields[1].value = u"Doe"; - credit_card_form.fields[2].value = u"4111111111111111"; - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[4].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[5].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane"); + credit_card_form.fields[1].set_value(u"Doe"); + credit_card_form.fields[2].set_value(u"4111111111111111"); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[4].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[5].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4861,11 +4861,11 @@ ExpectFillableFormParsedUkm(1 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_TRUE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -4900,11 +4900,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_FALSE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -4932,11 +4932,11 @@ ExpectFillableFormParsedUkm(1 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -4975,11 +4975,11 @@ ExpectFillableFormParsedUkm(2 /* num_fillable_forms_parsed */); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; @@ -5037,11 +5037,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"5454545454545454"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"5454545454545454"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Since card isn't in any of the supported ranges, local save should be // offered and upload save should not. @@ -5071,11 +5071,11 @@ personal_data().AddCreditCard(local_card); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"5454545454545454"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"5454545454545454"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Since card is already saved, local save should not be offered. FormSubmitted(credit_card_form); @@ -5095,11 +5095,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); // Since card is in one of the supported ranges(4111-4113), upload save should // be offered. @@ -5128,11 +5128,11 @@ // Edit the data, and submit. const char* const card_number = "4111111111111111"; - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = ASCIIToUTF16(card_number); - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(ASCIIToUTF16(card_number)); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -5165,11 +5165,11 @@ // Edit the data, and submit. const char* const card_number = "4111111111111111"; - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = ASCIIToUTF16(card_number); - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(ASCIIToUTF16(card_number)); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); base::HistogramTester histogram_tester; FormSubmitted(credit_card_form); @@ -5201,11 +5201,11 @@ FormsSeen(std::vector<FormData>(1, credit_card_form)); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = u"03"; - credit_card_form.fields[3].value = u"2999"; - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(u"03"); + credit_card_form.fields[3].set_value(u"2999"); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_FALSE(autofill_client_.ConfirmSaveCardLocallyWasCalled()); @@ -5408,11 +5408,11 @@ FormsSeen({credit_card_form}); // Edit the data, and submit. - credit_card_form.fields[0].value = u"Jane Doe"; - credit_card_form.fields[1].value = u"4111111111111111"; - credit_card_form.fields[2].value = ASCIIToUTF16(test::NextMonth()); - credit_card_form.fields[3].value = ASCIIToUTF16(test::NextYear()); - credit_card_form.fields[4].value = u"123"; + credit_card_form.fields[0].set_value(u"Jane Doe"); + credit_card_form.fields[1].set_value(u"4111111111111111"); + credit_card_form.fields[2].set_value(ASCIIToUTF16(test::NextMonth())); + credit_card_form.fields[3].set_value(ASCIIToUTF16(test::NextYear())); + credit_card_form.fields[4].set_value(u"123"); FormSubmitted(credit_card_form); EXPECT_EQ(autofill_client_.get_save_credit_card_options().card_save_type ==
diff --git a/components/autofill/core/browser/payments/full_card_request.cc b/components/autofill/core/browser/payments/full_card_request.cc index 0ab2438b..88ad344 100644 --- a/components/autofill/core/browser/payments/full_card_request.cc +++ b/components/autofill/core/browser/payments/full_card_request.cc
@@ -242,7 +242,7 @@ SendUnmaskCardRequest(); } -void FullCardRequest::OnUnmaskPromptClosed() { +void FullCardRequest::OnUnmaskPromptCancelled() { if (result_delegate_) { result_delegate_->OnFullCardRequestFailed(request_->card.record_type(), FailureType::PROMPT_CLOSED);
diff --git a/components/autofill/core/browser/payments/full_card_request.h b/components/autofill/core/browser/payments/full_card_request.h index 93df833d..0146617 100644 --- a/components/autofill/core/browser/payments/full_card_request.h +++ b/components/autofill/core/browser/payments/full_card_request.h
@@ -238,7 +238,7 @@ // CardUnmaskDelegate: void OnUnmaskPromptAccepted( const UserProvidedUnmaskDetails& user_response) override; - void OnUnmaskPromptClosed() override; + void OnUnmaskPromptCancelled() override; bool ShouldOfferFidoAuth() const override; // Called by autofill client when the risk data has been loaded.
diff --git a/components/autofill/core/browser/payments/full_card_request_unittest.cc b/components/autofill/core/browser/payments/full_card_request_unittest.cc index 4a2d56a2..096ce85 100644 --- a/components/autofill/core/browser/payments/full_card_request_unittest.cc +++ b/components/autofill/core/browser/payments/full_card_request_unittest.cc
@@ -266,7 +266,6 @@ details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify full PAN and dCVV are both used when returned by the server. @@ -287,7 +286,6 @@ card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPanWithDcvv(AutofillClient::PaymentsRpcResult::kSuccess, "4111", "321"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify getting the full PAN for a masked server card. @@ -330,7 +328,6 @@ CardUnmaskDelegate::UserProvidedUnmaskDetails details; details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify getting the CVC for an unmasked server card. @@ -353,7 +350,6 @@ CardUnmaskDelegate::UserProvidedUnmaskDetails details; details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify getting the CVC for an unmasked server card with expiration date in @@ -384,7 +380,6 @@ details.exp_month = u"12"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify getting the CVC for a masked server card with expiration date in the past. @@ -414,7 +409,6 @@ details.exp_month = u"12"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify getting the full PAN, the expiration and the dCVV for a virtual card @@ -473,7 +467,6 @@ response.card_type = AutofillClient::PaymentsRpcCardType::kVirtualCard; request()->OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, response); - card_unmask_delegate()->OnUnmaskPromptClosed(); } TEST_F(FullCardRequestTest, @@ -539,11 +532,9 @@ CardUnmaskDelegate::UserProvidedUnmaskDetails details; details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); - card_unmask_delegate()->OnUnmaskPromptClosed(); MakeGetFullCardRequest(FullCardRequestOptions().with_credit_card(card)); card_unmask_delegate()->OnUnmaskPromptAccepted(details); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // If the user cancels the CVC prompt, @@ -558,7 +549,7 @@ MakeGetFullCardRequest(FullCardRequestOptions().with_credit_card( CreditCard(CreditCard::RecordType::kMaskedServerCard, "server_id"))); - card_unmask_delegate()->OnUnmaskPromptClosed(); + card_unmask_delegate()->OnUnmaskPromptCancelled(); } // If the server provides an empty PAN with PERMANENT_FAILURE error, @@ -579,7 +570,6 @@ details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kPermanentFailure, ""); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // If the server provides an empty PAN with VCN_RETRIEVAL_TRY_AGAIN_FAILURE @@ -612,7 +602,6 @@ OnDidGetRealPan( AutofillClient::PaymentsRpcResult::kVcnRetrievalTryAgainFailure, "", /*is_virtual_card=*/true); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // If the server provides an empty PAN with VCN_RETRIEVAL_PERMANENT_FAILURE @@ -645,7 +634,6 @@ OnDidGetRealPan( AutofillClient::PaymentsRpcResult::kVcnRetrievalPermanentFailure, "", /*is_virtual_card=*/true); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // If the server provides an empty PAN with NETWORK_ERROR error, @@ -666,7 +654,6 @@ details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kNetworkError, ""); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // If the server provides an empty PAN with TRY_AGAIN_FAILURE, the user can @@ -698,7 +685,7 @@ details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kTryAgainFailure, ""); - card_unmask_delegate()->OnUnmaskPromptClosed(); + card_unmask_delegate()->OnUnmaskPromptCancelled(); histogram_tester.ExpectUniqueSample( "Autofill.CvcAuth.ServerCard.RetryableError", test_event, 1); } @@ -743,7 +730,6 @@ details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); histogram_tester.ExpectUniqueSample( "Autofill.CvcAuth.ServerCard.RetryableError", test_event, 1); } @@ -819,7 +805,6 @@ details.exp_year = u"2050"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify updating expiration date for an unmasked server card. @@ -846,7 +831,6 @@ details.exp_year = u"2050"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify updating expiration date for a local card. @@ -876,7 +860,6 @@ details.exp_month = u"12"; details.exp_year = u"2051"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Verify getting full PAN and CVC for PaymentRequest. @@ -900,7 +883,6 @@ details.cvc = u"123"; card_unmask_delegate()->OnUnmaskPromptAccepted(details); OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, "4111"); - card_unmask_delegate()->OnUnmaskPromptClosed(); } // Params of the FullCardRequestCardMetadataTest:
diff --git a/components/autofill/core/browser/payments/local_card_migration_manager_unittest.cc b/components/autofill/core/browser/payments/local_card_migration_manager_unittest.cc index 5ad73df..9318c16 100644 --- a/components/autofill/core/browser/payments/local_card_migration_manager_unittest.cc +++ b/components/autofill/core/browser/payments/local_card_migration_manager_unittest.cc
@@ -128,11 +128,11 @@ std::string_view expiration_year, std::string_view cvc) { DCHECK(credit_card_form.fields.size() >= 5); - credit_card_form.fields[0].value = ASCIIToUTF16(name_on_card); - credit_card_form.fields[1].value = ASCIIToUTF16(card_number); - credit_card_form.fields[2].value = ASCIIToUTF16(expiration_month); - credit_card_form.fields[3].value = ASCIIToUTF16(expiration_year); - credit_card_form.fields[4].value = ASCIIToUTF16(cvc); + credit_card_form.fields[0].set_value(ASCIIToUTF16(name_on_card)); + credit_card_form.fields[1].set_value(ASCIIToUTF16(card_number)); + credit_card_form.fields[2].set_value(ASCIIToUTF16(expiration_month)); + credit_card_form.fields[3].set_value(ASCIIToUTF16(expiration_year)); + credit_card_form.fields[4].set_value(ASCIIToUTF16(cvc)); } void AddLocalCreditCard(TestPersonalDataManager& personal_data,
diff --git a/components/autofill/core/browser/profile_token_quality.cc b/components/autofill/core/browser/profile_token_quality.cc index 3c348f7..1d70265 100644 --- a/components/autofill/core/browser/profile_token_quality.cc +++ b/components/autofill/core/browser/profile_token_quality.cc
@@ -166,7 +166,7 @@ possible_observations.emplace_back( stored_type, Observation{.type = base::to_underlying(GetObservationTypeFromField( - field, form_data.fields[i].value, other_profiles, + field, form_data.fields[i].value(), other_profiles, pdm.app_locale())), .form_hash = hash}); }
diff --git a/components/autofill/core/browser/profile_token_quality_unittest.cc b/components/autofill/core/browser/profile_token_quality_unittest.cc index faabced..c5753ac 100644 --- a/components/autofill/core/browser/profile_token_quality_unittest.cc +++ b/components/autofill/core/browser/profile_token_quality_unittest.cc
@@ -53,7 +53,7 @@ size_t field_index, std::u16string new_value) { FormFieldData& field = form.fields[field_index]; - field.value = std::move(new_value); + field.set_value(std::move(new_value)); bam_.OnTextFieldDidChange(form, field, gfx::RectF(), base::TimeTicks::Now()); }
diff --git a/components/autofill/core/browser/test_browser_autofill_manager.cc b/components/autofill/core/browser/test_browser_autofill_manager.cc index f074db6..1e56d7a 100644 --- a/components/autofill/core/browser/test_browser_autofill_manager.cc +++ b/components/autofill/core/browser/test_browser_autofill_manager.cc
@@ -133,7 +133,7 @@ for (size_t i = 0; i < expected_submitted_field_types_.size(); ++i) { SCOPED_TRACE(base::StringPrintf( "Field %d with value %s", static_cast<int>(i), - base::UTF16ToUTF8(submitted_form->field(i)->value).c_str())); + base::UTF16ToUTF8(submitted_form->field(i)->value()).c_str())); const FieldTypeSet& possible_types = submitted_form->field(i)->possible_types(); EXPECT_EQ(expected_submitted_field_types_[i].size(),
diff --git a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.cc b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.cc index 04e5d188..a338dab 100644 --- a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.cc +++ b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.cc
@@ -130,6 +130,9 @@ return; } + flow_ended_with_unmask_server_response_ = + result != AutofillClient::PaymentsRpcResult::kTryAgainFailure; + unmasking_result_ = result; AutofillClient::PaymentsRpcCardType card_type = IsVirtualCard() ? AutofillClient::PaymentsRpcCardType::kVirtualCard @@ -150,8 +153,9 @@ card_unmask_view_ = nullptr; LogOnCloseEvents(); unmasking_result_ = AutofillClient::PaymentsRpcResult::kNone; - if (delegate_) - delegate_->OnUnmaskPromptClosed(); + if (delegate_ && !flow_ended_with_unmask_server_response_) { + delegate_->OnUnmaskPromptCancelled(); + } } void CardUnmaskPromptControllerImpl::OnUnmaskPromptAccepted(
diff --git a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h index 05babdf1..c4740be 100644 --- a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h +++ b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h
@@ -128,6 +128,9 @@ CardUnmaskDelegate::UserProvidedUnmaskDetails pending_details_; + // Whether server has returned a final unmask result. + bool flow_ended_with_unmask_server_response_ = false; + base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_{ this}; };
diff --git a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc index 4859f6e..cbb5e9d8 100644 --- a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc +++ b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc
@@ -47,7 +47,7 @@ const UserProvidedUnmaskDetails& details) override { details_ = details; } - void OnUnmaskPromptClosed() override {} + void OnUnmaskPromptCancelled() override {} bool ShouldOfferFidoAuth() const override { return false; } const UserProvidedUnmaskDetails& details() { return details_; }
diff --git a/components/autofill/core/browser/webdata/autocomplete/autocomplete_table.cc b/components/autofill/core/browser/webdata/autocomplete/autocomplete_table.cc index 9fd63d5..421fc21 100644 --- a/components/autofill/core/browser/webdata/autocomplete/autocomplete_table.cc +++ b/components/autofill/core/browser/webdata/autocomplete/autocomplete_table.cc
@@ -409,21 +409,21 @@ return base::StrCat(message_parts); }; AutocompleteChange::Type change_type; - if (GetAutocompleteEntry(element.name, element.value).has_value()) { + if (GetAutocompleteEntry(element.name, element.value()).has_value()) { change_type = AutocompleteChange::UPDATE; sql::Statement s(db_->GetUniqueStatement( "UPDATE autofill SET date_last_used = ?, count = count + 1 " "WHERE name = ? AND value = ?")); s.BindInt64(0, time.ToTimeT()); s.BindString16(1, element.name); - s.BindString16(2, element.value); + s.BindString16(2, element.value()); if (!s.Run()) { DUMP_WILL_BE_NOTREACHED_NORETURN() << create_debug_info("UPDATE"); return false; } } else { change_type = AutocompleteChange::ADD; - if (!InsertAutocompleteEntry({{element.name, element.value}, + if (!InsertAutocompleteEntry({{element.name, element.value()}, /*date_created=*/time, /*date_last_used=*/time})) { DUMP_WILL_BE_NOTREACHED_NORETURN() << create_debug_info("INSERT"); @@ -431,7 +431,7 @@ } } changes->emplace_back(change_type, - AutocompleteKey(element.name, element.value)); + AutocompleteKey(element.name, element.value())); return true; }
diff --git a/components/autofill/core/browser/webdata/autocomplete/autocomplete_table_unittest.cc b/components/autofill/core/browser/webdata/autocomplete/autocomplete_table_unittest.cc index d669ae8..b90775e1 100644 --- a/components/autofill/core/browser/webdata/autocomplete/autocomplete_table_unittest.cc +++ b/components/autofill/core/browser/webdata/autocomplete/autocomplete_table_unittest.cc
@@ -104,24 +104,24 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); std::vector<AutocompleteEntry> v; for (int i = 0; i < 5; ++i) { - field.value = u"Clark Kent"; + field.set_value(u"Clark Kent"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(base::Seconds(2)); } clock.SetNow(begin); for (int i = 0; i < 3; ++i) { - field.value = u"Clark Sutter"; + field.set_value(u"Clark Sutter"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(base::Seconds(2)); } clock.SetNow(begin); for (int i = 0; i < 2; ++i) { field.name = u"Favorite Color"; - field.value = u"Green"; + field.set_value(u"Green"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(base::Seconds(2)); } @@ -196,16 +196,16 @@ // Now add some values with empty strings. const std::u16string kValue = u" toto "; field.name = u"blank"; - field.value = std::u16string(); + field.set_value(std::u16string()); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); field.name = u"blank"; - field.value = u" "; + field.set_value(u" "); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); field.name = u"blank"; - field.value = u" "; + field.set_value(u" "); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); field.name = u"blank"; - field.value = kValue; + field.set_value(kValue); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); // They should be stored normally as the DB layer does not check for empty @@ -222,7 +222,7 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); std::vector<AutocompleteEntry> prefix_v; @@ -233,7 +233,7 @@ EXPECT_TRUE( table_->GetFormValuesForElementName(field.name, u"", 10, no_prefix_v)); - AutocompleteEntry expected_entry(AutocompleteKey(field.name, field.value), + AutocompleteEntry expected_entry(AutocompleteKey(field.name, field.value()), AutofillClock::Now(), AutofillClock::Now()); EXPECT_THAT(prefix_v, ElementsAre(expected_entry)); @@ -248,7 +248,7 @@ table_->GetFormValuesForElementName(field.name, u"", 10, no_prefix_v)); expected_entry = - AutocompleteEntry(AutocompleteKey(field.name, field.value), + AutocompleteEntry(AutocompleteKey(field.name, field.value()), expected_entry.date_created(), AutofillClock::Now()); EXPECT_THAT(prefix_v, ElementsAre(expected_entry)); @@ -274,7 +274,7 @@ for (Entry entry : entries) { FormFieldData field; field.name = entry.name; - field.value = entry.value; + field.set_value(entry.value); ASSERT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(second); } @@ -329,7 +329,7 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(one_day); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); @@ -355,7 +355,7 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); ASSERT_EQ(1U, changes.size()); EXPECT_EQ(AutocompleteChange(AutocompleteChange::ADD, @@ -452,7 +452,7 @@ // Add a form field. This will be replaced. FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); AutocompleteEntry entry(MakeAutocompleteEntry(u"Name", u"Superman", 1, 2)); @@ -475,7 +475,7 @@ // Add a form field. This will NOT be replaced. FormFieldData field; field.name = existing.key().name(); - field.value = existing.key().value(); + field.set_value(existing.key().value()); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); AutocompleteEntry entry(MakeAutocompleteEntry(u"Name", u"Clark Kent", 1, 2)); std::vector<AutocompleteEntry> entries; @@ -498,19 +498,19 @@ std::vector<FormFieldData> elements; FormFieldData field; field.name = u"firstname"; - field.value = u"Joe"; + field.set_value(u"Joe"); elements.push_back(field); field.name = u"firstname"; - field.value = u"Jane"; + field.set_value(u"Jane"); elements.push_back(field); field.name = u"lastname"; - field.value = u"Smith"; + field.set_value(u"Smith"); elements.push_back(field); field.name = u"lastname"; - field.value = u"Jones"; + field.set_value(u"Jones"); elements.push_back(field); std::vector<AutocompleteChange> changes; @@ -536,19 +536,19 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); for (int i = 0; i < 5; i++) { clock.SetNow(base::Time::FromTimeT(10 * (i + 1))); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); } - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); changes.clear(); EXPECT_TRUE(table_->RemoveFormElementsAddedBetween( base::Time::FromTimeT(51), base::Time::FromTimeT(60), changes)); EXPECT_TRUE(changes.empty()); - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); } TEST_F(AutocompleteTableTest, @@ -558,19 +558,19 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); for (int i = 0; i < 5; i++) { clock.SetNow(base::Time::FromTimeT(50 + 10 * i)); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); } - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); changes.clear(); EXPECT_TRUE(table_->RemoveFormElementsAddedBetween( base::Time::FromTimeT(40), base::Time::FromTimeT(50), changes)); EXPECT_TRUE(changes.empty()); - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); } TEST_F(AutocompleteTableTest, @@ -580,22 +580,22 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); for (int i = 0; i < 5; i++) { clock.SetNow(base::Time::FromTimeT(10 * (i + 1))); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); } - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); changes.clear(); EXPECT_TRUE(table_->RemoveFormElementsAddedBetween( base::Time::FromTimeT(10), base::Time::FromTimeT(51), changes)); ASSERT_EQ(1U, changes.size()); EXPECT_EQ(AutocompleteChange(AutocompleteChange::REMOVE, - AutocompleteKey(field.name, field.value)), + AutocompleteKey(field.name, field.value())), changes[0]); - EXPECT_EQ(0, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(0, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); } TEST_F(AutocompleteTableTest, @@ -605,24 +605,24 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); for (int i = 0; i < 5; i++) { clock.SetNow(base::Time::FromTimeT(10 * (i + 1))); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); } - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); changes.clear(); EXPECT_TRUE(table_->RemoveFormElementsAddedBetween( base::Time::FromTimeT(40), base::Time::FromTimeT(60), changes)); ASSERT_EQ(1U, changes.size()); EXPECT_EQ(AutocompleteChange(AutocompleteChange::UPDATE, - AutocompleteKey(field.name, field.value)), + AutocompleteKey(field.name, field.value())), changes[0]); - EXPECT_EQ(4, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(4, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); std::optional<AutocompleteEntry> entry = - table_->GetAutocompleteEntry(field.name, field.value); + table_->GetAutocompleteEntry(field.name, field.value()); ASSERT_TRUE(entry); EXPECT_EQ(base::Time::FromTimeT(10), entry->date_created()); EXPECT_EQ(base::Time::FromTimeT(39), entry->date_last_used()); @@ -635,24 +635,24 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); for (int i = 0; i < 5; i++) { clock.SetNow(base::Time::FromTimeT(50 + 10 * i)); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); } - EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(5, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); changes.clear(); EXPECT_TRUE(table_->RemoveFormElementsAddedBetween( base::Time::FromTimeT(40), base::Time::FromTimeT(80), changes)); ASSERT_EQ(1U, changes.size()); EXPECT_EQ(AutocompleteChange(AutocompleteChange::UPDATE, - AutocompleteKey(field.name, field.value)), + AutocompleteKey(field.name, field.value())), changes[0]); - EXPECT_EQ(2, GetAutocompleteEntryCount(field.name, field.value, db_.get())); + EXPECT_EQ(2, GetAutocompleteEntryCount(field.name, field.value(), db_.get())); std::optional<AutocompleteEntry> entry = - table_->GetAutocompleteEntry(field.name, field.value); + table_->GetAutocompleteEntry(field.name, field.value()); ASSERT_TRUE(entry); EXPECT_EQ(base::Time::FromTimeT(80), entry->date_created()); EXPECT_EQ(base::Time::FromTimeT(90), entry->date_last_used()); @@ -667,15 +667,15 @@ FormFieldData field; field.name = u"Name"; - field.value = u"Clark Sutter"; + field.set_value(u"Clark Sutter"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(base::Days(2)); - field.value = u"Clark Kent"; + field.set_value(u"Clark Kent"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(base::Days(29)); - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); EXPECT_EQ(3U, changes.size()); @@ -702,14 +702,14 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(2 * kAutocompleteRetentionPolicyPeriod); changes.clear(); EXPECT_TRUE(table_->RemoveExpiredFormElements(changes)); EXPECT_EQ(AutocompleteChange(AutocompleteChange::EXPIRE, - AutocompleteKey(field.name, field.value)), + AutocompleteKey(field.name, field.value())), changes[0]); } @@ -721,7 +721,7 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); clock.Advance(base::Days(2)); changes.clear(); @@ -747,7 +747,7 @@ std::vector<Time> timestamps1; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); timestamps1.push_back(AutofillClock::Now()); std::string key1("NameSuperman"); @@ -777,7 +777,7 @@ std::vector<Time> timestamps1; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); timestamps1.push_back(AutofillClock::Now()); std::string key1("NameSuperman"); @@ -787,7 +787,7 @@ clock.SetNow(Time::FromTimeT(1)); std::vector<Time> timestamps2; field.name = u"Name"; - field.value = u"Clark Kent"; + field.set_value(u"Clark Kent"); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); timestamps2.push_back(AutofillClock::Now()); std::string key2("NameClark Kent"); @@ -820,7 +820,7 @@ for (int i = 0; i < 2; ++i) { FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); base::Time now = Time::FromTimeT(i); clock.SetNow(now); EXPECT_TRUE(table_->AddFormFieldValues({field}, &changes)); @@ -853,7 +853,7 @@ AutocompleteChangeList changes; FormFieldData field; field.name = u"Name"; - field.value = u"Superman"; + field.set_value(u"Superman"); EXPECT_FALSE(table_->AddFormFieldValues({field}, &changes)); }
diff --git a/components/autofill/core/browser/webdata/web_data_service_unittest.cc b/components/autofill/core/browser/webdata/web_data_service_unittest.cc index f4bee5c..168707f 100644 --- a/components/autofill/core/browser/webdata/web_data_service_unittest.cc +++ b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
@@ -187,7 +187,7 @@ std::vector<FormFieldData>* form_fields) { FormFieldData field; field.name = name; - field.value = value; + field.set_value(value); form_fields->push_back(field); }
diff --git a/components/autofill/core/common/autofill_data_validation.cc b/components/autofill/core/common/autofill_data_validation.cc index 290c57d..a99dd0d 100644 --- a/components/autofill/core/common/autofill_data_validation.cc +++ b/components/autofill/core/common/autofill_data_validation.cc
@@ -33,7 +33,7 @@ bool IsValidFormFieldData(const FormFieldData& field) { return IsValidString16(field.label) && IsValidString16(field.name) && - IsValidString16(field.value) && + IsValidString16(field.value()) && base::to_underlying(field.form_control_type) >= base::to_underlying(FormControlType::kMinValue) && base::to_underlying(field.form_control_type) <=
diff --git a/components/autofill/core/common/autofill_test_utils.cc b/components/autofill/core/common/autofill_test_utils.cc index facfe8d..b727346 100644 --- a/components/autofill/core/common/autofill_test_utils.cc +++ b/components/autofill/core/common/autofill_test_utils.cc
@@ -106,7 +106,7 @@ FormData WithoutValues(FormData form) { for (FormFieldData& field : form.fields) { - field.value = u""; + field.set_value(u""); } return form; } @@ -142,7 +142,7 @@ field.renderer_id = MakeFieldRendererId(); field.label = base::UTF8ToUTF16(label); field.name = base::UTF8ToUTF16(name); - field.value = base::UTF8ToUTF16(value); + field.set_value(base::UTF8ToUTF16(value)); field.form_control_type = type; field.is_focusable = true; return field;
diff --git a/components/autofill/core/common/field_data_manager_unittest.cc b/components/autofill/core/common/field_data_manager_unittest.cc index 17b0c173..64667fe 100644 --- a/components/autofill/core/common/field_data_manager_unittest.cc +++ b/components/autofill/core/common/field_data_manager_unittest.cc
@@ -19,7 +19,7 @@ void SetUp() override { FormFieldData field1; field1.id_attribute = u"name1"; - field1.value = u"first"; + field1.set_value(u"first"); field1.form_control_type = FormControlType::kInputText; field1.renderer_id = FieldRendererId(1); control_elements_.push_back(field1); @@ -40,7 +40,7 @@ const scoped_refptr<FieldDataManager> field_data_manager = base::MakeRefCounted<FieldDataManager>(); field_data_manager->UpdateFieldDataMap(control_elements_[0].renderer_id, - control_elements_[0].value, + control_elements_[0].value(), FieldPropertiesFlags::kUserTyped); const FieldRendererId id(control_elements_[0].renderer_id); EXPECT_TRUE(field_data_manager->HasFieldData(id)); @@ -57,7 +57,7 @@ EXPECT_EQ(mask, field_data_manager->GetFieldPropertiesMask(id)); field_data_manager->UpdateFieldDataMap(control_elements_[1].renderer_id, - control_elements_[1].value, + control_elements_[1].value(), FieldPropertiesFlags::kAutofilled); EXPECT_EQ(FieldPropertiesFlags::kNoFlags, field_data_manager->GetFieldPropertiesMask( @@ -86,7 +86,7 @@ EXPECT_EQ(mask, field_data_manager->GetFieldPropertiesMask(id)); field_data_manager->UpdateFieldDataMap(control_elements_[0].renderer_id, - control_elements_[0].value, + control_elements_[0].value(), FieldPropertiesFlags::kAutofilled); EXPECT_EQ(u"first", field_data_manager->GetUserInput(id)); } @@ -95,7 +95,7 @@ const scoped_refptr<FieldDataManager> field_data_manager = base::MakeRefCounted<FieldDataManager>(); field_data_manager->UpdateFieldDataMap(control_elements_[0].renderer_id, - control_elements_[0].value, + control_elements_[0].value(), FieldPropertiesFlags::kUserTyped); EXPECT_TRUE(field_data_manager->FindMatchedValue(u"first_element")); EXPECT_FALSE(field_data_manager->FindMatchedValue(u"second_element"));
diff --git a/components/autofill/core/common/form_data.cc b/components/autofill/core/common/form_data.cc index ab3e18a..5bd97af7 100644 --- a/components/autofill/core/common/form_data.cc +++ b/components/autofill/core/common/form_data.cc
@@ -132,8 +132,9 @@ bool FormHasNonEmptyPasswordField(const FormData& form) { for (const auto& field : form.fields) { if (field.IsPasswordInputElement()) { - if (!field.value.empty() || !field.user_input.empty()) + if (!field.value().empty() || !field.user_input.empty()) { return true; + } } } return false;
diff --git a/components/autofill/core/common/form_data_fuzzed_producer.cc b/components/autofill/core/common/form_data_fuzzed_producer.cc index 41cdd7d..6f7843e 100644 --- a/components/autofill/core/common/form_data_fuzzed_producer.cc +++ b/components/autofill/core/common/form_data_fuzzed_producer.cc
@@ -76,11 +76,11 @@ if (first_field_with_same_value == -1) { first_field_with_same_value = static_cast<int>(i); } else { - result.fields[i].value = - result.fields[first_field_with_same_value].value; + result.fields[i].set_value( + result.fields[first_field_with_same_value].value()); } } else if (!force_empty_value) { - result.fields[i].value = ConsumeU16String(provider); + result.fields[i].set_value(ConsumeU16String(provider)); } }
diff --git a/components/autofill/core/common/form_data_unittest.cc b/components/autofill/core/common/form_data_unittest.cc index c153aa3..f757096 100644 --- a/components/autofill/core/common/form_data_unittest.cc +++ b/components/autofill/core/common/form_data_unittest.cc
@@ -153,7 +153,7 @@ FormFieldData field_data; field_data.label = u"label"; field_data.name = u"name"; - field_data.value = u"value"; + field_data.set_value(u"value"); field_data.form_control_type = FormControlType::kInputPassword; field_data.autocomplete_attribute = "off"; field_data.max_length = 200;
diff --git a/components/autofill/core/common/form_field_data.cc b/components/autofill/core/common/form_field_data.cc index 41fb278..86addfeee 100644 --- a/components/autofill/core/common/form_field_data.cc +++ b/components/autofill/core/common/form_field_data.cc
@@ -103,7 +103,7 @@ iter->ReadUInt64(&field_data->max_length) && iter->ReadBool(&field_data->is_autofilled); if (success) { - field_data->value = std::move(value); + field_data->set_value(std::move(value)); // Form control types are serialized as strings for legacy reasons. // TODO(crbug.com/1353392,crbug.com/1482526): Why does the Password Manager // (de)serialize form control types? Remove it or migrate it to the enum @@ -355,7 +355,7 @@ FormFieldData::FillData::~FillData() = default; FormFieldData::FillData::FillData(const FormFieldData& field) - : value(field.value), + : value(field.value()), renderer_id(field.renderer_id), host_form_id(field.host_form_id), section(field.section), @@ -424,7 +424,7 @@ pickle->WriteInt(kFormFieldDataPickleVersion); pickle->WriteString16(field_data.label); pickle->WriteString16(field_data.name); - pickle->WriteString16(field_data.value); + pickle->WriteString16(field_data.value()); pickle->WriteString(FormControlTypeToString(field_data.form_control_type)); // We don't serialize the `parsed_autocomplete`. See http://crbug.com/1353392. pickle->WriteString(field_data.autocomplete_attribute); @@ -583,24 +583,20 @@ std::ostream& operator<<(std::ostream& os, const FormFieldData& field) { return os << "label='" << field.label << "' " - << "unique_Id=" << field.global_id() << " " - << "origin='" << field.origin.Serialize() << "' " - << "name='" << field.name << "' " - << "id_attribute='" << field.id_attribute << "' " - << "name_attribute='" << field.name_attribute << "' " - << "value='" << field.value << "' " - << "control='" << field.form_control_type << "' " - << "autocomplete='" << field.autocomplete_attribute << "' " + << "unique_Id=" << field.global_id() << " " << "origin='" + << field.origin.Serialize() << "' " << "name='" << field.name + << "' " << "id_attribute='" << field.id_attribute << "' " + << "name_attribute='" << field.name_attribute << "' " << "value='" + << field.value() << "' " << "control='" << field.form_control_type + << "' " << "autocomplete='" << field.autocomplete_attribute << "' " << "parsed_autocomplete='" << (field.parsed_autocomplete ? field.parsed_autocomplete->ToString() : "") - << "' " - << "placeholder='" << field.placeholder << "' " - << "max_length=" << field.max_length << " " - << "css_classes='" << field.css_classes << "' " - << "autofilled=" << field.is_autofilled << " " - << "check_status=" << field.check_status << " " + << "' " << "placeholder='" << field.placeholder << "' " + << "max_length=" << field.max_length << " " << "css_classes='" + << field.css_classes << "' " << "autofilled=" << field.is_autofilled + << " " << "check_status=" << field.check_status << " " << "is_focusable=" << field.is_focusable << " " << "should_autocomplete=" << field.should_autocomplete << " " << "role=" << field.role << " " @@ -641,7 +637,7 @@ buffer << Tr{} << "Is focusable:" << field.is_focusable; buffer << Tr{} << "Is enabled:" << field.is_enabled; buffer << Tr{} << "Is readonly:" << field.is_readonly; - buffer << Tr{} << "Is empty:" << (field.value.empty() ? "Yes" : "No"); + buffer << Tr{} << "Is empty:" << (field.value().empty() ? "Yes" : "No"); buffer << CTag{"table"}; return buffer; }
diff --git a/components/autofill/core/common/form_field_data.h b/components/autofill/core/common/form_field_data.h index 6a4ee94..1ca40116 100644 --- a/components/autofill/core/common/form_field_data.h +++ b/components/autofill/core/common/form_field_data.h
@@ -281,7 +281,8 @@ // depending on the `form_control_type`. // Truncated at `kMaxStringLength`. // TODO(crbug.com/1501362): Extract the value of contenteditables on iOS. - std::u16string value; + const std::u16string& value() const { return value_; } + void set_value(std::u16string value) { value_ = std::move(value); } // The selected text, or the empty string if no text is selected. // Truncated at `50 * kMaxStringLength`. @@ -417,6 +418,9 @@ // should be filled even though it is already considered autofilled OR // user modified. bool force_override = false; + + private: + std::u16string value_; }; // Structure containing necessary information to be sent from the browser to the @@ -495,7 +499,7 @@ do { \ EXPECT_EQ(expected.label, actual.label); \ EXPECT_EQ(expected.name, actual.name); \ - EXPECT_EQ(expected.value, actual.value); \ + EXPECT_EQ(expected.value(), actual.value()); \ EXPECT_EQ(expected.form_control_type, actual.form_control_type); \ EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \ EXPECT_EQ(expected.parsed_autocomplete, actual.parsed_autocomplete); \
diff --git a/components/autofill/core/common/form_field_data_unittest.cc b/components/autofill/core/common/form_field_data_unittest.cc index c9f8c262..87ed20c 100644 --- a/components/autofill/core/common/form_field_data_unittest.cc +++ b/components/autofill/core/common/form_field_data_unittest.cc
@@ -17,7 +17,7 @@ void FillCommonFields(FormFieldData* data) { data->label = u"label"; data->name = u"name"; - data->value = u"value"; + data->set_value(u"value"); data->form_control_type = FormControlType::kInputPassword; data->autocomplete_attribute = "off"; data->max_length = 200; @@ -58,7 +58,7 @@ void WriteSection1(const FormFieldData& data, base::Pickle* pickle) { pickle->WriteString16(data.label); pickle->WriteString16(data.name); - pickle->WriteString16(data.value); + pickle->WriteString16(data.value()); pickle->WriteString(FormControlTypeToString(data.form_control_type)); pickle->WriteString(data.autocomplete_attribute); pickle->WriteUInt64(data.max_length);
diff --git a/components/autofill/core/common/mojom/autofill_types_mojom_traits.cc b/components/autofill/core/common/mojom/autofill_types_mojom_traits.cc index 5358defd..a794590 100644 --- a/components/autofill/core/common/mojom/autofill_types_mojom_traits.cc +++ b/components/autofill/core/common/mojom/autofill_types_mojom_traits.cc
@@ -179,7 +179,7 @@ if (!data.ReadValue(&value)) { return false; } - out->value = std::move(value); + out->set_value(std::move(value)); if (!data.ReadSelectedText(&out->selected_text)) { return false; }
diff --git a/components/autofill/core/common/mojom/autofill_types_mojom_traits.h b/components/autofill/core/common/mojom/autofill_types_mojom_traits.h index 2b47a0be..bcd54948 100644 --- a/components/autofill/core/common/mojom/autofill_types_mojom_traits.h +++ b/components/autofill/core/common/mojom/autofill_types_mojom_traits.h
@@ -207,7 +207,7 @@ } static const std::u16string& value(const autofill::FormFieldData& r) { - return r.value; + return r.value(); } static const std::u16string& selected_text(const autofill::FormFieldData& r) {
diff --git a/components/autofill/core/common/mojom/autofill_types_mojom_traits_unittest.cc b/components/autofill/core/common/mojom/autofill_types_mojom_traits_unittest.cc index bb6da244..56ed3dc 100644 --- a/components/autofill/core/common/mojom/autofill_types_mojom_traits_unittest.cc +++ b/components/autofill/core/common/mojom/autofill_types_mojom_traits_unittest.cc
@@ -218,7 +218,7 @@ EXPECT_TRUE(passed.host_frame.is_empty()); EXPECT_TRUE(FormFieldData::DeepEqual(test::WithoutUnserializedData(expected), passed)); - EXPECT_EQ(expected.value, passed.value); + EXPECT_EQ(expected.value(), passed.value()); EXPECT_EQ(expected.user_input, passed.user_input); std::move(closure).Run(); } @@ -339,7 +339,7 @@ input.name = u"name"; input.id_attribute = u"id"; input.name_attribute = u"name"; - input.value = u"value"; + input.set_value(u"value"); input.form_control_type = FormControlType::kInputText; input.autocomplete_attribute = "on"; input.parsed_autocomplete =
diff --git a/components/autofill/core/common/save_password_progress_logger.cc b/components/autofill/core/common/save_password_progress_logger.cc index 80da20b..aee8e17 100644 --- a/components/autofill/core/common/save_password_progress_logger.cc +++ b/components/autofill/core/common/save_password_progress_logger.cc
@@ -123,7 +123,7 @@ std::string SavePasswordProgressLogger::GetFormFieldDataLogString( const FormFieldData& field) { const char* const is_visible = field.is_focusable ? "visible" : "invisible"; - const char* const is_empty = field.value.empty() ? "empty" : "non-empty"; + const char* const is_empty = field.value().empty() ? "empty" : "non-empty"; std::string autocomplete = field.autocomplete_attribute.empty() ? std::string()
diff --git a/components/autofill/ios/browser/autofill_agent.mm b/components/autofill/ios/browser/autofill_agent.mm index 6d1c4eb3..17f562b 100644 --- a/components/autofill/ios/browser/autofill_agent.mm +++ b/components/autofill/ios/browser/autofill_agent.mm
@@ -115,7 +115,7 @@ // Any value set will cause the BrowserAutofillManager to filter suggestions // (only show suggestions that begin the same as the current value) with the // effect that one only suggestion would be returned; the value itself. - field->value = std::u16string(); + field->set_value(std::u16string()); } } @@ -552,11 +552,12 @@ base::Value::Dict fieldsData; for (const auto& field : form.fields) { // Skip empty fields and those that are not autofilled. - if (field.value.empty() || !field.is_autofilled) + if (field.value().empty() || !field.is_autofilled) { continue; + } base::Value::Dict fieldData; - fieldData.Set("value", field.value); + fieldData.Set("value", field.value()); fieldData.Set("section", field.section.ToString()); fieldsData.Set(NumberToString(field.renderer_id.value()), std::move(fieldData));
diff --git a/components/autofill/ios/browser/autofill_agent_unittests.mm b/components/autofill/ios/browser/autofill_agent_unittests.mm index fb44538..4668912 100644 --- a/components/autofill/ios/browser/autofill_agent_unittests.mm +++ b/components/autofill/ios/browser/autofill_agent_unittests.mm
@@ -157,7 +157,7 @@ field.name = u"number"; field.name_attribute = field.name; field.id_attribute = u"number"; - field.value = u"number_value"; + field.set_value(u"number_value"); field.is_autofilled = true; field.renderer_id = FieldRendererId(2); form.fields.push_back(field); @@ -165,7 +165,7 @@ field.name = u"name"; field.name_attribute = field.name; field.id_attribute = u"name"; - field.value = u"name_value"; + field.set_value(u"name_value"); field.is_autofilled = true; field.renderer_id = FieldRendererId(3); form.fields.push_back(field); @@ -173,7 +173,7 @@ field.name = u"expiry_month"; field.name_attribute = field.name; field.id_attribute = u"expiry_month"; - field.value = u"01"; + field.set_value(u"01"); field.is_autofilled = false; field.renderer_id = FieldRendererId(4); form.fields.push_back(field); @@ -181,7 +181,7 @@ field.name = u"unknown"; field.name_attribute = field.name; field.id_attribute = u"unknown"; - field.value = u""; + field.set_value(u""); field.is_autofilled = true; field.renderer_id = FieldRendererId(5); form.fields.push_back(field); @@ -208,7 +208,7 @@ field.name = u"number"; field.name_attribute = field.name; field.id_attribute = u"number"; - field.value = u"number_value"; + field.set_value(u"number_value"); field.is_autofilled = true; field.renderer_id = FieldRendererId(2); @@ -235,7 +235,7 @@ field.name = u"number"; field.name_attribute = field.name; field.id_attribute = u"number"; - field.value = u"number_value"; + field.set_value(u"number_value"); field.is_autofilled = true; field.renderer_id = FieldRendererId(2); @@ -266,7 +266,7 @@ field.name = u"number"; field.name_attribute = field.name; field.id_attribute = u"number"; - field.value = u"number_value"; + field.set_value(u"number_value"); field.is_autofilled = true; field.renderer_id = FieldRendererId(2);
diff --git a/components/autofill/ios/browser/autofill_util.mm b/components/autofill/ios/browser/autofill_util.mm index f449faf..6bd7a39 100644 --- a/components/autofill/ios/browser/autofill_util.mm +++ b/components/autofill/ios/browser/autofill_util.mm
@@ -302,7 +302,7 @@ field_data->label = base::UTF8ToUTF16(*label); } if (const std::string* value = field.FindString("value")) { - field_data->value = base::UTF8ToUTF16(*value); + field_data->set_value(base::UTF8ToUTF16(*value)); } field_data->is_autofilled = field.FindBool("is_autofilled").value_or(field_data->is_autofilled);
diff --git a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenter.java b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenter.java index a9c6752..01296738 100644 --- a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenter.java +++ b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenter.java
@@ -104,8 +104,9 @@ } mDialog = new ComponentDialog(mContext, styles[buttonIndex][dialogIndex]); mDialog.setOnCancelListener( - dialogInterface -> - dismissCurrentDialog(DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE)); + dialogInterface -> { + dismissCurrentDialog(DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + }); // Cancel on touch outside should be disabled by default. The ModelChangeProcessor wouldn't // notify change if the property is not set during initialization.
diff --git a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/TabModalPresenter.java b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/TabModalPresenter.java index 24c243ce..e322888 100644 --- a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/TabModalPresenter.java +++ b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/TabModalPresenter.java
@@ -66,8 +66,7 @@ if (model.get(ModalDialogProperties.CANCEL_ON_TOUCH_OUTSIDE)) { mDialogContainer.setOnClickListener( (v) -> { - dismissCurrentDialog( - DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + dismissCurrentDialog(DialogDismissalCause.TOUCH_OUTSIDE); }); } else { mDialogContainer.setOnClickListener(null);
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java index f00f9468..4a4b3e6 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
@@ -96,10 +96,18 @@ } } - /** Returns the ResourceItem for a ContentSettingsType. */ - private static ResourceItem getResourceItem(int contentType) { + /** + * Returns the ResourceItem for a ContentSettingsType. + * @param delegate A site settings delegate to check feature states. Only needs to be passed + * to access Cookie icon, title or summary. + */ + private static ResourceItem getResourceItem(int contentType, SiteSettingsDelegate delegate) { switch (contentType) { case ContentSettingsType.ADS: + if (delegate == null) { + return new ResourceItem( + 0, 0, ContentSettingValues.ALLOW, ContentSettingValues.BLOCK, 0, 0, 0); + } return new ResourceItem( R.drawable.web_asset, R.string.site_settings_page_intrusive_ads_label, @@ -200,6 +208,10 @@ R.string.website_settings_category_clipboard_a11y); case ContentSettingsType.COOKIES: + if (delegate == null) { + return new ResourceItem( + 0, 0, ContentSettingValues.ALLOW, ContentSettingValues.BLOCK, 0, 0, 0); + } return new ResourceItem( R.drawable.gm_database_24, R.string.site_data_page_title, @@ -420,8 +432,8 @@ } /** Returns the resource id of the 24dp icon for a content type. */ - public static int getIcon(int contentType) { - return getResourceItem(contentType).getIcon(); + public static int getIcon(int contentType, SiteSettingsDelegate delegate) { + return getResourceItem(contentType, delegate).getIcon(); } /** @@ -437,8 +449,10 @@ public static Drawable getContentSettingsIcon( Context context, @ContentSettingsType.EnumType int contentSettingsType, - @ContentSettingValues @Nullable Integer value) { - Drawable icon = SettingsUtils.getTintedIcon(context, getIcon(contentSettingsType)); + @ContentSettingValues @Nullable Integer value, + SiteSettingsDelegate delegate) { + Drawable icon = + SettingsUtils.getTintedIcon(context, getIcon(contentSettingsType, delegate)); if (value != null && value == ContentSettingValues.BLOCK) { return getBlockedSquareIcon(context.getResources(), icon); } @@ -465,7 +479,8 @@ isIncognito ? R.color.default_icon_color_blue_light : R.color.default_icon_color_accent1_tint_list; - Drawable icon = SettingsUtils.getTintedIcon(context, getIcon(contentSettingsType), color); + Drawable icon = + SettingsUtils.getTintedIcon(context, getIcon(contentSettingsType, null), color); if (value != null && value == ContentSettingValues.BLOCK) { return getBlockedSquareIcon(context.getResources(), icon); } @@ -537,40 +552,42 @@ } /** - * Returns the resource id of the title (short version), shown on the Site Settings page and in - * the global toggle at the top of a Website Settings page for a category. + * Returns the resource id of the title (short version), shown on the Site Settings page + * and in the global toggle at the top of a Website Settings page for a category. */ - public static int getTitleForCategory(@SiteSettingsCategory.Type int type) { + public static int getTitleForCategory( + @SiteSettingsCategory.Type int type, SiteSettingsDelegate delegate) { if (type == SiteSettingsCategory.Type.THIRD_PARTY_COOKIES) { return R.string.third_party_cookies_page_title; } - return getTitle(SiteSettingsCategory.contentSettingsType(type)); + return getTitle(SiteSettingsCategory.contentSettingsType(type), delegate); } /** * Returns the resource id of the title (short version), shown on the Site Settings page and in * the global toggle at the top of a Website Settings page for a content type. */ - public static int getTitle(@ContentSettingsType.EnumType int contentType) { - return getResourceItem(contentType).getTitle(); + public static int getTitle( + @ContentSettingsType.EnumType int contentType, SiteSettingsDelegate delegate) { + return getResourceItem(contentType, delegate).getTitle(); } /** - * Returns which ContentSetting the global default is set to, when enabled. Either Ask/Allow. - * Not required unless this entry describes a settings that appears on the Site Settings page - * and has a global toggle. + * Returns which ContentSetting the global default is set to, when enabled. + * Either Ask/Allow. Not required unless this entry describes a settings + * that appears on the Site Settings page and has a global toggle. */ public static @ContentSettingValues @Nullable Integer getDefaultEnabledValue(int contentType) { - return getResourceItem(contentType).getDefaultEnabledValue(); + return getResourceItem(contentType, null).getDefaultEnabledValue(); } /** - * Returns which ContentSetting the global default is set to, when disabled. Usually Block. Not - * required unless this entry describes a settings that appears on the Site Settings page and - * has a global toggle. + * Returns which ContentSetting the global default is set to, when disabled. + * Usually Block. Not required unless this entry describes a settings + * that appears on the Site Settings page and has a global toggle. */ public static @ContentSettingValues @Nullable Integer getDefaultDisabledValue(int contentType) { - return getResourceItem(contentType).getDefaultDisabledValue(); + return getResourceItem(contentType, null).getDefaultDisabledValue(); } /** @@ -618,13 +635,13 @@ } /** Returns the summary (resource id) to show when the content type is enabled. */ - public static int getEnabledSummary(int contentType) { - return getResourceItem(contentType).getEnabledSummary(); + public static int getEnabledSummary(int contentType, SiteSettingsDelegate delegate) { + return getResourceItem(contentType, delegate).getEnabledSummary(); } /** Returns the summary (resource id) to show when the content type is disabled. */ - public static int getDisabledSummary(int contentType) { - return getResourceItem(contentType).getDisabledSummary(); + public static int getDisabledSummary(int contentType, SiteSettingsDelegate delegate) { + return getResourceItem(contentType, delegate).getDisabledSummary(); } /** @@ -633,13 +650,12 @@ * * <p>Returns `0` in case no a11y override is configured. */ - public static int getSummaryOverrideForScreenReader(int contentType) { - return getResourceItem(contentType).getSummaryOverrideForScreenReader(); + public static int getSummaryOverrideForScreenReader( + int contentType, SiteSettingsDelegate delegate) { + return getResourceItem(contentType, delegate).getSummaryOverrideForScreenReader(); } - /** - * Returns the summary for Geolocation content settings when it is set to 'Allow' (by policy). - */ + /** Returns the summary for Geolocation content settings when it is set to 'Allow' (by policy). */ public static int getGeolocationAllowedSummary() { return R.string.website_settings_category_allowed; }
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java index 382f51b..c96417b 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
@@ -1092,7 +1092,9 @@ preference.setIcon( SettingsUtils.getTintedIcon( getContext(), - ContentSettingsResources.getIcon(mCategory.getContentSettingsType()))); + ContentSettingsResources.getIcon( + mCategory.getContentSettingsType(), + getSiteSettingsDelegate()))); preference.setTitle(entry.first.get(0).getName()); preference.setFragment(ChosenObjectSettings.class.getCanonicalName()); getPreferenceScreen().addPreference(preference); @@ -1350,7 +1352,8 @@ private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) { binaryToggle.setOnPreferenceChangeListener(this); - binaryToggle.setTitle(ContentSettingsResources.getTitle(contentType)); + binaryToggle.setTitle( + ContentSettingsResources.getTitle(contentType, getSiteSettingsDelegate())); // Set summary on or off. BrowserContextHandle browserContextHandle = @@ -1359,11 +1362,16 @@ && WebsitePreferenceBridge.isLocationAllowedByPolicy(browserContextHandle)) { binaryToggle.setSummaryOn(ContentSettingsResources.getGeolocationAllowedSummary()); } else { - binaryToggle.setSummaryOn(ContentSettingsResources.getEnabledSummary(contentType)); + binaryToggle.setSummaryOn( + ContentSettingsResources.getEnabledSummary( + contentType, getSiteSettingsDelegate())); } - binaryToggle.setSummaryOff(ContentSettingsResources.getDisabledSummary(contentType)); + binaryToggle.setSummaryOff( + ContentSettingsResources.getDisabledSummary( + contentType, getSiteSettingsDelegate())); int summaryForAccessibility = - ContentSettingsResources.getSummaryOverrideForScreenReader(contentType); + ContentSettingsResources.getSummaryOverrideForScreenReader( + contentType, getSiteSettingsDelegate()); if (summaryForAccessibility != 0) { binaryToggle.setSummaryOverrideForScreenReader( getContext().getString(summaryForAccessibility));
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java index feb14ada..e967d01 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
@@ -488,12 +488,12 @@ @ContentSettingsType.EnumType int contentSettingsType, @ContentSettingValues @Nullable Integer value) { return ContentSettingsResources.getContentSettingsIcon( - getContext(), contentSettingsType, value); + getContext(), contentSettingsType, value, getSiteSettingsDelegate()); } /** - * Updates the permissions displayed in the UI by fetching them from mSite. Must only be called - * once mSite is set. + * Updates the permissions displayed in the UI by fetching them from mSite. + * Must only be called once mSite is set. */ private void displaySitePermissions() { if (getPreferenceScreen() != null) { @@ -869,7 +869,8 @@ getContentSettingsIcon( info.getContentSettingType(), info.getContentSetting())); preference.setTitle( - ContentSettingsResources.getTitle(info.getContentSettingType())); + ContentSettingsResources.getTitle( + info.getContentSettingType(), getSiteSettingsDelegate())); var pattern = WebsiteAddress.create(info.getPrimaryPattern()); preference.setSummary( getEmbeddedPermissionSummary(pattern.getHost(), info.getContentSetting())); @@ -1092,7 +1093,8 @@ Preference preference, @ContentSettingValues @Nullable Integer value) { @ContentSettingsType.EnumType int contentType = getContentSettingsTypeFromPreferenceKey(preference.getKey()); - int titleResourceId = ContentSettingsResources.getTitle(contentType); + int titleResourceId = + ContentSettingsResources.getTitle(contentType, getSiteSettingsDelegate()); if (titleResourceId != 0) { preference.setTitle(titleResourceId);
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java index fc04011..3f77407 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java
@@ -100,7 +100,9 @@ browserContextHandle, contentType); } - p.setTitle(ContentSettingsResources.getTitleForCategory(prefCategory)); + p.setTitle( + ContentSettingsResources.getTitleForCategory( + prefCategory, getSiteSettingsDelegate())); p.setOnPreferenceClickListener(this); @@ -158,7 +160,9 @@ if (prefCategory != Type.THIRD_PARTY_COOKIES) { p.setIcon( SettingsUtils.getTintedIcon( - getContext(), ContentSettingsResources.getIcon(contentType))); + getContext(), + ContentSettingsResources.getIcon( + contentType, getSiteSettingsDelegate()))); } }
diff --git a/components/commerce/core/product_specifications/product_specifications_service.cc b/components/commerce/core/product_specifications/product_specifications_service.cc index 563b6a0a..eaa362d 100644 --- a/components/commerce/core/product_specifications/product_specifications_service.cc +++ b/components/commerce/core/product_specifications/product_specifications_service.cc
@@ -58,4 +58,14 @@ bridge_->DeleteProductSpecificationsSet(uuid); } +void ProductSpecificationsService::AddObserver( + const commerce::ProductSpecificationsSet::Observer* observer) { + bridge_->AddObserver(observer); +} + +void ProductSpecificationsService::RemoveObserver( + const commerce::ProductSpecificationsSet::Observer* observer) { + bridge_->RemoveObserver(observer); +} + } // namespace commerce
diff --git a/components/commerce/core/product_specifications/product_specifications_service.h b/components/commerce/core/product_specifications/product_specifications_service.h index de9fe4e..4afe013 100644 --- a/components/commerce/core/product_specifications/product_specifications_service.h +++ b/components/commerce/core/product_specifications/product_specifications_service.h
@@ -38,6 +38,14 @@ // Deletes product specification set corresponding to identifier |uuid|. void DeleteProductSpecificationsSet(const std::string& uuid); + // Observer monitoring add/remove/update of ProductSpecificationSets. + void AddObserver( + const commerce::ProductSpecificationsSet::Observer* observer); + + // Remove observer monitoring add/remove/update of ProductSpecificationSets. + void RemoveObserver( + const commerce::ProductSpecificationsSet::Observer* observer); + private: std::unique_ptr<ProductSpecificationsSyncBridge> bridge_; scoped_refptr<base::SequencedTaskRunner> backend_task_runner_;
diff --git a/components/commerce/core/product_specifications/product_specifications_service_unittest.cc b/components/commerce/core/product_specifications/product_specifications_service_unittest.cc index c2282273..6e0072a5 100644 --- a/components/commerce/core/product_specifications/product_specifications_service_unittest.cc +++ b/components/commerce/core/product_specifications/product_specifications_service_unittest.cc
@@ -8,13 +8,16 @@ #include <vector> #include "base/run_loop.h" +#include "base/strings/stringprintf.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" #include "base/test/task_environment.h" #include "base/time/time.h" +#include "base/uuid.h" #include "components/commerce/core/commerce_types.h" #include "components/commerce/core/product_specifications/product_specifications_set.h" #include "components/commerce/core/product_specifications/product_specifications_sync_bridge.h" +#include "components/sync/model/in_memory_metadata_change_list.h" #include "components/sync/protocol/compare_specifics.pb.h" #include "components/sync/test/mock_model_type_change_processor.h" #include "components/sync/test/model_type_store_test_util.h" @@ -26,9 +29,6 @@ const char kProductOneUrl[] = "https://example.com/productone"; const char kProductTwoUrl[] = "https://example.com.com/producttwo"; const char kProductSpecsName[] = "name"; -const char kUuid[] = "uuid"; -const int kCreationTime = 1000; -const int kUpdateTime = 1001; sync_pb::CompareSpecifics BuildCompareSpecifics( const std::string& uuid, @@ -50,18 +50,60 @@ } const sync_pb::CompareSpecifics kCompareSpecifics[] = { - BuildCompareSpecifics("abba", + BuildCompareSpecifics("abe18411-bd7e-4819-b9b5-11e66e0ad8b4", 1710953277, 1710953277 + base::Time::kMillisecondsPerDay, "my first set", {"https://foo.com", "https://bar.com"}), BuildCompareSpecifics( - "baab", + "f448709c-fe1f-44ea-883e-f46267b97d29", 1711035900, 1711035900 + (2 * base::Time::kMillisecondsPerDay) / 3, "my next set", {"https://some-url.com", "https://another-url.com"})}; +syncer::EntityData MakeEntityData(const sync_pb::CompareSpecifics& specifics) { + syncer::EntityData entity_data; + *entity_data.specifics.mutable_compare() = specifics; + entity_data.name = base::StringPrintf("%s_%s", specifics.name().c_str(), + specifics.uuid().c_str()); + return entity_data; +} + +void AddTestSpecifics(commerce::ProductSpecificationsSyncBridge* bridge) { + syncer::EntityChangeList add_changes; + for (const auto& specifics : kCompareSpecifics) { + add_changes.push_back(syncer::EntityChange::CreateAdd( + specifics.uuid(), MakeEntityData(specifics))); + } + bridge->ApplyIncrementalSyncChanges( + std::make_unique<syncer::InMemoryMetadataChangeList>(), + std::move(add_changes)); +} + +MATCHER_P(HasAllProductSpecs, compare_specifics, "") { + std::vector<const GURL> specifics_urls; + for (const sync_pb::ComparisonData& data : compare_specifics.data()) { + specifics_urls.push_back(GURL(data.url())); + } + return arg.uuid().AsLowercaseString() == compare_specifics.uuid() && + arg.creation_time() == + base::Time::FromMillisecondsSinceUnixEpoch( + compare_specifics.creation_time_unix_epoch_micros()) && + arg.update_time() == + base::Time::FromMillisecondsSinceUnixEpoch( + compare_specifics.update_time_unix_epoch_micros()) && + arg.name() == compare_specifics.name() && arg.urls() == specifics_urls; +} + +MATCHER_P(IsUuid, uuid, "") { + return arg.AsLowercaseString() == uuid; +} + +MATCHER_P2(HasProductSpecsNameUrl, name, urls, "") { + return arg.name() == name && arg.urls() == urls; +} + } // namespace namespace commerce { @@ -87,12 +129,6 @@ syncer::EntityChangeList entity_changes), (override)); - MOCK_METHOD(std::optional<syncer::ModelError>, - ApplyIncrementalSyncChanges, - (std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, - syncer::EntityChangeList entity_changes), - (override)); - MOCK_METHOD(std::string, GetStorageKey, (const syncer::EntityData& entity_data), @@ -113,20 +149,36 @@ (DataCallback callback), (override)); - MOCK_METHOD(const std::optional<sync_pb::CompareSpecifics>, - AddProductSpecifications, - (const std::string& name, const std::vector<const GURL>& urls), - (override)); - void AddCompareSpecifics(const sync_pb::CompareSpecifics& compare_specifics) { entries_.emplace(compare_specifics.uuid(), compare_specifics); } }; +class MockProductSpecificationsSetObserver + : public ProductSpecificationsSet::Observer { + public: + MOCK_METHOD(void, + OnProductSpecificationsSetAdded, + (const ProductSpecificationsSet& set), + (const override)); + + MOCK_METHOD(void, + OnProductSpecificationsSetUpdate, + (const ProductSpecificationsSet& set), + (const override)); + + MOCK_METHOD(void, + OnProductSpecificationsSetRemoved, + (const base::Uuid& uuid), + (const override)); +}; + class ProductSpecificationsServiceTest : public testing::Test { public: void SetUp() override { store_ = syncer::ModelTypeStoreTestUtil::CreateInMemoryStoreForTest(); + ON_CALL(processor_, IsTrackingMetadata()) + .WillByDefault(testing::Return(true)); std::unique_ptr<MockProductSpecificationsSyncBridge> bridge = std::make_unique<MockProductSpecificationsSyncBridge>( syncer::ModelTypeStoreTestUtil::FactoryForForwardingStore(store()), @@ -134,36 +186,23 @@ bridge_ = bridge.get(); service_ = std::make_unique<ProductSpecificationsService>(std::move(bridge)); + service_->AddObserver(&observer_); base::RunLoop().RunUntilIdle(); } + void TearDown() override { service_->RemoveObserver(&observer_); } + MockProductSpecificationsSyncBridge* bridge() { return bridge_; } ProductSpecificationsService* service() { return service_.get(); } - void MockAddProductSpecifications() { - ON_CALL(*bridge_, AddProductSpecifications(testing::_, testing::_)) - .WillByDefault( - [](const std::string& name, const std::vector<const GURL>& urls) { - sync_pb::CompareSpecifics specifics; - specifics.set_uuid(kUuid); - specifics.set_creation_time_unix_epoch_micros(kCreationTime); - specifics.set_update_time_unix_epoch_micros(kUpdateTime); - specifics.set_name(name); - for (const GURL& url : urls) { - sync_pb::ComparisonData* data = specifics.add_data(); - data->set_url(url.spec()); - } - return specifics; - }); + testing::NiceMock<MockProductSpecificationsSetObserver>* observer() { + return &observer_; } void MockFailedAddProductSpecifications() { - ON_CALL(*bridge_, AddProductSpecifications(testing::_, testing::_)) - .WillByDefault( - [](const std::string& name, const std::vector<const GURL>& urls) { - return std::nullopt; - }); + ON_CALL(processor_, IsTrackingMetadata()) + .WillByDefault(testing::Return(false)); } void CheckSpecsAgainstSpecifics( @@ -191,6 +230,7 @@ raw_ptr<MockProductSpecificationsSyncBridge> bridge_; std::unique_ptr<syncer::ModelTypeStore> store_; testing::NiceMock<syncer::MockModelTypeChangeProcessor> processor_; + testing::NiceMock<MockProductSpecificationsSetObserver> observer_; syncer::ModelTypeStore* store() { return store_.get(); } @@ -212,7 +252,12 @@ } TEST_F(ProductSpecificationsServiceTest, TestAddProductSpecificationsSuccess) { - MockAddProductSpecifications(); + std::vector<const GURL> expected_product_urls{GURL(kProductOneUrl), + GURL(kProductTwoUrl)}; + EXPECT_CALL(*observer(), + OnProductSpecificationsSetAdded(HasProductSpecsNameUrl( + kProductSpecsName, expected_product_urls))) + .Times(1); std::optional<const ProductSpecificationsSet> product_spec_set = service()->AddProductSpecificationsSet( kProductSpecsName, {GURL(kProductOneUrl), GURL(kProductTwoUrl)}); @@ -222,6 +267,14 @@ EXPECT_EQ(kProductTwoUrl, product_spec_set.value().urls()[1].spec()); } +TEST_F(ProductSpecificationsServiceTest, TestRemoveProductSpecifications) { + AddTestSpecifics(bridge()); + EXPECT_CALL(*observer(), OnProductSpecificationsSetRemoved( + IsUuid(kCompareSpecifics[0].uuid()))) + .Times(1); + service()->DeleteProductSpecificationsSet(kCompareSpecifics[0].uuid()); +} + TEST_F(ProductSpecificationsServiceTest, TestAddProductSpecificationsFailure) { MockFailedAddProductSpecifications(); EXPECT_EQ(std::nullopt, service()->AddProductSpecificationsSet( @@ -229,4 +282,64 @@ {GURL(kProductOneUrl), GURL(kProductTwoUrl)})); } +TEST_F(ProductSpecificationsServiceTest, TestObserverNewSpecifics) { + syncer::EntityChangeList add_changes; + for (const auto& specifics : kCompareSpecifics) { + add_changes.push_back(syncer::EntityChange::CreateAdd( + specifics.uuid(), MakeEntityData(specifics))); + EXPECT_CALL(*observer(), + OnProductSpecificationsSetAdded(HasAllProductSpecs(specifics))) + .Times(1); + } + bridge()->ApplyIncrementalSyncChanges( + std::make_unique<syncer::InMemoryMetadataChangeList>(), + std::move(add_changes)); +} + +TEST_F(ProductSpecificationsServiceTest, TestObserverUpdateSpecifics) { + AddTestSpecifics(bridge()); + syncer::EntityChangeList update_changes; + sync_pb::CompareSpecifics new_specifics = kCompareSpecifics[0]; + sync_pb::ComparisonData* new_specifics_data = new_specifics.add_data(); + new_specifics_data->set_url("https://newurl.com/"); + new_specifics.set_update_time_unix_epoch_micros( + new_specifics.update_time_unix_epoch_micros() + + base::Time::kMillisecondsPerDay); + update_changes.push_back(syncer::EntityChange::CreateUpdate( + new_specifics.uuid(), MakeEntityData(new_specifics))); + + // Won't be updated because the update timestamp hasn't increased. + sync_pb::CompareSpecifics noupdate_specifics = kCompareSpecifics[1]; + sync_pb::ComparisonData* noupdate_specifics_data = + noupdate_specifics.add_data(); + noupdate_specifics_data->set_url("https://newurl.com/"); + update_changes.push_back(syncer::EntityChange::CreateUpdate( + noupdate_specifics.uuid(), MakeEntityData(noupdate_specifics))); + + EXPECT_CALL(*observer(), OnProductSpecificationsSetUpdate( + HasAllProductSpecs(new_specifics))) + .Times(1); + EXPECT_CALL(*observer(), OnProductSpecificationsSetUpdate( + HasAllProductSpecs(noupdate_specifics))) + .Times(0); + bridge()->ApplyIncrementalSyncChanges( + std::make_unique<syncer::InMemoryMetadataChangeList>(), + std::move(update_changes)); +} + +TEST_F(ProductSpecificationsServiceTest, TestObserverRemoveSpecifics) { + AddTestSpecifics(bridge()); + syncer::EntityChangeList remove_changes; + for (const auto& specifics : kCompareSpecifics) { + remove_changes.push_back( + syncer::EntityChange::CreateDelete(specifics.uuid())); + EXPECT_CALL(*observer(), + OnProductSpecificationsSetRemoved(IsUuid(specifics.uuid()))) + .Times(1); + } + bridge()->ApplyIncrementalSyncChanges( + std::make_unique<syncer::InMemoryMetadataChangeList>(), + std::move(remove_changes)); +} + } // namespace commerce
diff --git a/components/commerce/core/product_specifications/product_specifications_set.h b/components/commerce/core/product_specifications/product_specifications_set.h index f5773f1..d761faba 100644 --- a/components/commerce/core/product_specifications/product_specifications_set.h +++ b/components/commerce/core/product_specifications/product_specifications_set.h
@@ -7,6 +7,7 @@ #include <vector> +#include "base/observer_list_types.h" #include "base/time/time.h" #include "base/uuid.h" #include "components/sync/protocol/compare_specifics.pb.h" @@ -15,10 +16,30 @@ namespace commerce { class ProductSpecificationsService; +class ProductSpecificationsSyncBridge; // Contains a set of product specifications. class ProductSpecificationsSet { public: + class Observer : public base::CheckedObserver { + public: + virtual void OnProductSpecificationsSetAdded( + const ProductSpecificationsSet& product_specifications_set) const {} + + virtual void OnProductSpecificationsSetUpdate( + const ProductSpecificationsSet& product_specifications_set) const {} + + virtual void OnProductSpecificationsSetRemoved( + const base::Uuid& uuid) const {} + + private: + friend commerce::ProductSpecificationsSyncBridge; + + void OnProductSpecificationsSetRemoved(const std::string& uuid) const { + OnProductSpecificationsSetRemoved(base::Uuid::ParseLowercase(uuid)); + } + }; + ProductSpecificationsSet(const std::string& uuid, const int64_t creation_time_usec_since_epoch, const int64_t update_time_usec_since_epoch, @@ -47,6 +68,7 @@ private: friend commerce::ProductSpecificationsService; + friend commerce::ProductSpecificationsSyncBridge; static ProductSpecificationsSet FromProto( const sync_pb::CompareSpecifics& compare_specifics);
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc b/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc index df262cfe..09c3fc5 100644 --- a/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc +++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc
@@ -70,6 +70,7 @@ case syncer::EntityChange::ACTION_ADD: entries_.emplace(change->storage_key(), specifics); batch->WriteData(change->storage_key(), specifics.SerializeAsString()); + OnSpecificsAdded(specifics); break; case syncer::EntityChange::ACTION_UPDATE: { auto local_specifics = entries_.find(change->storage_key()); @@ -80,6 +81,7 @@ entries_[change->storage_key()] = specifics; batch->WriteData(change->storage_key(), specifics.SerializeAsString()); + OnSpecificsUpdated(specifics); } } break; @@ -87,6 +89,7 @@ case syncer::EntityChange::ACTION_DELETE: entries_.erase(change->storage_key()); batch->DeleteData(change->storage_key()); + OnSpecificsRemoved(change->storage_key()); break; } } @@ -154,6 +157,7 @@ batch->WriteData(specifics.uuid(), specifics.SerializeAsString()); Commit(std::move(batch)); + OnSpecificsAdded(specifics); return std::optional(specifics); } @@ -172,6 +176,7 @@ batch->DeleteData(uuid); Commit(std::move(batch)); + OnSpecificsRemoved(uuid); } void ProductSpecificationsSyncBridge::OnStoreCreated( @@ -235,4 +240,36 @@ } } +void ProductSpecificationsSyncBridge::AddObserver( + const commerce::ProductSpecificationsSet::Observer* observer) { + observers_.AddObserver(observer); +} +void ProductSpecificationsSyncBridge::RemoveObserver( + const commerce::ProductSpecificationsSet::Observer* observer) { + observers_.RemoveObserver(observer); +} + +void ProductSpecificationsSyncBridge::OnSpecificsAdded( + const sync_pb::CompareSpecifics& compare_specifics) { + for (const auto& observer : observers_) { + observer.OnProductSpecificationsSetAdded( + ProductSpecificationsSet::FromProto(compare_specifics)); + } +} + +void ProductSpecificationsSyncBridge::OnSpecificsUpdated( + const sync_pb::CompareSpecifics& compare_specifics) { + for (const auto& observer : observers_) { + observer.OnProductSpecificationsSetUpdate( + ProductSpecificationsSet::FromProto(compare_specifics)); + } +} + +void ProductSpecificationsSyncBridge::OnSpecificsRemoved( + const std::string& uuid) { + for (const auto& observer : observers_) { + observer.OnProductSpecificationsSetRemoved(uuid); + } +} + } // namespace commerce
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge.h b/components/commerce/core/product_specifications/product_specifications_sync_bridge.h index 2d64ffd..0988e7b 100644 --- a/components/commerce/core/product_specifications/product_specifications_sync_bridge.h +++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge.h
@@ -6,6 +6,8 @@ #define COMPONENTS_COMMERCE_CORE_PRODUCT_SPECIFICATIONS_PRODUCT_SPECIFICATIONS_SYNC_BRIDGE_H_ #include "base/memory/weak_ptr.h" +#include "base/observer_list.h" +#include "components/commerce/core/product_specifications/product_specifications_set.h" #include "components/sync/model/entity_change.h" #include "components/sync/model/model_type_store.h" #include "components/sync/model/model_type_sync_bridge.h" @@ -57,6 +59,9 @@ std::unique_ptr<syncer::ModelTypeStore> store_; + base::ObserverList<const commerce::ProductSpecificationsSet::Observer> + observers_; + virtual const std::optional<sync_pb::CompareSpecifics> AddProductSpecifications(const std::string& name, const std::vector<const GURL>& urls); @@ -75,6 +80,15 @@ void Commit(std::unique_ptr<syncer::ModelTypeStore::WriteBatch> batch); void OnCommit(const std::optional<syncer::ModelError>& error); + void AddObserver( + const commerce::ProductSpecificationsSet::Observer* observer); + void RemoveObserver( + const commerce::ProductSpecificationsSet::Observer* observer); + + void OnSpecificsAdded(const sync_pb::CompareSpecifics& compare_specifics); + void OnSpecificsUpdated(const sync_pb::CompareSpecifics& compare_specifics); + void OnSpecificsRemoved(const std::string& uuid); + base::WeakPtrFactory<ProductSpecificationsSyncBridge> weak_ptr_factory_{this}; };
diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/components/content_settings/core/common/cookie_settings_base.cc index cf7f062..42452c1 100644 --- a/components/content_settings/core/common/cookie_settings_base.cc +++ b/components/content_settings/core/common/cookie_settings_base.cc
@@ -731,9 +731,9 @@ return true; } // Note: no need to check permissions policy here. If the appropriate - // permissions policy was not present, then `overrides` would not - // contain `kStorageAccessGrantEligible`, and we'd have returned early - // above. + // permissions policy was not present, then no matching + // FEDERATED_IDENTITY_SHARING setting would be sent to this instance from the + // browser process. return GetContentSetting(url, first_party_url, ContentSettingsType::FEDERATED_IDENTITY_SHARING, /*info=*/nullptr) == CONTENT_SETTING_ALLOW;
diff --git a/components/omnibox/browser/featured_search_provider.cc b/components/omnibox/browser/featured_search_provider.cc index b206522..30c0890 100644 --- a/components/omnibox/browser/featured_search_provider.cc +++ b/components/omnibox/browser/featured_search_provider.cc
@@ -121,11 +121,20 @@ template_url.short_name()); match.relevance += 10; } else { - match.description = l10n_util::GetStringFUTF16( - IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT, template_url.keyword(), - template_url.short_name()); + std::u16string short_name = template_url.short_name(); + if (template_url.short_name() == u"Tabs") { + // Very special request from UX to sentence-case "Tabs" -> "tabs" only + // in this context. It needs to stay capitalized elsewhere since it's + // treated like a proper engine name. + match.description = short_name = u"tabs"; + } + match.description = + l10n_util::GetStringFUTF16(IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT, + template_url.keyword(), short_name); } - match.description_class.emplace_back(0, ACMatchClassification::NONE); + match.description_class = { + {0, ACMatchClassification::NONE}, + {template_url.keyword().size(), ACMatchClassification::DIM}}; match.contents.clear(); match.contents_class = {{}}; match.allowed_to_be_default_match = false;
diff --git a/components/omnibox/browser/search_suggestion_parser_unittest.cc b/components/omnibox/browser/search_suggestion_parser_unittest.cc index ad34890..d5ab3c1b 100644 --- a/components/omnibox/browser/search_suggestion_parser_unittest.cc +++ b/components/omnibox/browser/search_suggestion_parser_unittest.cc
@@ -1015,40 +1015,6 @@ ASSERT_THAT(results.suggest_results[1].subtypes(), testing::ElementsAre(3)); } -TEST(SearchSuggestionParserTest, FuzzTestCaseFailsGracefully) { - // clang-format off - std::string json_data = R"(["",[" "],[],[],{"google:suggestdetail":[{"ansa":{"l":[{"il":{"t":[{"t":"w","tt":4}]}},{"il":{"i":"","t":[{"t":"3","tt":1}]}}]},"ansb":"0"}]}])"; - // clang-format on - - // The original fuzz test case had a NUL (0) character at index 6 but it is - // replaced with space (32) above for system interaction reasons (clipboard, - // command line, and some editors shun null bytes). Test the fuzz case with - // input that is byte-for-byte identical with https://crbug.com/1255312 data. - json_data[6] = 0; - - std::optional<base::Value> root_val = base::JSONReader::Read(json_data); - ASSERT_TRUE(root_val); - ASSERT_TRUE(root_val.value().is_list()); - TestSchemeClassifier scheme_classifier; - AutocompleteInput input(u"", metrics::OmniboxEventProto::NTP_REALBOX, - scheme_classifier); - SearchSuggestionParser::Results results; - ASSERT_TRUE(SearchSuggestionParser::ParseSuggestResults( - root_val->GetList(), input, scheme_classifier, - /*default_result_relevance=*/400, - /*is_keyword_result=*/false, &results)); - - // Parsing should remain successful with kOmniboxSuggestionAnswer enabled. - omnibox_feature_configs::ScopedConfigForTesting< - omnibox_feature_configs::SuggestionAnswerMigration> - scoped_config; - scoped_config.Get().enabled = true; - ASSERT_TRUE(SearchSuggestionParser::ParseSuggestResults( - root_val->GetList(), input, scheme_classifier, - /*default_result_relevance=*/400, - /*is_keyword_result=*/false, &results)); -} - TEST(SearchSuggestionParserTest, BadAnswersFailGracefully) { // clang-format off std::vector<std::string> cases = {
diff --git a/components/omnibox_strings.grdp b/components/omnibox_strings.grdp index caa0c8c..3e34a9a 100644 --- a/components/omnibox_strings.grdp +++ b/components/omnibox_strings.grdp
@@ -277,10 +277,10 @@ History </message> <message name="IDS_SEARCH_ENGINES_STARTER_PACK_TABS_NAME" desc = "The name of the search engine to search through open Chrome Tabs as it appears on chrome://settings/searchEngines."> - tabs + Tabs </message> <message name="IDS_SEARCH_ENGINES_STARTER_PACK_TABS_KEYWORD" desc = "The keyword required to trigger tab search in keyword mode. This will be prepended with an '@'."> - tabs + Tabs </message> <message name="IDS_SEARCH_ENGINES_STARTER_PACK_GEMINI_NAME" desc = "The name of the Gemini engine as it appears on chrome://settings/searchEngines."> Gemini @@ -291,7 +291,7 @@ <message name="IDS_OMNIBOX_INSTANT_KEYWORD_CHAT_TEXT" desc="Text shown in an omnibox suggestion ready for instant keyword search when the destination is suitable for chatting. For example, starter pack suggestions like @gemini will chat with Gemini."> <ph name="KEYWORD">$1<ex>@gemini</ex></ph> - Chat with <ph name="KEYWORD_SHORT_NAME">$2<ex>Gemini</ex></ph> </message> - <message name="IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT" desc="Text shown in an omnibox suggestion ready for instant keyword search and the destination is suitable for searching. For example, starter pack suggestions like @bookmarks will search Bookmarks."> + <message name="IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT" desc="Text shown in an omnibox suggestion ready for instant keyword search when the destination is suitable for searching. For example, starter pack suggestions like @bookmarks will search Bookmarks."> <ph name="KEYWORD">$1<ex>@bookmarks</ex></ph> - Search <ph name="KEYWORD_SHORT_NAME">$2<ex>Bookmarks</ex></ph> </message>
diff --git a/components/optimization_guide/internal b/components/optimization_guide/internal index 750f8af..a1c5224 160000 --- a/components/optimization_guide/internal +++ b/components/optimization_guide/internal
@@ -1 +1 @@ -Subproject commit 750f8af0ac3d188eb13a742a04c00af449b62137 +Subproject commit a1c522469a9f572005c0e5e5907647c8b7b0d7f8
diff --git a/components/password_manager/core/browser/browser_save_password_progress_logger_unittest.cc b/components/password_manager/core/browser/browser_save_password_progress_logger_unittest.cc index a26430b..54550ed8 100644 --- a/components/password_manager/core/browser/browser_save_password_progress_logger_unittest.cc +++ b/components/password_manager/core/browser/browser_save_password_progress_logger_unittest.cc
@@ -72,7 +72,7 @@ field.form_control_type = autofill::FormControlType::kInputText; field.is_focusable = false; field.renderer_id = autofill::FieldRendererId(42); - field.value = u"a@example.com"; + field.set_value(u"a@example.com"); field.autocomplete_attribute.clear(); form_.fields.push_back(field); }
diff --git a/components/password_manager/core/browser/form_parsing/form_data_parser.cc b/components/password_manager/core/browser/form_parsing/form_data_parser.cc index 08d26fe..b10311f3 100644 --- a/components/password_manager/core/browser/form_parsing/form_data_parser.cc +++ b/components/password_manager/core/browser/form_parsing/form_data_parser.cc
@@ -183,7 +183,7 @@ // Returns |user_input| if it is not empty, |value| otherwise. const std::u16string& GetFieldValue(const FormFieldData& field) { - return field.user_input.empty() ? field.value : field.user_input; + return field.user_input.empty() ? field.value() : field.user_input; } // A helper struct that is used to capture significant fields to be used for @@ -242,8 +242,8 @@ password = passwords[0]; break; case 2: - if (!passwords[0]->value.empty() && - passwords[0]->value == passwords[1]->value) { + if (!passwords[0]->value().empty() && + passwords[0]->value() == passwords[1]->value()) { // Two identical non-empty passwords: assume we are seeing a new // password with a confirmation. This can be either a sign-up form or // a password change form that does not ask for the old password. @@ -264,19 +264,19 @@ // If there are more than 3 passwords it is not very clear what this // form it is. Consider only the first 3 passwords in such case as a // best-effort solution. - if (!passwords[0]->value.empty() && - passwords[0]->value == passwords[1]->value && - passwords[0]->value == passwords[2]->value) { + if (!passwords[0]->value().empty() && + passwords[0]->value() == passwords[1]->value() && + passwords[0]->value() == passwords[2]->value()) { // All passwords are the same. Assume that the first field is the // current password. password = passwords[0]; - } else if (passwords[1]->value == passwords[2]->value) { + } else if (passwords[1]->value() == passwords[2]->value()) { // New password is the duplicated one, and comes second; or empty form // with at least 3 password fields. password = passwords[0]; new_password = passwords[1]; confirmation_password = passwords[2]; - } else if (passwords[0]->value == passwords[1]->value) { + } else if (passwords[0]->value() == passwords[1]->value()) { // It is strange that the new password comes first, but trust more // which fields are duplicated than the ordering of fields. Assume // that any password fields after the new password contain sensitive @@ -750,7 +750,7 @@ if (!focusable_username && it->field->is_focusable) { focusable_username = it->field; } - if (stored_usernames.contains(base::i18n::ToLower(it->field->value))) { + if (stored_usernames.contains(base::i18n::ToLower(it->field->value()))) { return it->field; } } @@ -1124,7 +1124,7 @@ processed_fields, username_max); if (username_field_by_context && !(mode == FormDataParser::Mode::kSaving && - username_field_by_context->value.empty())) { + username_field_by_context->value().empty())) { significant_fields.username = username_field_by_context; if (method == UsernameDetectionMethod::kNoUsernameDetected || method == UsernameDetectionMethod::kBaseHeuristic) {
diff --git a/components/password_manager/core/browser/form_parsing/form_data_parser_unittest.cc b/components/password_manager/core/browser/form_parsing/form_data_parser_unittest.cc index 60c0378..fa6e2e9 100644 --- a/components/password_manager/core/browser/form_parsing/form_data_parser_unittest.cc +++ b/components/password_manager/core/browser/form_parsing/form_data_parser_unittest.cc
@@ -189,7 +189,7 @@ EXPECT_EQ(element_name, field_it->name); std::u16string expected_value = - field_it->user_input.empty() ? field_it->value : field_it->user_input; + field_it->user_input.empty() ? field_it->value() : field_it->user_input; if (element_value) EXPECT_EQ(expected_value, *element_value); @@ -203,7 +203,7 @@ for (const FormFieldData& field : form_data.fields) { result << "type=" << autofill::FormControlTypeToString(field.form_control_type) - << ", name=" << field.name << ", value=" << field.value + << ", name=" << field.name << ", value=" << field.value() << ", unique id=" << field.renderer_id.value() << "\n"; } return result; @@ -251,7 +251,7 @@ FormFieldData CreateField(FormControlType type, std::u16string value) { FormFieldData field; field.form_control_type = type; - field.value = std::move(value); + field.set_value(std::move(value)); field.renderer_id = autofill::test::MakeFieldRendererId(); return field; } @@ -310,9 +310,9 @@ field.is_readonly = field_description.is_readonly; field.properties_mask = field_description.properties_mask; if (field_description.value == kNonimportantValue) { - field.value = StampUniqueSuffix(u"value"); + field.set_value(StampUniqueSuffix(u"value")); } else { - field.value = field_description.value; + field.set_value(field_description.value); } if (field_description.autocomplete_attribute) field.autocomplete_attribute = field_description.autocomplete_attribute;
diff --git a/components/password_manager/core/browser/form_parsing/fuzzer/form_data_proto_producer.cc b/components/password_manager/core/browser/form_parsing/fuzzer/form_data_proto_producer.cc index bd7b9828..52e1f2b 100644 --- a/components/password_manager/core/browser/form_parsing/fuzzer/form_data_proto_producer.cc +++ b/components/password_manager/core/browser/form_parsing/fuzzer/form_data_proto_producer.cc
@@ -52,7 +52,7 @@ form_data_proto.autocomplete_attribute(); result.fields[i].label = UTF8ToUTF16(form_data_proto.label()); result.fields[i].name = UTF8ToUTF16(form_data_proto.name()); - result.fields[i].value = UTF8ToUTF16(form_data_proto.value()); + result.fields[i].set_value(UTF8ToUTF16(form_data_proto.value())); } return result;
diff --git a/components/password_manager/core/browser/form_saver_impl.cc b/components/password_manager/core/browser/form_saver_impl.cc index 732712b..b47a381d 100644 --- a/components/password_manager/core/browser/form_saver_impl.cc +++ b/components/password_manager/core/browser/form_saver_impl.cc
@@ -30,7 +30,7 @@ form->main_frame_origin = url::Origin(); for (FormFieldData& field : form->fields) { field.label.clear(); - field.value = u""; + field.set_value(u""); field.autocomplete_attribute.clear(); field.options.clear(); field.placeholder.clear();
diff --git a/components/password_manager/core/browser/form_saver_impl_unittest.cc b/components/password_manager/core/browser/form_saver_impl_unittest.cc index 4bb5464..8f4639ac 100644 --- a/components/password_manager/core/browser/form_saver_impl_unittest.cc +++ b/components/password_manager/core/browser/form_saver_impl_unittest.cc
@@ -289,7 +289,7 @@ FormFieldData field; field.name = u"name"; field.form_control_type = autofill::FormControlType::kInputPassword; - field.value = u"value"; + field.set_value(u"value"); field.label = u"label"; field.placeholder = u"placeholder"; field.id_attribute = u"id"; @@ -318,7 +318,7 @@ EXPECT_EQ(u"name", saved_field.name); EXPECT_EQ(autofill::FormControlType::kInputPassword, saved_field.form_control_type); - EXPECT_TRUE(saved_field.value.empty()); + EXPECT_TRUE(saved_field.value().empty()); EXPECT_TRUE(saved_field.label.empty()); EXPECT_TRUE(saved_field.placeholder.empty()); EXPECT_TRUE(saved_field.id_attribute.empty());
diff --git a/components/password_manager/core/browser/password_credential_filler_impl.cc b/components/password_manager/core/browser/password_credential_filler_impl.cc index be33fc9..3cfb36f 100644 --- a/components/password_manager/core/browser/password_credential_filler_impl.cc +++ b/components/password_manager/core/browser/password_credential_filler_impl.cc
@@ -95,7 +95,7 @@ } if (username_index != i && password_index != i && - form_data.fields[i].value.empty()) { + form_data.fields[i].value().empty()) { return SubmissionReadinessState::kEmptyFields; } number_of_visible_elements++;
diff --git a/components/password_manager/core/browser/password_form_cache_impl_unittest.cc b/components/password_manager/core/browser/password_form_cache_impl_unittest.cc index 395d29d5..82b480c 100644 --- a/components/password_manager/core/browser/password_form_cache_impl_unittest.cc +++ b/components/password_manager/core/browser/password_form_cache_impl_unittest.cc
@@ -58,8 +58,8 @@ // Fill values into the fields to save the form. FormData filled_form = form; EXPECT_EQ(filled_form.fields.size(), 2u); - filled_form.fields[0].value = u"username"; - filled_form.fields[1].value = u"password"; + filled_form.fields[0].set_value(u"username"); + filled_form.fields[1].set_value(u"password"); form_manager->ProvisionallySave( filled_form, &driver(), base::LRUCache<PossibleUsernameFieldIdentifier, PossibleUsernameData>(
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc index 9601cb5e..48299b4 100644 --- a/components/password_manager/core/browser/password_form_manager.cc +++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -342,8 +342,9 @@ // the submitted form. if (!parsed_submitted_form_->username_value.empty()) { for (const auto& field : form.fields) { - if (field.value == parsed_submitted_form_->username_value) + if (field.value() == parsed_submitted_form_->username_value) { return true; + } } } return false; @@ -695,7 +696,7 @@ }); if (modified_field == mutable_observed_form()->fields.end()) return; - modified_field->value = field_value; + modified_field->set_value(field_value); if (!HasGeneratedPassword()) return; @@ -1120,7 +1121,7 @@ // The parameters are coming from the renderer and can't be trusted. if (it == form_data.fields.end()) return; - it->value = password; + it->set_value(password); auto [parsed_form, username_detection_method] = ParseFormAndMakeLogging(form_data, FormDataParser::Mode::kSaving); if (!parsed_form) {
diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc index 2400510a..14dab33 100644 --- a/components/password_manager/core/browser/password_form_manager_unittest.cc +++ b/components/password_manager/core/browser/password_form_manager_unittest.cc
@@ -436,11 +436,12 @@ observed_form_only_password_fields_.fields.push_back(field); submitted_form_ = observed_form_; - submitted_form_.fields[kUsernameFieldIndex].value = u"user1"; - submitted_form_.fields[kPasswordFieldIndex].value = u"secret1"; + submitted_form_.fields[kUsernameFieldIndex].set_value(u"user1"); + submitted_form_.fields[kPasswordFieldIndex].set_value(u"secret1"); submitted_non_password_form_ = non_password_form_; - submitted_non_password_form_.fields[kUsernameFieldIndex].value = u"user1"; + submitted_non_password_form_.fields[kUsernameFieldIndex].set_value( + u"user1"); saved_match_.url = origin; saved_match_.action = action; @@ -469,9 +470,9 @@ parsed_submitted_form_ = parsed_observed_form_; parsed_submitted_form_.form_data = submitted_form_; parsed_submitted_form_.username_value = - submitted_form_.fields[kUsernameFieldIndex].value; + submitted_form_.fields[kUsernameFieldIndex].value(); parsed_submitted_form_.password_value = - submitted_form_.fields[kPasswordFieldIndex].value; + submitted_form_.fields[kPasswordFieldIndex].value(); EXPECT_CALL(client_, GetAutofillCrowdsourcingManager()) .WillRepeatedly(Return(&crowdsourcing_manager())); @@ -949,10 +950,10 @@ PasswordFormManager::set_wait_for_server_predictions_for_filling(false); SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); // Tests that depending on whether we fill on page load or account select that // correct user action is recorded. Fill on account select is simulated by @@ -982,10 +983,10 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_)); @@ -1000,9 +1001,10 @@ PasswordForm expected = saved_match_; expected.password_value += u"1"; - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = expected.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + expected.password_value); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_)); CheckPendingCredentials(expected, form_manager_->GetPendingCredentials()); @@ -1014,8 +1016,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; - submitted_form.fields[1].value = u"verystrongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); + submitted_form.fields[1].set_value(u"verystrongpassword"); PasswordForm expected = saved_match_; expected.password_value = u"verystrongpassword"; @@ -1033,8 +1035,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_, &another_saved_match}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; - submitted_form.fields[1].value = u"verystrongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); + submitted_form.fields[1].set_value(u"verystrongpassword"); PasswordForm expected = saved_match_; expected.password_value = u"verystrongpassword"; @@ -1051,7 +1053,7 @@ FormData anonymous_signup = observed_form_; // There is an anonymous password field. anonymous_signup.fields[2].name.clear(); - anonymous_signup.fields[2].value = u"a password"; + anonymous_signup.fields[2].set_value(u"a password"); // Mark the password field as new-password. std::map<FormSignature, FormPredictions> predictions = CreatePredictions( observed_form_, {std::make_pair(2, autofill::ACCOUNT_CREATION_PASSWORD)}); @@ -1074,8 +1076,8 @@ fetcher_->NotifyFetchCompleted(); FormData submitted_form = observed_form_; - submitted_form.fields[kUsernameFieldIndex].value = u"username"; - submitted_form.fields[kPasswordFieldIndex].value = u"password"; + submitted_form.fields[kUsernameFieldIndex].set_value(u"username"); + submitted_form.fields[kPasswordFieldIndex].set_value(u"password"); // Expect no crash. form_manager_->ProvisionallySave(submitted_form, &driver_, @@ -1086,10 +1088,10 @@ fetcher_->NotifyFetchCompleted(); FormData submitted_form = observed_form_; - submitted_form.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); // No submitted form yet. EXPECT_FALSE(form_manager_->IsEqualToSubmittedForm(submitted_form)); @@ -1115,8 +1117,8 @@ FormData submitted_form = observed_form_; std::u16string new_username = saved_match_.username_value + u"1"; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = new_username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(new_username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -1165,10 +1167,10 @@ FormData submitted_form = observed_form_; // Change - submitted_form.fields[kUsernameFieldIndex].value = - psl_saved_match_.username_value; - submitted_form.fields[kPasswordFieldIndex].value = - psl_saved_match_.password_value; + submitted_form.fields[kUsernameFieldIndex].set_value( + psl_saved_match_.username_value); + submitted_form.fields[kPasswordFieldIndex].set_value( + psl_saved_match_.password_value); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -1203,8 +1205,8 @@ FormData submitted_form = observed_form_; std::u16string username = saved_match_.username_value; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -1235,9 +1237,9 @@ {&saved_match_, ¬_best_saved_match, &saved_match_another_username}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = saved_match_.password_value; + submitted_form.fields[0].set_value(saved_match_.password_value); std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[1].value = new_password; + submitted_form.fields[1].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -1269,9 +1271,9 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = saved_match_.password_value; + submitted_form.fields[0].set_value(saved_match_.password_value); auto new_password = saved_match_.password_value + u"1"; - submitted_form.fields[1].value = new_password; + submitted_form.fields[1].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -1335,8 +1337,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // On a login form, the user uses the password value. - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); // The username should be corrected. To intensify testing, simulate that the // user changes the username value many times. for (const std::u16string& new_username_value : @@ -1345,7 +1347,7 @@ saved_match_.all_alternative_usernames[0].value, std::u16string(u"random"), std::u16string(), saved_match_.all_alternative_usernames[0].value}) { - submitted_form_.fields[kUsernameFieldIndex].value = new_username_value; + submitted_form_.fields[kUsernameFieldIndex].set_value(new_username_value); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_)); } @@ -1402,10 +1404,10 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // On a login form, the user reuses the username value and password value. - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_)); @@ -1463,8 +1465,8 @@ std::u16string user_chosen_username = u"user_chosen_username"; std::u16string automatically_chosen_username = u"automatically_chosen_username"; - submitted_form_.fields[0].value = user_chosen_username; - submitted_form_.fields[1].value = automatically_chosen_username; + submitted_form_.fields[0].set_value(user_chosen_username); + submitted_form_.fields[1].set_value(automatically_chosen_username); form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_); EXPECT_EQ(automatically_chosen_username, @@ -1529,8 +1531,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // Emulate submitting form with known username and different password. - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_); @@ -1547,12 +1549,12 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // Emulate submitting form that updates the password for a known username. - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); submitted_form_.fields[kPasswordFieldIndex].autocomplete_attribute = "new-password"; - submitted_form_.fields[kPasswordFieldIndex].value = - u"new_password_field_value"; + submitted_form_.fields[kPasswordFieldIndex].set_value( + u"new_password_field_value"); form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames_); @@ -1581,8 +1583,8 @@ fetcher_->NotifyFetchCompleted(); std::u16string password = u"password1"; std::u16string pin = u"pin"; - form.fields[0].value = password; - form.fields[1].value = pin; + form.fields[0].set_value(password); + form.fields[1].set_value(pin); form_manager_->ProvisionallySave(form, &driver_, possible_usernames_); // Check that a second password field is chosen for saving. @@ -1781,16 +1783,16 @@ EXPECT_TRUE(form_manager_->HasGeneratedPassword()); EXPECT_EQ(saved_form.username_value, - form_data.fields[kUsernameFieldIndex].value); + form_data.fields[kUsernameFieldIndex].value()); EXPECT_EQ(saved_form.password_value, - form_data.fields[kPasswordFieldIndex].value); + form_data.fields[kPasswordFieldIndex].value()); Mock::VerifyAndClearExpectations(&form_saver); // Check that when the generated password is edited, then it's presaved. form_with_generated_password.password_value += u"1"; - form_data.fields[kPasswordFieldIndex].value = - form_with_generated_password.password_value; + form_data.fields[kPasswordFieldIndex].set_value( + form_with_generated_password.password_value); EXPECT_CALL(form_saver, UpdateReplace(_, IsEmpty(), testing::Eq(u""), FormHasUniqueKey(form_with_generated_password))) @@ -1802,7 +1804,7 @@ EXPECT_TRUE(form_manager_->HasGeneratedPassword()); EXPECT_EQ(saved_form.username_value, - form_data.fields[kUsernameFieldIndex].value); + form_data.fields[kUsernameFieldIndex].value()); EXPECT_EQ(saved_form.password_value, form_with_generated_password.password_value); @@ -1838,8 +1840,8 @@ // Check that when the username is edited, then it's presaved. form_with_generated_password.username_value += u"1"; - form_data.fields[kUsernameFieldIndex].value = - form_with_generated_password.username_value; + form_data.fields[kUsernameFieldIndex].set_value( + form_with_generated_password.username_value); EXPECT_CALL(form_saver, UpdateReplace(_, IsEmpty(), testing::Eq(u""), FormHasUniqueKey(saved_form))) @@ -1883,7 +1885,7 @@ form_manager_->PresaveGeneratedPassword( form_with_generated_password.form_data, form_with_generated_password.password_value); - EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value, + EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value(), saved_form.username_value); EXPECT_EQ(generated_password, saved_form.password_value); EXPECT_TRUE(form_manager_->HasGeneratedPassword()); @@ -1898,7 +1900,7 @@ possible_usernames_)); form_manager_->Save(); - EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value, + EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value(), saved_form.username_value); EXPECT_EQ(generated_password, saved_form.password_value); } @@ -1970,8 +1972,8 @@ FormData& form_data = form_with_generated_password.form_data; // Check that the generated password is saved with the empty username when - // there is already a saved credetial with the same username. - form_data.fields[kUsernameFieldIndex].value = saved_match_.username_value; + // there is already a saved credential with the same username. + form_data.fields[kUsernameFieldIndex].set_value(saved_match_.username_value); form_manager_->PresaveGeneratedPassword( form_with_generated_password.form_data, form_with_generated_password.password_value); @@ -2006,9 +2008,10 @@ CreateFormManager(observed_form_); form_manager_->PresaveGeneratedPassword(submitted_form.form_data, submitted_form.password_value); - form_data.fields[kPasswordFieldIndex].value = - form_data.fields[kPasswordFieldIndex].value + u"1"; - submitted_form.password_value = form_data.fields[kPasswordFieldIndex].value; + form_data.fields[kPasswordFieldIndex].set_value( + form_data.fields[kPasswordFieldIndex].value() + u"1"); + submitted_form.password_value = + form_data.fields[kPasswordFieldIndex].value(); form_manager_->PresaveGeneratedPassword(submitted_form.form_data, submitted_form.password_value); form_manager_.reset(); @@ -2022,9 +2025,10 @@ CreateFormManager(observed_form_); form_manager_->PresaveGeneratedPassword(submitted_form.form_data, submitted_form.password_value); - form_data.fields[kPasswordFieldIndex].value = - form_data.fields[kPasswordFieldIndex].value + u"2"; - submitted_form.password_value = form_data.fields[kPasswordFieldIndex].value; + form_data.fields[kPasswordFieldIndex].set_value( + form_data.fields[kPasswordFieldIndex].value() + u"2"); + submitted_form.password_value = + form_data.fields[kPasswordFieldIndex].value(); form_manager_->PresaveGeneratedPassword(submitted_form.form_data, submitted_form.password_value); form_manager_->PasswordNoLongerGenerated(); @@ -2217,8 +2221,8 @@ FormData submitted_form = observed_form_; std::u16string username = saved_match_.username_value; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -2245,12 +2249,12 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // Simulate that the user fills the saved credentials manually. - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); submitted_form_.fields[kUsernameFieldIndex].properties_mask = FieldPropertiesFlags::kAutofilledOnUserTrigger; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); submitted_form_.fields[kPasswordFieldIndex].properties_mask = FieldPropertiesFlags::kAutofilledOnUserTrigger; @@ -2278,8 +2282,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // Simulate that the user fills the saved username manually. - non_password_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; + non_password_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); non_password_form_.fields[kUsernameFieldIndex].autocomplete_attribute = "username"; non_password_form_.fields[kUsernameFieldIndex].properties_mask = @@ -2500,8 +2504,8 @@ const std::u16string typed_username = u"user1"; FormFieldData& username_field = form_to_presave.fields[kUsernameFieldIndex]; FormFieldData& password_field = form_to_presave.fields[kPasswordFieldIndex]; - username_field.value = typed_username; - password_field.value = u"not_password"; + username_field.set_value(typed_username); + password_field.set_value(u"not_password"); // Use |generated_password| different from value in field to test that the // generated password is saved. const std::u16string generated_password = u"gen_pw"; @@ -2522,7 +2526,7 @@ form_manager_->UpdateStateOnUserInput(form_to_presave.renderer_id, generation_element, changed_password); - EXPECT_EQ(username_field.value, saved_form.username_value); + EXPECT_EQ(username_field.value(), saved_form.username_value); EXPECT_EQ(changed_password, saved_form.password_value); } @@ -2540,8 +2544,9 @@ form_manager_->UpdateStateOnUserInput(observed_form_.renderer_id, password_field, new_field_value); - EXPECT_EQ(new_field_value, - form_manager_->observed_form()->fields[kPasswordFieldIndex].value); + EXPECT_EQ( + new_field_value, + form_manager_->observed_form()->fields[kPasswordFieldIndex].value()); } TEST_P(PasswordFormManagerTest, iOSUsingFieldDataManagerData) { @@ -2622,7 +2627,7 @@ /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); base::LRUCache<PossibleUsernameFieldIdentifier, PossibleUsernameData> possible_usernames = MakePossibleUsernamesCache({possible_username_data}); @@ -2672,7 +2677,7 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames)); @@ -2703,7 +2708,7 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames)); @@ -2736,7 +2741,7 @@ FormData submitted_form = observed_form_only_password_fields_; // Imitate sign-up flow: the only filled password field is a new password. submitted_form.fields[0].autocomplete_attribute = "new-password"; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames)); @@ -2779,8 +2784,8 @@ // Simulate submitting the form. FormData submitted_form = observed_form_; - submitted_form.fields[1].value = possible_username; - submitted_form.fields[2].value = u"strongpassword"; + submitted_form.fields[1].set_value(possible_username); + submitted_form.fields[2].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames)); @@ -2829,10 +2834,10 @@ // Simulate submitting a form without a username. Data from // |possible_username_data| will be taken for setting username. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"oldpassword"; + submitted_form.fields[0].set_value(u"oldpassword"); // Simulate password reset flow for password update case. if (is_password_update) { - submitted_form.fields[1].value = u"newpassword"; + submitted_form.fields[1].set_value(u"newpassword"); } ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, @@ -2905,7 +2910,7 @@ // Create possible username data. PossibleUsernameData possible_username_data( saved_match_.signon_realm, kSingleUsernameFieldRendererId, - submitted_form_.fields[kUsernameFieldIndex].value, base::Time::Now(), + submitted_form_.fields[kUsernameFieldIndex].value(), base::Time::Now(), /*driver_id=*/0, /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); possible_username_data.form_predictions = MakeSingleUsernamePredictions( @@ -2988,14 +2993,14 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); // Simulate submitting a password form. - submitted_form_.fields[kPasswordFieldIndex].value = u"strongpassword"; + submitted_form_.fields[kPasswordFieldIndex].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames)); form_manager_->SaveSuggestedUsernameValueToVotesUploader(); // Simulate the user modifying the username in the prompt. form_manager_->OnUpdateUsernameFromPrompt( - submitted_form_.fields[kUsernameFieldIndex].value); + submitted_form_.fields[kUsernameFieldIndex].value()); #if !BUILDFLAG(IS_ANDROID) // Expect a negative `IN_FORM_OVERRULE` vote on the username form. @@ -3046,7 +3051,7 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); // Simulate submitting a password form. - submitted_form_.fields[kPasswordFieldIndex].value = u"strongpassword"; + submitted_form_.fields[kPasswordFieldIndex].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames)); form_manager_->SaveSuggestedUsernameValueToVotesUploader(); @@ -3107,7 +3112,7 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); // Simulate submitting a password form. - submitted_form_.fields[kPasswordFieldIndex].value = u"strongpassword"; + submitted_form_.fields[kPasswordFieldIndex].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, possible_usernames)); form_manager_->SaveSuggestedUsernameValueToVotesUploader(); @@ -3147,7 +3152,7 @@ // Create possible username data. PossibleUsernameData possible_username_data( saved_match_.signon_realm, kSingleUsernameFieldRendererId, - submitted_form_.fields[kUsernameFieldIndex].value, base::Time::Now(), + submitted_form_.fields[kUsernameFieldIndex].value(), base::Time::Now(), /*driver_id=*/0, /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); @@ -3275,7 +3280,7 @@ // Simulate submitting a password form. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames)); @@ -3401,7 +3406,7 @@ // Simulate submission a form without username. Data from // |possible_username_data| will be taken for setting username. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames)); @@ -3469,7 +3474,7 @@ CreateFormManager(submitted_form); fetcher_->NotifyFetchCompleted(); // User types a password value. - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); // User entered single username data on the previous form. const std::u16string single_username_value = u"single_username_value"; @@ -3520,7 +3525,7 @@ /*is_likely_otp=*/false); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); for (FieldType prediction : {SINGLE_USERNAME, NOT_USERNAME}) { SCOPED_TRACE(testing::Message("prediction=") << prediction); @@ -3573,7 +3578,7 @@ /*is_likely_otp=*/false); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); possible_username_data_with_prediction.form_predictions = MakeSingleUsernamePredictions(kSingleUsernameFormSignature, @@ -3605,7 +3610,7 @@ fetcher_->NotifyFetchCompleted(); // User types a password value. - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); // User entered single username data on the previous form. const std::u16string single_username_value = u"single_username_value"; @@ -3635,7 +3640,7 @@ fetcher_->NotifyFetchCompleted(); // User types a password value. - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); // User entered single username data on the previous form. const std::u16string possible_username = u"test@example.org"; @@ -3665,8 +3670,8 @@ TEST_P(PasswordFormManagerTest, ChangePasswordFormWithoutUsernameSubmitted) { // A form with old and new password fields without username. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"oldpassword"; - submitted_form.fields[1].value = u"newpassword"; + submitted_form.fields[0].set_value(u"oldpassword"); + submitted_form.fields[1].set_value(u"newpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -3681,20 +3686,20 @@ FormFieldData username_field; username_field.name = u"username"; username_field.form_control_type = autofill::FormControlType::kInputText; - username_field.value = u"oldusername"; + username_field.set_value(u"oldusername"); username_field.renderer_id = autofill::FieldRendererId(2); submitted_form.fields.insert(std::begin(submitted_form.fields), username_field); - submitted_form.fields[1].value = u"oldpassword"; - submitted_form.fields[2].value = u"newpassword"; + submitted_form.fields[1].set_value(u"oldpassword"); + submitted_form.fields[2].set_value(u"newpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); EXPECT_TRUE(form_manager_->HasLikelyChangeOrResetFormSubmitted()); // A form with username and new password fields (most likely sign-up). - submitted_form.fields[1].value = u"newpassword"; + submitted_form.fields[1].set_value(u"newpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -3706,8 +3711,8 @@ TEST_P(PasswordFormManagerTest, ResetPasswordFormSubmitted) { // A form with new and confirmation password fields without username. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"newpassword"; - submitted_form.fields[1].value = u"newpassword"; + submitted_form.fields[0].set_value(u"newpassword"); + submitted_form.fields[1].set_value(u"newpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -3738,10 +3743,10 @@ GaiaIdHash::FromGaiaId(kGaiaId)); SetNonFederatedAndNotifyFetchCompleted({&saved_match}); - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); form_manager_->Fill(); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, @@ -3765,10 +3770,10 @@ GaiaIdHash::FromGaiaId(kGaiaId)); SetNonFederatedAndNotifyFetchCompleted({&saved_match}); - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); form_manager_->Fill(); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form_, &driver_, @@ -3902,7 +3907,7 @@ // Simulate submitting a password form. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); form_manager_->SaveSuggestedUsernameValueToVotesUploader(); @@ -3958,7 +3963,7 @@ // Simulate submitting a password form. A previously saved username value // (`saved_match_.username_value`) is offered as username in the prompt FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); form_manager_->SaveSuggestedUsernameValueToVotesUploader(); @@ -4009,8 +4014,8 @@ // Simulate submitting a password form. FormData submitted_form = observed_form_; - submitted_form.fields[1].value = kPossibleUsername; - submitted_form.fields[2].value = u"strongpassword"; + submitted_form.fields[1].set_value(kPossibleUsername); + submitted_form.fields[2].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); form_manager_->SaveSuggestedUsernameValueToVotesUploader(); @@ -4070,7 +4075,7 @@ // Simulate submitting a password form. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); // kPossibleUsername is suggested in the prompt, because the field has a @@ -4119,7 +4124,7 @@ // Provisionally save the form on password input. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strong_password"; + submitted_form.fields[0].set_value(u"strong_password"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -4150,7 +4155,7 @@ // Provisionally save the form on password input. FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strong_password"; + submitted_form.fields[0].set_value(u"strong_password"); ASSERT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -4478,8 +4483,8 @@ FormData submitted_form = observed_form_; std::u16string new_username = saved_match_.username_value + u"1"; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = new_username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(new_username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); PasswordForm updated_form; @@ -4512,8 +4517,8 @@ FormData submitted_form = observed_form_; std::u16string new_username = saved_match_.username_value + u"1"; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = new_username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(new_username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); EXPECT_TRUE(form_manager_->ProvisionallySave(submitted_form, &driver_, possible_usernames_)); @@ -4550,8 +4555,8 @@ std::u16string user_chosen_username = u"user_chosen_username"; std::u16string automatically_chosen_username = u"automatically_chosen_username"; - submitted_form_.fields[0].value = user_chosen_username; - submitted_form_.fields[1].value = automatically_chosen_username; + submitted_form_.fields[0].set_value(user_chosen_username); + submitted_form_.fields[1].set_value(automatically_chosen_username); EXPECT_CALL( *mock_password_save_manager(), CreatePendingCredentials( @@ -4604,8 +4609,8 @@ fetcher_->NotifyFetchCompleted(); std::u16string password = u"password1"; std::u16string pin = u"pin"; - form.fields[0].value = password; - form.fields[1].value = pin; + form.fields[0].set_value(password); + form.fields[1].set_value(pin); // Check that a second password field is chosen for saving. EXPECT_CALL(*mock_password_save_manager(), CreatePendingCredentials(FormHasPassword(pin), _, _, _, _)); @@ -4690,7 +4695,7 @@ // Check that the generated password is forwarded to the save manager. EXPECT_CALL(*mock_password_save_manager(), PresaveGeneratedPassword(FormHasPassword( - form_data.fields[kPasswordFieldIndex].value))); + form_data.fields[kPasswordFieldIndex].value()))); form_manager_->PresaveGeneratedPassword( form_with_generated_password.form_data, form_with_generated_password.password_value); @@ -4717,7 +4722,7 @@ // Now, the password save manager should have a generated password. ON_CALL(*mock_password_save_manager(), HasGeneratedPassword()) .WillByDefault(Return(true)); - EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value, + EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value(), updated_form.username_value); EXPECT_TRUE(form_manager_->HasGeneratedPassword()); // Check that the generated password is saved. @@ -4730,7 +4735,7 @@ Save(FormDataPointeeEqualTo(submitted_form_), _)) .WillOnce(SaveArg<1>(&updated_form)); form_manager_->Save(); - EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value, + EXPECT_EQ(submitted_form_.fields[kUsernameFieldIndex].value(), updated_form.username_value); } @@ -4855,7 +4860,7 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); // Check that a username is chosen from |possible_username_data|. EXPECT_CALL(*mock_password_save_manager(), CreatePendingCredentials(FormHasUsernameValue(possible_username), @@ -4884,7 +4889,7 @@ possible_usernames = MakePossibleUsernamesCache({possible_username_data}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); PasswordForm parsed_submitted_form; EXPECT_CALL(*mock_password_save_manager(), CreatePendingCredentials) .WillOnce(SaveArg<0>(&parsed_submitted_form));
diff --git a/components/password_manager/core/browser/password_form_metrics_recorder.cc b/components/password_manager/core/browser/password_form_metrics_recorder.cc index e43be88..e9b662e 100644 --- a/components/password_manager/core/browser/password_form_metrics_recorder.cc +++ b/components/password_manager/core/browser/password_form_metrics_recorder.cc
@@ -121,7 +121,7 @@ for (const FormFieldData& field : submitted_form.fields) { const std::u16string& value = - field.user_input.empty() ? field.value : field.user_input; + field.user_input.empty() ? field.value() : field.user_input; bool user_typed = field.properties_mask & FieldPropertiesFlags::kUserTyped; bool manually_filled = @@ -196,7 +196,7 @@ password_bubble_experiment::GetSmartBubbleDismissalThreshold(); for (const FormFieldData& field : submitted_form.fields) { const std::u16string& value = - field.user_input.empty() ? field.value : field.user_input; + field.user_input.empty() ? field.value() : field.user_input; for (const InteractionsStats& stat : interactions_stats) { if (stat.username_value == value && stat.dismissal_count >= show_threshold)
diff --git a/components/password_manager/core/browser/password_form_metrics_recorder_unittest.cc b/components/password_manager/core/browser/password_form_metrics_recorder_unittest.cc index 5a8376e..34ad40b2 100644 --- a/components/password_manager/core/browser/password_form_metrics_recorder_unittest.cc +++ b/components/password_manager/core/browser/password_form_metrics_recorder_unittest.cc
@@ -599,7 +599,7 @@ PasswordForm password_form; for (const auto& field : fields) { FormFieldData form_field; - form_field.value = ASCIIToUTF16(field.value); + form_field.set_value(ASCIIToUTF16(field.value)); form_field.user_input = ASCIIToUTF16(field.user_input); if (field.user_typed)
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc index 5372c7ed..ac01f77b 100644 --- a/components/password_manager/core/browser/password_manager.cc +++ b/components/password_manager/core/browser/password_manager.cc
@@ -99,7 +99,7 @@ const std::u16string& confirmation_password = parsed_form.confirmation_password_element; for (const auto& field : form_data.fields) { - if (!field.value.empty() && + if (!field.value().empty() && (field.name == new_password || (!old_password.empty() && field.name == old_password) || (!confirmation_password.empty() && @@ -644,7 +644,7 @@ manager->GetSubmittedForm()->new_password_element_renderer_id; auto it = base::ranges::find(form_data.fields, new_password_field_id, &autofill::FormFieldData::renderer_id); - if (it != form_data.fields.end() && it->value.empty()) { + if (it != form_data.fields.end() && it->value().empty()) { manager->UpdateSubmissionIndicatorEvent( SubmissionIndicatorEvent::CHANGE_PASSWORD_FORM_CLEARED); OnLoginSuccessful(); @@ -950,7 +950,7 @@ if (!util::CanFieldBeConsideredAsSingleUsername( field.name_attribute, field.id_attribute, field.label) || - !util::CanValueBeConsideredAsSingleUsername(field.value)) { + !util::CanValueBeConsideredAsSingleUsername(field.value())) { return; }
diff --git a/components/password_manager/core/browser/password_manager_unittest.cc b/components/password_manager/core/browser/password_manager_unittest.cc index 5b10439..9b5d0e4 100644 --- a/components/password_manager/core/browser/password_manager_unittest.cc +++ b/components/password_manager/core/browser/password_manager_unittest.cc
@@ -317,7 +317,7 @@ form->main_frame_origin = url::Origin(); for (FormFieldData& field : form->fields) { field.label.clear(); - field.value = u""; + field.set_value(u""); field.autocomplete_attribute.clear(); field.options.clear(); field.placeholder.clear(); @@ -525,7 +525,7 @@ field.name = u"Email"; field.id_attribute = field.name; field.name_attribute = field.name; - field.value = u"googleuser"; + field.set_value(u"googleuser"); field.form_control_type = autofill::FormControlType::kInputText; field.renderer_id = FieldRendererId(2); form_data.fields.push_back(field); @@ -533,7 +533,7 @@ field.name = u"Passwd"; field.id_attribute = field.name; field.name_attribute = field.name; - field.value = u"p4ssword"; + field.set_value(u"p4ssword"); field.form_control_type = autofill::FormControlType::kInputPassword; field.renderer_id = FieldRendererId(3); form_data.fields.push_back(field); @@ -644,7 +644,7 @@ FormFieldData password_field; password_field.name = form.password_element; password_field.id_attribute = form.password_element; - password_field.value = form.password_value; + password_field.set_value(form.password_value); password_field.form_control_type = autofill::FormControlType::kInputPassword; password_field.renderer_id = FieldRendererId(2); @@ -653,7 +653,7 @@ FormFieldData captcha_field; captcha_field.name = u"captcha_element"; captcha_field.id_attribute = captcha_field.name; - captcha_field.value = u"captcha_value"; + captcha_field.set_value(u"captcha_value"); captcha_field.form_control_type = autofill::FormControlType::kInputText; captcha_field.renderer_id = FieldRendererId(3); form.form_data.fields.push_back(captcha_field); @@ -691,7 +691,7 @@ search_field.name = u"search_bar"; search_field.name_attribute = search_field.name; search_field.id_attribute = search_field.name_attribute; - search_field.value = u"search_field_value"; + search_field.set_value(u"search_field_value"); search_field.form_control_type = autofill::FormControlType::kInputText; search_field.renderer_id = FieldRendererId(62); @@ -713,7 +713,7 @@ FormFieldData name_field; name_field.name = u"name"; name_field.id_attribute = name_field.name; - name_field.value = u"Name"; + name_field.set_value(u"Name"); name_field.form_control_type = autofill::FormControlType::kInputText; name_field.renderer_id = FieldRendererId(2); form.form_data.fields.push_back(name_field); @@ -721,7 +721,7 @@ FormFieldData surname_field; surname_field.name = form.username_element; surname_field.id_attribute = surname_field.name; - surname_field.value = form.username_value; + surname_field.set_value(form.username_value); surname_field.form_control_type = autofill::FormControlType::kInputText; surname_field.renderer_id = FieldRendererId(3); form.form_data.fields.push_back(surname_field); @@ -729,7 +729,7 @@ FormFieldData password_field; password_field.name = form.password_element; password_field.id_attribute = form.password_element; - password_field.value = form.password_value; + password_field.set_value(form.password_value); password_field.form_control_type = autofill::FormControlType::kInputPassword; password_field.renderer_id = FieldRendererId(4); @@ -751,7 +751,7 @@ FormFieldData field; field.name = form.username_element; field.id_attribute = field.name; - field.value = form.username_value; + field.set_value(form.username_value); field.form_control_type = autofill::FormControlType::kInputText; field.renderer_id = FieldRendererId(2); field.autocomplete_attribute = "cc-name"; @@ -759,7 +759,7 @@ field.name = form.password_element; field.id_attribute = field.name; - field.value = form.password_value; + field.set_value(form.password_value); field.form_control_type = autofill::FormControlType::kInputPassword; field.renderer_id = FieldRendererId(3); field.autocomplete_attribute = "cc-number"; @@ -855,7 +855,7 @@ std::vector<FormData> observed; FormData form_data(MakeSignUpFormData()); - const std::u16string username = form_data.fields[0].value; + const std::u16string username = form_data.fields[0].value(); observed.push_back(form_data); manager()->OnPasswordFormsParsed(&driver_, observed); manager()->OnPasswordFormsRendered(&driver_, observed); @@ -866,7 +866,7 @@ generated_password); task_environment_.RunUntilIdle(); EXPECT_THAT(store_->stored_passwords(), SizeIs(1)); - form_data.fields[1].value = generated_password; + form_data.fields[1].set_value(generated_password); OnPasswordFormSubmitted(form_data); // The user should not need to confirm saving as they have already given @@ -896,8 +896,8 @@ .WillRepeatedly(Return(true)); FormData form_data = MakeSimpleFormData(); - std::u16string username = form_data.fields[0].value; - std::u16string generated_password = form_data.fields[1].value + u"1"; + std::u16string username = form_data.fields[0].value(); + std::u16string generated_password = form_data.fields[1].value() + u"1"; FieldRendererId username_element = form_data.fields[0].renderer_id; FieldRendererId generation_element = form_data.fields[1].renderer_id; @@ -915,7 +915,7 @@ store_->stored_passwords(), ElementsAre(Pair(GetSignonRealm(form_data.url), ElementsAre(FormUsernamePasswordAre( - form_data.fields[0].value, generated_password))))); + form_data.fields[0].value(), generated_password))))); // Test when the user is changing the generated password, presaved credential // is updated. @@ -927,7 +927,7 @@ store_->stored_passwords(), ElementsAre(Pair(GetSignonRealm(form_data.url), ElementsAre(FormUsernamePasswordAre( - form_data.fields[0].value, generated_password))))); + form_data.fields[0].value(), generated_password))))); // Test when the user is changing the username, presaved credential is // updated. @@ -1287,7 +1287,8 @@ PasswordForm incomplete_match(form); incomplete_match.password_value = form.password_value.substr(0, form.password_value.length() - 1); - incomplete_match.form_data.fields[1].value = incomplete_match.password_value; + incomplete_match.form_data.fields[1].set_value( + incomplete_match.password_value); std::unique_ptr<PasswordFormManagerForUI> form_manager_to_save; EXPECT_CALL(client_, ShowManualFallbackForSaving(_, false, true)) .WillOnce(MoveArg<0>((&form_manager_to_save))); @@ -1340,7 +1341,7 @@ // The user deletes the password, no manuall fallback should be shown. PasswordForm empty_password_form(form); empty_password_form.password_value.clear(); - empty_password_form.form_data.fields[1].value = u""; + empty_password_form.form_data.fields[1].set_value(u""); EXPECT_CALL(client_, ShowManualFallbackForSaving).Times(0); EXPECT_CALL(client_, HideManualFallbackForSaving); manager()->OnInformAboutUserInput(&driver_, empty_password_form.form_data); @@ -1368,7 +1369,7 @@ .WillRepeatedly(Return(false)); // The user is typing a credential. No fallback should be available. FormData typed_credentials(form_data); - typed_credentials.fields[1].value = u"pw"; + typed_credentials.fields[1].set_value(u"pw"); EXPECT_CALL(client_, ShowManualFallbackForSaving).Times(0); manager()->OnInformAboutUserInput(&driver_, form_data); @@ -1798,7 +1799,7 @@ form_data_after_navigation.url = GURL("https://accounts.google.com/login/error?redirect_after_login"); for (auto& field : form_data_after_navigation.fields) - field.value = u""; + field.set_value(u""); observed.push_back(form_data_after_navigation); // A PasswordForm appears, and is visible in the layout: @@ -1836,7 +1837,7 @@ form_data_after_navigation.url = GURL("https://accounts.google.com/login/error?redirect_after_login"); for (auto& field : form_data_after_navigation.fields) - field.value = u""; + field.set_value(u""); observed.push_back(form_data_after_navigation); // Reappeared change password form is a signal of a possibly successful @@ -2087,10 +2088,10 @@ FormFieldData& username_field = insecure_form.form_data.fields[0]; username_field.name = insecure_form.username_element; insecure_form.username_value = u"compromised_user"; - username_field.value = insecure_form.username_value; + username_field.set_value(insecure_form.username_value); insecure_form.password_value = u"C0mpr0m1s3d_P4ss"; FormFieldData& password_field = insecure_form.form_data.fields[1]; - password_field.value = insecure_form.password_value; + password_field.set_value(insecure_form.password_value); insecure_form.url = GURL("http://example.com/home"); insecure_form.action = GURL("http://example.com/home"); insecure_form.form_data.url = insecure_form.url; @@ -2149,7 +2150,7 @@ TEST_P(PasswordManagerTest, DoNotSaveWithEmptyNewPasswordAndNonemptyPassword) { std::vector<FormData> observed; FormData form_data(MakeSimpleFormData()); - ASSERT_FALSE(form_data.fields[1].value.empty()); + ASSERT_FALSE(form_data.fields[1].value().empty()); FormFieldData field; field.name = u"new_password_element"; field.id_attribute = field.name; @@ -2177,7 +2178,7 @@ manager()->OnPasswordFormsRendered(&driver_, observed); task_environment_.RunUntilIdle(); ASSERT_TRUE(form_manager_to_save); - EXPECT_EQ(form_data.fields[1].value, + EXPECT_EQ(form_data.fields[1].value(), form_manager_to_save->GetPendingCredentials().password_value); } @@ -2439,7 +2440,7 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); manager()->OnPresaveGeneratedPassword(&driver_, form_data, - form_data.fields[1].value); + form_data.fields[1].value()); task_environment_.RunUntilIdle(); task_environment_.RunUntilIdle(); ASSERT_FALSE(store_->stored_passwords().empty()); @@ -2473,14 +2474,14 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); manager()->OnPresaveGeneratedPassword(&driver_, form_data, - form_data.fields[1].value); + form_data.fields[1].value()); task_environment_.RunUntilIdle(); ASSERT_FALSE(store_->stored_passwords().empty()); PasswordForm form = store_->stored_passwords().begin()->second[0]; // Simulate user editing and submitting a different password. Verify that // the edited password is the one that is saved. - form_data.fields[1].value = u"different_password"; + form_data.fields[1].set_value(u"different_password"); OnPasswordFormSubmitted(form_data); // Do not save generated password when the password form reappears. @@ -2514,12 +2515,12 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); manager()->OnPresaveGeneratedPassword(&driver_, form_data, - form_data.fields[1].value); + form_data.fields[1].value()); task_environment_.RunUntilIdle(); ASSERT_FALSE(store_->stored_passwords().empty()); // Simulate user removing generated password and adding a new one. - form_data.fields[1].value = u"different_password"; + form_data.fields[1].set_value(u"different_password"); manager()->OnPasswordNoLongerGenerated(&driver_, form_data); task_environment_.RunUntilIdle(); ASSERT_TRUE(store_->IsEmpty()); @@ -2551,12 +2552,12 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); manager()->OnPresaveGeneratedPassword(&driver_, form_data, - form_data.fields[1].value); + form_data.fields[1].value()); task_environment_.RunUntilIdle(); ASSERT_FALSE(store_->stored_passwords().empty()); // Simulate user removing generated password and adding a new one. - form_data.fields[1].value = u"different_password"; + form_data.fields[1].set_value(u"different_password"); manager()->OnPasswordNoLongerGenerated(&driver_, form_data); task_environment_.RunUntilIdle(); ASSERT_TRUE(store_->IsEmpty()); @@ -2587,11 +2588,11 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); manager()->OnPresaveGeneratedPassword(&driver_, form_data, - form_data.fields[1].value); + form_data.fields[1].value()); // Simulate user changing the username, without ever completely // deleting the password. - form_data.fields[0].value = u"new_username"; + form_data.fields[0].set_value(u"new_username"); OnPasswordFormSubmitted(form_data); task_environment_.RunUntilIdle(); @@ -2605,8 +2606,8 @@ ASSERT_THAT(store_->stored_passwords(), SizeIs(1)); PasswordForm form = store_->stored_passwords().begin()->second[0]; - EXPECT_EQ(form_data.fields[0].value, form.username_value); - EXPECT_EQ(form_data.fields[1].value, form.password_value); + EXPECT_EQ(form_data.fields[0].value(), form.username_value); + EXPECT_EQ(form_data.fields[1].value(), form.password_value); } TEST_P(PasswordManagerTest, PasswordGenerationPresavePassword) { @@ -2670,7 +2671,7 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); manager()->OnPresaveGeneratedPassword(&driver_, form_data, - form_data.fields[1].value); + form_data.fields[1].value()); task_environment_.RunUntilIdle(); EXPECT_TRUE(store_->stored_passwords().empty()); histogram_tester.ExpectUniqueSample( @@ -2809,9 +2810,9 @@ PasswordForm filled_form(observed_form); filled_form.username_value = android_form.username_value; - filled_form.form_data.fields[0].value = filled_form.username_value; + filled_form.form_data.fields[0].set_value(filled_form.username_value); filled_form.password_value = android_form.password_value; - filled_form.form_data.fields[1].value = filled_form.password_value; + filled_form.form_data.fields[1].set_value(filled_form.password_value); OnPasswordFormSubmitted(filled_form.form_data); PasswordForm saved_notified_form; @@ -2854,9 +2855,9 @@ PasswordForm filled_form(observed_form); filled_form.username_value = android_form.username_value; - filled_form.form_data.fields[0].value = filled_form.username_value; + filled_form.form_data.fields[0].set_value(filled_form.username_value); filled_form.password_value = u"new_password"; - filled_form.form_data.fields[1].value = filled_form.password_value; + filled_form.form_data.fields[1].set_value(filled_form.password_value); OnPasswordFormSubmitted(filled_form.form_data); std::unique_ptr<PasswordFormManagerForUI> form_manager_to_save; @@ -2886,7 +2887,7 @@ PasswordForm form(MakeFormWithOnlyNewPasswordField()); form.username_element.clear(); form.username_value.clear(); - form.form_data.fields[0].value = u""; + form.form_data.fields[0].set_value(u""); std::vector<FormData> observed = {form.form_data}; // Emulate page load. @@ -2899,7 +2900,7 @@ OnPasswordFormSubmitted(form.form_data); // JavaScript cleared field values. - observed[0].fields[1].value = u""; + observed[0].fields[1].set_value(u""); // Check success of the submission. std::unique_ptr<PasswordFormManagerForUI> form_manager_to_save; @@ -2919,7 +2920,7 @@ std::vector<FormData> observed; FormData form_data(MakeSimpleGAIAFormData()); // Simulate that no username is found. - form_data.fields[0].value = u""; + form_data.fields[0].set_value(u""); observed.push_back(form_data); manager()->OnPasswordFormsRendered(&driver_, observed); @@ -2982,7 +2983,7 @@ // The username of the stored form is different, there should be save bubble. PasswordForm new_form = form; new_form.username_value = u"another_username"; - new_form.form_data.fields[0].value = new_form.username_value; + new_form.form_data.fields[0].set_value(new_form.username_value); EXPECT_CALL(client_, ShowManualFallbackForSaving(_, false, false)) .WillOnce(MoveArg<0>(&form_manager_to_save)); manager()->OnInformAboutUserInput(&driver_, new_form.form_data); @@ -3221,8 +3222,8 @@ task_environment_.RunUntilIdle(); auto submitted_form_data = form_data; - submitted_form_data.fields[0].value = u"username"; - submitted_form_data.fields[1].value = u"password1"; + submitted_form_data.fields[0].set_value(u"username"); + submitted_form_data.fields[1].set_value(u"password1"); OnPasswordFormSubmitted(submitted_form_data); EXPECT_TRUE(manager()->GetSubmittedManagerForTest()); @@ -3263,8 +3264,8 @@ manager()->OnInformAboutUserInput(&driver_, form_data); auto submitted_form_data = form_data; - submitted_form_data.fields[0].value = u"username"; - submitted_form_data.fields[1].value = u"strong_password"; + submitted_form_data.fields[0].set_value(u"username"); + submitted_form_data.fields[1].set_value(u"strong_password"); std::unique_ptr<PasswordFormManagerForUI> form_manager_to_save; EXPECT_CALL(client_, PromptUserToSaveOrUpdatePassword) @@ -3286,8 +3287,8 @@ EXPECT_CALL(client_, IsSavingAndFillingEnabled(form_data.url)) .WillRepeatedly(Return(true)); - form_data.fields[0].value = u"username"; - form_data.fields[1].value = u"password"; + form_data.fields[0].set_value(u"username"); + form_data.fields[1].set_value(u"password"); form_data.fields[1].is_focusable = false; EXPECT_CALL(client_, PromptUserToSaveOrUpdatePassword).Times(0); @@ -3349,7 +3350,7 @@ // The username of the stored form is different, there should be save bubble. PasswordForm new_form = form; new_form.username_value = u"another_username"; - new_form.form_data.fields[0].value = new_form.username_value; + new_form.form_data.fields[0].set_value(new_form.username_value); EXPECT_CALL(client_, ShowManualFallbackForSaving(_, false, false)) .WillOnce(MoveArg<0>(&form_manager_to_save)); manager()->OnInformAboutUserInput(&driver_, new_form.form_data); @@ -3369,8 +3370,8 @@ manager()->OnPasswordFormsParsed(&driver_, {form_data}); auto submitted_form_data = form_data; - submitted_form_data.fields[0].value = u"username"; - submitted_form_data.fields[1].value = u"strong_password"; + submitted_form_data.fields[0].set_value(u"username"); + submitted_form_data.fields[1].set_value(u"strong_password"); EXPECT_CALL(client_, PromptUserToSaveOrUpdatePassword).Times(0); manager()->OnDynamicFormSubmission(&driver_, @@ -3387,8 +3388,8 @@ manager()->OnPasswordFormsParsed(&driver_, {form_data}); auto submitted_form_data = form_data; - submitted_form_data.fields[0].value = u"text"; - submitted_form_data.fields[1].value = u"1234"; + submitted_form_data.fields[0].set_value(u"text"); + submitted_form_data.fields[1].set_value(u"1234"); EXPECT_CALL(client_, PromptUserToSaveOrUpdatePassword).Times(0); manager()->OnDynamicFormSubmission(&driver_, @@ -3786,9 +3787,9 @@ auto submitted_form = form; submitted_form.form_data.renderer_id.value() += 1000; submitted_form.username_value = u"username1"; - submitted_form.form_data.fields[0].value = submitted_form.username_value; + submitted_form.form_data.fields[0].set_value(submitted_form.username_value); submitted_form.password_value = u"password1"; - submitted_form.form_data.fields[1].value = submitted_form.password_value; + submitted_form.form_data.fields[1].set_value(submitted_form.password_value); OnPasswordFormSubmitted(submitted_form.form_data); EXPECT_TRUE(manager()->GetSubmittedManagerForTest()); @@ -3835,11 +3836,11 @@ store_->AddLogin(saved_match); PasswordForm non_password_form(MakeSimpleForm()); non_password_form.username_value = u"+1 650 000 000"; // Phone number. - non_password_form.form_data.fields[0].value = - non_password_form.username_value; + non_password_form.form_data.fields[0].set_value( + non_password_form.username_value); non_password_form.password_value = u"379 390"; // One time SMS code. - non_password_form.form_data.fields[1].value = - non_password_form.password_value; + non_password_form.form_data.fields[1].set_value( + non_password_form.password_value); non_password_form.form_data.fields[1].id_attribute = u"one-time-code"; non_password_form.only_for_fallback = true; @@ -3940,7 +3941,7 @@ one_time_code_form.form_data.url = one_time_code_form.url; FormFieldData field; field.name_attribute = one_time_code_form.password_element; - field.value = one_time_code_form.password_value; + field.set_value(one_time_code_form.password_value); field.form_control_type = autofill::FormControlType::kInputPassword; one_time_code_form.form_data.fields.push_back(field); @@ -3996,8 +3997,8 @@ one_time_code_form.only_for_fallback = true; one_time_code_form.password_value = u"379 390"; one_time_code_form.password_element = u"one-time-code"; - one_time_code_form.form_data.fields[1].value = - one_time_code_form.password_value; + one_time_code_form.form_data.fields[1].set_value( + one_time_code_form.password_value); one_time_code_form.form_data.fields[1].name_attribute = one_time_code_form.password_element; @@ -4059,7 +4060,7 @@ auto check_instance = std::make_unique<MockLeakDetectionCheck>(); EXPECT_CALL(*check_instance, Start(LeakDetectionInitiator::kSignInCheck, form_data.url, - form_data.fields[0].value, form_data.fields[1].value)); + form_data.fields[0].value(), form_data.fields[1].value())); EXPECT_CALL(*weak_factory, TryCreateLeakCheck) .WillOnce(Return(ByMove(std::move(check_instance)))); @@ -4224,7 +4225,7 @@ // Simulate that the user typed a password and submitted the password form. const std::u16string password = u"newpassword"; - password_form.form_data.fields[0].value = password; + password_form.form_data.fields[0].set_value(password); OnPasswordFormSubmitted(password_form.form_data); // Simulate successful submission and expect a save prompt. @@ -4275,7 +4276,7 @@ // User enters OTP. manager()->OnUserModifiedNonPasswordField( &driver_, intermediary_form.form_data.fields[0].renderer_id, - /*value=*/intermediary_form.form_data.fields[0].value, + /*value=*/intermediary_form.form_data.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/true); @@ -4297,13 +4298,13 @@ manager()->OnUserModifiedNonPasswordField( &driver_, password_form.form_data.fields[0].renderer_id, - /*value=*/password_form.form_data.fields[0].value, + /*value=*/password_form.form_data.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); manager()->OnUserModifiedNonPasswordField( &driver_, password_form.form_data.fields[1].renderer_id, - /*value=*/password_form.form_data.fields[1].value, + /*value=*/password_form.form_data.fields[1].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); @@ -4369,7 +4370,7 @@ // User enters OTP. manager()->OnUserModifiedNonPasswordField( &driver_, intermediary_form.form_data.fields[0].renderer_id, - /*value=*/intermediary_form.form_data.fields[0].value, + /*value=*/intermediary_form.form_data.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/true); @@ -4457,7 +4458,7 @@ // User enters CAPTCHA. manager()->OnUserModifiedNonPasswordField( &driver_, password_form.form_data.fields[1].renderer_id, - /*value=*/password_form.form_data.fields[1].value, + /*value=*/password_form.form_data.fields[1].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); @@ -4516,7 +4517,7 @@ // User enters OTP. manager()->OnUserModifiedNonPasswordField( &driver_, intermediary_form.form_data.fields[0].renderer_id, - /*value=*/intermediary_form.form_data.fields[0].value, + /*value=*/intermediary_form.form_data.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/true); @@ -4546,12 +4547,12 @@ // Simulate user modifying the text fields inside password form. manager()->OnUserModifiedNonPasswordField( &driver_, signup_form.form_data.fields[0].renderer_id, - /*value=*/signup_form.form_data.fields[0].value, + /*value=*/signup_form.form_data.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); manager()->OnUserModifiedNonPasswordField( &driver_, signup_form.form_data.fields[1].renderer_id, - /*value=*/signup_form.form_data.fields[1].value, + /*value=*/signup_form.form_data.fields[1].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); @@ -4674,7 +4675,7 @@ // User enters something to search bar. manager()->OnUserModifiedNonPasswordField( &driver_, search_bar.fields[0].renderer_id, - /*value=*/search_bar.fields[0].value, + /*value=*/search_bar.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); @@ -4745,7 +4746,7 @@ // the password form. const std::u16string password = u"newpassword"; ASSERT_TRUE(saved_form.password_value != password); - password_form.form_data.fields[0].value = password; + password_form.form_data.fields[0].set_value(password); OnPasswordFormSubmitted(password_form.form_data); // Simulate successful submission and expect a prompt. @@ -4851,7 +4852,7 @@ // Simulate user modifying the text fields inside password form. manager()->OnUserModifiedNonPasswordField( &driver_, password_form.form_data.fields[0].renderer_id, - /*value=*/password_form.form_data.fields[0].value, + /*value=*/password_form.form_data.fields[0].value(), /*autocomplete_attribute_has_username=*/false, /*is_likely_otp=*/false); @@ -5066,7 +5067,7 @@ autofill::FormControlType::kInputPassword; old_password_field.renderer_id = FieldRendererId(2); old_password_field.name = u"oldpass"; - old_password_field.value = u"oldpass"; + old_password_field.set_value(u"oldpass"); form_data.fields.push_back(old_password_field); FormFieldData new_password_field; @@ -5091,9 +5092,9 @@ manager()->form_managers().front()->votes_uploader(); ASSERT_TRUE(votes_uploader); - form_data.fields[0].value = u"oldpass"; - form_data.fields[1].value = u"newpass"; - form_data.fields[2].value = u"newpass"; + form_data.fields[0].set_value(u"oldpass"); + form_data.fields[1].set_value(u"newpass"); + form_data.fields[2].set_value(u"newpass"); manager()->OnInformAboutUserInput(&driver_, form_data); @@ -5122,7 +5123,7 @@ password_field.form_control_type = autofill::FormControlType::kInputPassword; password_field.renderer_id = FieldRendererId(1); password_field.name = u"one-time-code"; - password_field.value = u"123456"; + password_field.set_value(u"123456"); form_data.fields.push_back(password_field); manager()->OnPasswordFormsParsed(&driver_, {form_data}); @@ -5153,7 +5154,7 @@ autofill::FormControlType::kInputPassword; old_password_field.renderer_id = FieldRendererId(2); old_password_field.name = kEmptyName; - old_password_field.value = u"oldpass"; + old_password_field.set_value(u"oldpass"); form_data.fields.push_back(old_password_field); FormFieldData new_password_field; @@ -5167,8 +5168,8 @@ manager()->OnPasswordFormsParsed(&driver_, {form_data}); task_environment_.RunUntilIdle(); - form_data.fields[0].value = u"oldpass"; - form_data.fields[1].value = u"newpass"; + form_data.fields[0].set_value(u"oldpass"); + form_data.fields[1].set_value(u"newpass"); manager()->OnInformAboutUserInput(&driver_, form_data); @@ -5197,7 +5198,7 @@ autofill::FormControlType::kInputPassword; old_password_field.renderer_id = FieldRendererId(1); old_password_field.name = u"oldpass"; - old_password_field.value = u"oldpass"; + old_password_field.set_value(u"oldpass"); form_data.fields.push_back(old_password_field); FormFieldData new_password_field; @@ -5218,16 +5219,16 @@ manager()->OnPasswordFormsParsed(&driver_, {form_data}); task_environment_.RunUntilIdle(); - form_data.fields[0].value = u"oldpass"; - form_data.fields[1].value = u"newpass"; - form_data.fields[2].value = u"newpass"; + form_data.fields[0].set_value(u"oldpass"); + form_data.fields[1].set_value(u"newpass"); + form_data.fields[2].set_value(u"newpass"); manager()->OnInformAboutUserInput(&driver_, form_data); - form_data.fields[0].value = std::u16string(); - form_data.fields[2].value = std::u16string(); + form_data.fields[0].set_value(std::u16string()); + form_data.fields[2].set_value(std::u16string()); if (new_password_field_was_cleared) - form_data.fields[1].value = std::u16string(); + form_data.fields[1].set_value(std::u16string()); std::unique_ptr<PasswordFormManagerForUI> form_manager_to_save; if (new_password_field_was_cleared) { @@ -5262,7 +5263,7 @@ autofill::FormControlType::kInputPassword; old_password_field.renderer_id = FieldRendererId(1); old_password_field.name = kEmptyName; - old_password_field.value = u"oldpass"; + old_password_field.set_value(u"oldpass"); form_data.fields.push_back(old_password_field); FormFieldData new_password_field; @@ -5276,14 +5277,14 @@ manager()->OnPasswordFormsParsed(&driver_, {form_data}); task_environment_.RunUntilIdle(); - form_data.fields[0].value = u"oldpass"; - form_data.fields[1].value = u"newpass"; + form_data.fields[0].set_value(u"oldpass"); + form_data.fields[1].set_value(u"newpass"); manager()->OnInformAboutUserInput(&driver_, form_data); - form_data.fields[0].value = u""; + form_data.fields[0].set_value(u""); if (new_password_field_was_cleared) - form_data.fields[1].value = u""; + form_data.fields[1].set_value(u""); std::unique_ptr<PasswordFormManagerForUI> form_manager_to_save; if (new_password_field_was_cleared) { @@ -5312,7 +5313,7 @@ // The user updates the password. FormData updated_data(form.form_data); - updated_data.fields[1].value = u"new_password"; + updated_data.fields[1].set_value(u"new_password"); manager()->OnInformAboutUserInput(&driver_, updated_data); EXPECT_TRUE(manager()->IsFormManagerPendingPasswordUpdate()); @@ -5742,14 +5743,14 @@ one_time_code_form.username_element = test_form_username_element_; FormFieldData username_field; username_field.name = test_form_username_element_; - username_field.value = one_time_code_form_username_value; + username_field.set_value(one_time_code_form_username_value); username_field.form_control_type = autofill::FormControlType::kInputText; username_field.renderer_id = FieldRendererId(1); one_time_code_form.form_data.fields.push_back(username_field); } FormFieldData otp_field; - otp_field.value = test_form_otp_value_; + otp_field.set_value(test_form_otp_value_); otp_field.form_control_type = autofill::FormControlType::kInputPassword; otp_field.renderer_id = FieldRendererId(2); one_time_code_form.form_data.fields.push_back(otp_field);
diff --git a/components/password_manager/core/browser/password_save_manager_impl_unittest.cc b/components/password_manager/core/browser/password_save_manager_impl_unittest.cc index 4e991d2..1f62697 100644 --- a/components/password_manager/core/browser/password_save_manager_impl_unittest.cc +++ b/components/password_manager/core/browser/password_save_manager_impl_unittest.cc
@@ -243,8 +243,8 @@ observed_form_only_password_fields_.fields.push_back(field); submitted_form_ = observed_form_; - submitted_form_.fields[kUsernameFieldIndex].value = u"user1"; - submitted_form_.fields[kPasswordFieldIndex].value = u"secret1"; + submitted_form_.fields[kUsernameFieldIndex].set_value(u"user1"); + submitted_form_.fields[kPasswordFieldIndex].set_value(u"secret1"); saved_match_.url = origin; saved_match_.action = action; @@ -273,9 +273,9 @@ parsed_submitted_form_ = parsed_observed_form_; parsed_submitted_form_.form_data = submitted_form_; parsed_submitted_form_.username_value = - submitted_form_.fields[kUsernameFieldIndex].value; + submitted_form_.fields[kUsernameFieldIndex].value(); parsed_submitted_form_.password_value = - submitted_form_.fields[kPasswordFieldIndex].value; + submitted_form_.fields[kPasswordFieldIndex].value(); fetcher_ = std::make_unique<FakeFormFetcher>(); fetcher_->Fetch(); @@ -476,10 +476,10 @@ TEST_P(PasswordSaveManagerImplTest, CreatePendingCredentialsAlreadySaved) { SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); password_save_manager_impl()->CreatePendingCredentials( Parse(submitted_form_), &observed_form_, submitted_form_, @@ -501,10 +501,10 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); password_save_manager_impl()->CreatePendingCredentials( Parse(submitted_form_), &observed_form_, submitted_form_, @@ -523,9 +523,10 @@ PasswordForm expected = saved_match_; expected.password_value += u"1"; - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; - submitted_form_.fields[kPasswordFieldIndex].value = expected.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); + submitted_form_.fields[kPasswordFieldIndex].set_value( + expected.password_value); password_save_manager_impl()->CreatePendingCredentials( Parse(submitted_form_), &observed_form_, submitted_form_, @@ -542,8 +543,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; - submitted_form.fields[1].value = u"verystrongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); + submitted_form.fields[1].set_value(u"verystrongpassword"); PasswordForm expected = saved_match_; expected.password_value = u"verystrongpassword"; @@ -566,8 +567,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_, &another_saved_match}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = u"strongpassword"; - submitted_form.fields[1].value = u"verystrongpassword"; + submitted_form.fields[0].set_value(u"strongpassword"); + submitted_form.fields[1].set_value(u"verystrongpassword"); PasswordForm expected = saved_match_; expected.password_value = u"verystrongpassword"; @@ -594,9 +595,9 @@ // Create submitted form, that has one of the previously saved usernames in // it. FormData submitted_form = observed_form_; - submitted_form.fields[0].value = another_saved_match.username_value; - submitted_form.fields[1].value = u"new_username"; - submitted_form.fields[2].value = u"verystrongpassword"; + submitted_form.fields[0].set_value(another_saved_match.username_value); + submitted_form.fields[1].set_value(u"new_username"); + submitted_form.fields[2].set_value(u"verystrongpassword"); PasswordForm parsed_form = Parse(submitted_form); password_save_manager_impl()->CreatePendingCredentials( @@ -620,7 +621,7 @@ FormData anonymous_signup = observed_form_; // There is an anonymous password field and set it as the new password field. anonymous_signup.fields[2].name.clear(); - anonymous_signup.fields[2].value = u"a password"; + anonymous_signup.fields[2].set_value(u"a password"); anonymous_signup.fields[2].autocomplete_attribute = "new-password"; password_save_manager_impl()->CreatePendingCredentials( @@ -661,8 +662,8 @@ FormData submitted_form = observed_form_; std::u16string new_username = saved_match_.username_value + u"1"; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = new_username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(new_username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); PasswordForm parsed_submitted_form = Parse(submitted_form); // Set SubmissionIndicatorEvent to test metrics recording. @@ -721,10 +722,10 @@ SetNonFederatedAndNotifyFetchCompleted({&psl_saved_match_}); FormData submitted_form = observed_form_; - submitted_form.fields[kUsernameFieldIndex].value = - psl_saved_match_.username_value; - submitted_form.fields[kPasswordFieldIndex].value = - psl_saved_match_.password_value; + submitted_form.fields[kUsernameFieldIndex].set_value( + psl_saved_match_.username_value); + submitted_form.fields[kPasswordFieldIndex].set_value( + psl_saved_match_.password_value); password_save_manager_impl()->CreatePendingCredentials( Parse(submitted_form), &observed_form_, submitted_form, @@ -763,8 +764,8 @@ FormData submitted_form = observed_form_; std::u16string username = saved_match_.username_value; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); password_save_manager_impl()->CreatePendingCredentials( Parse(submitted_form), &observed_form_, submitted_form, @@ -797,9 +798,9 @@ {&saved_match_, ¬_best_saved_match, &saved_match_another_username}); FormData submitted_form = observed_form_only_password_fields_; - submitted_form.fields[0].value = saved_match_.password_value; + submitted_form.fields[0].set_value(saved_match_.password_value); std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[1].value = new_password; + submitted_form.fields[1].set_value(new_password); password_save_manager_impl()->CreatePendingCredentials( Parse(submitted_form), &observed_form_only_password_fields_, @@ -833,8 +834,8 @@ std::u16string user_chosen_username = u"user_chosen_username"; std::u16string automatically_chosen_username = u"automatically_chosen_username"; - submitted_form_.fields[0].value = user_chosen_username; - submitted_form_.fields[1].value = automatically_chosen_username; + submitted_form_.fields[0].set_value(user_chosen_username); + submitted_form_.fields[1].set_value(automatically_chosen_username); PasswordForm parsed_submitted_form = Parse(submitted_form_); password_save_manager_impl()->CreatePendingCredentials( parsed_submitted_form, &observed_form_only_password_fields_, @@ -928,8 +929,8 @@ SetNonFederatedAndNotifyFetchCompleted({&saved_match_}); // Emulate submitting form with known username and different password. - submitted_form_.fields[kUsernameFieldIndex].value = - saved_match_.username_value; + submitted_form_.fields[kUsernameFieldIndex].set_value( + saved_match_.username_value); PasswordForm parsed_submitted_form = Parse(submitted_form_); password_save_manager_impl()->CreatePendingCredentials( @@ -961,8 +962,8 @@ fetcher()->NotifyFetchCompleted(); std::u16string password = u"password1"; std::u16string pin = u"pin"; - submitted_form.fields[0].value = password; - submitted_form.fields[1].value = pin; + submitted_form.fields[0].set_value(password); + submitted_form.fields[1].set_value(pin); PasswordForm parsed_submitted_form = Parse(submitted_form); password_save_manager_impl()->CreatePendingCredentials( @@ -1189,8 +1190,8 @@ FormData submitted_form = observed_form_; std::u16string username = saved_match_.username_value; std::u16string new_password = saved_match_.password_value + u"1"; - submitted_form.fields[kUsernameFieldIndex].value = username; - submitted_form.fields[kPasswordFieldIndex].value = new_password; + submitted_form.fields[kUsernameFieldIndex].set_value(username); + submitted_form.fields[kPasswordFieldIndex].set_value(new_password); PasswordForm parsed_submitted_form = Parse(submitted_form); // Set SubmissionIndicatorEvent to test metrics recording. @@ -1334,9 +1335,9 @@ // Use the same credentials on the submitted form. submitted_form_ = observed_form_; - submitted_form_.fields[kUsernameFieldIndex].value = username; - submitted_form_.fields[kPasswordFieldIndex].value = - saved_match_.password_value; + submitted_form_.fields[kUsernameFieldIndex].set_value(username); + submitted_form_.fields[kPasswordFieldIndex].set_value( + saved_match_.password_value); PasswordForm parsed_submitted_form = Parse(submitted_form_); password_save_manager_impl()->CreatePendingCredentials(
diff --git a/components/password_manager/core/browser/sync_username_test_base.cc b/components/password_manager/core/browser/sync_username_test_base.cc index 5fb3cf32..0b27de6 100644 --- a/components/password_manager/core/browser/sync_username_test_base.cc +++ b/components/password_manager/core/browser/sync_username_test_base.cc
@@ -23,12 +23,12 @@ FormFieldData field; field.name = u"username_element"; field.form_control_type = autofill::FormControlType::kInputText; - field.value = ASCIIToUTF16(username); + field.set_value(ASCIIToUTF16(username)); form.fields.push_back(field); field.name = u"password_element"; field.form_control_type = autofill::FormControlType::kInputPassword; - field.value = u"strong_pw"; + field.set_value(u"strong_pw"); form.fields.push_back(field); return form; }
diff --git a/components/password_manager/core/browser/votes_uploader.cc b/components/password_manager/core/browser/votes_uploader.cc index f6d27217..17ec50dc 100644 --- a/components/password_manager/core/browser/votes_uploader.cc +++ b/components/password_manager/core/browser/votes_uploader.cc
@@ -831,9 +831,10 @@ // If we are updating a password, the known value is the old password, not // the new one. for (auto& field : *form) { - if (field->value.empty()) + if (field->value().empty()) { continue; - if (known_username == field->value || known_password == field->value) { + } + if (known_username == field->value() || known_password == field->value()) { field->properties_mask |= autofill::FieldPropertiesFlags::kKnownValue; } } @@ -929,8 +930,8 @@ void VotesUploader::StoreInitialFieldValues( const autofill::FormData& observed_form) { for (const auto& field : observed_form.fields) { - if (!field.value.empty()) { - initial_values_.insert(std::make_pair(field.renderer_id, field.value)); + if (!field.value().empty()) { + initial_values_.insert(std::make_pair(field.renderer_id, field.value())); } } }
diff --git a/components/password_manager/core/browser/votes_uploader_unittest.cc b/components/password_manager/core/browser/votes_uploader_unittest.cc index e4190254..d6784ed2 100644 --- a/components/password_manager/core/browser/votes_uploader_unittest.cc +++ b/components/password_manager/core/browser/votes_uploader_unittest.cc
@@ -415,11 +415,11 @@ FormData form_data; FormFieldData username_field; - username_field.value = prefilled_username; + username_field.set_value(prefilled_username); username_field.renderer_id = username_field_renderer_id; FormFieldData other_field; - other_field.value = u"some_field"; + other_field.set_value(u"some_field"); other_field.renderer_id = FieldRendererId(3234); form_data.fields = {other_field, username_field}; @@ -427,7 +427,7 @@ VotesUploader votes_uploader(&client_, true); votes_uploader.StoreInitialFieldValues(form_data); - form_data.fields.at(1).value = u"user entered value"; + form_data.fields.at(1).set_value(u"user entered value"); FormStructure form_structure(form_data); PasswordForm password_form;
diff --git a/components/password_manager/ios/shared_password_controller_unittest.mm b/components/password_manager/ios/shared_password_controller_unittest.mm index e37e1dd..50f2029 100644 --- a/components/password_manager/ios/shared_password_controller_unittest.mm +++ b/components/password_manager/ios/shared_password_controller_unittest.mm
@@ -614,7 +614,7 @@ field.name = u"Username"; field.id_attribute = field.name; field.name_attribute = field.name; - field.value = u"googleuser"; + field.set_value(u"googleuser"); field.form_control_type = autofill::FormControlType::kInputText; field.renderer_id = autofill::test::MakeFieldRendererId(); form_data.fields.push_back(field); @@ -622,7 +622,7 @@ field.name = u"Passwd"; field.id_attribute = field.name; field.name_attribute = field.name; - field.value = u"p4ssword"; + field.set_value(u"p4ssword"); field.form_control_type = autofill::FormControlType::kInputPassword; field.renderer_id = autofill::test::MakeFieldRendererId(); field.max_length = max_length;
diff --git a/components/password_manager/ios/test_helpers.cc b/components/password_manager/ios/test_helpers.cc index 74eb605..4b039113 100644 --- a/components/password_manager/ios/test_helpers.cc +++ b/components/password_manager/ios/test_helpers.cc
@@ -77,12 +77,12 @@ form_data->renderer_id = FormRendererId(form_id); FormFieldData field; - field.value = base::UTF8ToUTF16(username_value); + field.set_value(base::UTF8ToUTF16(username_value)); field.form_control_type = autofill::FormControlType::kInputText; field.renderer_id = FieldRendererId(username_field_id); form_data->fields.push_back(field); - field.value = base::UTF8ToUTF16(password_value); + field.set_value(base::UTF8ToUTF16(password_value)); field.form_control_type = autofill::FormControlType::kInputPassword; field.renderer_id = FieldRendererId(password_field_id); form_data->fields.push_back(field); @@ -98,14 +98,14 @@ field.name = u"Username"; field.id_attribute = field.name; field.name_attribute = field.name; - field.value = u"googleuser"; + field.set_value(u"googleuser"); field.form_control_type = autofill::FormControlType::kInputText; form_data.fields.push_back(field); field.name = u"Passwd"; field.id_attribute = field.name; field.name_attribute = field.name; - field.value = u"p4ssword"; + field.set_value(u"p4ssword"); field.form_control_type = autofill::FormControlType::kInputPassword; form_data.fields.push_back(field);
diff --git a/components/payments/content/utility/payment_manifest_parser_unittest.cc b/components/payments/content/utility/payment_manifest_parser_unittest.cc index 5fcd77d..6f19c3ad 100644 --- a/components/payments/content/utility/payment_manifest_parser_unittest.cc +++ b/components/payments/content/utility/payment_manifest_parser_unittest.cc
@@ -238,6 +238,7 @@ // Web app manifest parsing: +// Expect that input is valid JSON but not a valid web app manifest. void ExpectUnableToParseWebAppManifest(const std::string& input) { base::Value value = base::test::ParseJson(input); std::vector<WebAppManifestSection> sections; @@ -396,22 +397,6 @@ "}"); } -TEST(PaymentManifestParserTest, VersionShouldNotHaveNullCharacters) { - ExpectUnableToParseWebAppManifest( - "{" - " \"related_applications\": [{" - " \"platform\": \"play\", " - " \"id\": \"com.bobpay.app\", " - " \"min_version\": \"1\01\", " - " \"fingerprints\": [{" - " \"type\": \"sha256_cert\", " - " \"value\": \"00:01:02:03:04:05:06:07:08:09:A0:A1:A2:A3:A4:A5:A6:A7" - ":A8:A9:B0:B1:B2:B3:B4:B5:B6:B7:B8:B9:C0:C1\"" - " }]" - " }]" - "}"); -} - TEST(PaymentManifestParserTest, KeysShouldBeLowerCase) { ExpectUnableToParseWebAppManifest( "{"
diff --git a/components/performance_manager/features.cc b/components/performance_manager/features.cc index 1216ee7d..3ed8ad5 100644 --- a/components/performance_manager/features.cc +++ b/components/performance_manager/features.cc
@@ -19,8 +19,8 @@ "RunPerformanceManagerOnMainThread", base::FEATURE_DISABLED_BY_DEFAULT); -BASE_FEATURE(kRunOnDedicatedThreadPoolThread, - "RunOnDedicatedThreadPoolThread", +BASE_FEATURE(kRunOnMainThreadSync, + "RunPerformanceManagerOnMainThreadSync", base::FEATURE_DISABLED_BY_DEFAULT); #if !BUILDFLAG(IS_ANDROID)
diff --git a/components/performance_manager/graph/policies/process_priority_policy.cc b/components/performance_manager/graph/policies/process_priority_policy.cc index e021fe56..17a01118 100644 --- a/components/performance_manager/graph/policies/process_priority_policy.cc +++ b/components/performance_manager/graph/policies/process_priority_policy.cc
@@ -73,7 +73,8 @@ // If the PM is already running on the UI thread, improve performance by // skipping the thread-hop. - if (base::FeatureList::IsEnabled(features::kRunOnMainThread)) { + if (base::FeatureList::IsEnabled(features::kRunOnMainThread) || + base::FeatureList::IsEnabled(features::kRunOnMainThreadSync)) { SetProcessPriorityOnUIThread(process_node->GetRenderProcessHostProxy(), foreground); return;
diff --git a/components/performance_manager/graph/policies/process_priority_policy_unittest.cc b/components/performance_manager/graph/policies/process_priority_policy_unittest.cc index 2ba33df..4f021c2 100644 --- a/components/performance_manager/graph/policies/process_priority_policy_unittest.cc +++ b/components/performance_manager/graph/policies/process_priority_policy_unittest.cc
@@ -51,14 +51,20 @@ })); } -// Tests ProcessPriorityPolicy with and without PerformanceManager running on -// the main thread. -class ProcessPriorityPolicyTest : public PerformanceManagerTestHarness, - public ::testing::WithParamInterface<bool> { +struct PMThreadingConfiguration { + bool run_on_main_thread; + bool run_on_main_thread_sync; +}; + +// Tests ProcessPriorityPolicy in different threading configurations. +class ProcessPriorityPolicyTest + : public PerformanceManagerTestHarness, + public ::testing::WithParamInterface<PMThreadingConfiguration> { public: ProcessPriorityPolicyTest() { - scoped_feature_list_.InitWithFeatureState(features::kRunOnMainThread, - GetParam()); + scoped_feature_list_.InitWithFeatureStates( + {{features::kRunOnMainThread, GetParam().run_on_main_thread}, + {features::kRunOnMainThreadSync, GetParam().run_on_main_thread_sync}}); } ProcessPriorityPolicyTest(const ProcessPriorityPolicyTest&) = delete; @@ -112,7 +118,18 @@ base::RepeatingClosure quit_closure_ = task_environment()->QuitClosure(); }; -INSTANTIATE_TEST_SUITE_P(All, ProcessPriorityPolicyTest, ::testing::Bool()); +INSTANTIATE_TEST_SUITE_P( + , + ProcessPriorityPolicyTest, + ::testing::Values( + PMThreadingConfiguration{.run_on_main_thread = false, + .run_on_main_thread_sync = false}, + + PMThreadingConfiguration{.run_on_main_thread = true, + .run_on_main_thread_sync = false}, + + PMThreadingConfiguration{.run_on_main_thread = false, + .run_on_main_thread_sync = true})); } // namespace
diff --git a/components/performance_manager/performance_manager_impl.cc b/components/performance_manager/performance_manager_impl.cc index 97590fc..01e6f248 100644 --- a/components/performance_manager/performance_manager_impl.cc +++ b/components/performance_manager/performance_manager_impl.cc
@@ -12,12 +12,18 @@ #include "base/containers/flat_set.h" #include "base/feature_list.h" #include "base/functional/bind.h" +#include "base/functional/callback.h" +#include "base/location.h" #include "base/memory/ptr_util.h" +#include "base/memory/scoped_refptr.h" +#include "base/no_destructor.h" #include "base/notreached.h" +#include "base/task/delayed_task_handle.h" #include "base/task/lazy_thread_pool_task_runner.h" #include "base/task/sequenced_task_runner.h" #include "base/task/single_thread_task_runner_thread_mode.h" #include "base/task/task_traits.h" +#include "base/time/time.h" #include "components/performance_manager/graph/frame_node_impl.h" #include "components/performance_manager/graph/page_node_impl.h" #include "components/performance_manager/graph/process_node_impl.h" @@ -62,6 +68,104 @@ return content::GetUIThreadTaskRunner({kPmTaskPriority}); } +// A `TaskRunner` which runs callbacks synchronously when they're posted with no +// delay from the UI thread, or posts to the UI thread otherwise. +// +// Note: The UI thread `TaskRunner` is obtained from `GetUITaskRunner()` in each +// method called, rather than being cached in a member, to ensure that the +// correct `TaskRunner` is used across tests that run in the same process. +// `GetUIThreadTaskRunner()` is not known to be costly. +class TaskRunnerWithSynchronousRunOnUIThread + : public base::SequencedTaskRunner { + public: + static scoped_refptr<base::SequencedTaskRunner> GetInstance() { + static base::NoDestructor<scoped_refptr<base::SequencedTaskRunner>> + instance( + base::MakeRefCounted<TaskRunnerWithSynchronousRunOnUIThread>()); + return *instance; + } + + TaskRunnerWithSynchronousRunOnUIThread() = default; + + bool PostDelayedTask(const base::Location& from_here, + base::OnceClosure task, + base::TimeDelta delay) override { + auto task_runner = GetUITaskRunner(); + if (task_runner->RunsTasksInCurrentSequence() && delay.is_zero()) { + std::move(task).Run(); + return true; + } + return task_runner->PostDelayedTask(from_here, std::move(task), delay); + } + + bool PostNonNestableDelayedTask(const base::Location& from_here, + base::OnceClosure task, + base::TimeDelta delay) override { + auto task_runner = GetUITaskRunner(); + if (task_runner->RunsTasksInCurrentSequence() && delay.is_zero()) { + std::move(task).Run(); + return true; + } + return task_runner->PostNonNestableDelayedTask(from_here, std::move(task), + delay); + } + + base::DelayedTaskHandle PostCancelableDelayedTask( + base::subtle::PostDelayedTaskPassKey pass_key, + const base::Location& from_here, + base::OnceClosure task, + base::TimeDelta delay) override { + // There is no call to this method on the Performance Manager `TaskRunner`. + // + // All callers are annotated with `base::subtle::PostDelayedTaskPassKey`. In + // most cases, it's trivial to verify that they don't target this + // `TaskRunner`. To confirm that no calls are made via timers defined in + // base/timer/timer.cc, we manually verified that no `TaskRunner` obtained + // from `PerformanceManager(Impl)::GetTaskRunner()` is passed to + // `base::TimerBase::SetTaskRunner()`. + NOTREACHED_NORETURN(); + } + + base::DelayedTaskHandle PostCancelableDelayedTaskAt( + base::subtle::PostDelayedTaskPassKey pass_key, + const base::Location& from_here, + base::OnceClosure task, + base::TimeTicks delayed_run_time, + base::subtle::DelayPolicy delay_policy) override { + // There is no call to this method on the Performance Manager `TaskRunner`. + // + // See notes in `PostCancelableDelayedTask`. + NOTREACHED_NORETURN(); + } + + bool PostDelayedTaskAt(base::subtle::PostDelayedTaskPassKey pass_key, + const base::Location& from_here, + base::OnceClosure task, + base::TimeTicks delayed_run_time, + base::subtle::DelayPolicy delay_policy) override { + // There is no call to this method on the Performance Manager `TaskRunner`. + // + // See notes in `PostCancelableDelayedTask`. + NOTREACHED_NORETURN(); + } + + bool RunOrPostTask(base::subtle::RunOrPostTaskPassKey, + const base::Location& from_here, + base::OnceClosure task) override { + // There is no call to this method on the Performance Manager `TaskRunner`. + // The only call is in ipc/ipc_mojo_bootstrap.cc and it's trivial to verify + // that it doesn't target this `TaskRunner`. + NOTREACHED_NORETURN(); + } + + bool RunsTasksInCurrentSequence() const override { + return GetUITaskRunner()->RunsTasksInCurrentSequence(); + } + + private: + ~TaskRunnerWithSynchronousRunOnUIThread() override = default; +}; + } // namespace // static @@ -251,8 +355,7 @@ scoped_refptr<base::SequencedTaskRunner> PerformanceManagerImpl::GetTaskRunner() { if (base::FeatureList::IsEnabled(features::kRunOnMainThread)) { - CHECK(!base::FeatureList::IsEnabled( - features::kRunOnDedicatedThreadPoolThread)); + CHECK(!base::FeatureList::IsEnabled(features::kRunOnMainThreadSync)); // Used the cached runner, if available. This prevents doing repeated // lookups. if (g_performance_manager) @@ -266,15 +369,11 @@ // |g_performance_manager| while it was alive. return GetUITaskRunner(); } - if (base::FeatureList::IsEnabled(features::kRunOnDedicatedThreadPoolThread)) { - CHECK(!base::FeatureList::IsEnabled(features::kRunOnMainThread)); - // Use a dedicated thread so that all tasks on the PM sequence can be - // identified in traces. - static base::LazyThreadPoolSingleThreadTaskRunner task_runner = - LAZY_THREAD_POOL_SINGLE_THREAD_TASK_RUNNER_INITIALIZER( - kPMTaskTraits, base::SingleThreadTaskRunnerThreadMode::DEDICATED); - return task_runner.Get(); + + if (base::FeatureList::IsEnabled(features::kRunOnMainThreadSync)) { + return TaskRunnerWithSynchronousRunOnUIThread::GetInstance(); } + static base::LazyThreadPoolSequencedTaskRunner performance_manager_task_runner = LAZY_THREAD_POOL_SEQUENCED_TASK_RUNNER_INITIALIZER(kPMTaskTraits); @@ -398,11 +497,6 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!g_performance_manager); - if (base::FeatureList::IsEnabled(features::kRunOnDedicatedThreadPoolThread)) { - // This should be the first task that runs on the dedicated thread. - base::PlatformThread::SetName("Performance Manager"); - } - g_performance_manager = this; graph_.SetUp(); graph_.set_ukm_recorder(ukm::UkmRecorder::Get());
diff --git a/components/performance_manager/public/features.h b/components/performance_manager/public/features.h index 388ffb4..38c36152 100644 --- a/components/performance_manager/public/features.h +++ b/components/performance_manager/public/features.h
@@ -15,16 +15,16 @@ namespace performance_manager::features { -// If enabled the PM runs on the main (UI) thread. Incompatible with -// kRunOnDedicatedThreadPoolThread. +// If enabled the PM runs on the main (UI) thread. Cannot be enabled +// simultaneously with `kRunOnMainThreadSync`. BASE_DECLARE_FEATURE(kRunOnMainThread); -// If enabled the PM runs on a single ThreadPool thread that isn't shared with -// any other task runners. It will be named "Performance Manager" in traces. -// This makes it easy to identify tasks running on the PM sequence, but may not -// perform as well as a shared sequence, which is the default. Incompatible with -// kRunOnMainThread. -BASE_DECLARE_FEATURE(kRunOnDedicatedThreadPoolThread); +// If enabled, the PM runs on the main (UI) thread *and* tasks posted to the PM +// TaskRunner from the main (UI) thread run synchronously. Cannot be enabled +// simultaneously with `kRunOnMainThread`. This is a standalone feature rather +// than a param on `kRunOnMainThreadSync` because accessing the state of a +// `base::Feature` is faster than accessing the state of a `base::FeatureParam`. +BASE_DECLARE_FEATURE(kRunOnMainThreadSync); #if !BUILDFLAG(IS_ANDROID)
diff --git a/components/performance_manager/v8_memory/v8_memory_test_helpers.cc b/components/performance_manager/v8_memory/v8_memory_test_helpers.cc index 8e6b6ec..d4bc975 100644 --- a/components/performance_manager/v8_memory/v8_memory_test_helpers.cc +++ b/components/performance_manager/v8_memory/v8_memory_test_helpers.cc
@@ -178,7 +178,8 @@ void V8MemoryPerformanceManagerTestHarness::SetUp() { PerformanceManagerTestHarness::SetUp(); - if (!base::FeatureList::IsEnabled(features::kRunOnMainThread)) { + if (!base::FeatureList::IsEnabled(features::kRunOnMainThread) && + !base::FeatureList::IsEnabled(features::kRunOnMainThreadSync)) { // Precondition: CallOnGraph must run on a different sequence. Note that // all tasks passed to CallOnGraph will only run when run_loop.Run() is // called.
diff --git a/components/policy/resources/templates/policies.yaml b/components/policy/resources/templates/policies.yaml index d96623f..6ae9536 100644 --- a/components/policy/resources/templates/policies.yaml +++ b/components/policy/resources/templates/policies.yaml
@@ -1252,6 +1252,8 @@ 1251: GenAILocalFoundationalModelSettings 1252: DeviceExtensionsSystemLogEnabled 1253: ChromeDataRegionSetting + 1254: ContextualGoogleIntegrationsEnabled + 1255: ContextualGoogleIntegrationsConfiguration atomic_groups: 1: Homepage 2: RemoteAccess
diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/ContextualGoogleIntegrationsConfiguration.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/ContextualGoogleIntegrationsConfiguration.yaml new file mode 100644 index 0000000..02e9b9f --- /dev/null +++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/ContextualGoogleIntegrationsConfiguration.yaml
@@ -0,0 +1,47 @@ +caption: Contextual integrations of Google services on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> +desc: |- + Improve productivity by allowing information from Google apps and services to appear on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> system surfaces. + + An integration will be displayed if the associated Google service is turned on. + + When <ph name="CONTEXTUAL_GOOGLE_INTEGRATIONS_ENABLED">ContextualGoogleIntegrationsEnabled</ph> is Disabled, all services will be disabled, regardless the settings of this policy. + + When <ph name="CONTEXTUAL_GOOGLE_INTEGRATIONS_ENABLED">ContextualGoogleIntegrationsEnabled</ph> is Enabled or not set, services can be selected by this policy. + + If this policy is left unset, all services will be enabled. + + Otherwise, only selected services will be enabled. +example_value: +- GoogleCalendar +- GoogleClassroom +- GoogleTasks +features: + dynamic_refresh: true + per_profile: true +items: +# `GoogleCalendar` will eventually replace `CalendarIntegrationEnabled` policy. +- caption: <ph name="GOOGLE_CALENDAR_NAME">Google Calendar</ph> + name: GoogleCalendar + value: GoogleCalendar +# `GoogleClassroom` will not be immediately supported. +- caption: <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> + name: GoogleClassroom + value: GoogleClassroom +- caption: <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> + name: GoogleTasks + value: GoogleTasks +owners: +- amitrokhin@google.com +- file://ash/glanceables/OWNERS +schema: + items: + enum: + - GoogleCalendar + - GoogleClassroom + - GoogleTasks + type: string + type: array +future_on: +- chrome_os +tags: [] +type: string-enum-list
diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/ContextualGoogleIntegrationsEnabled.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/ContextualGoogleIntegrationsEnabled.yaml new file mode 100644 index 0000000..f53a9ade --- /dev/null +++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/ContextualGoogleIntegrationsEnabled.yaml
@@ -0,0 +1,26 @@ +caption: Contextual integrations of Google services on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> +default: true +desc: |- + Improve productivity by allowing information from Google apps and services to appear on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> system surfaces. + + If this policy is Enabled or left unset, the integrations selected in <ph name="CONTEXTUAL_GOOGLE_INTEGRATIONS_CONFIGURATION">ContextualGoogleIntegrationsConfiguration</ph> are enabled. + + If this policy is Disabled, all integrations are disabled. +example_value: true +features: + dynamic_refresh: true + per_profile: true +items: +- caption: Allow integrations + value: true +- caption: Disable integrations + value: false +owners: +- amitrokhin@google.com +- file://ash/glanceables/OWNERS +schema: + type: boolean +future_on: +- chrome_os +tags: [] +type: main
diff --git a/components/policy/test/data/pref_mapping/ContextualGoogleIntegrationsConfiguration.json b/components/policy/test/data/pref_mapping/ContextualGoogleIntegrationsConfiguration.json new file mode 100644 index 0000000..7387bd6 --- /dev/null +++ b/components/policy/test/data/pref_mapping/ContextualGoogleIntegrationsConfiguration.json
@@ -0,0 +1,203 @@ +[ + { + "os": [ + "chromeos_ash" + ], + "policy_pref_mapping_tests": [ + { + "note": "default", + "policies": {}, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "default_value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=default + invalid type", + "policies": { + "ContextualGoogleIntegrationsConfiguration": 123 + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "default_value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=false + invalid type", + "policies": { + "ContextualGoogleIntegrationsEnabled": false, + "ContextualGoogleIntegrationsConfiguration": 123 + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "default_value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=true + invalid type", + "policies": { + "ContextualGoogleIntegrationsEnabled": true, + "ContextualGoogleIntegrationsConfiguration": 123 + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "default_value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=default + invalid type of integration", + "policies": { + "ContextualGoogleIntegrationsConfiguration": [ + 123 + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=false + invalid type of integration", + "policies": { + "ContextualGoogleIntegrationsEnabled": false, + "ContextualGoogleIntegrationsConfiguration": [ + 123 + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=true + invalid type of integration", + "policies": { + "ContextualGoogleIntegrationsEnabled": true, + "ContextualGoogleIntegrationsConfiguration": [ + 123 + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=default + unknown integration", + "policies": { + "ContextualGoogleIntegrationsConfiguration": [ + "Unknown", + "GoogleTasks" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [ + "GoogleTasks" + ] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=false + unknown integration", + "policies": { + "ContextualGoogleIntegrationsEnabled": false, + "ContextualGoogleIntegrationsConfiguration": [ + "Unknown", + "GoogleTasks" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [] + } + } + }, + { + "note": "ContextualGoogleIntegrationsEnabled=true + unknown integration", + "policies": { + "ContextualGoogleIntegrationsEnabled": true, + "ContextualGoogleIntegrationsConfiguration": [ + "Unknown", + "GoogleTasks" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [ + "GoogleTasks" + ] + } + } + }, + { + "note": "GoogleCalendar only", + "policies": { + "ContextualGoogleIntegrationsConfiguration": [ + "GoogleCalendar" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [ + "GoogleCalendar" + ] + } + } + }, + { + "note": "GoogleClassroom only", + "policies": { + "ContextualGoogleIntegrationsConfiguration": [ + "GoogleClassroom" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [ + "GoogleClassroom" + ] + } + } + }, + { + "note": "GoogleTasks only", + "policies": { + "ContextualGoogleIntegrationsConfiguration": [ + "GoogleTasks" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [ + "GoogleTasks" + ] + } + } + } + ] + } +]
diff --git a/components/policy/test/data/pref_mapping/ContextualGoogleIntegrationsEnabled.json b/components/policy/test/data/pref_mapping/ContextualGoogleIntegrationsEnabled.json new file mode 100644 index 0000000..f094408 --- /dev/null +++ b/components/policy/test/data/pref_mapping/ContextualGoogleIntegrationsEnabled.json
@@ -0,0 +1,68 @@ +[ + { + "os": [ + "chromeos_ash" + ], + "policy_pref_mapping_tests": [ + { + "note": "default", + "policies": {}, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "default_value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + }, + { + "note": "invalid type", + "policies": { + "ContextualGoogleIntegrationsEnabled": 123 + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "default_value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + }, + { + "note": "false", + "policies": { + "ContextualGoogleIntegrationsEnabled": false + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [] + } + } + }, + { + "note": "true", + "policies": { + "ContextualGoogleIntegrationsEnabled": true, + "ContextualGoogleIntegrationsConfiguration": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + }, + "prefs": { + "ash.contextual_google_integrations_configuration": { + "value": [ + "GoogleCalendar", + "GoogleClassroom", + "GoogleTasks" + ] + } + } + } + ] + } +]
diff --git a/components/search_engines/template_url_starter_pack_data.cc b/components/search_engines/template_url_starter_pack_data.cc index 5ce1f56..0620e03f 100644 --- a/components/search_engines/template_url_starter_pack_data.cc +++ b/components/search_engines/template_url_starter_pack_data.cc
@@ -14,7 +14,7 @@ namespace TemplateURLStarterPackData { // Update this whenever a change is made to any starter pack data. -const int kCurrentDataVersion = 8; +const int kCurrentDataVersion = 9; // Only update this if there's an incompatible change that requires force // updating the user's starter pack data. This will overwrite any of the
diff --git a/components/segmentation_platform/public/android/input_context_android.cc b/components/segmentation_platform/public/android/input_context_android.cc index 18e20bb0..5951b45 100644 --- a/components/segmentation_platform/public/android/input_context_android.cc +++ b/components/segmentation_platform/public/android/input_context_android.cc
@@ -59,6 +59,14 @@ } } +void JavaGURLArrayToGURLVector( + JNIEnv* env, + const base::android::JavaRef<jobjectArray>& j_gurls, + std::vector<GURL>* ret) { + *ret = jni_zero::ConvertArray<std::vector<GURL>>::FromJniType<jobject>( + env, j_gurls); +} + static void JavaLongArrayToBaseTimeVector( JNIEnv* env, const base::android::JavaRef<jlongArray>& java_values, @@ -127,7 +135,7 @@ ConvertAndAddToInputContext(env, input_context, jint64_keys, jint64_values, base::android::JavaLongArrayToInt64Vector); ConvertAndAddToInputContext(env, input_context, jurl_keys, jurl_values, - url::GURLAndroid::JavaGURLArrayToGURLVector); + JavaGURLArrayToGURLVector); } static void JNI_InputContext_FillNative(
diff --git a/components/subresource_filter/android/java/src/org/chromium/components/subresource_filter/AdsBlockedDialogTest.java b/components/subresource_filter/android/java/src/org/chromium/components/subresource_filter/AdsBlockedDialogTest.java index 05063b9..21785bb9 100644 --- a/components/subresource_filter/android/java/src/org/chromium/components/subresource_filter/AdsBlockedDialogTest.java +++ b/components/subresource_filter/android/java/src/org/chromium/components/subresource_filter/AdsBlockedDialogTest.java
@@ -123,8 +123,7 @@ createAndShowDialog(false); ModalDialogProperties.Controller dialogController = mModalDialogModel.get(ModalDialogProperties.CONTROLLER); - dialogController.onDismiss( - mModalDialogModel, DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE); + dialogController.onDismiss(mModalDialogModel, DialogDismissalCause.NAVIGATE_BACK); Mockito.verify(mDialogHandler).removeCallbacksAndMessages(null); Mockito.verify(mNativeMock).onDismissed(anyLong()); }
diff --git a/components/test/data/viz/unit_tests_bundle_data.filelist b/components/test/data/viz/unit_tests_bundle_data.filelist index 316ef0c..d33b805 100644 --- a/components/test/data/viz/unit_tests_bundle_data.filelist +++ b/components/test/data/viz/unit_tests_bundle_data.filelist
@@ -291,8 +291,12 @@ //components/test/data/viz/yuv_stripes.png //components/test/data/viz/yuv_stripes_alpha.png //components/test/data/viz/yuv_stripes_clipped.png +//components/test/data/viz/yuv_stripes_fcc_limited.png +//components/test/data/viz/yuv_stripes_gbr_limited.png //components/test/data/viz/yuv_stripes_offset.png +//components/test/data/viz/yuv_stripes_smpte240m_limited.png //components/test/data/viz/yuv_stripes_ycocg_limited.png +//components/test/data/viz/yuv_stripes_ydzdx_limited.png //components/test/data/viz/zoom_filter_skia_gl.png //components/test/data/viz/zoom_filter_skia_graphite.png //components/test/data/viz/zoom_filter_skia_vk.png
diff --git a/components/test/data/viz/yuv_stripes_fcc_limited.png b/components/test/data/viz/yuv_stripes_fcc_limited.png new file mode 100644 index 0000000..1dde60b --- /dev/null +++ b/components/test/data/viz/yuv_stripes_fcc_limited.png Binary files differ
diff --git a/components/test/data/viz/yuv_stripes_gbr_limited.png b/components/test/data/viz/yuv_stripes_gbr_limited.png new file mode 100644 index 0000000..15be500f --- /dev/null +++ b/components/test/data/viz/yuv_stripes_gbr_limited.png Binary files differ
diff --git a/components/test/data/viz/yuv_stripes_smpte240m_limited.png b/components/test/data/viz/yuv_stripes_smpte240m_limited.png new file mode 100644 index 0000000..cfff1160 --- /dev/null +++ b/components/test/data/viz/yuv_stripes_smpte240m_limited.png Binary files differ
diff --git a/components/test/data/viz/yuv_stripes_ycocg_limited.png b/components/test/data/viz/yuv_stripes_ycocg_limited.png index 8da0793..1ea531f8 100644 --- a/components/test/data/viz/yuv_stripes_ycocg_limited.png +++ b/components/test/data/viz/yuv_stripes_ycocg_limited.png Binary files differ
diff --git a/components/test/data/viz/yuv_stripes_ydzdx_limited.png b/components/test/data/viz/yuv_stripes_ydzdx_limited.png new file mode 100644 index 0000000..11b6348 --- /dev/null +++ b/components/test/data/viz/yuv_stripes_ydzdx_limited.png Binary files differ
diff --git a/components/trusted_vault/standalone_trusted_vault_backend_unittest.cc b/components/trusted_vault/standalone_trusted_vault_backend_unittest.cc index b5eddc7..daacb7f 100644 --- a/components/trusted_vault/standalone_trusted_vault_backend_unittest.cc +++ b/components/trusted_vault/standalone_trusted_vault_backend_unittest.cc
@@ -229,7 +229,6 @@ void ResetBackend() { auto delegate = std::make_unique<testing::NiceMock<MockDelegate>>(); - delegate_ = delegate.get(); auto connection = std::make_unique<testing::NiceMock<MockTrustedVaultConnection>>(); @@ -342,12 +341,10 @@ private: base::ScopedTempDir temp_dir_; const base::FilePath file_path_; - raw_ptr<testing::NiceMock<MockDelegate>, DanglingUntriaged> delegate_ = - nullptr; - raw_ptr<testing::NiceMock<MockTrustedVaultConnection>, DanglingUntriaged> - connection_ = nullptr; base::SimpleTestClock clock_; scoped_refptr<StandaloneTrustedVaultBackend> backend_; + raw_ptr<testing::NiceMock<MockTrustedVaultConnection>> connection_ = nullptr; + std::unique_ptr<FakeRecoveryKeyProvider> recovery_key_provider_holder_; raw_ptr<testing::NiceMock<MockRecoveryKeyStoreConnection>> recovery_key_store_connection_ = nullptr;
diff --git a/components/user_manager/user.cc b/components/user_manager/user.cc index 8163865..18993f9 100644 --- a/components/user_manager/user.cc +++ b/components/user_manager/user.cc
@@ -130,10 +130,6 @@ return TypeHasGaiaAccount(GetType()); } -bool User::IsActiveDirectoryUser() const { - return false; -} - bool User::IsChild() const { return GetType() == UserType::kChild; }
diff --git a/components/user_manager/user.h b/components/user_manager/user.h index 2548ac1..2ba36c5 100644 --- a/components/user_manager/user.h +++ b/components/user_manager/user.h
@@ -103,9 +103,6 @@ // UserType::kRegular and UserType::kChild. bool HasGaiaAccount() const; - // Returns true if it's Active Directory user. - bool IsActiveDirectoryUser() const; - // Returns true if user is child. bool IsChild() const;
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc index 5db93af..be0a5c65 100644 --- a/components/user_manager/user_manager_base.cc +++ b/components/user_manager/user_manager_base.cc
@@ -887,8 +887,9 @@ bool UserManagerBase::CanUserBeRemoved(const User* user) const { // Only regular users are allowed to be manually removed. - if (!user || !(user->HasGaiaAccount() || user->IsActiveDirectoryUser())) + if (!user || !user->HasGaiaAccount()) { return false; + } // Sanity check: we must not remove single user unless it's an enterprise // device. This check may seem redundant at a first sight because @@ -1271,7 +1272,7 @@ user = *it; it = users_.erase(it); } else { - if ((*it)->HasGaiaAccount() || (*it)->IsActiveDirectoryUser()) { + if ((*it)->HasGaiaAccount()) { const std::string user_email = (*it)->GetAccountId().GetUserEmail(); prefs_users_update->Append(user_email); }
diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc index c73b3c2..1036b786 100644 --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc
@@ -226,12 +226,6 @@ "PendingFrames", 2}; #endif -// Allow SkiaRenderer to skip drawing render passes that contain a single -// RenderPassDrawQuad. -BASE_FEATURE(kAllowBypassRenderPassQuads, - "AllowBypassRenderPassQuads", - base::FEATURE_ENABLED_BY_DEFAULT); - BASE_FEATURE(kAllowUndamagedNonrootRenderPassToSkip, "AllowUndamagedNonrootRenderPassToSkip", base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/components/viz/common/features.h b/components/viz/common/features.h index e9fd6d82..de5c3a0 100644 --- a/components/viz/common/features.h +++ b/components/viz/common/features.h
@@ -66,7 +66,6 @@ #endif VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kDrawPredictedInkPoint); -VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kAllowBypassRenderPassQuads); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kAllowUndamagedNonrootRenderPassToSkip); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE( kAllowForceMergeRenderPassWithRequireOverlayQuads);
diff --git a/components/viz/common/gpu/context_lost_reason.h b/components/viz/common/gpu/context_lost_reason.h index 1e3b2257..16e067a 100644 --- a/components/viz/common/gpu/context_lost_reason.h +++ b/components/viz/common/gpu/context_lost_reason.h
@@ -28,7 +28,7 @@ CONTEXT_LOST_INVALID_GPU_MESSAGE = 12, // SkiaRenderer marked context as lost because of failed Reshape call CONTEXT_LOST_RESHAPE_FAILED = 13, - CONTEXT_LOST_SET_DRAW_RECTANGLE_FAILED = 14, + CONTEXT_LOST_SET_DRAW_RECTANGLE_FAILED [[deprecated]] = 14, CONTEXT_LOST_DIRECT_COMPOSITION_OVERLAY_FAILED = 15, CONTEXT_LOST_SWAP_FAILED = 16, CONTEXT_LOST_BEGIN_PAINT_FAILED = 17,
diff --git a/components/viz/service/display/direct_renderer.cc b/components/viz/service/display/direct_renderer.cc index 4cc3eb3..01ec8d0c 100644 --- a/components/viz/service/display/direct_renderer.cc +++ b/components/viz/service/display/direct_renderer.cc
@@ -834,8 +834,6 @@ // BindFramebufferToTexture(). if (is_root && !output_surface_->capabilities().renderer_allocates_images) { BindFramebufferToOutputSurface(); - if (output_surface_->capabilities().supports_dc_layers) - output_surface_->SetDrawRectangle(current_frame()->root_damage_rect); InitializeViewport(current_frame(), render_pass->output_rect, gfx::Rect(current_frame()->device_viewport_size), current_frame()->device_viewport_size);
diff --git a/components/viz/service/display/output_surface.cc b/components/viz/service/display/output_surface.cc index 2cdfafd..2883816 100644 --- a/components/viz/service/display/output_surface.cc +++ b/components/viz/service/display/output_surface.cc
@@ -35,14 +35,6 @@ OutputSurface::~OutputSurface() = default; -void OutputSurface::SetDrawRectangle(const gfx::Rect& rect) { - NOTREACHED(); -} - -void OutputSurface::SetEnableDCLayers(bool enabled) { - NOTREACHED(); -} - gfx::Rect OutputSurface::GetCurrentFramebufferDamage() const { return gfx::Rect(); }
diff --git a/components/viz/service/display/output_surface.h b/components/viz/service/display/output_surface.h index 57741991..cb26e7b1 100644 --- a/components/viz/service/display/output_surface.h +++ b/components/viz/service/display/output_surface.h
@@ -185,20 +185,6 @@ virtual void EnsureBackbuffer() = 0; virtual void DiscardBackbuffer() = 0; - // Marks that the given rectangle will be drawn to on the default, bound - // framebuffer. The contents of the framebuffer are undefined after this - // command and must be filled in completely before a swap happens. Drawing - // outside this rectangle causes undefined behavior. - // - // Note: This is only valid to call if `capabilities().supports_dc_layers` is - // true. It can only be called once per swap and must be called before - // drawing to the default framebuffer. - virtual void SetDrawRectangle(const gfx::Rect& rect); - - // Enable or disable DC layers. Must be called before DC layers are scheduled. - // Only valid if |capabilities().supports_dc_layers| is true. - virtual void SetEnableDCLayers(bool enabled); - // Returns true if a main image overlay plane should be scheduled. virtual bool IsDisplayedAsOverlayPlane() const = 0;
diff --git a/components/viz/service/display/renderer_pixeltest.cc b/components/viz/service/display/renderer_pixeltest.cc index 0ec4cf50..be33ba59 100644 --- a/components/viz/service/display/renderer_pixeltest.cc +++ b/components/viz/service/display/renderer_pixeltest.cc
@@ -2490,7 +2490,64 @@ .SetAbsErrorLimit(2))); } -TEST_P(VideoRendererPixelHiLoTest, SimpleYCoCgYUVRect) { +class VideoRendererPixelHiLoColorSpaceTest + : public VideoRendererPixelTestBase, + public testing::WithParamInterface<std::tuple<bool, gfx::ColorSpace>> { + public: + VideoRendererPixelHiLoColorSpaceTest() + : VideoRendererPixelTestBase(RendererType::kSkiaGL) {} + + bool IsHighbit() const { return std::get<0>(GetParam()); } + gfx::ColorSpace GetColorSpace() const { return std::get<1>(GetParam()); } + const std::string GetName() const { + auto cs = GetColorSpace(); + switch (cs.GetMatrixID()) { + case gfx::ColorSpace::MatrixID::FCC: + return "_fcc_limited"; + case gfx::ColorSpace::MatrixID::YCOCG: + return "_ycocg_limited"; + case gfx::ColorSpace::MatrixID::SMPTE240M: + return "_smpte240m_limited"; + case gfx::ColorSpace::MatrixID::YDZDX: + return "_ydzdx_limited"; + case gfx::ColorSpace::MatrixID::GBR: + return "_gbr_limited"; + default: + NOTREACHED(); + } + return ""; + } +}; + +gfx::ColorSpace yuv_color_spaces[] = { + gfx::ColorSpace(gfx::ColorSpace::PrimaryID::SMPTE170M, + gfx::ColorSpace::TransferID::SMPTE170M, + gfx::ColorSpace::MatrixID::YCOCG, + gfx::ColorSpace::RangeID::LIMITED), + gfx::ColorSpace(gfx::ColorSpace::PrimaryID::SMPTE170M, + gfx::ColorSpace::TransferID::SMPTE170M, + gfx::ColorSpace::MatrixID::FCC, + gfx::ColorSpace::RangeID::LIMITED), + gfx::ColorSpace(gfx::ColorSpace::PrimaryID::SMPTE170M, + gfx::ColorSpace::TransferID::SMPTE170M, + gfx::ColorSpace::MatrixID::SMPTE240M, + gfx::ColorSpace::RangeID::LIMITED), + gfx::ColorSpace(gfx::ColorSpace::PrimaryID::SMPTE170M, + gfx::ColorSpace::TransferID::SMPTE170M, + gfx::ColorSpace::MatrixID::YDZDX, + gfx::ColorSpace::RangeID::LIMITED), + gfx::ColorSpace(gfx::ColorSpace::PrimaryID::SMPTE170M, + gfx::ColorSpace::TransferID::SMPTE170M, + gfx::ColorSpace::MatrixID::GBR, + gfx::ColorSpace::RangeID::LIMITED), +}; + +INSTANTIATE_TEST_SUITE_P(, + VideoRendererPixelHiLoColorSpaceTest, + testing::Combine(testing::Bool(), + testing::ValuesIn(yuv_color_spaces))); + +TEST_P(VideoRendererPixelHiLoColorSpaceTest, SimpleYUVRect) { gfx::Rect rect(this->device_viewport_size_); CompositorRenderPassId id{1}; @@ -2499,12 +2556,8 @@ this->display_color_spaces_ = kRec601DisplayColorSpaces; CreateTestMultiplanarVideoDrawQuad_Striped( - media::PIXEL_FORMAT_I420, - gfx::ColorSpace(gfx::ColorSpace::PrimaryID::SMPTE170M, - gfx::ColorSpace::TransferID::SMPTE170M, - gfx::ColorSpace::MatrixID::YCOCG, - gfx::ColorSpace::RangeID::LIMITED), - false, IsHighbit(), gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), pass.get(), + media::PIXEL_FORMAT_I420, GetColorSpace(), false, IsHighbit(), + gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), pass.get(), this->video_resource_updater_.get(), rect, rect, this->resource_provider_.get(), this->child_resource_provider_.get(), this->child_context_provider_.get()); @@ -2516,16 +2569,17 @@ AggregatedRenderPassList pass_list; pass_list.push_back(std::move(copy_pass)); + base::FilePath expected_result = + base::FilePath(FILE_PATH_LITERAL("yuv_stripes.png")); + expected_result = expected_result.InsertBeforeExtensionASCII(GetName()); // TODO(crbug.com/1465939): Remove error relaxations once software pixel // upload support lands for Windows for multiplanar SI. - EXPECT_TRUE(this->RunPixelTest( - &pass_list, - base::FilePath(FILE_PATH_LITERAL("yuv_stripes_ycocg_limited.png")), - cc::FuzzyPixelComparator() - .DiscardAlpha() - .SetErrorPixelsPercentageLimit(100.f) - .SetAvgAbsErrorLimit(1.0f) - .SetAbsErrorLimit(2))); + EXPECT_TRUE(this->RunPixelTest(&pass_list, expected_result, + cc::FuzzyPixelComparator() + .DiscardAlpha() + .SetErrorPixelsPercentageLimit(100.f) + .SetAvgAbsErrorLimit(1.0f) + .SetAbsErrorLimit(2))); } #if BUILDFLAG(IS_IOS)
diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc index 558ed93e..757e5e2a 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc
@@ -1989,18 +1989,6 @@ const DrawQuad* SkiaRenderer::CanPassBeDrawnDirectly( const AggregatedRenderPass* pass) { - bool is_directly_drawable_with_single_rpdq = false; - const auto* draw_quad = CanPassBeDrawnDirectlyInternal( - pass, &is_directly_drawable_with_single_rpdq); - UMA_HISTOGRAM_BOOLEAN( - "Compositing.SkiaRenderer.DirectlyDrawableRenderPassWithRPDQ", - is_directly_drawable_with_single_rpdq); - return draw_quad; -} - -const DrawQuad* SkiaRenderer::CanPassBeDrawnDirectlyInternal( - const AggregatedRenderPass* pass, - bool* is_directly_drawable_with_single_rpdq) { // If render pass bypassing is disabled for testing if (settings_->disable_render_pass_bypassing) return nullptr; @@ -2105,12 +2093,6 @@ !nested_render_pass->backdrop_filters.IsEmpty()) { return nullptr; } - - *is_directly_drawable_with_single_rpdq = true; - - if (!base::FeatureList::IsEnabled(features::kAllowBypassRenderPassQuads)) { - return nullptr; - } } // The quad type knows how to apply RPDQ filters, and the quad settings can
diff --git a/components/viz/service/display/skia_renderer.h b/components/viz/service/display/skia_renderer.h index 060a198..087513b 100644 --- a/components/viz/service/display/skia_renderer.h +++ b/components/viz/service/display/skia_renderer.h
@@ -264,10 +264,6 @@ const DrawQuad* CanPassBeDrawnDirectly( const AggregatedRenderPass* pass) override; - const DrawQuad* CanPassBeDrawnDirectlyInternal( - const AggregatedRenderPass* pass, - bool* is_directly_drawable_with_single_rpdq); - void DrawDelegatedInkTrail() override; // Get a color filter that converts from |src| color space to |dst| color
diff --git a/components/viz/service/display_embedder/skia_output_device.cc b/components/viz/service/display_embedder/skia_output_device.cc index 22d3222..2b9848d 100644 --- a/components/viz/service/display_embedder/skia_output_device.cc +++ b/components/viz/service/display_embedder/skia_output_device.cc
@@ -178,15 +178,6 @@ return false; } -bool SkiaOutputDevice::SetDrawRectangle(const gfx::Rect& draw_rectangle) { - NOTREACHED(); - return false; -} - -void SkiaOutputDevice::SetEnableDCLayers(bool enable) { - NOTREACHED(); -} - bool SkiaOutputDevice::IsPrimaryPlaneOverlay() const { return false; }
diff --git a/components/viz/service/display_embedder/skia_output_device.h b/components/viz/service/display_embedder/skia_output_device.h index 790ec19..3ae9bcf 100644 --- a/components/viz/service/display_embedder/skia_output_device.h +++ b/components/viz/service/display_embedder/skia_output_device.h
@@ -151,12 +151,6 @@ OutputSurfaceFrame frame) = 0; virtual bool EnsureMinNumberOfBuffers(size_t n); - // Set the rectangle that will be drawn into on the surface. - virtual bool SetDrawRectangle(const gfx::Rect& draw_rectangle); - - // Enable or disable DC layers. Must be called before DC layers are scheduled. - virtual void SetEnableDCLayers(bool enabled); - virtual void SetVSyncDisplayID(int64_t display_id) {} // Whether the output device's primary plane is an overlay. This returns true
diff --git a/components/viz/service/display_embedder/skia_output_device_dcomp.cc b/components/viz/service/display_embedder/skia_output_device_dcomp.cc index 2c360b7..cc034cd 100644 --- a/components/viz/service/display_embedder/skia_output_device_dcomp.cc +++ b/components/viz/service/display_embedder/skia_output_device_dcomp.cc
@@ -337,8 +337,8 @@ OutputSurfaceFrame frame) { StartSwapBuffers({}); - // The |update_rect| is ignored because SetDrawRectangle specified the area to - // be swapped. + // The |update_rect| is ignored because the SharedImage backing already + // knows the area to be swapped. presenter_->Present( base::BindOnce(&SkiaOutputDeviceDComp::OnPresentFinished, weak_ptr_factory_.GetWeakPtr(), std::move(frame), size_), @@ -510,10 +510,6 @@ return true; } -bool SkiaOutputDeviceDComp::SetDrawRectangle(const gfx::Rect& draw_rectangle) { - return presenter_->SetDrawRectangle(draw_rectangle); -} - SkSurface* SkiaOutputDeviceDComp::BeginPaint( std::vector<GrBackendSemaphore>* end_semaphores) { NOTIMPLEMENTED();
diff --git a/components/viz/service/display_embedder/skia_output_device_dcomp.h b/components/viz/service/display_embedder/skia_output_device_dcomp.h index a1b658f..23d6246 100644 --- a/components/viz/service/display_embedder/skia_output_device_dcomp.h +++ b/components/viz/service/display_embedder/skia_output_device_dcomp.h
@@ -72,7 +72,6 @@ int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; - bool SetDrawRectangle(const gfx::Rect& draw_rectangle) override; SkSurface* BeginPaint( std::vector<GrBackendSemaphore>* end_semaphores) override; void EndPaint() override;
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.cc b/components/viz/service/display_embedder/skia_output_surface_impl.cc index 764daa9f..8c0fb63 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl.cc +++ b/components/viz/service/display_embedder/skia_output_surface_impl.cc
@@ -335,30 +335,6 @@ client_ = client; } -void SkiaOutputSurfaceImpl::SetDrawRectangle(const gfx::Rect& draw_rectangle) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(capabilities().supports_dc_layers); - - if (has_set_draw_rectangle_for_frame_) - return; - - // TODO(kylechar): Add a check that |draw_rectangle| is the full size of the - // framebuffer the next time this is called after Reshape(). - - draw_rectangle_.emplace(draw_rectangle); - has_set_draw_rectangle_for_frame_ = true; -} - -void SkiaOutputSurfaceImpl::SetEnableDCLayers(bool enable) { - DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - DCHECK(capabilities().supports_dc_layers); - - auto task = base::BindOnce(&SkiaOutputSurfaceImplOnGpu::SetEnableDCLayers, - base::Unretained(impl_on_gpu_.get()), enable); - EnqueueGpuTask(std::move(task), {}, /*make_current=*/true, - /*need_framebuffer=*/false); -} - void SkiaOutputSurfaceImpl::EnsureBackbuffer() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); // impl_on_gpu_ is released on the GPU thread by a posted task from @@ -407,9 +383,6 @@ sk_color_space_ = params.color_space.ToSkColorSpace(); - // SetDrawRectangle() will need to be called at the new size. - has_set_draw_rectangle_for_frame_ = false; - if (use_damage_area_from_skia_output_device_) { damage_of_current_buffer_ = gfx::Rect(size_); } else if (frame_buffer_damage_tracker_) { @@ -772,8 +745,6 @@ ((!frame.sub_buffer_rect || !frame.sub_buffer_rect->IsEmpty()) == current_buffer_modified_)); - has_set_draw_rectangle_for_frame_ = false; - // If current_buffer_modified_ is false, it means SkiaRenderer doesn't draw // anything for current frame. So this SwapBuffer() must be a empty swap, so // the previous buffer will be used for this frame. @@ -970,16 +941,14 @@ if (current_paint_->mailbox().IsZero()) { // Draw on the root render pass. current_buffer_modified_ = true; - auto task = - base::BindOnce(&SkiaOutputSurfaceImplOnGpu::FinishPaintCurrentFrame, - base::Unretained(impl_on_gpu_.get()), std::move(ddl), - std::move(overdraw_ddl), std::move(graphite_recording), - std::move(images_in_current_paint_), - resource_sync_tokens_, std::move(on_finished), - std::move(return_release_fence_cb), draw_rectangle_); + auto task = base::BindOnce( + &SkiaOutputSurfaceImplOnGpu::FinishPaintCurrentFrame, + base::Unretained(impl_on_gpu_.get()), std::move(ddl), + std::move(overdraw_ddl), std::move(graphite_recording), + std::move(images_in_current_paint_), resource_sync_tokens_, + std::move(on_finished), std::move(return_release_fence_cb)); EnqueueGpuTask(std::move(task), std::move(resource_sync_tokens_), /*make_current=*/true, /*need_framebuffer=*/true); - draw_rectangle_.reset(); } else { auto task = base::BindOnce( &SkiaOutputSurfaceImplOnGpu::FinishPaintRenderPass,
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.h b/components/viz/service/display_embedder/skia_output_surface_impl.h index 8c99839..227fafdc 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl.h +++ b/components/viz/service/display_embedder/skia_output_surface_impl.h
@@ -92,8 +92,6 @@ // OutputSurface implementation: gpu::SurfaceHandle GetSurfaceHandle() const override; void BindToClient(OutputSurfaceClient* client) override; - void SetDrawRectangle(const gfx::Rect& draw_rectangle) override; - void SetEnableDCLayers(bool enable) override; void EnsureBackbuffer() override; void DiscardBackbuffer() override; void Reshape(const ReshapeParams& params) override; @@ -440,9 +438,6 @@ skgpu::graphite::Volatile graphite_use_volatile_promise_images_ = skgpu::graphite::Volatile::kYes; - bool has_set_draw_rectangle_for_frame_ = false; - std::optional<gfx::Rect> draw_rectangle_; - bool should_measure_next_post_task_ = false; // GPU tasks pending for flush.
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc index af9131a..7c303ee 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc +++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
@@ -467,8 +467,7 @@ std::vector<raw_ptr<ImageContextImpl, VectorExperimental>> image_contexts, std::vector<gpu::SyncToken> sync_tokens, base::OnceClosure on_finished, - base::OnceCallback<void(gfx::GpuFenceHandle)> return_release_fence_cb, - std::optional<gfx::Rect> draw_rectangle) { + base::OnceCallback<void(gfx::GpuFenceHandle)> return_release_fence_cb) { TRACE_EVENT0("viz", "SkiaOutputSurfaceImplOnGpu::FinishPaintCurrentFrame"); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(!scoped_output_device_paint_); @@ -482,14 +481,6 @@ return; } - if (draw_rectangle) { - if (!output_device_->SetDrawRectangle(*draw_rectangle)) { - MarkContextLost( - ContextLostReason::CONTEXT_LOST_SET_DRAW_RECTANGLE_FAILED); - return; - } - } - // We do not reset scoped_output_device_paint_ after drawing the ddl until // SwapBuffers() is called, because we may need access to output_sk_surface() // for CopyOutput(). @@ -2043,13 +2034,6 @@ overlays_ = std::move(overlays); } -void SkiaOutputSurfaceImplOnGpu::SetEnableDCLayers(bool enable) { - if (context_is_lost_) { - return; - } - output_device_->SetEnableDCLayers(enable); -} - void SkiaOutputSurfaceImplOnGpu::SetVSyncDisplayID(int64_t display_id) { output_device_->SetVSyncDisplayID(display_id); } @@ -2466,12 +2450,6 @@ } if (frame) { - if (gl_surface_) { - if (frame->delegated_ink_metadata) { - gl_surface_->SetDelegatedInkTrailStartPoint( - std::move(frame->delegated_ink_metadata)); - } - } if (presenter_) { presenter_->SetChoreographerVsyncIdForNextFrame( frame->choreographer_vsync_id); @@ -2738,16 +2716,12 @@ void SkiaOutputSurfaceImplOnGpu::InitDelegatedInkPointRendererReceiver( mojo::PendingReceiver<gfx::mojom::DelegatedInkPointRenderer> pending_receiver) { - if (gl_surface_) { - DCHECK(!presenter_); - gl_surface_->InitDelegatedInkPointRendererReceiver( - std::move(pending_receiver)); - } else if (presenter_) { #if BUILDFLAG(IS_WIN) + if (presenter_) { presenter_->InitDelegatedInkPointRendererReceiver( std::move(pending_receiver)); -#endif } +#endif } const scoped_refptr<AsyncReadResultLock>
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h index 4d89450..3f1d407f 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h +++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
@@ -167,8 +167,7 @@ std::vector<raw_ptr<ImageContextImpl, VectorExperimental>> image_contexts, std::vector<gpu::SyncToken> sync_tokens, base::OnceClosure on_finished, - base::OnceCallback<void(gfx::GpuFenceHandle)> return_release_fence_cb, - std::optional<gfx::Rect> draw_rectangle); + base::OnceCallback<void(gfx::GpuFenceHandle)> return_release_fence_cb); void ScheduleOutputSurfaceAsOverlay( const OverlayProcessorInterface::OutputSurfaceOverlayPlane& output_surface_plane); @@ -223,10 +222,6 @@ image_contexts); void ScheduleOverlays(SkiaOutputSurface::OverlayList overlays); - void SetEnableDCLayers(bool enable); - - void SetGpuVSyncEnabled(bool enabled); - void SetVSyncDisplayID(int64_t display_id); void SetFrameRate(float frame_rate);
diff --git a/components/viz/test/fake_output_surface.cc b/components/viz/test/fake_output_surface.cc index 1bc97d1..ee6a8ad 100644 --- a/components/viz/test/fake_output_surface.cc +++ b/components/viz/test/fake_output_surface.cc
@@ -52,14 +52,6 @@ client_->DidReceivePresentationFeedback({now, base::TimeDelta(), 0}); } -void FakeSoftwareOutputSurface::SetDrawRectangle(const gfx::Rect& rect) { - NOTREACHED(); -} - -void FakeSoftwareOutputSurface::SetEnableDCLayers(bool enabled) { - NOTREACHED(); -} - void FakeSoftwareOutputSurface::BindToClient(OutputSurfaceClient* client) { DCHECK(client); DCHECK(!client_);
diff --git a/components/viz/test/fake_output_surface.h b/components/viz/test/fake_output_surface.h index d2aa023..235e46559 100644 --- a/components/viz/test/fake_output_surface.h +++ b/components/viz/test/fake_output_surface.h
@@ -37,8 +37,6 @@ void BindToClient(OutputSurfaceClient* client) override; void EnsureBackbuffer() override {} void DiscardBackbuffer() override {} - void SetDrawRectangle(const gfx::Rect& rect) override; - void SetEnableDCLayers(bool enabled) override; void Reshape(const ReshapeParams& params) override; void SwapBuffers(OutputSurfaceFrame frame) override; bool IsDisplayedAsOverlayPlane() const override;
diff --git a/components/viz/test/fake_skia_output_surface.h b/components/viz/test/fake_skia_output_surface.h index 497e0df..2f674b4 100644 --- a/components/viz/test/fake_skia_output_surface.h +++ b/components/viz/test/fake_skia_output_surface.h
@@ -99,9 +99,6 @@ std::vector<AggregatedRenderPassId> ids) override; void ScheduleOverlays(OverlayList overlays, std::vector<gpu::SyncToken> sync_tokens) override {} -#if BUILDFLAG(IS_WIN) - void SetEnableDCLayers(bool enable) override {} -#endif void CopyOutput(const copy_output::RenderPassGeometry& geometry, const gfx::ColorSpace& color_space, std::unique_ptr<CopyOutputRequest> request,
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc index ed4f59b..aa7eaec 100644 --- a/content/browser/accessibility/browser_accessibility_manager.cc +++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -34,7 +34,7 @@ #if defined(AX_FAIL_FAST_BUILD) #include "base/command_line.h" #include "content/public/browser/ax_inspect_factory.h" -#include "content/public/common/content_switches.h" +#include "ui/accessibility/accessibility_switches.h" #endif namespace content {
diff --git a/content/browser/accessibility/browser_accessibility_state_impl.cc b/content/browser/accessibility/browser_accessibility_state_impl.cc index 83ec1d82..b9d1978 100644 --- a/content/browser/accessibility/browser_accessibility_state_impl.cc +++ b/content/browser/accessibility/browser_accessibility_state_impl.cc
@@ -28,6 +28,7 @@ #include "content/public/browser/scoped_accessibility_mode.h" #include "content/public/common/content_switches.h" #include "ui/accessibility/accessibility_features.h" +#include "ui/accessibility/accessibility_switches.h" #include "ui/accessibility/ax_mode_histogram_logger.h" #include "ui/accessibility/platform/ax_platform_node.h" #include "ui/events/base_event_utils.h"
diff --git a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc index f444171..c86c221 100644 --- a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc +++ b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
@@ -2150,7 +2150,8 @@ #if defined(IS_FAST_BUILD) // Avoid flakiness on slower debug/sanitizer builds. // TODO(crbug.com/1466360): Enable once thread flakiness is resolved. -#if BUILDFLAG(IS_LINUX) +// TODO(crbug.com/332652840): It is flaky with SkiaGraphite enabled on Windows. +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #define MAYBE_NonInteractiveChangesAreBatched \ DISABLED_NonInteractiveChangesAreBatched #else
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.cc b/content/browser/accessibility/dump_accessibility_browsertest_base.cc index a0e94a9..7ef6b12d 100644 --- a/content/browser/accessibility/dump_accessibility_browsertest_base.cc +++ b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
@@ -227,10 +227,14 @@ std::vector<base::test::FeatureRef>* enabled_features, std::vector<base::test::FeatureRef>* disabled_features) { // For the best test coverage during development of this feature, enable the - // code that expposes document markers on AXInlineTextBox objects and the + // code that exposes document markers on AXInlineTextBox objects and the // corresponding code in AXPosition on the browser that collects those // markers. enabled_features->emplace_back(features::kUseAXPositionForDocumentMarkers); + // For improved test coverage ahead of a finch trial, enable the feature that + // prunes redundant text for inline text boxes. + enabled_features->emplace_back( + features::kAccessibilityPruneRedundantInlineText); } std::string DumpAccessibilityTestBase::DumpTreeAsString() const {
diff --git a/content/browser/blob_storage/blob_internals_url_loader.cc b/content/browser/blob_storage/blob_internals_url_loader.cc index f0b4236..1e8460b7 100644 --- a/content/browser/blob_storage/blob_internals_url_loader.cc +++ b/content/browser/blob_storage/blob_internals_url_loader.cc
@@ -34,7 +34,7 @@ MOJO_RESULT_OK); void* buffer = nullptr; - uint32_t num_bytes = output.size(); + size_t num_bytes = output.size(); MojoResult result = producer_handle->BeginWriteData( &buffer, &num_bytes, MOJO_BEGIN_WRITE_DATA_FLAG_ALL_OR_NONE); CHECK_EQ(result, MOJO_RESULT_OK);
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc index 07476880..c8c0cad 100644 --- a/content/browser/cache_storage/cache_storage_manager_unittest.cc +++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -122,7 +122,7 @@ // This should always succeed immediately because we size the pipe to // hold the entire blob for tiny data lengths. - uint32_t num_bytes = data_.length(); + size_t num_bytes = data_.length(); producer_handle_->WriteData(data_.data(), &num_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(data_.length(), num_bytes);
diff --git a/content/browser/devtools/devtools_stream_pipe.cc b/content/browser/devtools/devtools_stream_pipe.cc index 899dfa7..7a9a2992 100644 --- a/content/browser/devtools/devtools_stream_pipe.cc +++ b/content/browser/devtools/devtools_stream_pipe.cc
@@ -77,7 +77,7 @@ } while (!read_requests_.empty()) { const void* pipe_bytes = nullptr; - uint32_t bytes_available = 0; + size_t bytes_available = 0; MojoResult res = pipe_->BeginReadData(&pipe_bytes, &bytes_available, MOJO_READ_DATA_FLAG_NONE); if (res == MOJO_RESULT_FAILED_PRECONDITION) { @@ -87,9 +87,8 @@ } DCHECK_EQ(MOJO_RESULT_OK, res); auto& request = read_requests_.front(); - const uint32_t bytes_to_read = - std::min(bytes_available, - request.max_size - static_cast<uint32_t>(buffer_.size())); + const size_t bytes_to_read = + std::min(bytes_available, size_t{request.max_size} - buffer_.size()); // Dispatch available bytes (but no more than requested), when there are // multiple requests pending. If we just have a single read request, it's // more efficient (and easier for client) to only dispatch when enough bytes
diff --git a/content/browser/devtools/devtools_url_loader_interceptor.cc b/content/browser/devtools/devtools_url_loader_interceptor.cc index d0a4e12..531f27b3 100644 --- a/content/browser/devtools/devtools_url_loader_interceptor.cc +++ b/content/browser/devtools/devtools_url_loader_interceptor.cc
@@ -1371,7 +1371,7 @@ MOJO_RESULT_OK); if (body) { - uint32_t num_bytes = body_size; + size_t num_bytes = body_size; MojoResult res = producer_handle->WriteData( body->front() + offset, &num_bytes, MOJO_WRITE_DATA_FLAG_NONE); DCHECK_EQ(0u, res);
diff --git a/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc b/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc index be0f475..46ae4c1 100644 --- a/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc +++ b/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc
@@ -62,8 +62,8 @@ class ReadWriteWaiter { public: ReadWriteWaiter( - uint32_t required_receive_bytes, - uint32_t required_send_bytes, + size_t required_receive_bytes, + size_t required_send_bytes, mojo::Remote<network::mojom::TCPServerSocket>& tcp_server_socket) : required_receive_bytes_(required_receive_bytes), required_send_bytes_(required_send_bytes) { @@ -126,7 +126,7 @@ DCHECK(receive_stream_.is_valid()); DCHECK_LT(bytes_received_, required_receive_bytes_); const void* buffer = nullptr; - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult mojo_result = receive_stream_->BeginReadData( &buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (mojo_result == MOJO_RESULT_SHOULD_WAIT) { @@ -163,8 +163,7 @@ DCHECK(send_stream_.is_valid()); DCHECK_LT(bytes_sent_, required_send_bytes_); void* buffer = nullptr; - uint32_t num_bytes = - static_cast<uint32_t>(required_send_bytes_ - bytes_sent_); + size_t num_bytes = required_send_bytes_ - bytes_sent_; MojoResult mojo_result = send_stream_->BeginWriteData( &buffer, &num_bytes, MOJO_WRITE_DATA_FLAG_NONE); if (mojo_result == MOJO_RESULT_SHOULD_WAIT) { @@ -198,16 +197,16 @@ } } - const uint32_t required_receive_bytes_; - const uint32_t required_send_bytes_; + const size_t required_receive_bytes_; + const size_t required_send_bytes_; base::RunLoop run_loop_; mojo::Remote<network::mojom::TCPConnectedSocket> accepted_socket_; mojo::ScopedDataPipeConsumerHandle receive_stream_; mojo::ScopedDataPipeProducerHandle send_stream_; std::unique_ptr<mojo::SimpleWatcher> read_watcher_; std::unique_ptr<mojo::SimpleWatcher> write_watcher_; - uint32_t bytes_received_ = 0; - uint32_t bytes_sent_ = 0; + size_t bytes_received_ = 0; + size_t bytes_sent_ = 0; }; } // anonymous namespace
diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc index 2971ba83..0e8c413 100644 --- a/content/browser/download/mhtml_generation_browsertest.cc +++ b/content/browser/download/mhtml_generation_browsertest.cc
@@ -144,7 +144,7 @@ void WriteDataToProducerPipe( mojo::ScopedDataPipeProducerHandle producer_pipe) { base::ScopedAllowBlockingForTesting allow_blocking; - uint32_t size = strlen(kTestData); + size_t size = strlen(kTestData); producer_pipe->WriteData(kTestData, &size, MOJO_WRITE_DATA_FLAG_NONE); producer_pipe.reset(); }
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc index ee44d24b..94b9b445 100644 --- a/content/browser/download/mhtml_generation_manager.cc +++ b/content/browser/download/mhtml_generation_manager.cc
@@ -12,6 +12,7 @@ #include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h" +#include "base/numerics/safe_conversions.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" @@ -489,14 +490,15 @@ DCHECK_NE(result, MOJO_RESULT_FAILED_PRECONDITION); // Begin consumer data pipe handle read and file write loop. char buffer[1024]; - uint32_t num_bytes = sizeof(buffer); + size_t num_bytes = sizeof(buffer); while (result == MOJO_RESULT_OK && state.readable()) { result = mhtml_data_consumer_->ReadData(&buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (result == MOJO_RESULT_OK) { if (secure_hash_) secure_hash_->Update(&buffer, num_bytes); - if (browser_file_.WriteAtCurrentPos(buffer, num_bytes) < 0) { + if (browser_file_.WriteAtCurrentPos( + buffer, base::checked_cast<int>(num_bytes)) < 0) { DLOG(ERROR) << "Error writing to file handle."; OnWriteComplete(std::move(callback), mojom::MhtmlSaveStatus::kFileWritingError);
diff --git a/content/browser/file_system/file_system_url_loader_factory_browsertest.cc b/content/browser/file_system/file_system_url_loader_factory_browsertest.cc index ee728b9..c306c7b 100644 --- a/content/browser/file_system/file_system_url_loader_factory_browsertest.cc +++ b/content/browser/file_system/file_system_url_loader_factory_browsertest.cc
@@ -120,7 +120,7 @@ std::string* result, base::OnceClosure quit_closure) { while (true) { - uint32_t num_bytes; + size_t num_bytes; const void* buffer = nullptr; MojoResult rv = handle.BeginReadData(&buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE);
diff --git a/content/browser/interest_group/interest_group_permissions_checker_unittest.cc b/content/browser/interest_group/interest_group_permissions_checker_unittest.cc index 31e1aba..d02c46d8 100644 --- a/content/browser/interest_group/interest_group_permissions_checker_unittest.cc +++ b/content/browser/interest_group/interest_group_permissions_checker_unittest.cc
@@ -435,7 +435,7 @@ mojo::ScopedDataPipeConsumerHandle body; ASSERT_EQ(mojo::CreateDataPipe(response_body.size(), producer_handle, body), MOJO_RESULT_OK); - uint32_t bytes_written = response_body.size(); + size_t bytes_written = response_body.size(); ASSERT_EQ(MOJO_RESULT_OK, producer_handle->WriteData(response_body.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
diff --git a/content/browser/loader/cross_site_document_blocking_browsertest.cc b/content/browser/loader/cross_site_document_blocking_browsertest.cc index ef46238..3d87c1a3 100644 --- a/content/browser/loader/cross_site_document_blocking_browsertest.cc +++ b/content/browser/loader/cross_site_document_blocking_browsertest.cc
@@ -205,7 +205,7 @@ private: void ReadBody(base::OnceClosure completion_callback) { char buffer[128]; - uint32_t num_bytes = sizeof(buffer); + size_t num_bytes = sizeof(buffer); MojoResult result = test_client_.response_body().ReadData( buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE); @@ -317,7 +317,7 @@ original_client_->OnReceiveResponse( std::move(response_head), std::move(consumer_handle), std::nullopt); - uint32_t num_bytes = response_body.size(); + size_t num_bytes = response_body.size(); EXPECT_EQ(MOJO_RESULT_OK, producer_handle->WriteData(response_body.data(), &num_bytes, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
diff --git a/content/browser/loader/file_url_loader_factory.cc b/content/browser/loader/file_url_loader_factory.cc index 12449f4..f543da1 100644 --- a/content/browser/loader/file_url_loader_factory.cc +++ b/content/browser/loader/file_url_loader_factory.cc
@@ -669,10 +669,10 @@ // Write any data we read for MIME sniffing, constraining by range where // applicable. This will always fit in the pipe (see DCHECK above, and // assertions near network::features::GetDataPipeDefaultAllocationSize()). - uint32_t write_size = std::min( - static_cast<uint32_t>(initial_read_size - first_byte_to_send), - static_cast<uint32_t>(total_bytes_to_send)); - const uint32_t expected_write_size = write_size; + size_t write_size = std::min( + base::checked_cast<size_t>(initial_read_size - first_byte_to_send), + base::checked_cast<size_t>(total_bytes_to_send)); + const size_t expected_write_size = write_size; MojoResult result = producer_handle->WriteData(&initial_read_buffer[first_byte_to_send], &write_size, MOJO_WRITE_DATA_FLAG_NONE);
diff --git a/content/browser/preloading/prefetch/prefetch_data_pipe_tee.cc b/content/browser/preloading/prefetch/prefetch_data_pipe_tee.cc index c3ba4142..2058e66 100644 --- a/content/browser/preloading/prefetch/prefetch_data_pipe_tee.cc +++ b/content/browser/preloading/prefetch/prefetch_data_pipe_tee.cc
@@ -107,7 +107,7 @@ } const void* read_data = nullptr; - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult rv = source_->BeginReadData(&read_data, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (rv == MOJO_RESULT_OK) {
diff --git a/content/browser/preloading/prefetch/prefetch_data_pipe_tee_unittest.cc b/content/browser/preloading/prefetch/prefetch_data_pipe_tee_unittest.cc index 13b592a..a09c9fc 100644 --- a/content/browser/preloading/prefetch/prefetch_data_pipe_tee_unittest.cc +++ b/content/browser/preloading/prefetch/prefetch_data_pipe_tee_unittest.cc
@@ -53,7 +53,7 @@ private: void OnDataAvailable(MojoResult result) { DCHECK_LT(data_.size(), size_); - uint32_t size = size_ - data_.size(); + size_t size = size_ - data_.size(); std::vector<char> buffer(size, 0); MojoResult read_result = consumer_handle_->ReadData( buffer.data(), &size, MOJO_READ_DATA_FLAG_NONE); @@ -70,7 +70,7 @@ mojo::ScopedDataPipeConsumerHandle consumer_handle_; - uint32_t size_; + size_t size_; std::string data_; base::RepeatingClosure on_read_done_; };
diff --git a/content/browser/preloading/prefetch/prefetch_service_unittest.cc b/content/browser/preloading/prefetch/prefetch_service_unittest.cc index 18e3b27..7015dd30 100644 --- a/content/browser/preloading/prefetch/prefetch_service_unittest.cc +++ b/content/browser/preloading/prefetch/prefetch_service_unittest.cc
@@ -1038,7 +1038,7 @@ ASSERT_TRUE(producer_handle_for_gurl_.count(request->request.url)); ASSERT_TRUE(producer_handle_for_gurl_[request->request.url]); - uint32_t bytes_written = body.size(); + size_t bytes_written = body.size(); EXPECT_EQ( producer_handle_for_gurl_[request->request.url]->WriteData( body.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE),
diff --git a/content/browser/preloading/prefetch/prefetch_streaming_url_loader_unittest.cc b/content/browser/preloading/prefetch/prefetch_streaming_url_loader_unittest.cc index ae2c3fd0..1c42adc 100644 --- a/content/browser/preloading/prefetch/prefetch_streaming_url_loader_unittest.cc +++ b/content/browser/preloading/prefetch/prefetch_streaming_url_loader_unittest.cc
@@ -86,7 +86,7 @@ void SimulateReceiveData(const std::string& data, bool expected_successful = true) { ASSERT_TRUE(producer_handle_); - uint32_t bytes_written = data.size(); + size_t bytes_written = data.size(); auto write_result = producer_handle_->WriteData( data.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE); if (expected_successful) {
diff --git a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor_unittest.cc b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor_unittest.cc index 7b9e750..e1c194e 100644 --- a/content/browser/preloading/prefetch/prefetch_url_loader_interceptor_unittest.cc +++ b/content/browser/preloading/prefetch/prefetch_url_loader_interceptor_unittest.cc
@@ -1159,7 +1159,7 @@ CHECK_EQ( mojo::CreateDataPipe(content.size(), producer_handle, consumer_handle), MOJO_RESULT_OK); - uint32_t bytes_written = content.size(); + size_t bytes_written = content.size(); CHECK_EQ(MOJO_RESULT_OK, producer_handle->WriteData(content.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE)); @@ -1542,7 +1542,7 @@ CHECK_EQ( mojo::CreateDataPipe(content.size(), producer_handle, consumer_handle), MOJO_RESULT_OK); - uint32_t bytes_written = content.size(); + size_t bytes_written = content.size(); CHECK_EQ(MOJO_RESULT_OK, producer_handle->WriteData(content.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE)); @@ -1616,7 +1616,7 @@ CHECK_EQ( mojo::CreateDataPipe(content.size(), producer_handle, consumer_handle), MOJO_RESULT_OK); - uint32_t bytes_written = content.size(); + size_t bytes_written = content.size(); CHECK_EQ(MOJO_RESULT_OK, producer_handle->WriteData(content.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
diff --git a/content/browser/renderer_host/http_error_navigation_throttle.cc b/content/browser/renderer_host/http_error_navigation_throttle.cc index 671466b..57105ea 100644 --- a/content/browser/renderer_host/http_error_navigation_throttle.cc +++ b/content/browser/renderer_host/http_error_navigation_throttle.cc
@@ -68,7 +68,7 @@ NavigationRequest::From(navigation_handle())->response_body(); // See how many bytes are in the body, without consuming anything from the // response body data pipe. - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult result = body.ReadData(nullptr, &num_bytes, MOJO_READ_DATA_FLAG_QUERY);
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc index c9aaefe5..68622902 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc
@@ -10268,7 +10268,7 @@ } void NavigationRequest::OnResponseBodyReady(MojoResult) { - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult result = response_body().ReadData(nullptr, &num_bytes, MOJO_READ_DATA_FLAG_QUERY); CHECK_EQ(result, MOJO_RESULT_OK);
diff --git a/content/browser/renderer_host/navigation_request_unittest.cc b/content/browser/renderer_host/navigation_request_unittest.cc index 4648747..b908d8f 100644 --- a/content/browser/renderer_host/navigation_request_unittest.cc +++ b/content/browser/renderer_host/navigation_request_unittest.cc
@@ -1330,7 +1330,7 @@ TEST_F(NavigationRequestResponseBodyTest, Received) { auto navigation = CreateNavigationSimulator(); std::string response = "response-body-content"; - uint32_t write_size = response.size(); + size_t write_size = response.size(); ASSERT_EQ(MOJO_RESULT_OK, mojo::CreateDataPipe(write_size, producer_handle_, consumer_handle_)); navigation->SetResponseBody(std::move(consumer_handle_)); @@ -1372,7 +1372,7 @@ EXPECT_EQ(std::string(), response_body()); std::string response = "response-body-content"; - uint32_t write_size = response.size(); + size_t write_size = response.size(); ASSERT_EQ(MOJO_RESULT_OK, producer_handle_->WriteData(response.c_str(), &write_size, MOJO_WRITE_DATA_FLAG_NONE));
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc index be16ee5..ad587d9f2 100644 --- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
@@ -12,6 +12,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h" +#include "base/numerics/safe_conversions.h" #include "base/task/sequenced_task_runner.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -518,7 +519,7 @@ } pending_read_context_ = context->MakeReplyMessageContext(); - pending_read_size_ = static_cast<uint32_t>(bytes_to_read); + pending_read_size_ = base::checked_cast<size_t>(bytes_to_read); TryRead(); return PP_OK_COMPLETIONPENDING; } @@ -752,7 +753,7 @@ DCHECK(read_watcher_); const void* buffer = nullptr; - uint32_t num_bytes = 0; + size_t num_bytes = 0; int mojo_result = receive_stream_->BeginReadData(&buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (mojo_result == MOJO_RESULT_SHOULD_WAIT) { @@ -771,7 +772,7 @@ // This is guaranteed by Mojo. DCHECK_GT(num_bytes, 0u); - uint32_t bytes_to_copy = std::min(num_bytes, pending_read_size_); + size_t bytes_to_copy = std::min(num_bytes, pending_read_size_); SendReadReply(PP_OK, std::string(reinterpret_cast<const char*>(buffer), bytes_to_copy)); receive_stream_->EndReadData(bytes_to_copy); @@ -810,7 +811,7 @@ DCHECK(write_watcher_); - uint32_t num_bytes = + size_t num_bytes = pending_write_data_.size() - pending_write_bytes_written_; DCHECK_GT(num_bytes, 0u); int mojo_result = send_stream_->WriteData(
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h index b7bcaccd..dd800689 100644 --- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h +++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
@@ -351,7 +351,7 @@ bool pending_accept_; - uint32_t pending_read_size_; + size_t pending_read_size_; ppapi::host::ReplyMessageContext pending_read_context_; // This is set to an error other than PP_OK_COMPLETIONPENDING when a read // error is received through the SocketObserver interface. If the
diff --git a/content/browser/service_worker/service_worker_cache_writer.cc b/content/browser/service_worker/service_worker_cache_writer.cc index 71a8963..2964e8d 100644 --- a/content/browser/service_worker/service_worker_cache_writer.cc +++ b/content/browser/service_worker/service_worker_cache_writer.cc
@@ -10,6 +10,7 @@ #include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" +#include "base/numerics/safe_conversions.h" #include "base/task/sequenced_task_runner.h" #include "crypto/secure_hash.h" #include "crypto/sha2.h" @@ -718,7 +719,7 @@ ReadCallback callback) { DCHECK(buffer); buffer_ = std::move(buffer); - num_bytes_to_read_ = num_bytes; + num_bytes_to_read_ = base::checked_cast<size_t>(num_bytes); callback_ = std::move(callback); if (!data_.is_valid()) { @@ -750,7 +751,7 @@ // TODO(https://crbug.com/1055677): notify of errors. num_bytes_to_read_ = 0; } - owner_->AsyncDoLoop(num_bytes_to_read_); + owner_->AsyncDoLoop(base::checked_cast<int>(num_bytes_to_read_)); } void OnReadDataPrepared(mojo::ScopedDataPipeConsumerHandle data) { @@ -776,7 +777,7 @@ // Parameters set on Read(). scoped_refptr<net::IOBuffer> buffer_; - uint32_t num_bytes_to_read_ = 0; + size_t num_bytes_to_read_ = 0; ReadCallback callback_; // |reader_| is safe to be kept as a rawptr because |owner_| owns |this| and
diff --git a/content/browser/service_worker/service_worker_installed_script_reader.cc b/content/browser/service_worker/service_worker_installed_script_reader.cc index 9c7f7aa..0ae46dd 100644 --- a/content/browser/service_worker/service_worker_installed_script_reader.cc +++ b/content/browser/service_worker/service_worker_installed_script_reader.cc
@@ -39,7 +39,7 @@ void OnWritable(MojoResult) { // It isn't necessary to handle MojoResult here since WriteDataRaw() // returns an equivalent error. - uint32_t size = meta_data_->size() - bytes_sent_; + size_t size = meta_data_->size() - bytes_sent_; TRACE_EVENT2( "ServiceWorker", "ServiceWorkerInstalledScriptReader::MetaDataSender::OnWritable",
diff --git a/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc b/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc index 456b178..9fd7a2d 100644 --- a/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc +++ b/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc
@@ -831,7 +831,7 @@ EXPECT_FALSE(version_->HasNoWork()); // Write the body stream. - uint32_t written_bytes = sizeof(kResponseBody) - 1; + size_t written_bytes = sizeof(kResponseBody) - 1; MojoResult mojo_result = producer_handle->WriteData( kResponseBody, &written_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(MOJO_RESULT_OK, mojo_result); @@ -881,7 +881,7 @@ ExpectResponseInfo(*info, *CreateResponseInfoFromServiceWorker()); // Start writing the body stream, then abort before finishing. - uint32_t written_bytes = sizeof(kResponseBody) - 1; + size_t written_bytes = sizeof(kResponseBody) - 1; MojoResult mojo_result = producer_handle->WriteData( kResponseBody, &written_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(MOJO_RESULT_OK, mojo_result); @@ -936,7 +936,7 @@ // Start writing the body stream, then break the Mojo connection to the loader // before finishing. - uint32_t written_bytes = sizeof(kResponseBody) - 1; + size_t written_bytes = sizeof(kResponseBody) - 1; MojoResult mojo_result = producer_handle->WriteData( kResponseBody, &written_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(MOJO_RESULT_OK, mojo_result);
diff --git a/content/browser/service_worker/service_worker_new_script_loader.cc b/content/browser/service_worker/service_worker_new_script_loader.cc index 1e8d936..5c6d3df 100644 --- a/content/browser/service_worker/service_worker_new_script_loader.cc +++ b/content/browser/service_worker/service_worker_new_script_loader.cc
@@ -594,7 +594,7 @@ uint32_t bytes_available) { // Cap the buffer size up to |kReadBufferSize|. The remaining will be written // next time. - uint32_t bytes_written = std::min<uint32_t>(kReadBufferSize, bytes_available); + size_t bytes_written = std::min<size_t>(kReadBufferSize, bytes_available); auto buffer = base::MakeRefCounted<WrappedIOBuffer>( pending_buffer ? pending_buffer->buffer() : nullptr, @@ -637,7 +637,7 @@ // A null buffer and zero |bytes_written| are passed when this is the end of // the body. net::Error error = cache_writer_->MaybeWriteData( - buffer.get(), base::strict_cast<size_t>(bytes_written), + buffer.get(), bytes_written, base::BindOnce(&ServiceWorkerNewScriptLoader::OnWriteDataComplete, weak_factory_.GetWeakPtr(), pending_buffer, bytes_written)); @@ -652,7 +652,7 @@ void ServiceWorkerNewScriptLoader::OnWriteDataComplete( scoped_refptr<network::MojoToNetPendingBuffer> pending_buffer, - uint32_t bytes_written, + size_t bytes_written, net::Error error) { TRACE_EVENT_WITH_FLOW0("ServiceWorker", "ServiceWorkerNewScriptLoader::OnWriteDataComplete",
diff --git a/content/browser/service_worker/service_worker_new_script_loader.h b/content/browser/service_worker/service_worker_new_script_loader.h index 98390b4ad6..05e4d61 100644 --- a/content/browser/service_worker/service_worker_new_script_loader.h +++ b/content/browser/service_worker/service_worker_new_script_loader.h
@@ -164,7 +164,7 @@ uint32_t bytes_available); void OnWriteDataComplete( scoped_refptr<network::MojoToNetPendingBuffer> pending_buffer, - uint32_t bytes_written, + size_t bytes_written, net::Error error); // This is the last method that is called on this class. Notifies the final
diff --git a/content/browser/service_worker/service_worker_new_script_loader_unittest.cc b/content/browser/service_worker/service_worker_new_script_loader_unittest.cc index 5fdb599b..4922ba5 100644 --- a/content/browser/service_worker/service_worker_new_script_loader_unittest.cc +++ b/content/browser/service_worker/service_worker_new_script_loader_unittest.cc
@@ -120,7 +120,7 @@ return true; } - uint32_t bytes_written = response.body.size(); + size_t bytes_written = response.body.size(); mojo::ScopedDataPipeConsumerHandle consumer; mojo::ScopedDataPipeProducerHandle producer; CHECK_EQ(MOJO_RESULT_OK, mojo::CreateDataPipe(nullptr, producer, consumer)); @@ -459,9 +459,9 @@ // Keep writing body until ServiceWorkerNewScriptLoader's client producer // data pipe becomes full. mojo::ScopedDataPipeProducerHandle body_producer = loader_factory.TakeBody(); - uint32_t total_bytes_written = 0; + size_t total_bytes_written = 0; while (true) { - uint32_t bytes_written = ServiceWorkerNewScriptLoader::kReadBufferSize; + size_t bytes_written = ServiceWorkerNewScriptLoader::kReadBufferSize; MojoResult result = body_producer->WriteData(kBody.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_NONE); if (result != MOJO_RESULT_OK) {
diff --git a/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc b/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc index 9831e231..0872379 100644 --- a/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc +++ b/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc
@@ -804,7 +804,7 @@ mojo::ScopedDataPipeProducerHandle producer; EXPECT_EQ(MOJO_RESULT_OK, mojo::CreateDataPipe(&options, producer, consumer)); - uint32_t bytes_written = body_from_net.size(); + size_t bytes_written = body_from_net.size(); EXPECT_EQ(MOJO_RESULT_OK, producer->WriteData(body_from_net.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
diff --git a/content/browser/service_worker/service_worker_test_utils.cc b/content/browser/service_worker/service_worker_test_utils.cc index 88ee60fe..1173f93 100644 --- a/content/browser/service_worker/service_worker_test_utils.cc +++ b/content/browser/service_worker/service_worker_test_utils.cc
@@ -864,7 +864,7 @@ // Create a data pipe which has the new block sent from the network. ASSERT_EQ(MOJO_RESULT_OK, mojo::CreateDataPipe(nullptr, *out_body_handle, network_consumer)); - uint32_t written_size = diff_data_block.size(); + size_t written_size = diff_data_block.size(); ASSERT_EQ(MOJO_RESULT_OK, (*out_body_handle) ->WriteData(diff_data_block.c_str(), &written_size, @@ -957,7 +957,7 @@ std::string* result, base::OnceClosure quit_closure) { while (true) { - uint32_t num_bytes; + size_t num_bytes; const void* buffer = nullptr; MojoResult rv = handle.BeginReadData(&buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE);
diff --git a/content/browser/service_worker/service_worker_updated_script_loader.cc b/content/browser/service_worker/service_worker_updated_script_loader.cc index 05c3d01..393d2b7 100644 --- a/content/browser/service_worker/service_worker_updated_script_loader.cc +++ b/content/browser/service_worker/service_worker_updated_script_loader.cc
@@ -32,7 +32,7 @@ namespace content { // We chose this size because the AppCache uses this. -const uint32_t ServiceWorkerUpdatedScriptLoader::kReadBufferSize = 32768; +const size_t ServiceWorkerUpdatedScriptLoader::kReadBufferSize = 32768; // This is for debugging https://crbug.com/959627. // The purpose is to see where the IOBuffer comes from by checking |__vfptr|. @@ -277,8 +277,8 @@ // Cap the buffer size up to |kReadBufferSize|. The remaining will be written // next time. - uint32_t bytes_newly_sent = - std::min<uint32_t>(kReadBufferSize, data_length_ - bytes_sent_to_client_); + size_t bytes_newly_sent = + std::min<size_t>(kReadBufferSize, data_length_ - bytes_sent_to_client_); MojoResult result = client_producer_->WriteData(data_to_send_->data() + bytes_sent_to_client_, @@ -395,7 +395,7 @@ uint32_t bytes_available) { // Cap the buffer size up to |kReadBufferSize|. The remaining will be written // next time. - uint32_t bytes_written = std::min<uint32_t>(kReadBufferSize, bytes_available); + size_t bytes_written = std::min<size_t>(kReadBufferSize, bytes_available); auto buffer = base::MakeRefCounted<WrappedIOBuffer>( pending_buffer ? pending_buffer->buffer() : nullptr, @@ -431,7 +431,7 @@ // A null buffer and zero |bytes_written| are passed when this is the end of // the body. net::Error error = cache_writer_->MaybeWriteData( - buffer.get(), base::strict_cast<size_t>(bytes_written), + buffer.get(), bytes_written, base::BindOnce(&ServiceWorkerUpdatedScriptLoader::OnWriteDataComplete, weak_factory_.GetWeakPtr(), pending_buffer, bytes_written)); @@ -446,7 +446,7 @@ void ServiceWorkerUpdatedScriptLoader::OnWriteDataComplete( scoped_refptr<network::MojoToNetPendingBuffer> pending_buffer, - uint32_t bytes_written, + size_t bytes_written, net::Error error) { CHECK_NE(net::ERR_IO_PENDING, error); if (error != net::OK) { @@ -473,7 +473,7 @@ } CHECK(pending_buffer); - pending_buffer->CompleteRead(bytes_written); + pending_buffer->CompleteRead(base::checked_cast<uint32_t>(bytes_written)); // Get the consumer handle from a previous read operation if we have one. network_consumer_ = pending_buffer->ReleaseHandle(); network_watcher_.ArmOrNotify();
diff --git a/content/browser/service_worker/service_worker_updated_script_loader.h b/content/browser/service_worker/service_worker_updated_script_loader.h index 2dc7b9b..fb6f857 100644 --- a/content/browser/service_worker/service_worker_updated_script_loader.h +++ b/content/browser/service_worker/service_worker_updated_script_loader.h
@@ -120,7 +120,7 @@ base::OnceCallback<void(net::Error)> callback) override; // Buffer size for reading script data from network. - const static uint32_t kReadBufferSize; + const static size_t kReadBufferSize; private: class WrappedIOBuffer; @@ -140,7 +140,7 @@ uint32_t bytes_available); void OnWriteDataComplete( scoped_refptr<network::MojoToNetPendingBuffer> pending_buffer, - uint32_t bytes_written, + size_t bytes_written, net::Error error); // This is the last method that is called on this class. Notifies the final
diff --git a/content/browser/service_worker/service_worker_updated_script_loader_unittest.cc b/content/browser/service_worker/service_worker_updated_script_loader_unittest.cc index 742b492..30c3b825 100644 --- a/content/browser/service_worker/service_worker_updated_script_loader_unittest.cc +++ b/content/browser/service_worker/service_worker_updated_script_loader_unittest.cc
@@ -408,7 +408,7 @@ // Keep writing body until ServiceWorkerUpdatedScriptLoader's client producer // data pipe becomes full. while (true) { - uint32_t bytes_written = kNetworkBlock.size(); + size_t bytes_written = kNetworkBlock.size(); MojoResult result = network_producer_->WriteData( kNetworkBlock.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_NONE); if (result != MOJO_RESULT_OK) {
diff --git a/content/browser/speech/network_speech_recognition_engine_impl_unittest.cc b/content/browser/speech/network_speech_recognition_engine_impl_unittest.cc index b5f5494..9a798cd7 100644 --- a/content/browser/speech/network_speech_recognition_engine_impl_unittest.cc +++ b/content/browser/speech/network_speech_recognition_engine_impl_unittest.cc
@@ -584,9 +584,9 @@ std::string response_string = SerializeProtobufResponse(result); response_buffer_.append(response_string); - uint32_t written = 0; + size_t written = 0; while (written < response_string.size()) { - uint32_t write_bytes = response_string.size() - written; + size_t write_bytes = response_string.size() - written; MojoResult mojo_result = downstream_data_pipe_->WriteData( response_string.data() + written, &write_bytes, MOJO_WRITE_DATA_FLAG_NONE); @@ -738,7 +738,7 @@ base::RunLoop().RunUntilIdle(); const void* data; - uint32_t num_bytes; + size_t num_bytes; MojoResult mojo_result = upstream_data_pipe_->BeginReadData( &data, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (mojo_result == MOJO_RESULT_OK) {
diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc index 3127a51..dcb385c 100644 --- a/content/browser/speech/speech_recognizer_impl_unittest.cc +++ b/content/browser/speech/speech_recognizer_impl_unittest.cc
@@ -478,7 +478,7 @@ base::RunLoop().RunUntilIdle(); const void* buffer; - uint32_t num_bytes; + size_t num_bytes; MojoResult result = consumer_handle->BeginReadData( &buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (result == MOJO_RESULT_OK) {
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher.cc b/content/browser/web_package/signed_exchange_cert_fetcher.cc index 9e0764c..a5d9de24 100644 --- a/content/browser/web_package/signed_exchange_cert_fetcher.cc +++ b/content/browser/web_package/signed_exchange_cert_fetcher.cc
@@ -185,7 +185,7 @@ TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"), "SignedExchangeCertFetcher::OnHandleReady"); const void* buffer = nullptr; - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult rv = body_->BeginReadData(&buffer, &num_bytes, MOJO_READ_DATA_FLAG_NONE); if (rv == MOJO_RESULT_OK) {
diff --git a/content/browser/webkit_browsertest.cc b/content/browser/webkit_browsertest.cc index 4041fe8c..0a1b485 100644 --- a/content/browser/webkit_browsertest.cc +++ b/content/browser/webkit_browsertest.cc
@@ -36,7 +36,7 @@ response->headers->GetMimeType(&response->mime_type); std::string body = "some data\r\n"; - uint32_t bytes_written = body.size(); + size_t bytes_written = body.size(); mojo::ScopedDataPipeProducerHandle producer_handle; mojo::ScopedDataPipeConsumerHandle consumer_handle; CHECK_EQ(mojo::CreateDataPipe(body.size(), producer_handle, consumer_handle),
diff --git a/content/browser/webui/web_ui_url_loader_factory.cc b/content/browser/webui/web_ui_url_loader_factory.cc index 917b5de..3879322 100644 --- a/content/browser/webui/web_ui_url_loader_factory.cc +++ b/content/browser/webui/web_ui_url_loader_factory.cc
@@ -101,7 +101,7 @@ } uint32_t output_offset = 0; - uint32_t output_size = base::checked_cast<uint32_t>(bytes->size()); + size_t output_size = bytes->size(); if (requested_range) { if (!requested_range->ComputeBounds(output_size)) { CallOnError(std::move(client_remote), @@ -128,7 +128,7 @@ CHECK_EQ(create_result, MOJO_RESULT_OK); void* buffer = nullptr; - uint32_t num_bytes = output_size; + size_t num_bytes = output_size; MojoResult result = pipe_producer_handle->BeginWriteData( &buffer, &num_bytes, MOJO_WRITE_DATA_FLAG_NONE); CHECK_EQ(result, MOJO_RESULT_OK);
diff --git a/content/browser/webui/web_ui_url_loader_factory_unittest.cc b/content/browser/webui/web_ui_url_loader_factory_unittest.cc index 09807c91..9797c24a 100644 --- a/content/browser/webui/web_ui_url_loader_factory_unittest.cc +++ b/content/browser/webui/web_ui_url_loader_factory_unittest.cc
@@ -201,7 +201,7 @@ if (loader_client.completion_status().error_code == net::OK) { ASSERT_TRUE(loader_client.response_body().is_valid()); - uint32_t response_size; + size_t response_size; ASSERT_EQ(loader_client.response_body().ReadData(nullptr, &response_size, MOJO_READ_DATA_FLAG_QUERY), MOJO_RESULT_OK);
diff --git a/content/common/service_worker/race_network_request_read_buffer_manager.cc b/content/common/service_worker/race_network_request_read_buffer_manager.cc index c17775ad..f27dfc3 100644 --- a/content/common/service_worker/race_network_request_read_buffer_manager.cc +++ b/content/common/service_worker/race_network_request_read_buffer_manager.cc
@@ -44,7 +44,7 @@ std::pair<MojoResult, base::span<const char>> RaceNetworkRequestReadBufferManager::ReadData() { CHECK_EQ(BytesRemaining(), 0u); - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult result; bool is_query_data_size_mode = base::GetFieldTrialParamByFeatureAsBool( features::kServiceWorkerAutoPreload, "query_data_size", false);
diff --git a/content/common/service_worker/race_network_request_read_buffer_manager_unittest.cc b/content/common/service_worker/race_network_request_read_buffer_manager_unittest.cc index a7bd908..4de8cddd 100644 --- a/content/common/service_worker/race_network_request_read_buffer_manager_unittest.cc +++ b/content/common/service_worker/race_network_request_read_buffer_manager_unittest.cc
@@ -25,7 +25,7 @@ MOJO_RESULT_OK); const char expected_data[] = "abcde"; - uint32_t num_bytes = sizeof(expected_data); + size_t num_bytes = sizeof(expected_data); base::test::SingleThreadTaskEnvironment task_environment; base::RunLoop run_loop;
diff --git a/content/common/service_worker/race_network_request_url_loader_client_unittest.cc b/content/common/service_worker/race_network_request_url_loader_client_unittest.cc index fa79f50..24e1d2a 100644 --- a/content/common/service_worker/race_network_request_url_loader_client_unittest.cc +++ b/content/common/service_worker/race_network_request_url_loader_client_unittest.cc
@@ -128,7 +128,7 @@ return; } const void* buffer; - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult result = body_->BeginReadData(&buffer, &num_bytes, MOJO_BEGIN_READ_DATA_FLAG_NONE); switch (result) { @@ -180,7 +180,7 @@ std::unique_ptr<mojo::SimpleWatcher> body_watcher_; mojo::ScopedDataPipeConsumerHandle body_; std::string chunk_; - uint32_t num_bytes_; + size_t num_bytes_; State state_ = State::kWaiting; }; @@ -225,7 +225,7 @@ // calls |client_|'s OnReceiveResponse(), which will trigger the relay of data // chunks in ServiceWorkerRaceNetworkRequestURLLoaderClient. void WriteData(const std::string& expected_body) { - uint32_t num_bytes = expected_body.size(); + size_t num_bytes = expected_body.size(); MojoResult result = producer_->WriteData(expected_body.data(), &num_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(result, MOJO_RESULT_OK); @@ -302,7 +302,7 @@ const network::mojom::URLResponseHeadPtr& response_head, mojo::ScopedDataPipeConsumerHandle body) { const void* buffer; - uint32_t num_bytes = 0; + size_t num_bytes = 0; MojoResult result = body->BeginReadData(&buffer, &num_bytes, MOJO_BEGIN_READ_DATA_FLAG_NONE); ASSERT_EQ(result, MOJO_RESULT_OK);
diff --git a/content/common/service_worker/race_network_request_write_buffer_manager.cc b/content/common/service_worker/race_network_request_write_buffer_manager.cc index 2378d39..890699e 100644 --- a/content/common/service_worker/race_network_request_write_buffer_manager.cc +++ b/content/common/service_worker/race_network_request_write_buffer_manager.cc
@@ -80,7 +80,7 @@ MojoResult RaceNetworkRequestWriteBufferManager::BeginWriteData() { void* buffer; - uint32_t num_write_bytes; + size_t num_write_bytes; MojoResult result = producer_->BeginWriteData(&buffer, &num_write_bytes, MOJO_WRITE_DATA_FLAG_NONE); buffer_ = base::make_span(static_cast<char*>(buffer), num_write_bytes); @@ -106,7 +106,7 @@ auto buffer = read_buffer.size() > data_pipe_buffer_size_ ? read_buffer.subspan(0, data_pipe_buffer_size_) : read_buffer; - uint32_t num_bytes = buffer.size(); + size_t num_bytes = buffer.size(); MojoResult result = producer_->WriteData(buffer.data(), &num_bytes, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE); num_bytes_written_ += num_bytes;
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 405cd38e..a4faeb4 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc
@@ -235,9 +235,6 @@ // Disables the RemotePlayback API. const char kDisableRemotePlaybackAPI[] = "disable-remote-playback-api"; -// Turns off the accessibility in the renderer. -const char kDisableRendererAccessibility[] = "disable-renderer-accessibility"; - // Prevent renderer process backgrounding when set. const char kDisableRendererBackgrounding[] = "disable-renderer-backgrounding"; @@ -466,16 +463,6 @@ const char kForcePresentationReceiverForTesting[] = "force-presentation-receiver-for-testing"; -// Force renderer accessibility to be on instead of enabling it on demand when -// a screen reader is detected. The disable-renderer-accessibility switch -// overrides this if present. -// This switch has an optional parameter that forces an AXMode bundle. The three -// available bundle settings are: 'basic', 'form-controls', and 'complete'. If -// the bundle argument is invalid, then the forced AXMode will default to -// 'complete'. If the bundle argument is missing, then the initial AXMode will -// default to complete but allow changes to the AXMode during execution. -const char kForceRendererAccessibility[] = "force-renderer-accessibility"; - // Extra command line options for launching the GPU process (normally used // for debugging). Use like renderer-cmd-prefix. const char kGpuLauncher[] = "gpu-launcher";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index b6f3b21..f090eb4 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h
@@ -82,7 +82,6 @@ CONTENT_EXPORT extern const char kDisableReadingFromCanvas[]; extern const char kDisableRemoteFonts[]; CONTENT_EXPORT extern const char kDisableRemotePlaybackAPI[]; -extern const char kDisableRendererAccessibility[]; CONTENT_EXPORT extern const char kDisableRendererBackgrounding[]; CONTENT_EXPORT extern const char kDisableResourceScheduler[]; CONTENT_EXPORT extern const char kDisableSharedWorkers[]; @@ -138,7 +137,6 @@ CONTENT_EXPORT extern const char kFileUrlPathAlias[]; CONTENT_EXPORT extern const char kForceDisplayList2dCanvas[]; CONTENT_EXPORT extern const char kForcePresentationReceiverForTesting[]; -CONTENT_EXPORT extern const char kForceRendererAccessibility[]; CONTENT_EXPORT extern const char kForceWebRtcIPHandlingPolicy[]; extern const char kGpuLauncher[]; CONTENT_EXPORT extern const char kGpuProcess[];
diff --git a/content/public/test/url_loader_interceptor.cc b/content/public/test/url_loader_interceptor.cc index b262c24..11e41a5 100644 --- a/content/public/test/url_loader_interceptor.cc +++ b/content/public/test/url_loader_interceptor.cc
@@ -498,7 +498,7 @@ CreateDataPipe(&options, producer_handle, consumer_handle); CHECK_EQ(result, MOJO_RESULT_OK); - uint32_t bytes_written = body.size(); + size_t bytes_written = body.size(); result = producer_handle->WriteData(body.data(), &bytes_written, MOJO_WRITE_DATA_FLAG_ALL_OR_NONE); CHECK_EQ(result, MOJO_RESULT_OK);
diff --git a/content/renderer/mhtml_handle_writer.cc b/content/renderer/mhtml_handle_writer.cc index 88b4e25..37e11a28 100644 --- a/content/renderer/mhtml_handle_writer.cc +++ b/content/renderer/mhtml_handle_writer.cc
@@ -144,7 +144,7 @@ // If there is no more data in this block, continue to next block or // finish. - uint32_t num_bytes = data.size() - write_position_; + size_t num_bytes = data.size() - write_position_; if (num_bytes == 0) { write_position_ = 0; if (++current_block_ >= mhtml_contents_.size()) {
diff --git a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc index 141f382..ef82d4d 100644 --- a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc +++ b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
@@ -1071,7 +1071,7 @@ ExpectResponseInfo(*info, *expected_info); // Write the body stream. - uint32_t written_bytes = sizeof(kResponseBody) - 1; + size_t written_bytes = sizeof(kResponseBody) - 1; MojoResult mojo_result = producer_handle->WriteData( kResponseBody, &written_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(MOJO_RESULT_OK, mojo_result); @@ -1135,7 +1135,7 @@ ExpectResponseInfo(*info, *CreateResponseInfoFromServiceWorker()); // Start writing the body stream, then abort before finishing. - uint32_t written_bytes = sizeof(kResponseBody) - 1; + size_t written_bytes = sizeof(kResponseBody) - 1; MojoResult mojo_result = producer_handle->WriteData( kResponseBody, &written_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(MOJO_RESULT_OK, mojo_result); @@ -1451,7 +1451,7 @@ EXPECT_EQ(network::mojom::FetchResponseType::kDefault, info->response_type); // Write the body stream. - uint32_t written_bytes = sizeof(kResponseBody) - 1; + size_t written_bytes = sizeof(kResponseBody) - 1; MojoResult mojo_result = producer_handle->WriteData( kResponseBody, &written_bytes, MOJO_WRITE_DATA_FLAG_NONE); ASSERT_EQ(MOJO_RESULT_OK, mojo_result);
diff --git a/content/services/auction_worklet/set_bid_bindings.cc b/content/services/auction_worklet/set_bid_bindings.cc index ac3c303..144b024a 100644 --- a/content/services/auction_worklet/set_bid_bindings.cc +++ b/content/services/auction_worklet/set_bid_bindings.cc
@@ -525,12 +525,23 @@ std::optional<std::vector<blink::AdDescriptor>> ad_component_descriptors; const size_t kMaxAdAuctionAdComponents = blink::MaxAdAuctionAdComponents(); - if (idl.target_num_ad_components.has_value() && - idl.target_num_ad_components.value() > kMaxAdAuctionAdComponents) { - return base::unexpected(IdlConvert::Status::MakeErrorMessage( - base::StringPrintf("%sbid targetNumAdComponents larger than " - "component ad limit of %zu.", - error_prefix.c_str(), kMaxAdAuctionAdComponents))); + if (idl.target_num_ad_components.has_value()) { + if (*idl.target_num_ad_components > kMaxAdAuctionAdComponents) { + return base::unexpected(IdlConvert::Status::MakeErrorMessage( + base::StringPrintf("%sbid targetNumAdComponents larger than " + "component ad limit of %zu.", + error_prefix.c_str(), kMaxAdAuctionAdComponents))); + } + if (*idl.target_num_ad_components == 0) { + return base::unexpected(IdlConvert::Status::MakeErrorMessage(base::StrCat( + {error_prefix, "targetNumAdComponents must be positive."}))); + } + + if (idl.num_mandatory_ad_components > *idl.target_num_ad_components) { + return base::unexpected(IdlConvert::Status::MakeErrorMessage(base::StrCat( + {error_prefix, + "numMandatoryAdComponents cannot exceed targetNumAdComponents."}))); + } } if (idl.ad_components.has_value()) { @@ -597,17 +608,6 @@ "adComponents list smaller than targetNumAdComponents."}))); } - if (*idl.target_num_ad_components == 0) { - return base::unexpected(IdlConvert::Status::MakeErrorMessage(base::StrCat( - {error_prefix, "targetNumAdComponents must be positive."}))); - } - - if (idl.num_mandatory_ad_components > *idl.target_num_ad_components) { - return base::unexpected(IdlConvert::Status::MakeErrorMessage(base::StrCat( - {error_prefix, - "numMandatoryAdComponents cannot exceed targetNumAdComponents."}))); - } - // Must have some component ads since their number is >= // `target_num_ad_components`, and that's positive. DCHECK(idl.ad_components.has_value());
diff --git a/content/test/content_test_bundle_data.filelist b/content/test/content_test_bundle_data.filelist index aebd91f..01c0d69 100644 --- a/content/test/content_test_bundle_data.filelist +++ b/content/test/content_test_bundle_data.filelist
@@ -6266,6 +6266,7 @@ data/gpu/concave_paths.html data/gpu/core_animation_status_api.html data/gpu/empty.html +data/gpu/favicon.ico data/gpu/filter_effects.html data/gpu/functional_3d_css.html data/gpu/functional_blank.html
diff --git a/content/test/data/accessibility/accname/name-img-labelledby-inputs-tree-expected-blink.txt b/content/test/data/accessibility/accname/name-img-labelledby-inputs-tree-expected-blink.txt index f92c92d2..b702f888 100644 --- a/content/test/data/accessibility/accname/name-img-labelledby-inputs-tree-expected-blink.txt +++ b/content/test/data/accessibility/accname/name-img-labelledby-inputs-tree-expected-blink.txt
@@ -4,13 +4,13 @@ ++++++textField value='peanuts' ++++++++genericContainer ++++++++++staticText name='peanuts' -++++++++++++inlineTextBox name='peanuts' +++++++++++++inlineTextBox ++++++textField value='popcorn' ++++++++genericContainer ++++++++++staticText name='popcorn' -++++++++++++inlineTextBox name='popcorn' +++++++++++++inlineTextBox ++++++textField value='apple jacks' ++++++++genericContainer ++++++++++staticText name='apple jacks' -++++++++++++inlineTextBox name='apple jacks' +++++++++++++inlineTextBox ++++++image name='peanuts popcorn apple jacks'
diff --git a/content/test/data/accessibility/aom/aom-modal-dialog-expected-blink.txt b/content/test/data/accessibility/aom/aom-modal-dialog-expected-blink.txt index 032a717..99deb53e 100644 --- a/content/test/data/accessibility/aom/aom-modal-dialog-expected-blink.txt +++ b/content/test/data/accessibility/aom/aom-modal-dialog-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='Content outside modal dialog. ' -++++++++++inlineTextBox name='Content outside modal dialog. ' +++++++++++inlineTextBox ++++++++button name='Button outside modal dialog.' ++++++++++staticText name='Button outside modal dialog.' -++++++++++++inlineTextBox name='Button outside modal dialog.' +++++++++++++inlineTextBox ++++++dialog name='Modal dialog.' modal=true ++++++++button name='Button inside modal dialog.'
diff --git a/content/test/data/accessibility/aria/annotation-roles-expected-blink.txt b/content/test/data/accessibility/aria/annotation-roles-expected-blink.txt index c1e65ba..808eaaa 100644 --- a/content/test/data/accessibility/aria/annotation-roles-expected-blink.txt +++ b/content/test/data/accessibility/aria/annotation-roles-expected-blink.txt
@@ -5,9 +5,9 @@ ++++++suggestion name='suggestion' ++++++paragraph ++++++++staticText name='This is ' -++++++++++inlineTextBox name='This is ' +++++++++++inlineTextBox ++++++++mark ++++++++++staticText name='highlighted' -++++++++++++inlineTextBox name='highlighted' +++++++++++++inlineTextBox ++++++++staticText name='.' -++++++++++inlineTextBox name='.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-activedescendant-expected-blink.txt b/content/test/data/accessibility/aria/aria-activedescendant-expected-blink.txt index 5793f444..479ded6b 100644 --- a/content/test/data/accessibility/aria/aria-activedescendant-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-activedescendant-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++menu name='parent node' activedescendantId=menuItemCheckBox ++++++++menuItem name='Inactive descendant' ++++++++++staticText name='Inactive descendant' -++++++++++++inlineTextBox name='Inactive descendant' +++++++++++++inlineTextBox ++++++++menuItemCheckBox name='Active descendant' checkedState=false ++++++++++staticText name='Active descendant' -++++++++++++inlineTextBox name='Active descendant' +++++++++++++inlineTextBox ++++++++menuItemRadio name='Inactive descendant #2' checkedState=false ++++++++++staticText name='Inactive descendant #2' -++++++++++++inlineTextBox name='Inactive descendant #2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-alert-expected-blink.txt b/content/test/data/accessibility/aria/aria-alert-expected-blink.txt index f77aec3..1d224ea8 100644 --- a/content/test/data/accessibility/aria/aria-alert-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-alert-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++alert liveStatus='assertive' containerLiveAtomic=true liveAtomic=true ++++++++staticText name='This test is for aria role="alert"' containerLiveAtomic=true -++++++++++inlineTextBox name='This test is for aria role="alert"' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-any-unignored-expected-blink.txt b/content/test/data/accessibility/aria/aria-any-unignored-expected-blink.txt index b0cc29b..a3fba9a 100644 --- a/content/test/data/accessibility/aria/aria-any-unignored-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-any-unignored-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Hi ' -++++++++++inlineTextBox name='Hi ' +++++++++++inlineTextBox ++++++++staticText name='ignored span' -++++++++++inlineTextBox name='ignored span' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Hi ' -++++++++++inlineTextBox name='Hi ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='unignored span' -++++++++++++inlineTextBox name='unignored span' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-article-expected-blink.txt b/content/test/data/accessibility/aria/aria-article-expected-blink.txt index 6889fcec..2fbffad 100644 --- a/content/test/data/accessibility/aria/aria-article-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-article-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++article ++++++++staticText name='This is an ARIA article.' -++++++++++inlineTextBox name='This is an ARIA article.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-article-posinset-setsize-expected-blink.txt b/content/test/data/accessibility/aria/aria-article-posinset-setsize-expected-blink.txt index e8713a47..c8868e3 100644 --- a/content/test/data/accessibility/aria/aria-article-posinset-setsize-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-article-posinset-setsize-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++article ++++++++staticText name='ARIA Articles outside of feeds should have PosInSet and SetSize of 0.' -++++++++++inlineTextBox name='ARIA Articles outside of feeds should have PosInSet and SetSize of 0.' +++++++++++inlineTextBox ++++++feed setSize=5 ++++++++article setSize=5 posInSet=4 ++++++++article setSize=5 posInSet=5
diff --git a/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt b/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt index c668f2e..6295e57d 100644 --- a/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-atomic-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++log ++++++++staticText name='This test is for aria-atomic="false"' -++++++++++inlineTextBox name='This test is for aria-atomic="false"' +++++++++++inlineTextBox ++++++log containerLiveAtomic=true liveAtomic=true ++++++++staticText name='This test is for aria-atomic="true"' containerLiveAtomic=true -++++++++++inlineTextBox name='This test is for aria-atomic="true"' +++++++++++inlineTextBox ++++++alert containerLiveAtomic=true liveAtomic=true ++++++++staticText name='This test is for alert.' containerLiveAtomic=true -++++++++++inlineTextBox name='This test is for alert.' +++++++++++inlineTextBox ++++++status containerLiveAtomic=true liveAtomic=true ++++++++staticText name='This test is for status.' containerLiveAtomic=true -++++++++++inlineTextBox name='This test is for status.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt b/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt index 7c70606..f361671c2 100644 --- a/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt
@@ -4,20 +4,20 @@ ++++++textFieldWithComboBox autoComplete='inline' value='autocomplete=inline' haspopup=listbox ++++++++genericContainer ++++++++++staticText name='autocomplete=inline' -++++++++++++inlineTextBox name='autocomplete=inline' +++++++++++++inlineTextBox ++++++textFieldWithComboBox autoComplete='list' value='autocomplete=list' haspopup=listbox ++++++++genericContainer ++++++++++staticText name='autocomplete=list' -++++++++++++inlineTextBox name='autocomplete=list' +++++++++++++inlineTextBox ++++++textFieldWithComboBox autoComplete='both' value='autocomplete=both' haspopup=listbox ++++++++genericContainer ++++++++++staticText name='autocomplete=both' -++++++++++++inlineTextBox name='autocomplete=both' +++++++++++++inlineTextBox ++++++textFieldWithComboBox value='autocomplete=none' haspopup=listbox ++++++++genericContainer ++++++++++staticText name='autocomplete=none' -++++++++++++inlineTextBox name='autocomplete=none' +++++++++++++inlineTextBox ++++++textField autoComplete='inline' value='No role with autocomplete=inline' ++++++++genericContainer ++++++++++staticText name='No role with autocomplete=inline' -++++++++++++inlineTextBox name='No role with autocomplete=inline' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-banner-expected-blink.txt b/content/test/data/accessibility/aria/aria-banner-expected-blink.txt index 133306d..a7ab5ac6 100644 --- a/content/test/data/accessibility/aria/aria-banner-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-banner-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++banner ++++++++staticText name='Chromium Browser' -++++++++++inlineTextBox name='Chromium Browser' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-blockquote-expected-blink.txt b/content/test/data/accessibility/aria/aria-blockquote-expected-blink.txt index a7576c84..81b7399 100644 --- a/content/test/data/accessibility/aria/aria-blockquote-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-blockquote-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++blockquote ++++++++staticText name='Blockquote' -++++++++++inlineTextBox name='Blockquote' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-button-expected-blink.txt b/content/test/data/accessibility/aria/aria-button-expected-blink.txt index 8b97b98..9d14e0f 100644 --- a/content/test/data/accessibility/aria/aria-button-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-button-expected-blink.txt
@@ -3,55 +3,55 @@ ++++genericContainer ignored ++++++button name='Button1' ++++++++staticText name='Button1' -++++++++++inlineTextBox name='Button1' +++++++++++inlineTextBox ++++++toggleButton name='Button2' checkedState=true ++++++++staticText name='Button2' -++++++++++inlineTextBox name='Button2' +++++++++++inlineTextBox ++++++toggleButton name='Button3' checkedState=false ++++++++staticText name='Button3' -++++++++++inlineTextBox name='Button3' +++++++++++inlineTextBox ++++++popUpButton name='Button4' haspopup=menu ++++++++staticText name='Button4' -++++++++++inlineTextBox name='Button4' +++++++++++inlineTextBox ++++++button name='Button5' ++++++++staticText name='Button5' -++++++++++inlineTextBox name='Button5' +++++++++++inlineTextBox ++++++button name='Complex button ' ++++++++staticText name='Complex button ' -++++++++++inlineTextBox name='Complex button ' +++++++++++inlineTextBox ++++++++textField ++++++++++genericContainer ++++++toggleButton name='Complex toggle button ' checkedState=true ++++++++staticText name='Complex toggle button ' -++++++++++inlineTextBox name='Complex toggle button ' +++++++++++inlineTextBox ++++++++textField ++++++++++genericContainer ++++++popUpButton name='Complex pop up button ' haspopup=menu ++++++++staticText name='Complex pop up button ' -++++++++++inlineTextBox name='Complex pop up button ' +++++++++++inlineTextBox ++++++++textField ++++++++++genericContainer ++++++popUpButton name='Example haspopup' haspopup=menu ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++popUpButton name='Example haspopup' haspopup=menu ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++popUpButton name='Example haspopup' haspopup=listbox ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++popUpButton name='Example haspopup' haspopup=tree ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++popUpButton name='Example haspopup' haspopup=grid ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++button name='Example haspopup' haspopup=dialog ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++button name='Example haspopup' ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox ++++++button name='Example haspopup' ++++++++staticText name='Example haspopup' -++++++++++inlineTextBox name='Example haspopup' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-cell-expected-blink.txt b/content/test/data/accessibility/aria/aria-cell-expected-blink.txt index c970851e..c4f8fe0 100644 --- a/content/test/data/accessibility/aria/aria-cell-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-cell-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++row ++++++++++columnHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt index b03068e..6ec6ce1 100644 --- a/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-checkbox-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored ++++++checkBox name='CheckBox1' checkedState=true ++++++++staticText name='CheckBox1' -++++++++++inlineTextBox name='CheckBox1' +++++++++++inlineTextBox ++++++checkBox name='CheckBox2' checkedState=false ++++++++staticText name='CheckBox2' -++++++++++inlineTextBox name='CheckBox2' +++++++++++inlineTextBox ++++++checkBox name='CheckBox3' checkedState=mixed ++++++++staticText name='CheckBox3' -++++++++++inlineTextBox name='CheckBox3' +++++++++++inlineTextBox ++++++checkBox name='CheckBox4' checkedState=false ++++++++staticText name='CheckBox4' -++++++++++inlineTextBox name='CheckBox4' +++++++++++inlineTextBox ++++++checkBox name='Complex checkbox' checkedState=false ++++++++staticText name='Complex ' -++++++++++inlineTextBox name='Complex ' +++++++++++inlineTextBox ++++++++textField ++++++++++genericContainer ++++++++staticText name=' checkbox' -++++++++++inlineTextBox name=' checkbox' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-code-expected-blink.txt b/content/test/data/accessibility/aria/aria-code-expected-blink.txt index b847ae2..16d9b79 100644 --- a/content/test/data/accessibility/aria/aria-code-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-code-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++code ++++++++staticText name='role' -++++++++++inlineTextBox name='role' +++++++++++inlineTextBox ++++++code ++++++++staticText name='element (no name)' -++++++++++inlineTextBox name='element (no name)' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++code name='include me' ++++++++staticText name='element (with name)' -++++++++++inlineTextBox name='element (with name)' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt b/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt index 382e3c15..d23f7ba2 100644 --- a/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt
@@ -5,23 +5,23 @@ ++++++++row ++++++++++columnHeader name='cell 2' ariaCellColumnIndex=2 ariaCellColumnSpan=2 ++++++++++++staticText name='cell 2' -++++++++++++++inlineTextBox name='cell 2' +++++++++++++++inlineTextBox ++++++++++columnHeader name='cell 4' ariaCellColumnIndex=4 ++++++++++++staticText name='cell 4' -++++++++++++++inlineTextBox name='cell 4' +++++++++++++++inlineTextBox ++++++++++columnHeader name='cell 5' ariaCellColumnIndex=5 ++++++++++++staticText name='cell 5' -++++++++++++++inlineTextBox name='cell 5' +++++++++++++++inlineTextBox ++++++++row ariaCellColumnIndex=2 ++++++++++cell name='cell 2' ariaCellColumnIndex=2 ++++++++++++staticText name='cell 2' -++++++++++++++inlineTextBox name='cell 2' +++++++++++++++inlineTextBox ++++++++++cell name='cell 3' ariaCellColumnIndex=3 ++++++++++++staticText name='cell 3' -++++++++++++++inlineTextBox name='cell 3' +++++++++++++++inlineTextBox ++++++++++cell name='cell 4' ariaCellColumnIndex=4 ++++++++++++staticText name='cell 4' -++++++++++++++inlineTextBox name='cell 4' +++++++++++++++inlineTextBox ++++++++++cell name='cell 5' ariaCellColumnIndex=5 ++++++++++++staticText name='cell 5' -++++++++++++++inlineTextBox name='cell 5' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-col-row-index-expected-blink.txt b/content/test/data/accessibility/aria/aria-col-row-index-expected-blink.txt index 4794a15..11ed12f 100644 --- a/content/test/data/accessibility/aria/aria-col-row-index-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-col-row-index-expected-blink.txt
@@ -6,66 +6,66 @@ ++++++++++row ariaCellRowIndex=2 ++++++++++++columnHeader name='row2 colheader2' ariaCellColumnIndex=2 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 colheader2' -++++++++++++++++inlineTextBox name='row2 colheader2' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='row2 colheader3' ariaCellColumnIndex=3 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 colheader3' -++++++++++++++++inlineTextBox name='row2 colheader3' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='row2 colheader4' ariaCellColumnIndex=4 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 colheader4' -++++++++++++++++inlineTextBox name='row2 colheader4' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='row2 colheader5' ariaCellColumnIndex=5 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 colheader5' -++++++++++++++++inlineTextBox name='row2 colheader5' +++++++++++++++++inlineTextBox ++++++++rowGroup ++++++++++row ariaCellRowIndex=3 ++++++++++++cell name='row3 col2' ariaCellColumnIndex=2 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col2' -++++++++++++++++inlineTextBox name='row3 col2' +++++++++++++++++inlineTextBox ++++++++++++cell name='row3 col3' ariaCellColumnIndex=3 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col3' -++++++++++++++++inlineTextBox name='row3 col3' +++++++++++++++++inlineTextBox ++++++++++++cell name='row3 col4' ariaCellColumnIndex=4 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col4' -++++++++++++++++inlineTextBox name='row3 col4' +++++++++++++++++inlineTextBox ++++++++++++cell name='row3 col5' ariaCellColumnIndex=5 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col5' -++++++++++++++++inlineTextBox name='row3 col5' +++++++++++++++++inlineTextBox ++++++++++row ariaCellRowIndex=4 ++++++++++++cell name='row4 col2' ariaCellColumnIndex=2 ariaCellRowIndex=4 ++++++++++++++staticText name='row4 col2' -++++++++++++++++inlineTextBox name='row4 col2' +++++++++++++++++inlineTextBox ++++++++++++cell name='row4 col3' ariaCellColumnIndex=3 ariaCellRowIndex=4 ++++++++++++++staticText name='row4 col3' -++++++++++++++++inlineTextBox name='row4 col3' +++++++++++++++++inlineTextBox ++++++++++++cell name='row4 col4' ariaCellColumnIndex=4 ariaCellRowIndex=4 ++++++++++++++staticText name='row4 col4' -++++++++++++++++inlineTextBox name='row4 col4' +++++++++++++++++inlineTextBox ++++++++++++cell name='row4 col5' ariaCellColumnIndex=5 ariaCellRowIndex=4 ++++++++++++++staticText name='row4 col5' -++++++++++++++++inlineTextBox name='row4 col5' +++++++++++++++++inlineTextBox ++++++++++row ariaCellRowIndex=5 ++++++++++++cell name='row5 col2' ariaCellColumnIndex=2 ariaCellRowIndex=5 ++++++++++++++staticText name='row5 col2' -++++++++++++++++inlineTextBox name='row5 col2' +++++++++++++++++inlineTextBox ++++++++++++cell name='row5 col3' ariaCellColumnIndex=3 ariaCellRowIndex=5 ++++++++++++++staticText name='row5 col3' -++++++++++++++++inlineTextBox name='row5 col3' +++++++++++++++++inlineTextBox ++++++++++++cell name='row5 col4' ariaCellColumnIndex=4 ariaCellRowIndex=5 ++++++++++++++staticText name='row5 col4' -++++++++++++++++inlineTextBox name='row5 col4' +++++++++++++++++inlineTextBox ++++++++++++cell name='row5 col5' ariaCellColumnIndex=5 ariaCellRowIndex=5 ++++++++++++++staticText name='row5 col5' -++++++++++++++++inlineTextBox name='row5 col5' +++++++++++++++++inlineTextBox ++++++++++row ariaCellRowIndex=6 ++++++++++++cell name='row6 col2' ariaCellColumnIndex=2 ariaCellRowIndex=6 ++++++++++++++staticText name='row6 col2' -++++++++++++++++inlineTextBox name='row6 col2' +++++++++++++++++inlineTextBox ++++++++++++cell name='row6 col3' ariaCellColumnIndex=3 ariaCellRowIndex=6 ++++++++++++++staticText name='row6 col3' -++++++++++++++++inlineTextBox name='row6 col3' +++++++++++++++++inlineTextBox ++++++++++++cell name='row6 col4' ariaCellColumnIndex=4 ariaCellRowIndex=6 ++++++++++++++staticText name='row6 col4' -++++++++++++++++inlineTextBox name='row6 col4' +++++++++++++++++inlineTextBox ++++++++++++cell name='row6 col5' ariaCellColumnIndex=5 ariaCellRowIndex=6 ++++++++++++++staticText name='row6 col5' -++++++++++++++++inlineTextBox name='row6 col5' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-col-row-index-undefined-expected-blink.txt b/content/test/data/accessibility/aria/aria-col-row-index-undefined-expected-blink.txt index 241c6f9..7de064d 100644 --- a/content/test/data/accessibility/aria/aria-col-row-index-undefined-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-col-row-index-undefined-expected-blink.txt
@@ -6,31 +6,31 @@ ++++++++++row ariaCellRowIndex=-1 ++++++++++++columnHeader name='row1 colheader1' ariaCellColumnIndex=1 ariaCellRowIndex=1 ++++++++++++++staticText name='row1 colheader1' -++++++++++++++++inlineTextBox name='row1 colheader1' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='row1 colheader2' ariaCellColumnIndex=2 ariaCellRowIndex=1 ++++++++++++++staticText name='row1 colheader2' -++++++++++++++++inlineTextBox name='row1 colheader2' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='row1 colheader3' ariaCellColumnIndex=3 ariaCellRowIndex=1 ++++++++++++++staticText name='row1 colheader3' -++++++++++++++++inlineTextBox name='row1 colheader3' +++++++++++++++++inlineTextBox ++++++++rowGroup ++++++++++row ariaCellRowIndex=0 ++++++++++++cell name='row2 col1' ariaCellColumnIndex=1 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 col1' -++++++++++++++++inlineTextBox name='row2 col1' +++++++++++++++++inlineTextBox ++++++++++++cell name='row2 col2' ariaCellColumnIndex=2 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 col2' -++++++++++++++++inlineTextBox name='row2 col2' +++++++++++++++++inlineTextBox ++++++++++++cell name='row2 col3' ariaCellColumnIndex=3 ariaCellRowIndex=2 ++++++++++++++staticText name='row2 col3' -++++++++++++++++inlineTextBox name='row2 col3' +++++++++++++++++inlineTextBox ++++++++++row ariaCellRowIndex=1 ++++++++++++cell name='row3 col1' ariaCellColumnIndex=1 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col1' -++++++++++++++++inlineTextBox name='row3 col1' +++++++++++++++++inlineTextBox ++++++++++++cell name='row3 col2' ariaCellColumnIndex=2 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col2' -++++++++++++++++inlineTextBox name='row3 col2' +++++++++++++++++inlineTextBox ++++++++++++cell name='row3 col3' ariaCellColumnIndex=3 ariaCellRowIndex=3 ++++++++++++++staticText name='row3 col3' -++++++++++++++++inlineTextBox name='row3 col3' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt b/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt index 44073ad..d9b97a8a 100644 --- a/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt
@@ -5,21 +5,21 @@ ++++++++row ++++++++++columnHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Safari' ++++++++++++staticText name='Safari' -++++++++++++++inlineTextBox name='Safari' +++++++++++++++inlineTextBox ++++++++++cell name='WebKit' ++++++++++++staticText name='WebKit' -++++++++++++++inlineTextBox name='WebKit' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-combobox-dynamic-expected-blink.txt b/content/test/data/accessibility/aria/aria-combobox-dynamic-expected-blink.txt index 78719f1..534f4aee 100644 --- a/content/test/data/accessibility/aria/aria-combobox-dynamic-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-combobox-dynamic-expected-blink.txt
@@ -4,19 +4,19 @@ ++++++genericContainer focusable name='Done' ++++++genericContainer ++++++++staticText name='State' -++++++++++inlineTextBox name='State' +++++++++++inlineTextBox ++++++textFieldWithComboBox focusable autoComplete='list' name='State' activedescendantId=listBoxOption restriction=readOnly haspopup=listbox controlsIds=listBox ++++++++genericContainer ++++++listBox ++++++++listBoxOption focusable name='Alabama' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alabama' -++++++++++++inlineTextBox name='Alabama' +++++++++++++inlineTextBox ++++++++listBoxOption focusable name='Alaska' selected=true ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alaska' -++++++++++++inlineTextBox name='Alaska' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt b/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt index ee39a0df..4fa9f9e6a 100644 --- a/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt
@@ -3,32 +3,32 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='State' -++++++++++inlineTextBox name='State' +++++++++++inlineTextBox ++++++textFieldWithComboBox focusable autoComplete='list' name='State' activedescendantId=listBoxOption restriction=readOnly haspopup=listbox controlsIds=listBox ++++++++genericContainer ++++++listBox ++++++++listBoxOption focusable name='Alabama' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alabama' -++++++++++++inlineTextBox name='Alabama' +++++++++++++inlineTextBox ++++++++listBoxOption focusable name='Alaska' selected=true ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alaska' -++++++++++++inlineTextBox name='Alaska' +++++++++++++inlineTextBox ++++++textFieldWithComboBox focusable activedescendantId=row haspopup=listbox controlsIds=grid ++++++++genericContainer ++++++grid ++++++++row focusable name='Grid row' ++++++++++staticText name='Grid row' -++++++++++++inlineTextBox name='Grid row' +++++++++++++inlineTextBox ++++++textFieldWithComboBox focusable activedescendantId=row haspopup=listbox controlsIds=treeGrid ++++++++genericContainer ++++++treeGrid ++++++++rowGroup ++++++++++row focusable name='Treegrid row' ++++++++++++staticText name='Treegrid row' -++++++++++++++inlineTextBox name='Treegrid row' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-combobox-implicit-haspopup-expected-blink.txt b/content/test/data/accessibility/aria/aria-combobox-implicit-haspopup-expected-blink.txt index 4e9bcb8..e996008 100644 --- a/content/test/data/accessibility/aria/aria-combobox-implicit-haspopup-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-combobox-implicit-haspopup-expected-blink.txt
@@ -8,4 +8,4 @@ ++++++++genericContainer ++++++comboBoxMenuButton name='ComboBoxMenuButton"' value='Select' haspopup=listbox ++++++++staticText name='Select' -++++++++++inlineTextBox name='Select' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-blink.txt b/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-blink.txt index dfcdb86a..1d349b0 100644 --- a/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-blink.txt
@@ -3,17 +3,17 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='Choose a fruit, with text content' -++++++++++inlineTextBox name='Choose a fruit, with text content' +++++++++++inlineTextBox ++++++comboBoxMenuButton collapsed name='Choose a fruit, with text content' value='Apple' activedescendantId=listBoxOption haspopup=listbox controlsIds=listBox ++++++++staticText name='Apple' -++++++++++inlineTextBox name='Apple' +++++++++++inlineTextBox ++++++listBox ++++++++listBoxOption name='Apple' selected=true ++++++++++staticText name='Apple' -++++++++++++inlineTextBox name='Apple' +++++++++++++inlineTextBox ++++++++listBoxOption name='Banana' selected=false ++++++++++staticText name='Banana' -++++++++++++inlineTextBox name='Banana' +++++++++++++inlineTextBox ++++++++listBoxOption name='Cherry' selected=false ++++++++++staticText name='Cherry' -++++++++++++inlineTextBox name='Cherry' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt b/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt index 2de1ff9..137e630 100644 --- a/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-complementary-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++complementary ++++++++staticText name='This is ARIA role complementary.' -++++++++++inlineTextBox name='This is ARIA role complementary.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt b/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt index d791c16..1be90b0 100644 --- a/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-contentinfo-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++contentInfo ++++++++staticText name='This is ARIA role contentinfo.' -++++++++++inlineTextBox name='This is ARIA role contentinfo.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-controls-expected-blink.txt b/content/test/data/accessibility/aria/aria-controls-expected-blink.txt index d94da3f1..d8f1497 100644 --- a/content/test/data/accessibility/aria/aria-controls-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-controls-expected-blink.txt
@@ -4,14 +4,14 @@ ++++++menuBar horizontal ++++++++menuItem name='File' controlsIds=menu ++++++++++staticText name='File' -++++++++++++inlineTextBox name='File' +++++++++++++inlineTextBox ++++++++menuItem name='Edit' ++++++++++staticText name='Edit' -++++++++++++inlineTextBox name='Edit' +++++++++++++inlineTextBox ++++++menu name='File' ++++++++menuItem name='New' ++++++++++staticText name='New' -++++++++++++inlineTextBox name='New' +++++++++++++inlineTextBox ++++++++menuItem name='Open' ++++++++++staticText name='Open' -++++++++++++inlineTextBox name='Open' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-controls-many-paragraphs-between-expected-blink.txt b/content/test/data/accessibility/aria/aria-controls-many-paragraphs-between-expected-blink.txt index d4d5252..4cbb0c6 100644 --- a/content/test/data/accessibility/aria/aria-controls-many-paragraphs-between-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-controls-many-paragraphs-between-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++button name='First button' controlsIds=paragraph ++++++++staticText name='First button' -++++++++++inlineTextBox name='First button' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='First paragraph' -++++++++++inlineTextBox name='First paragraph' +++++++++++inlineTextBox ++++++button name='Last button' controlsIds=paragraph ++++++++staticText name='Last button' -++++++++++inlineTextBox name='Last button' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Last paragraph' -++++++++++inlineTextBox name='Last paragraph' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-current-expected-blink.txt b/content/test/data/accessibility/aria/aria-current-expected-blink.txt index 01cd7ec..be8f0028 100644 --- a/content/test/data/accessibility/aria/aria-current-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-current-expected-blink.txt
@@ -3,63 +3,63 @@ ++++genericContainer ignored ++++++link name='Section one' ++++++++staticText name='Section one' -++++++++++inlineTextBox name='Section one' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Section two' ++++++++staticText name='Section two' -++++++++++inlineTextBox name='Section two' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Section three' ariaCurrentState=location ++++++++staticText name='Section three' -++++++++++inlineTextBox name='Section three' +++++++++++inlineTextBox ++++++lineBreak name='<newline>' -++++++++inlineTextBox name='<newline>' +++++++++inlineTextBox ++++++heading name='Section one heading' hierarchicalLevel=1 ++++++++staticText name='Section one heading' -++++++++++inlineTextBox name='Section one heading' +++++++++++inlineTextBox ++++++heading name='Section two heading' hierarchicalLevel=1 ++++++++staticText name='Section two heading' -++++++++++inlineTextBox name='Section two heading' +++++++++++inlineTextBox ++++++heading name='Section three heading' hierarchicalLevel=1 ++++++++staticText name='Section three heading' -++++++++++inlineTextBox name='Section three heading' +++++++++++inlineTextBox ++++++lineBreak name='<newline>' -++++++++inlineTextBox name='<newline>' +++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Span 1' -++++++++++inlineTextBox name='Span 1' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ariaCurrentState=true ++++++++++staticText name='Span 2' -++++++++++++inlineTextBox name='Span 2' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='Span 3' -++++++++++inlineTextBox name='Span 3' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=true ++++++++staticText name='aria-current is true' -++++++++++inlineTextBox name='aria-current is true' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=false ++++++++staticText name='aria-current is false' -++++++++++inlineTextBox name='aria-current is false' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=time ++++++++staticText name='aria-current is time' -++++++++++inlineTextBox name='aria-current is time' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=date ++++++++staticText name='aria-current is date' -++++++++++inlineTextBox name='aria-current is date' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=location ++++++++staticText name='aria-current is location' -++++++++++inlineTextBox name='aria-current is location' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=step ++++++++staticText name='aria-current is step' -++++++++++inlineTextBox name='aria-current is step' +++++++++++inlineTextBox ++++++paragraph ariaCurrentState=page ++++++++staticText name='aria-current is page' -++++++++++inlineTextBox name='aria-current is page' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='aria-current is empty string' -++++++++++inlineTextBox name='aria-current is empty string' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt b/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt index 19c9f7a7..b00ba41 100644 --- a/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-describedby-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++genericContainer ++++++tooltip name='Your username should be your email id' ++++++++staticText name='Your username should be your email id' -++++++++++inlineTextBox name='Your username should be your email id' +++++++++++inlineTextBox ++++++genericContainer ignored invisible ++++++textField description='mmddyy' descriptionFrom=relatedElement ++++++++genericContainer
diff --git a/content/test/data/accessibility/aria/aria-description-expected-blink.txt b/content/test/data/accessibility/aria/aria-description-expected-blink.txt index a2c89be..45a3af0 100644 --- a/content/test/data/accessibility/aria/aria-description-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-description-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++genericContainer description='Description from describedby' name='both' descriptionFrom=relatedElement describedbyIds=tooltip ++++++tooltip name='Description from describedby' ++++++++staticText name='Description from describedby' -++++++++++inlineTextBox name='Description from describedby' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-details-expected-blink.txt b/content/test/data/accessibility/aria/aria-details-expected-blink.txt index d976e04..cae8fcbb 100644 --- a/content/test/data/accessibility/aria/aria-details-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-details-expected-blink.txt
@@ -6,16 +6,16 @@ ++++++++++genericContainer ++++++paragraph ++++++++staticText name='Details' -++++++++++inlineTextBox name='Details' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='This ' -++++++++++inlineTextBox name='This ' +++++++++++inlineTextBox ++++++++genericContainer detailsIds=group,image ++++++++++staticText name='text' -++++++++++++inlineTextBox name='text' +++++++++++++inlineTextBox ++++++++staticText name=' has details' -++++++++++inlineTextBox name=' has details' +++++++++++inlineTextBox ++++++group ++++++++staticText name='Text details' -++++++++++inlineTextBox name='Text details' +++++++++++inlineTextBox ++++++image name='Image details'
diff --git a/content/test/data/accessibility/aria/aria-details-multiple-expected-blink.txt b/content/test/data/accessibility/aria/aria-details-multiple-expected-blink.txt index 0e4d640..dec742f 100644 --- a/content/test/data/accessibility/aria/aria-details-multiple-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-details-multiple-expected-blink.txt
@@ -2,18 +2,18 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='Some ' -++++++++inlineTextBox name='Some ' +++++++++inlineTextBox ++++++mark detailsIds=comment,docFootnote,definition ++++++++staticText name='highlighted text' -++++++++++inlineTextBox name='highlighted text' +++++++++++inlineTextBox ++++++staticText name=' example.' -++++++++inlineTextBox name=' example.' +++++++++inlineTextBox ++++++comment ++++++++staticText name='Good job!' -++++++++++inlineTextBox name='Good job!' +++++++++++inlineTextBox ++++++docFootnote ++++++++staticText name='Some footnote.' -++++++++++inlineTextBox name='Some footnote.' +++++++++++inlineTextBox ++++++definition ++++++++staticText name='The meaning is.' -++++++++++inlineTextBox name='The meaning is.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt b/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt index 8fcdf8b..15f5b25 100644 --- a/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-dialog-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++dialog ++++++++staticText name='This is ARIA dialog.' -++++++++++inlineTextBox name='This is ARIA dialog.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-directory-children-expected-blink.txt b/content/test/data/accessibility/aria/aria-directory-children-expected-blink.txt index 9027f3e..7a56ddb8 100644 --- a/content/test/data/accessibility/aria/aria-directory-children-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-directory-children-expected-blink.txt
@@ -4,28 +4,28 @@ ++++++directory htmlTag='div' ++++++++listItem htmlTag='div' ++++++++++staticText name='an item in the directory' -++++++++++++inlineTextBox name='an item in the directory' +++++++++++++inlineTextBox ++++++++listItem htmlTag='div' ++++++++++staticText name='an item in the directory' -++++++++++++inlineTextBox name='an item in the directory' +++++++++++++inlineTextBox ++++++directory htmlTag='ul' ++++++++listItem htmlTag='li' ++++++++++staticText name='an item in the directory, no explicit role' -++++++++++++inlineTextBox name='an item in the directory, no explicit role' +++++++++++++inlineTextBox ++++++++listItem htmlTag='li' ++++++++++staticText name='an item in the directory with role=listitem' -++++++++++++inlineTextBox name='an item in the directory with role=listitem' +++++++++++++inlineTextBox ++++++directory htmlTag='ol' ++++++++listItem htmlTag='li' ++++++++++staticText name='an item in the directory, no explicit role' -++++++++++++inlineTextBox name='an item in the directory, no explicit role' +++++++++++++inlineTextBox ++++++++listItem htmlTag='li' ++++++++++staticText name='an item in the directory with role=listitem' -++++++++++++inlineTextBox name='an item in the directory with role=listitem' +++++++++++++inlineTextBox ++++++directory htmlTag='menu' ++++++++listItem htmlTag='li' ++++++++++staticText name='an item in the directory, no explicit role' -++++++++++++inlineTextBox name='an item in the directory, no explicit role' +++++++++++++inlineTextBox ++++++++listItem htmlTag='li' ++++++++++staticText name='an item in the directory with role=listitem' -++++++++++++inlineTextBox name='an item in the directory with role=listitem' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-document-expected-blink.txt b/content/test/data/accessibility/aria/aria-document-expected-blink.txt index d9d6337..346812c2 100644 --- a/content/test/data/accessibility/aria/aria-document-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-document-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++document ++++++++staticText name='aria role document' -++++++++++inlineTextBox name='aria role document' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-emphasis-expected-blink.txt b/content/test/data/accessibility/aria/aria-emphasis-expected-blink.txt index bd9322f..cae4a87 100644 --- a/content/test/data/accessibility/aria/aria-emphasis-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-emphasis-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++emphasis ++++++++staticText name='role' -++++++++++inlineTextBox name='role' +++++++++++inlineTextBox ++++++emphasis ++++++++staticText name='element (no name)' -++++++++++inlineTextBox name='element (no name)' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++emphasis name='include me' ++++++++staticText name='element (with name)' -++++++++++inlineTextBox name='element (with name)' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt b/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt index d7c855c1c..1bbea77 100644 --- a/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-errormessage-expected-blink.txt
@@ -12,13 +12,13 @@ ++++++++++genericContainer ++++++paragraph ++++++++staticText name='Error for invalid input' -++++++++++inlineTextBox name='Error for invalid input' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Another error for invalid input' -++++++++++inlineTextBox name='Another error for invalid input' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Error for input which is not invalid' -++++++++++inlineTextBox name='Error for input which is not invalid' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Error for input with invalid not set' -++++++++++inlineTextBox name='Error for input with invalid not set' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt b/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt index daca115..e3c858c 100644 --- a/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt
@@ -4,20 +4,20 @@ ++++++menu ++++++++menuItem collapsed name='New' haspopup=menu ++++++++++staticText name='New' -++++++++++++inlineTextBox name='New' +++++++++++++inlineTextBox ++++++++menuItem name='Open' haspopup=menu ++++++++++staticText name='Open' -++++++++++++inlineTextBox name='Open' +++++++++++++inlineTextBox ++++++++menuItem collapsed name='Save' ++++++++++staticText name='Save' -++++++++++++inlineTextBox name='Save' +++++++++++++inlineTextBox ++++++++menuItem name='Quit' ++++++++++staticText name='Quit' -++++++++++++inlineTextBox name='Quit' +++++++++++++inlineTextBox ++++++splitter horizontal ++++++++staticText name='ARIA separator. aria-expanded value set to false.' -++++++++++inlineTextBox name='ARIA separator. aria-expanded value set to false.' +++++++++++inlineTextBox ++++++splitter horizontal ++++++++staticText name='ARIA separator. aria-expanded value set to true.' -++++++++++inlineTextBox name='ARIA separator. aria-expanded value set to true.' +++++++++++inlineTextBox ++++++splitter horizontal
diff --git a/content/test/data/accessibility/aria/aria-figure-expected-blink.txt b/content/test/data/accessibility/aria/aria-figure-expected-blink.txt index eec4a66..8ae8415 100644 --- a/content/test/data/accessibility/aria/aria-figure-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-figure-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++figure ++++++++staticText name='Figure' -++++++++++inlineTextBox name='Figure' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt b/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt index c7d837a..4fda2eaa 100644 --- a/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-flowto-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++region name='current' flowtoIds=footer ++++++++staticText name='Lorem ipsum' -++++++++++inlineTextBox name='Lorem ipsum' +++++++++++inlineTextBox ++++++footer name='next' ++++++++staticText name='dolor sit amet' -++++++++++inlineTextBox name='dolor sit amet' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-flowto-multiple-expected-blink.txt b/content/test/data/accessibility/aria/aria-flowto-multiple-expected-blink.txt index d8281502..0fef040 100644 --- a/content/test/data/accessibility/aria/aria-flowto-multiple-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-flowto-multiple-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ignored ++++++genericContainer name='a3' flowtoIds=genericContainer ++++++++staticText name='a3' -++++++++++inlineTextBox name='a3' +++++++++++inlineTextBox ++++++genericContainer name='b3' ++++++++staticText name='b3' -++++++++++inlineTextBox name='b3' +++++++++++inlineTextBox ++++++genericContainer name='c3' flowtoIds=genericContainer ++++++++staticText name='c3' -++++++++++inlineTextBox name='c3' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-form-expected-blink.txt b/content/test/data/accessibility/aria/aria-form-expected-blink.txt index 443495a1..09aacc9 100644 --- a/content/test/data/accessibility/aria/aria-form-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-form-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored ++++++group ++++++++staticText name='Unnamed ARIA form: must fall back to the native role.' -++++++++++inlineTextBox name='Unnamed ARIA form: must fall back to the native role.' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Unnamed ARIA form on plain div uses generic container role.' -++++++++++inlineTextBox name='Unnamed ARIA form on plain div uses generic container role.' +++++++++++inlineTextBox ++++++form name='Named form' ++++++++staticText name='Named ARIA form#1 gets the form role.' -++++++++++inlineTextBox name='Named ARIA form#1 gets the form role.' +++++++++++inlineTextBox ++++++form name='Named ARIA form#2 gets the form role.' ++++++++genericContainer ++++++++++staticText name='Named ARIA form#2 gets the form role.' -++++++++++++inlineTextBox name='Named ARIA form#2 gets the form role.' +++++++++++++inlineTextBox ++++++form name='Named form' ++++++++staticText name='Named ARIA form#3 gets the form role.' -++++++++++inlineTextBox name='Named ARIA form#3 gets the form role.' +++++++++++inlineTextBox ++++++form roleDescription='form' ++++++++staticText name='An aria-rolescription works on a nameless role=form.' -++++++++++inlineTextBox name='An aria-rolescription works on a nameless role=form.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-generic-expected-blink.txt b/content/test/data/accessibility/aria/aria-generic-expected-blink.txt index 0efcf42..5093aa1 100644 --- a/content/test/data/accessibility/aria/aria-generic-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-generic-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++genericContainer hasAriaAttribute=true ++++++++staticText name='content' -++++++++++inlineTextBox name='content' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-grid-expected-blink.txt index b922b90..8608c36 100644 --- a/content/test/data/accessibility/aria/aria-grid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-grid-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++row tableRowIndex=0 ++++++++++columnHeader name='Browser' tableCellColumnIndex=0 tableCellColumnSpan=1 tableCellRowIndex=0 tableCellRowSpan=1 ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' tableCellColumnIndex=1 tableCellColumnSpan=1 tableCellRowIndex=0 tableCellRowSpan=1 ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row tableRowIndex=1 ++++++++++cell name='Chrome' tableCellColumnIndex=0 tableCellColumnSpan=1 tableCellRowIndex=1 tableCellRowSpan=1 ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' tableCellColumnIndex=1 tableCellColumnSpan=1 tableCellRowIndex=1 tableCellRowSpan=1 ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt b/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt index a78ca59b..8e717ef9 100644 --- a/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt
@@ -6,74 +6,74 @@ ++++++++++row name='r1-real' tableRowIndex=0 ++++++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 ++++++++++++++staticText name='A1' -++++++++++++++++inlineTextBox name='A1' +++++++++++++++++inlineTextBox ++++++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 ++++++++++++++staticText name='A2' -++++++++++++++++inlineTextBox name='A2' +++++++++++++++++inlineTextBox ++++++++genericContainer description='r2-wrap' ++++++++++genericContainer description='r2-vanilla' ++++++++++++row name='r2-real' tableRowIndex=1 ++++++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 ++++++++++++++++staticText name='B1' -++++++++++++++++++inlineTextBox name='B1' +++++++++++++++++++inlineTextBox ++++++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 ++++++++++++++++staticText name='B2' -++++++++++++++++++inlineTextBox name='B2' +++++++++++++++++++inlineTextBox ++++++grid name='2: Single wrapper around all rows' tableRowCount=2 tableColumnCount=2 ++++++++genericContainer ++++++++++row tableRowIndex=0 ++++++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 ++++++++++++++staticText name='A1' -++++++++++++++++inlineTextBox name='A1' +++++++++++++++++inlineTextBox ++++++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 ++++++++++++++staticText name='A2' -++++++++++++++++inlineTextBox name='A2' +++++++++++++++++inlineTextBox ++++++++++row tableRowIndex=1 ++++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 ++++++++++++++staticText name='B1' -++++++++++++++++inlineTextBox name='B1' +++++++++++++++++inlineTextBox ++++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 ++++++++++++++staticText name='B2' -++++++++++++++++inlineTextBox name='B2' +++++++++++++++++inlineTextBox ++++++grid name='3: Individual cells get their own wrappers' tableRowCount=2 tableColumnCount=2 ++++++++row tableRowIndex=0 ++++++++++genericContainer ++++++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 ++++++++++++++staticText name='A1' -++++++++++++++++inlineTextBox name='A1' +++++++++++++++++inlineTextBox ++++++++++genericContainer ++++++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 ++++++++++++++staticText name='A2' -++++++++++++++++inlineTextBox name='A2' +++++++++++++++++inlineTextBox ++++++++row tableRowIndex=1 ++++++++++genericContainer ++++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 ++++++++++++++staticText name='B1' -++++++++++++++++inlineTextBox name='B1' +++++++++++++++++inlineTextBox ++++++++++genericContainer ++++++++++++genericContainer ++++++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 ++++++++++++++++staticText name='B2' -++++++++++++++++++inlineTextBox name='B2' +++++++++++++++++++inlineTextBox ++++++grid name='4: Single wrapper around all cells in a row' tableRowCount=2 tableColumnCount=2 ++++++++row tableRowIndex=0 ++++++++++genericContainer ++++++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 ++++++++++++++staticText name='A1' -++++++++++++++++inlineTextBox name='A1' +++++++++++++++++inlineTextBox ++++++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 ++++++++++++++staticText name='A2' -++++++++++++++++inlineTextBox name='A2' +++++++++++++++++inlineTextBox ++++++++row tableRowIndex=1 ++++++++++genericContainer ++++++++++++genericContainer ++++++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 ++++++++++++++++staticText name='B1' -++++++++++++++++++inlineTextBox name='B1' +++++++++++++++++++inlineTextBox ++++++++++++genericContainer ++++++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 ++++++++++++++++staticText name='B2' -++++++++++++++++++inlineTextBox name='B2' +++++++++++++++++++inlineTextBox ++++++grid name='5: Wrapper insanity' tableRowCount=2 tableColumnCount=2 ++++++++genericContainer ++++++++++genericContainer @@ -83,15 +83,15 @@ ++++++++++++++++++genericContainer ++++++++++++++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 ++++++++++++++++++++++staticText name='A1' -++++++++++++++++++++++++inlineTextBox name='A1' +++++++++++++++++++++++++inlineTextBox ++++++++++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 ++++++++++++++++++staticText name='A2' -++++++++++++++++++++inlineTextBox name='A2' +++++++++++++++++++++inlineTextBox ++++++++++genericContainer ++++++++++++row tableRowIndex=1 ++++++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 ++++++++++++++++staticText name='B1' -++++++++++++++++++inlineTextBox name='B1' +++++++++++++++++++inlineTextBox ++++++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 ++++++++++++++++staticText name='B2' -++++++++++++++++++inlineTextBox name='B2' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt b/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt index b25e208..702a190 100644 --- a/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++row ++++++++++columnHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-gridcell-focused-only-expected-blink.txt b/content/test/data/accessibility/aria/aria-gridcell-focused-only-expected-blink.txt index 9b28934..edf459b 100644 --- a/content/test/data/accessibility/aria/aria-gridcell-focused-only-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-gridcell-focused-only-expected-blink.txt
@@ -5,16 +5,16 @@ ++++++++row ++++++++++columnHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-group-expected-blink.txt b/content/test/data/accessibility/aria/aria-group-expected-blink.txt index dbb8362..82c7131 100644 --- a/content/test/data/accessibility/aria/aria-group-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-group-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++group ++++++++link name='Group Link1' ++++++++++staticText name='Group Link1' -++++++++++++inlineTextBox name='Group Link1' +++++++++++++inlineTextBox ++++++++link name='Group Link2' ++++++++++staticText name='Group Link2' -++++++++++++inlineTextBox name='Group Link2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-heading-expected-blink.txt b/content/test/data/accessibility/aria/aria-heading-expected-blink.txt index a6840b8..c2b3f70 100644 --- a/content/test/data/accessibility/aria/aria-heading-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-heading-expected-blink.txt
@@ -3,23 +3,23 @@ ++++genericContainer ignored ++++++heading name='ARIA Heading 1' hierarchicalLevel=1 ++++++++staticText name='ARIA Heading 1' -++++++++++inlineTextBox name='ARIA Heading 1' +++++++++++inlineTextBox ++++++heading name='ARIA Heading 2' hierarchicalLevel=2 ++++++++staticText name='ARIA Heading 2' -++++++++++inlineTextBox name='ARIA Heading 2' +++++++++++inlineTextBox ++++++heading name='ARIA Heading 3' hierarchicalLevel=3 ++++++++staticText name='ARIA Heading 3' -++++++++++inlineTextBox name='ARIA Heading 3' +++++++++++inlineTextBox ++++++heading name='ARIA Heading 4' hierarchicalLevel=4 ++++++++staticText name='ARIA Heading 4' -++++++++++inlineTextBox name='ARIA Heading 4' +++++++++++inlineTextBox ++++++heading name='ARIA Heading 5' hierarchicalLevel=5 ++++++++staticText name='ARIA Heading 5' -++++++++++inlineTextBox name='ARIA Heading 5' +++++++++++inlineTextBox ++++++heading name='ARIA Heading 6' hierarchicalLevel=6 ++++++++staticText name='ARIA Heading 6' -++++++++++inlineTextBox name='ARIA Heading 6' +++++++++++inlineTextBox ++++++genericContainer ++++++++heading name='Heading' hierarchicalLevel=2 ++++++++++staticText name='Heading' -++++++++++++inlineTextBox name='Heading' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-hidden-changed-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-changed-expected-blink.txt index 9cd2c891..a2ce500 100644 --- a/content/test/data/accessibility/aria/aria-hidden-changed-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-hidden-changed-expected-blink.txt
@@ -5,6 +5,6 @@ ++++++++group ++++++++++mark ++++++++++++staticText name='xyz' -++++++++++++++inlineTextBox name='xyz' +++++++++++++++inlineTextBox ++++++++staticText name='From hidden' -++++++++++inlineTextBox name='From hidden' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-hidden-changed-on-buttons-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-changed-on-buttons-expected-blink.txt index 3d18363..8c13693 100644 --- a/content/test/data/accessibility/aria/aria-hidden-changed-on-buttons-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-hidden-changed-on-buttons-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++staticText ignored invisible name='Button 1' ++++++button name='Button 2' ++++++++staticText name='Button 2' -++++++++++inlineTextBox name='Button 2' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt index b2ec421..e9a6630 100644 --- a/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-hidden-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored isLineBreakingObject=true ++++++genericContainer isLineBreakingObject=true ++++++++staticText name='blockDisplay' -++++++++++inlineTextBox name='blockDisplay' +++++++++++inlineTextBox ++++++genericContainer isLineBreakingObject=true ++++++++staticText name='blockDisplay Hiddenfalse' -++++++++++inlineTextBox name='blockDisplay Hiddenfalse' +++++++++++inlineTextBox ++++++genericContainer invisible name='blockDisplay Hiddentruefocusable' isLineBreakingObject=true ++++++++staticText ignored invisible name='blockDisplay Hiddentruefocusable'
diff --git a/content/test/data/accessibility/aria/aria-hidden-iframe-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-iframe-expected-blink.txt index ab39296c..ddc8b078 100644 --- a/content/test/data/accessibility/aria/aria-hidden-iframe-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-hidden-iframe-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ++++++button focusable name='Before' ++++++++staticText name='Before' -++++++++++inlineTextBox name='Before' +++++++++++inlineTextBox ++++++button focusable name='After' ++++++++staticText name='After' -++++++++++inlineTextBox name='After' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-hidden-single-descendant-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-single-descendant-expected-blink.txt index c768f1e..136a4fa 100644 --- a/content/test/data/accessibility/aria/aria-hidden-single-descendant-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-hidden-single-descendant-expected-blink.txt
@@ -6,5 +6,5 @@ ++++++genericContainer ++++++++button name='expect visible subtree' ++++++++++staticText name='expect visible subtree' -++++++++++++inlineTextBox name='expect visible subtree' +++++++++++++inlineTextBox ++++++group name='Done'
diff --git a/content/test/data/accessibility/aria/aria-hidden-single-descendant-visibility-hidden-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-single-descendant-visibility-hidden-expected-blink.txt index c768f1e..136a4fa 100644 --- a/content/test/data/accessibility/aria/aria-hidden-single-descendant-visibility-hidden-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-hidden-single-descendant-visibility-hidden-expected-blink.txt
@@ -6,5 +6,5 @@ ++++++genericContainer ++++++++button name='expect visible subtree' ++++++++++staticText name='expect visible subtree' -++++++++++++inlineTextBox name='expect visible subtree' +++++++++++++inlineTextBox ++++++group name='Done'
diff --git a/content/test/data/accessibility/aria/aria-img-child-expected-blink.txt b/content/test/data/accessibility/aria/aria-img-child-expected-blink.txt index 80d76d4e9..6242e6e 100644 --- a/content/test/data/accessibility/aria/aria-img-child-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-img-child-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++image ++++++++genericContainer ++++++++++staticText name='Img.jpg' -++++++++++++inlineTextBox name='Img.jpg' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-insertion-deletion-expected-blink.txt b/content/test/data/accessibility/aria/aria-insertion-deletion-expected-blink.txt index 73fe8bd3..44b6b56 100644 --- a/content/test/data/accessibility/aria/aria-insertion-deletion-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-insertion-deletion-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='My favorite browser is ' -++++++++++inlineTextBox name='My favorite browser is ' +++++++++++inlineTextBox ++++++++contentDeletion ++++++++++staticText name='ABC' -++++++++++++inlineTextBox name='ABC' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++contentInsertion ++++++++++staticText name='Chrome' -++++++++++++inlineTextBox name='Chrome' +++++++++++++inlineTextBox ++++++++staticText name='!' -++++++++++inlineTextBox name='!' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-keyshortcuts-expected-blink.txt b/content/test/data/accessibility/aria/aria-keyshortcuts-expected-blink.txt index f4b457e..6063d2e 100644 --- a/content/test/data/accessibility/aria/aria-keyshortcuts-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-keyshortcuts-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ++++++button keyShortcuts='Ctrl+X' name='Cut' ++++++++staticText name='Cut' -++++++++++inlineTextBox name='Cut' +++++++++++inlineTextBox ++++++button keyShortcuts='Ctrl+C' name='Copy' ++++++++staticText name='Copy' -++++++++++inlineTextBox name='Copy' +++++++++++inlineTextBox ++++++button keyShortcuts='Ctrl+V' name='Paste' ++++++++staticText name='Paste' -++++++++++inlineTextBox name='Paste' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-label-augment-inner-text-expected-blink.txt b/content/test/data/accessibility/aria/aria-label-augment-inner-text-expected-blink.txt index 1f6ed42..5e690f1 100644 --- a/content/test/data/accessibility/aria/aria-label-augment-inner-text-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-label-augment-inner-text-expected-blink.txt
@@ -3,15 +3,15 @@ ++++genericContainer ++++++link name='Link' ++++++++staticText name='Link' -++++++++++inlineTextBox name='Link' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='AriaLabel' ++++++++staticText name='Link' -++++++++++inlineTextBox name='Link' +++++++++++inlineTextBox ++++++button name='Button' ++++++++staticText name='Button' -++++++++++inlineTextBox name='Button' +++++++++++inlineTextBox ++++++button name='AriaLabel' ++++++++staticText name='Button' -++++++++++inlineTextBox name='Button' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt b/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt index 72baea8..e01c0457 100644 --- a/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-labelledby-heading-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++genericContainer ++++++heading name='h2' hierarchicalLevel=2 ++++++++staticText name='h2' -++++++++++inlineTextBox name='h2' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-labelledby-refers-to-self-expected-blink.txt b/content/test/data/accessibility/aria/aria-labelledby-refers-to-self-expected-blink.txt index 75b20f60..e3fe148f 100644 --- a/content/test/data/accessibility/aria/aria-labelledby-refers-to-self-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-labelledby-refers-to-self-expected-blink.txt
@@ -3,24 +3,24 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='The Label' -++++++++++inlineTextBox name='The Label' +++++++++++inlineTextBox ++++++textField name='The Label ariaLabel' value='the value' ++++++++genericContainer ++++++++++staticText name='the value' -++++++++++++inlineTextBox name='the value' +++++++++++++inlineTextBox ++++++checkBox name='We have 3 cats' checkedState=false ++++++++staticText name='We have ' -++++++++++inlineTextBox name='We have ' +++++++++++inlineTextBox ++++++++textField name='Number of cats' value='3' ++++++++++genericContainer ++++++++++++staticText name='3' -++++++++++++++inlineTextBox name='3' +++++++++++++++inlineTextBox ++++++++staticText name=' cats' -++++++++++inlineTextBox name=' cats' +++++++++++inlineTextBox ++++++group name='Range Slider' ++++++++legend ++++++++++labelText ++++++++++++staticText name='Range Slider' -++++++++++++++inlineTextBox name='Range Slider' +++++++++++++++inlineTextBox ++++++++slider horizontal name='Range Slider Minimum' value='10' valueForRange=10.00 minValueForRange=0.00 maxValueForRange=90.00 ++++++++slider horizontal name='Range Slider Maximum' value='90' valueForRange=90.00 minValueForRange=10.00 maxValueForRange=100.00
diff --git a/content/test/data/accessibility/aria/aria-leaf-in-editable-expected-blink.txt b/content/test/data/accessibility/aria/aria-leaf-in-editable-expected-blink.txt index a67b50d..261816f9 100644 --- a/content/test/data/accessibility/aria/aria-leaf-in-editable-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-leaf-in-editable-expected-blink.txt
@@ -4,37 +4,37 @@ ++++++genericContainer multiline ++++++++button name='ARIA leaf content is not removed in editor' ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++checkBox name='ARIA leaf content is not removed in editor' checkedState=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++menuItem name='ARIA leaf content is not removed in editor' ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++menuItemRadio name='ARIA leaf content is not removed in editor' checkedState=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++menuItemCheckBox name='ARIA leaf content is not removed in editor' checkedState=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++listBoxOption name='ARIA leaf content is not removed in editor' selected=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++progressIndicator minValueForRange=0.00 maxValueForRange=100.00 ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++radioButton name='ARIA leaf content is not removed in editor' checkedState=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++splitter horizontal ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++slider horizontal minValueForRange=0.00 maxValueForRange=100.00 ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++switch name='ARIA leaf content is not removed in editor' checkedState=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox ++++++++tab name='ARIA leaf content is not removed in editor' selected=false ++++++++++staticText name='ARIA leaf content is not removed in editor' -++++++++++++inlineTextBox name='ARIA leaf content is not removed in editor' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-level-expected-blink.txt b/content/test/data/accessibility/aria/aria-level-expected-blink.txt index de12be7..5d0c420 100644 --- a/content/test/data/accessibility/aria/aria-level-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-level-expected-blink.txt
@@ -3,75 +3,75 @@ ++++genericContainer ignored ++++++heading name='Level 2' hierarchicalLevel=2 ++++++++staticText name='Level 2' -++++++++++inlineTextBox name='Level 2' +++++++++++inlineTextBox ++++++heading name='Level 9' hierarchicalLevel=9 ++++++++staticText name='Level 9' -++++++++++inlineTextBox name='Level 9' +++++++++++inlineTextBox ++++++heading name='Level 1' hierarchicalLevel=1 ++++++++staticText name='Level 1' -++++++++++inlineTextBox name='Level 1' +++++++++++inlineTextBox ++++++heading name='Level 3' hierarchicalLevel=3 ++++++++staticText name='Level 3' -++++++++++inlineTextBox name='Level 3' +++++++++++inlineTextBox ++++++heading name='Level 3' hierarchicalLevel=3 ++++++++staticText name='Level 3' -++++++++++inlineTextBox name='Level 3' +++++++++++inlineTextBox ++++++heading name='Level 4' hierarchicalLevel=4 ++++++++staticText name='Level 4' -++++++++++inlineTextBox name='Level 4' +++++++++++inlineTextBox ++++++heading name='Level 5' hierarchicalLevel=5 ++++++++staticText name='Level 5' -++++++++++inlineTextBox name='Level 5' +++++++++++inlineTextBox ++++++tree ++++++++treeItem name='Tree item at level 1' hierarchicalLevel=1 selected=false ++++++++++staticText name='Tree item at level 1' -++++++++++++inlineTextBox name='Tree item at level 1' +++++++++++++inlineTextBox ++++++++++group ++++++++++++treeItem name='Tree item at level 2' hierarchicalLevel=2 selected=false ++++++++++++++staticText name='Tree item at level 2' -++++++++++++++++inlineTextBox name='Tree item at level 2' +++++++++++++++++inlineTextBox ++++++++++++treeItem name='Tree item at level 2, aria-level is 0' hierarchicalLevel=2 selected=false ++++++++++++++staticText name='Tree item at level 2, aria-level is 0' -++++++++++++++++inlineTextBox name='Tree item at level 2, aria-level is 0' +++++++++++++++++inlineTextBox ++++++++treeItem name='Tree item at level 3' hierarchicalLevel=3 selected=false ++++++++++staticText name='Tree item at level 3' -++++++++++++inlineTextBox name='Tree item at level 3' +++++++++++++inlineTextBox ++++++++treeItem name='Tree item at level 20' hierarchicalLevel=20 selected=false ++++++++++staticText name='Tree item at level 20' -++++++++++++inlineTextBox name='Tree item at level 20' +++++++++++++inlineTextBox ++++++++treeItem name='Tree item at level 1' hierarchicalLevel=1 selected=false ++++++++++staticText name='Tree item at level 1' -++++++++++++inlineTextBox name='Tree item at level 1' +++++++++++++inlineTextBox ++++++++treeItem name='Tree item at level 1' hierarchicalLevel=1 selected=false ++++++++++staticText name='Tree item at level 1' -++++++++++++inlineTextBox name='Tree item at level 1' +++++++++++++inlineTextBox ++++++++treeItem name='Tree item at level 1' hierarchicalLevel=1 selected=false ++++++++++staticText name='Tree item at level 1' -++++++++++++inlineTextBox name='Tree item at level 1' +++++++++++++inlineTextBox ++++++treeGrid ++++++++rowGroup ignored ++++++++++row hierarchicalLevel=1 ++++++++++++cell name='Cell at level 1' ++++++++++++++staticText name='Cell at level 1' -++++++++++++++++inlineTextBox name='Cell at level 1' +++++++++++++++++inlineTextBox ++++++++++row hierarchicalLevel=2 ++++++++++++cell name='Cell at level 2' ++++++++++++++staticText name='Cell at level 2' -++++++++++++++++inlineTextBox name='Cell at level 2' +++++++++++++++++inlineTextBox ++++++listItem hierarchicalLevel=1 ++++++++staticText name='List item at level 1' -++++++++++inlineTextBox name='List item at level 1' +++++++++++inlineTextBox ++++++listItem hierarchicalLevel=3 ++++++++staticText name='List item at level 3' -++++++++++inlineTextBox name='List item at level 3' +++++++++++inlineTextBox ++++++list ++++++++listItem hierarchicalLevel=2 ++++++++++staticText name='List item at level 2' -++++++++++++inlineTextBox name='List item at level 2' +++++++++++++inlineTextBox ++++++++list ++++++++++listItem hierarchicalLevel=2 ++++++++++++staticText name='List item at level 2' -++++++++++++++inlineTextBox name='List item at level 2' +++++++++++++++inlineTextBox ++++++++++listItem hierarchicalLevel=7 ++++++++++++staticText name='List item at level 7' -++++++++++++++inlineTextBox name='List item at level 7' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-list-expected-blink.txt b/content/test/data/accessibility/aria/aria-list-expected-blink.txt index 1aa50fc7..c619fbd 100644 --- a/content/test/data/accessibility/aria/aria-list-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-list-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++list ++++++++listItem name='1' ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listItem name='2' ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listItem name='3' ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt index c64785af..d8d8fa0 100644 --- a/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt
@@ -4,13 +4,13 @@ ++++++listBox activedescendantId=listBoxOption ++++++++listBoxOption name='1' selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='2' selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='3' selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++genericContainer === Start Continuation === rootWebArea @@ -19,13 +19,13 @@ ++++++listBox activedescendantId=listBoxOption ++++++++listBoxOption name='1' selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='2' selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='3' selected=true ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='focused' -++++++++++inlineTextBox name='focused' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt index bd04ec81..bba0c3c 100644 --- a/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt
@@ -4,16 +4,16 @@ ++++++listBox multiselectable activedescendantId=listBoxOption ++++++++listBoxOption name='Item 1' selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 2' selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 3' selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 4' selected=true ++++++++++staticText name='Item 4' -++++++++++++inlineTextBox name='Item 4' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 5' selected=true ++++++++++staticText name='Item 5' -++++++++++++inlineTextBox name='Item 5' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt index 292c1841..d7184274 100644 --- a/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++listBox ++++++++listBoxOption name='1' selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='2' selected=true ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='3' selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-listbox-disabled-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-disabled-expected-blink.txt index 3417937..be03b364 100644 --- a/content/test/data/accessibility/aria/aria-listbox-disabled-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-disabled-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored ++++++heading name='Start of test: striped should have selected state' ++++++++staticText name='Start of test: striped should have selected state' -++++++++++inlineTextBox name='Start of test: striped should have selected state' +++++++++++inlineTextBox ++++++listBox restriction=disabled ++++++++listBoxOption name='Orange' restriction=disabled selected=false ++++++++++staticText name='Orange' -++++++++++++inlineTextBox name='Orange' +++++++++++++inlineTextBox ++++++++listBoxOption name='Striped' restriction=disabled selected=true ++++++++++staticText name='Striped' -++++++++++++inlineTextBox name='Striped' +++++++++++++inlineTextBox ++++++++listBoxOption name='Calico' restriction=disabled selected=false ++++++++++staticText name='Calico' -++++++++++++inlineTextBox name='Calico' +++++++++++++inlineTextBox ++++++++listBoxOption name='Black' restriction=disabled selected=false ++++++++++staticText name='Black' -++++++++++++inlineTextBox name='Black' +++++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='End of test' -++++++++++inlineTextBox name='End of test' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt index 00b95417..ec6ea68 100644 --- a/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt
@@ -4,14 +4,14 @@ ++++++listBox setSize=4 ++++++++listBoxOption name='Item 1' setSize=4 posInSet=1 selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 2' setSize=4 posInSet=2 selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++splitter horizontal ++++++++listBoxOption name='Second group item 1' setSize=4 posInSet=3 selected=false ++++++++++staticText name='Second group item 1' -++++++++++++inlineTextBox name='Second group item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Second group item 2' setSize=4 posInSet=4 selected=false ++++++++++staticText name='Second group item 2' -++++++++++++inlineTextBox name='Second group item 2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt b/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt index a910b63b..7dce390 100644 --- a/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listitem-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++list ++++++++listItem name='1' hierarchicalLevel=1 ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listItem name='2' hierarchicalLevel=1 ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-live-nested-expected-blink.txt b/content/test/data/accessibility/aria/aria-live-nested-expected-blink.txt index de2cfd0..55b7644c 100644 --- a/content/test/data/accessibility/aria/aria-live-nested-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-live-nested-expected-blink.txt
@@ -4,13 +4,13 @@ ++++++group containerLiveStatus='polite' liveStatus='polite' ++++++++group containerLiveStatus='off' liveStatus='off' ++++++++++staticText containerLiveStatus='off' name='Nested - off' -++++++++++++inlineTextBox name='Nested - off' +++++++++++++inlineTextBox ++++++group containerLiveStatus='off' liveStatus='off' ++++++++group containerLiveStatus='polite' liveStatus='polite' ++++++++++staticText containerLiveStatus='polite' name='Nested - polite' -++++++++++++inlineTextBox name='Nested - polite' +++++++++++++inlineTextBox ++++++group containerLiveStatus='polite' liveStatus='polite' ++++++++genericContainer ignored ++++++++++group containerLiveStatus='assertive' liveStatus='assertive' ++++++++++++staticText containerLiveStatus='assertive' name='Nested - assertive' -++++++++++++++inlineTextBox name='Nested - assertive' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt b/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt index 9c30d134..849f8f02 100644 --- a/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-live-with-content-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ignored ++++++marquee containerLiveRelevant='additions text' containerLiveStatus='off' liveRelevant='additions text' liveStatus='off' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false ++++++++staticText containerLiveRelevant='additions text' containerLiveStatus='off' name='Off' liveRelevant='additions text' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false -++++++++++inlineTextBox name='Off' +++++++++++inlineTextBox ++++++marquee containerLiveRelevant='additions text' containerLiveStatus='polite' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false ++++++++staticText containerLiveRelevant='additions text' containerLiveStatus='polite' name='Polite' liveRelevant='additions text' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false -++++++++++inlineTextBox name='Polite' +++++++++++inlineTextBox ++++++marquee containerLiveRelevant='additions text' containerLiveStatus='assertive' liveRelevant='additions text' liveStatus='assertive' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false ++++++++staticText containerLiveRelevant='additions text' containerLiveStatus='assertive' name='Assertive' liveRelevant='additions text' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false -++++++++++inlineTextBox name='Assertive' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-math-expected-blink.txt b/content/test/data/accessibility/aria/aria-math-expected-blink.txt index c5a14b02..53f3148 100644 --- a/content/test/data/accessibility/aria/aria-math-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-math-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++math name='ARIA role math.' ++++++++staticText name='ARIA role math.' -++++++++++inlineTextBox name='ARIA role math.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-menu-expected-blink.txt b/content/test/data/accessibility/aria/aria-menu-expected-blink.txt index e765d42..3c3ad5a 100644 --- a/content/test/data/accessibility/aria/aria-menu-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-menu-expected-blink.txt
@@ -4,23 +4,23 @@ ++++++menuBar horizontal ++++++++menuItem name='File' controlsIds=menu ++++++++++staticText name='File' -++++++++++++inlineTextBox name='File' +++++++++++++inlineTextBox ++++++++menuItem name='Edit' ++++++++++staticText name='Edit' -++++++++++++inlineTextBox name='Edit' +++++++++++++inlineTextBox ++++++++menuItem name='View' ++++++++++staticText name='View' -++++++++++++inlineTextBox name='View' +++++++++++++inlineTextBox ++++++menu name='File' ++++++++menuItem name='New' ++++++++++staticText name='New' -++++++++++++inlineTextBox name='New' +++++++++++++inlineTextBox ++++++++menuItem name='Open' ++++++++++staticText name='Open' -++++++++++++inlineTextBox name='Open' +++++++++++++inlineTextBox ++++++++menuItem name='Save' ++++++++++staticText name='Save' -++++++++++++inlineTextBox name='Save' +++++++++++++inlineTextBox ++++++++menuItem name='Quit' ++++++++++staticText name='Quit' -++++++++++++inlineTextBox name='Quit' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt b/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt index 63fa93c7..fb0d87f1 100644 --- a/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-menubar-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++menuBar horizontal ++++++++menuItem name='File' ++++++++++staticText name='File' -++++++++++++inlineTextBox name='File' +++++++++++++inlineTextBox ++++++++menuItem name='Edit' ++++++++++staticText name='Edit' -++++++++++++inlineTextBox name='Edit' +++++++++++++inlineTextBox ++++++++menuItem name='View' ++++++++++staticText name='View' -++++++++++++inlineTextBox name='View' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt index e615a3d..060b599 100644 --- a/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-menuitem-expected-blink.txt
@@ -4,14 +4,14 @@ ++++++menu ++++++++menuItem name='File' ++++++++++staticText name='File' -++++++++++++inlineTextBox name='File' +++++++++++++inlineTextBox ++++++++menuItem name='Edit' ++++++++++staticText name='Edit' -++++++++++++inlineTextBox name='Edit' +++++++++++++inlineTextBox ++++++++menuItem name='Complex menuitem' ++++++++++staticText name='Complex ' -++++++++++++inlineTextBox name='Complex ' +++++++++++++inlineTextBox ++++++++++textField ++++++++++++genericContainer ++++++++++staticText name=' menuitem' -++++++++++++inlineTextBox name=' menuitem' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-menuitem-in-group-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitem-in-group-expected-blink.txt index 9f13996..f0516c7 100644 --- a/content/test/data/accessibility/aria/aria-menuitem-in-group-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-menuitem-in-group-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++group ++++++++menuItem name='Menu item' ++++++++++staticText name='Menu item' -++++++++++++inlineTextBox name='Menu item' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt index 80ba5df..9d7c459 100644 --- a/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-menuitemcheckbox-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++menu ++++++++menuItemCheckBox name='Menu item 1' checkedState=false ++++++++++staticText name='Menu item 1' -++++++++++++inlineTextBox name='Menu item 1' +++++++++++++inlineTextBox ++++++++menuItemCheckBox name='Menu item 2' checkedState=true ++++++++++staticText name='Menu item 2' -++++++++++++inlineTextBox name='Menu item 2' +++++++++++++inlineTextBox ++++++++menuItemCheckBox name='Menu item 3' checkedState=mixed ++++++++++staticText name='Menu item 3' -++++++++++++inlineTextBox name='Menu item 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt b/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt index 48afa55..ed6fae1 100644 --- a/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-menuitemradio-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++menu ++++++++menuItemRadio name='Menu item 1' checkedState=false ++++++++++staticText name='Menu item 1' -++++++++++++inlineTextBox name='Menu item 1' +++++++++++++inlineTextBox ++++++++menuItemRadio name='Menu item 2' checkedState=true ++++++++++staticText name='Menu item 2' -++++++++++++inlineTextBox name='Menu item 2' +++++++++++++inlineTextBox ++++++++menuItemRadio name='Menu item 3' checkedState=false ++++++++++staticText name='Menu item 3' -++++++++++++inlineTextBox name='Menu item 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-meter-expected-blink.txt b/content/test/data/accessibility/aria/aria-meter-expected-blink.txt index 57eedbf..9d7128c 100644 --- a/content/test/data/accessibility/aria/aria-meter-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-meter-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++meter name='funding' value='half-way' valueForRange=50.00 minValueForRange=0.00 maxValueForRange=100.00 ++++++++staticText name='We're getting there!' -++++++++++inlineTextBox name='We're getting there!' +++++++++++inlineTextBox ++++++meter name='funding' valueForRange=10.00 minValueForRange=0.00 maxValueForRange=100.00 ++++++++staticText name='Not so great.' -++++++++++inlineTextBox name='Not so great.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-mismatched-table-attr-expected-blink.txt b/content/test/data/accessibility/aria/aria-mismatched-table-attr-expected-blink.txt index 6ea5387..f0fefd0 100644 --- a/content/test/data/accessibility/aria/aria-mismatched-table-attr-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-mismatched-table-attr-expected-blink.txt
@@ -6,25 +6,25 @@ ++++++++++row ++++++++++++columnHeader name='Column 1' ariaCellColumnIndex=1 ariaCellRowIndex=1 ++++++++++++++staticText name='Column 1' -++++++++++++++++inlineTextBox name='Column 1' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Column 2' ariaCellColumnIndex=2 ariaCellRowIndex=1 ++++++++++++++staticText name='Column 2' -++++++++++++++++inlineTextBox name='Column 2' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Column 3' ariaCellColumnIndex=3 ariaCellRowIndex=1 ++++++++++++++staticText name='Column 3' -++++++++++++++++inlineTextBox name='Column 3' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='Cell A2' ariaCellColumnIndex=2 ariaCellRowIndex=2 ++++++++++++++staticText name='Cell A2' -++++++++++++++++inlineTextBox name='Cell A2' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell A3' ariaCellColumnIndex=3 ariaCellRowIndex=2 ++++++++++++++staticText name='Cell A3' -++++++++++++++++inlineTextBox name='Cell A3' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='Cell B1' ariaCellColumnIndex=1 ariaCellRowIndex=3 ++++++++++++++staticText name='Cell B1' -++++++++++++++++inlineTextBox name='Cell B1' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell B2' ariaCellColumnIndex=2 ariaCellRowIndex=3 ++++++++++++++staticText name='Cell B2' -++++++++++++++++inlineTextBox name='Cell B2' +++++++++++++++++inlineTextBox ++++++paragraph ignored
diff --git a/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt b/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt index 390af55..db74610 100644 --- a/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-multiselectable-expected-blink.txt
@@ -5,49 +5,49 @@ ++++++++listBoxOption name='Example 1' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 1' -++++++++++++inlineTextBox name='Example 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Example 2' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 2' -++++++++++++inlineTextBox name='Example 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='Example 3' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 3' -++++++++++++inlineTextBox name='Example 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Example 4' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 4' -++++++++++++inlineTextBox name='Example 4' +++++++++++++inlineTextBox ++++++listBox multiselectable name='My Listbox' ++++++++listBoxOption name='Example 1' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 1' -++++++++++++inlineTextBox name='Example 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Example 2' selected=true ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 2' -++++++++++++inlineTextBox name='Example 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='Example 3' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 3' -++++++++++++inlineTextBox name='Example 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Example 4' selected=true ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Example 4' -++++++++++++inlineTextBox name='Example 4' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-none-expected-blink.txt b/content/test/data/accessibility/aria/aria-none-expected-blink.txt index 581a235..facd5ca 100644 --- a/content/test/data/accessibility/aria/aria-none-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-none-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='With aria-role none' -++++++++inlineTextBox name='With aria-role none' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-option-complex-children-expected-blink.txt b/content/test/data/accessibility/aria/aria-option-complex-children-expected-blink.txt index 7e7aa62..d6f6a34d 100644 --- a/content/test/data/accessibility/aria/aria-option-complex-children-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-option-complex-children-expected-blink.txt
@@ -5,16 +5,16 @@ ++++++++listBoxOption focusable name='label-WAI-ARIA 1.1' selected=true ++++++++++link focusable description='title-WAI-ARIA 1.1' name='href-WAI-ARIA 1.1' descriptionFrom=title ++++++++++++staticText name='href-WAI-ARIA 1.1' -++++++++++++++inlineTextBox name='href-WAI-ARIA 1.1' +++++++++++++++inlineTextBox ++++++++++paragraph name='title-https://www.w3.org/TR/wai-aria-practices-1.1/' ++++++++++++staticText name='link-https://www.w3.org/TR/wai-aria-practices-1.1/' -++++++++++++++inlineTextBox name='link-https://www.w3.org/TR/wai-aria-practices-1.1/' +++++++++++++++inlineTextBox ++++++++++button focusable name='Close' ++++++++++++staticText name='Close' -++++++++++++++inlineTextBox name='Close' +++++++++++++++inlineTextBox ++++++++listBoxOption focusable name='1234567' selected=false ++++++++++staticText name='href-WAI-ARIA 1.1 ' -++++++++++++inlineTextBox name='href-WAI-ARIA 1.1 ' +++++++++++++inlineTextBox ++++++++++button focusable name='Close' ++++++++++++staticText name='Close' -++++++++++++++inlineTextBox name='Close' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-option-expected-blink.txt b/content/test/data/accessibility/aria/aria-option-expected-blink.txt index 30d9234..49147da 100644 --- a/content/test/data/accessibility/aria/aria-option-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-option-expected-blink.txt
@@ -4,25 +4,25 @@ ++++++listBox activedescendantId=listBoxOption ++++++++listBoxOption focusable name='option 1' selected=false ++++++++++staticText name='option 1' -++++++++++++inlineTextBox name='option 1' +++++++++++++inlineTextBox ++++++++listBoxOption focusable name='label 2' selected=false ++++++++++staticText name='option 2' -++++++++++++inlineTextBox name='option 2' +++++++++++++inlineTextBox ++++++++listBoxOption focusable name='caterpillar' selected=false ++++++++++staticText name='cat' -++++++++++++inlineTextBox name='cat' +++++++++++++inlineTextBox ++++++++++strong ++++++++++++staticText name='erpillar' -++++++++++++++inlineTextBox name='erpillar' +++++++++++++++inlineTextBox ++++++++listBoxOption focusable name='catfish' selected=false ++++++++++staticText name='cat' -++++++++++++inlineTextBox name='cat' +++++++++++++inlineTextBox ++++++++++emphasis ++++++++++++staticText name='fish' -++++++++++++++inlineTextBox name='fish' +++++++++++++++inlineTextBox ++++++++listBoxOption focusable name='medusa' selected=false ++++++++++emphasis ++++++++++++staticText name='jelly' -++++++++++++++inlineTextBox name='jelly' +++++++++++++++inlineTextBox ++++++++++staticText name='fish' -++++++++++++inlineTextBox name='fish' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-owns-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-expected-blink.txt index 44364f2e..9d741e2 100644 --- a/content/test/data/accessibility/aria/aria-owns-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-owns-expected-blink.txt
@@ -7,18 +7,18 @@ ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++genericContainer ++++++++++++staticText name='One' -++++++++++++++inlineTextBox name='One' +++++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='%E2%80%A2' ++++++++++++staticText ignored name='%E2%80%A2' ++++++++++genericContainer ++++++++++++staticText name='Two' -++++++++++++++inlineTextBox name='Two' +++++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Four' -++++++++++++inlineTextBox name='Four' +++++++++++++inlineTextBox ++++++genericContainer ignored ++++++genericContainer ignored ++++++++listItem @@ -26,5 +26,5 @@ ++++++++++++staticText ignored name='%E2%80%A2' ++++++++++genericContainer ++++++++++++staticText name='Three' -++++++++++++++inlineTextBox name='Three' +++++++++++++++inlineTextBox ++++++genericContainer ignored
diff --git a/content/test/data/accessibility/aria/aria-owns-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-grid-expected-blink.txt index b922b90..8608c36 100644 --- a/content/test/data/accessibility/aria/aria-owns-grid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-owns-grid-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++row tableRowIndex=0 ++++++++++columnHeader name='Browser' tableCellColumnIndex=0 tableCellColumnSpan=1 tableCellRowIndex=0 tableCellRowSpan=1 ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' tableCellColumnIndex=1 tableCellColumnSpan=1 tableCellRowIndex=0 tableCellRowSpan=1 ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row tableRowIndex=1 ++++++++++cell name='Chrome' tableCellColumnIndex=0 tableCellColumnSpan=1 tableCellRowIndex=1 tableCellRowSpan=1 ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' tableCellColumnIndex=1 tableCellColumnSpan=1 tableCellRowIndex=1 tableCellRowSpan=1 ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-owns-ignored-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-ignored-expected-blink.txt index 3ec7d1d..375e4cf 100644 --- a/content/test/data/accessibility/aria/aria-owns-ignored-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-owns-ignored-expected-blink.txt
@@ -7,7 +7,7 @@ ++++++++none ignored ++++++++++button name='button-in-owned-tree' ++++++++++++staticText name='button-in-owned-tree' -++++++++++++++inlineTextBox name='button-in-owned-tree' +++++++++++++++inlineTextBox ++++++splitter horizontal name='Element with aria-owns is never ignored' ++++++genericContainer ++++++++textField
diff --git a/content/test/data/accessibility/aria/aria-owns-included-in-tree-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-included-in-tree-expected-blink.txt index 4de9ff4..8da3961 100644 --- a/content/test/data/accessibility/aria/aria-owns-included-in-tree-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-owns-included-in-tree-expected-blink.txt
@@ -15,7 +15,7 @@ ++++++++++genericContainer ignored ++++++++++++button name='button-in-owned-tree' ++++++++++++++staticText name='button-in-owned-tree' -++++++++++++++++inlineTextBox name='button-in-owned-tree' +++++++++++++++++inlineTextBox ++++++++splitter horizontal name='Element with aria-owns is always in tree' ++++++++genericContainer ++++++++++textField @@ -30,7 +30,7 @@ ++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='xyz' -++++++++++++++++++inlineTextBox name='xyz' +++++++++++++++++++inlineTextBox ++++++++++++genericContainer ++++++++++++++slider horizontal valueForRange=50.00 minValueForRange=0.00 maxValueForRange=100.00 ++++++++none ignored
diff --git a/content/test/data/accessibility/aria/aria-owns-list-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-list-expected-blink.txt index 35346f6..58ec22f 100644 --- a/content/test/data/accessibility/aria/aria-owns-list-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-owns-list-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++list pageSize=(400, 400) ++++++++listItem pageSize=(400, 200) ++++++++++staticText name='One' -++++++++++++inlineTextBox name='One' +++++++++++++inlineTextBox ++++++++listItem pageSize=(400, 200) ++++++++++staticText name='Two' -++++++++++++inlineTextBox name='Two' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-owns-with-role-change-expected-blink.txt b/content/test/data/accessibility/aria/aria-owns-with-role-change-expected-blink.txt index 7e34101..b9c1101 100644 --- a/content/test/data/accessibility/aria/aria-owns-with-role-change-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-owns-with-role-change-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++region name='Stuff' ++++++++staticText name='Text' -++++++++++inlineTextBox name='Text' +++++++++++inlineTextBox ++++++++button name='Button' ++++++++++staticText name='Button' -++++++++++++inlineTextBox name='Button' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt b/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt index 7c47883..5c176429 100644 --- a/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-presentation-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='aria-role presentation' -++++++++inlineTextBox name='aria-role presentation' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-presentation-in-list-expected-blink.txt b/content/test/data/accessibility/aria/aria-presentation-in-list-expected-blink.txt index 5765ad4..626fa0c 100644 --- a/content/test/data/accessibility/aria/aria-presentation-in-list-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-presentation-in-list-expected-blink.txt
@@ -6,12 +6,12 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='One' -++++++++++++inlineTextBox name='One' +++++++++++++inlineTextBox ++++++++listItem isLineBreakingObject=true ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Two' -++++++++++++inlineTextBox name='Two' +++++++++++++inlineTextBox ++++++++++staticText name=' ' ++++++++++staticText name='Three' -++++++++++++inlineTextBox name='Three' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt b/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt index ade4bd5..86d3bad4 100644 --- a/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-pressed-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++button name='Regular button' ++++++++staticText name='Regular button' -++++++++++inlineTextBox name='Regular button' +++++++++++inlineTextBox ++++++toggleButton name='Toggle button unpressed' checkedState=false ++++++++staticText name='Toggle button unpressed' -++++++++++inlineTextBox name='Toggle button unpressed' +++++++++++inlineTextBox ++++++toggleButton name='Toggle button pressed' checkedState=true ++++++++staticText name='Toggle button pressed' -++++++++++inlineTextBox name='Toggle button pressed' +++++++++++inlineTextBox ++++++toggleButton name='Toggle button mixed' checkedState=mixed ++++++++staticText name='Toggle button mixed' -++++++++++inlineTextBox name='Toggle button mixed' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-radio-expected-blink.txt b/content/test/data/accessibility/aria/aria-radio-expected-blink.txt index c22c9ce5..36a8347 100644 --- a/content/test/data/accessibility/aria/aria-radio-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-radio-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++radioButton name='Radio1' checkedState=false ++++++++staticText name='Radio1' -++++++++++inlineTextBox name='Radio1' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-radio-in-shadow-root-expected-blink.txt b/content/test/data/accessibility/aria/aria-radio-in-shadow-root-expected-blink.txt index 56c3f8b..22242337 100644 --- a/content/test/data/accessibility/aria/aria-radio-in-shadow-root-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-radio-in-shadow-root-expected-blink.txt
@@ -4,59 +4,59 @@ ++++++radioGroup name='Group One' setSize=3 ++++++++heading name='Group One' ++++++++++staticText name='Group One' -++++++++++++inlineTextBox name='Group One' +++++++++++++inlineTextBox ++++++++radioButton name='Red' setSize=3 posInSet=1 checkedState=true ++++++++++staticText name='Red' -++++++++++++inlineTextBox name='Red' +++++++++++++inlineTextBox ++++++++radioButton name='Green' setSize=3 posInSet=2 checkedState=false ++++++++++staticText name='Green' -++++++++++++inlineTextBox name='Green' +++++++++++++inlineTextBox ++++++++radioButton name='Blue' setSize=3 posInSet=3 checkedState=false ++++++++++genericContainer ignored ++++++++++++staticText name='Blue' -++++++++++++++inlineTextBox name='Blue' +++++++++++++++inlineTextBox ++++++radioGroup name='Group Two' setSize=3 ++++++++genericContainer ignored ++++++++++heading name='Group Two' ++++++++++++staticText name='Group Two' -++++++++++++++inlineTextBox name='Group Two' +++++++++++++++inlineTextBox ++++++++++radioButton name='Red' setSize=3 posInSet=1 checkedState=true ++++++++++++staticText name='Red' -++++++++++++++inlineTextBox name='Red' +++++++++++++++inlineTextBox ++++++++++radioButton name='Green' setSize=3 posInSet=2 checkedState=false ++++++++++++staticText name='Green' -++++++++++++++inlineTextBox name='Green' +++++++++++++++inlineTextBox ++++++++++radioButton name='Blue' setSize=3 posInSet=3 checkedState=false ++++++++++++genericContainer ignored ++++++++++++++staticText name='Blue' -++++++++++++++++inlineTextBox name='Blue' +++++++++++++++++inlineTextBox ++++++radioGroup name='Group with aria-setsize and aria-posinset' setSize=8 ++++++++genericContainer ignored ++++++++++heading name='Group with aria-setsize and aria-posinset' ++++++++++++staticText name='Group with aria-setsize and aria-posinset' -++++++++++++++inlineTextBox name='Group with aria-setsize and aria-posinset' +++++++++++++++inlineTextBox ++++++++++radioButton name='Red' setSize=8 posInSet=5 checkedState=true ++++++++++++staticText name='Red' -++++++++++++++inlineTextBox name='Red' +++++++++++++++inlineTextBox ++++++++++radioButton name='Green' setSize=8 posInSet=6 checkedState=false ++++++++++++staticText name='Green' -++++++++++++++inlineTextBox name='Green' +++++++++++++++inlineTextBox ++++++++++radioButton name='Blue' setSize=8 posInSet=7 checkedState=false ++++++++++++genericContainer ignored ++++++++++++++staticText name='Blue' -++++++++++++++++inlineTextBox name='Blue' +++++++++++++++++inlineTextBox ++++++group name='Checkbox Group One' setSize=0 ++++++++genericContainer ignored ++++++++++heading name='Checkbox Group One' ++++++++++++staticText name='Checkbox Group One' -++++++++++++++inlineTextBox name='Checkbox Group One' +++++++++++++++inlineTextBox ++++++++++checkBox name='Red' checkedState=true ++++++++++++staticText name='Red' -++++++++++++++inlineTextBox name='Red' +++++++++++++++inlineTextBox ++++++++++checkBox name='Green' checkedState=false ++++++++++++staticText name='Green' -++++++++++++++inlineTextBox name='Green' +++++++++++++++inlineTextBox ++++++++++checkBox name='Blue' checkedState=false ++++++++++++genericContainer ignored ++++++++++++++staticText name='Blue' -++++++++++++++++inlineTextBox name='Blue' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-radiogroup-expected-blink.txt b/content/test/data/accessibility/aria/aria-radiogroup-expected-blink.txt index ff33b53..9020c6c 100644 --- a/content/test/data/accessibility/aria/aria-radiogroup-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-radiogroup-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++radioGroup name='My group' ++++++++radioButton name='Radio 1' checkedState=false radioGroupIds=radioButton,radioButton ++++++++++staticText name='Radio 1' -++++++++++++inlineTextBox name='Radio 1' +++++++++++++inlineTextBox ++++++++radioButton name='Radio 2' checkedState=false radioGroupIds=radioButton,radioButton ++++++++++staticText name='Radio 2' -++++++++++++inlineTextBox name='Radio 2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt b/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt index 9648aa40..a6e57bf 100644 --- a/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt
@@ -5,12 +5,12 @@ ++++++++textField value='Readonly-false input' ++++++++++genericContainer ++++++++++++staticText name='Readonly-false input' -++++++++++++++inlineTextBox name='Readonly-false input' +++++++++++++++inlineTextBox ++++++genericContainer ++++++++textField value='Readonly-true input' restriction=readOnly ++++++++++genericContainer ++++++++++++staticText name='Readonly-true input' -++++++++++++++inlineTextBox name='Readonly-true input' +++++++++++++++inlineTextBox ++++++genericContainer name='Readonly-false plain div' ++++++genericContainer name='Readonly-true plain div' ++++++genericContainer multiline name='Readonly-false contenteditable div'
diff --git a/content/test/data/accessibility/aria/aria-region-expected-blink.txt b/content/test/data/accessibility/aria/aria-region-expected-blink.txt index c28cb04..bd240318 100644 --- a/content/test/data/accessibility/aria/aria-region-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-region-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored ++++++group ++++++++staticText name='Unnamed ARIA region: must fall back to the native role.' -++++++++++inlineTextBox name='Unnamed ARIA region: must fall back to the native role.' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Unnamed ARIA region on plain div uses generic container role.' -++++++++++inlineTextBox name='Unnamed ARIA region on plain div uses generic container role.' +++++++++++inlineTextBox ++++++region name='Named region' ++++++++staticText name='Named ARIA region#1 gets the region role.' -++++++++++inlineTextBox name='Named ARIA region#1 gets the region role.' +++++++++++inlineTextBox ++++++region name='Named ARIA region#2 gets the region role.' ++++++++genericContainer ++++++++++staticText name='Named ARIA region#2 gets the region role.' -++++++++++++inlineTextBox name='Named ARIA region#2 gets the region role.' +++++++++++++inlineTextBox ++++++region name='Named region' ++++++++staticText name='Named ARIA region#3 gets the region role.' -++++++++++inlineTextBox name='Named ARIA region#3 gets the region role.' +++++++++++inlineTextBox ++++++region roleDescription='Regioneque region' ++++++++staticText name='An aria-rolescription works on a nameless role=region.' -++++++++++inlineTextBox name='An aria-rolescription works on a nameless role=region.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-roledescription-expected-blink.txt b/content/test/data/accessibility/aria/aria-roledescription-expected-blink.txt index 890dfb6..b8dde2b7 100644 --- a/content/test/data/accessibility/aria/aria-roledescription-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-roledescription-expected-blink.txt
@@ -3,22 +3,22 @@ ++++genericContainer ignored ++++++button name='Native button' ++++++++staticText name='Native button' -++++++++++inlineTextBox name='Native button' +++++++++++inlineTextBox ++++++button name='ARIA button' ++++++++staticText name='ARIA button' -++++++++++inlineTextBox name='ARIA button' +++++++++++inlineTextBox ++++++button name='Clicky button' roleDescription='Clicky' ++++++++staticText name='Clicky button' -++++++++++inlineTextBox name='Clicky button' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='foo' -++++++++++inlineTextBox name='foo' +++++++++++inlineTextBox ++++++genericContainer name='bar' ++++++++staticText name='bar' -++++++++++inlineTextBox name='bar' +++++++++++inlineTextBox ++++++paragraph roleDescription='Texty' ++++++++staticText name='baz' -++++++++++inlineTextBox name='baz' +++++++++++inlineTextBox ++++++group roleDescription='SuperContainer' ++++++++staticText name='SuperContainer group' -++++++++++inlineTextBox name='SuperContainer group' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt b/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt index 962080d..7202c46 100644 --- a/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt
@@ -5,17 +5,17 @@ ++++++++row ++++++++++columnHeader name='cell 2' ariaCellRowIndex=3 ++++++++++++staticText name='cell 2' -++++++++++++++inlineTextBox name='cell 2' +++++++++++++++inlineTextBox ++++++++++columnHeader name='cell 3' ariaCellRowIndex=3 ++++++++++++staticText name='cell 3' -++++++++++++++inlineTextBox name='cell 3' +++++++++++++++inlineTextBox ++++++++++columnHeader name='cell 4' ariaCellRowIndex=3 ariaCellRowSpan=2 ++++++++++++staticText name='cell 4' -++++++++++++++inlineTextBox name='cell 4' +++++++++++++++inlineTextBox ++++++++row ariaCellRowIndex=4 ++++++++++cell name='cell 2' ariaCellRowIndex=4 ++++++++++++staticText name='cell 2' -++++++++++++++inlineTextBox name='cell 2' +++++++++++++++inlineTextBox ++++++++++cell name='cell 3' ariaCellRowIndex=4 ++++++++++++staticText name='cell 3' -++++++++++++++inlineTextBox name='cell 3' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-row-expected-blink.txt b/content/test/data/accessibility/aria/aria-row-expected-blink.txt index 44073ad..d9b97a8a 100644 --- a/content/test/data/accessibility/aria/aria-row-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-row-expected-blink.txt
@@ -5,21 +5,21 @@ ++++++++row ++++++++++columnHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Safari' ++++++++++++staticText name='Safari' -++++++++++++++inlineTextBox name='Safari' +++++++++++++++inlineTextBox ++++++++++cell name='WebKit' ++++++++++++staticText name='WebKit' -++++++++++++++inlineTextBox name='WebKit' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt b/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt index 0d44647..4ae685b 100644 --- a/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt
@@ -5,20 +5,20 @@ ++++++++row ++++++++++rowHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Safari' ++++++++++++staticText name='Safari' -++++++++++++++inlineTextBox name='Safari' +++++++++++++++inlineTextBox ++++++++row ++++++++++rowHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox ++++++++++cell name='WebKit' ++++++++++++staticText name='WebKit' -++++++++++++++inlineTextBox name='WebKit' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt b/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt index ac773566..c2bfc44 100644 --- a/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-scrollbar-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++scrollBar vertical valueForRange=55.00 minValueForRange=0.00 maxValueForRange=100.00 ++++++++staticText name='ScrollBar1' -++++++++++inlineTextBox name='ScrollBar1' +++++++++++inlineTextBox ++++++scrollBar horizontal valueForRange=55.00 minValueForRange=0.00 maxValueForRange=100.00 ++++++++staticText name='ScrollBar2' -++++++++++inlineTextBox name='ScrollBar2' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-search-expected-blink.txt b/content/test/data/accessibility/aria/aria-search-expected-blink.txt index b9e0548..868aaec 100644 --- a/content/test/data/accessibility/aria/aria-search-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-search-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++search ++++++++staticText name='ARIA role search.' -++++++++++inlineTextBox name='ARIA role search.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-selected-expected-blink.txt b/content/test/data/accessibility/aria/aria-selected-expected-blink.txt index 168ecfe..99fb8574 100644 --- a/content/test/data/accessibility/aria/aria-selected-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-selected-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++listBox ++++++++listBoxOption name='1' selected=true ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='2' selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-separator-expected-blink.txt b/content/test/data/accessibility/aria/aria-separator-expected-blink.txt index f51e936..fd4f6be5 100644 --- a/content/test/data/accessibility/aria/aria-separator-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-separator-expected-blink.txt
@@ -2,12 +2,12 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='Before' -++++++++inlineTextBox name='Before' +++++++++inlineTextBox ++++++splitter horizontal ++++++++staticText name='ARIA separator. No value when unfocusable.' -++++++++++inlineTextBox name='ARIA separator. No value when unfocusable.' +++++++++++inlineTextBox ++++++splitter horizontal valueForRange=1.00 minValueForRange=1.00 maxValueForRange=3.00 ++++++++staticText name='ARIA separator. Can have a value when focusable.' -++++++++++inlineTextBox name='ARIA separator. Can have a value when focusable.' +++++++++++inlineTextBox ++++++staticText name='After' -++++++++inlineTextBox name='After' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-set-counts-with-hidden-items-expected-blink.txt b/content/test/data/accessibility/aria/aria-set-counts-with-hidden-items-expected-blink.txt index 5efec2c..52afe745 100644 --- a/content/test/data/accessibility/aria/aria-set-counts-with-hidden-items-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-set-counts-with-hidden-items-expected-blink.txt
@@ -4,33 +4,33 @@ ++++++listBox setSize=4 ++++++++listBoxOption name='Item 1' setSize=4 posInSet=1 selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 2' setSize=4 posInSet=2 selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption ignored invisible name='Hidden' setSize=4 posInSet=4 selected=false ++++++++++staticText ignored invisible name='Hidden' ++++++++listBoxOption name='Item 3' setSize=4 posInSet=3 selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 4' setSize=4 posInSet=4 selected=false ++++++++++staticText name='Item 4' -++++++++++++inlineTextBox name='Item 4' +++++++++++++inlineTextBox ++++++listBox setSize=5 ++++++++listBoxOption name='Item 1' setSize=5 posInSet=1 selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 2' setSize=5 posInSet=2 selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption ignored invisible name='Hidden' selected=false ++++++++++staticText ignored invisible name='Hidden' ++++++++listBoxOption name='Item 3' setSize=5 posInSet=3 selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 4' setSize=5 posInSet=4 selected=false ++++++++++staticText name='Item 4' -++++++++++++inlineTextBox name='Item 4' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 5' setSize=5 posInSet=5 selected=false ++++++++++staticText name='Item 5' -++++++++++++inlineTextBox name='Item 5' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-set-counts-with-tree-levels-expected-blink.txt b/content/test/data/accessibility/aria/aria-set-counts-with-tree-levels-expected-blink.txt index b6029e9..a6f5b02 100644 --- a/content/test/data/accessibility/aria/aria-set-counts-with-tree-levels-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-set-counts-with-tree-levels-expected-blink.txt
@@ -4,25 +4,25 @@ ++++++tree setSize=2 ++++++++treeItem name='Item A' hierarchicalLevel=1 setSize=2 posInSet=1 selected=false ++++++++++staticText name='Item A' -++++++++++++inlineTextBox name='Item A' +++++++++++++inlineTextBox ++++++++treeItem name='Item A1' hierarchicalLevel=2 setSize=2 posInSet=1 selected=false ++++++++++staticText name='Item A1' -++++++++++++inlineTextBox name='Item A1' +++++++++++++inlineTextBox ++++++++treeItem name='Item A1x' hierarchicalLevel=3 setSize=3 posInSet=1 selected=false ++++++++++staticText name='Item A1x' -++++++++++++inlineTextBox name='Item A1x' +++++++++++++inlineTextBox ++++++++treeItem name='Item A1y' hierarchicalLevel=3 setSize=3 posInSet=2 selected=false ++++++++++staticText name='Item A1y' -++++++++++++inlineTextBox name='Item A1y' +++++++++++++inlineTextBox ++++++++treeItem name='Item A1z' hierarchicalLevel=3 setSize=3 posInSet=3 selected=false ++++++++++staticText name='Item A1z' -++++++++++++inlineTextBox name='Item A1z' +++++++++++++inlineTextBox ++++++++treeItem name='Item A2' hierarchicalLevel=2 setSize=2 posInSet=2 selected=false ++++++++++staticText name='Item A2' -++++++++++++inlineTextBox name='Item A2' +++++++++++++inlineTextBox ++++++++treeItem name='Item B' hierarchicalLevel=1 setSize=2 posInSet=2 selected=false ++++++++++staticText name='Item B' -++++++++++++inlineTextBox name='Item B' +++++++++++++inlineTextBox ++++++++treeItem name='Item B1' hierarchicalLevel=2 setSize=1 posInSet=1 selected=false ++++++++++staticText name='Item B1' -++++++++++++inlineTextBox name='Item B1' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt b/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt index fcb6991c..6359b03 100644 --- a/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt
@@ -4,29 +4,29 @@ ++++++listBox setSize=4 ++++++++listBoxOption name='Item 1' setSize=4 posInSet=1 selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 2' setSize=4 posInSet=2 selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 3' setSize=4 posInSet=3 selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 4' setSize=4 posInSet=4 selected=false ++++++++++staticText name='Item 4' -++++++++++++inlineTextBox name='Item 4' +++++++++++++inlineTextBox ++++++listBox setSize=5 ++++++++listBoxOption name='Item 1' setSize=5 posInSet=1 selected=false ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 2' setSize=5 posInSet=2 selected=false ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 3' setSize=5 posInSet=3 selected=false ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 4' setSize=5 posInSet=4 selected=false ++++++++++staticText name='Item 4' -++++++++++++inlineTextBox name='Item 4' +++++++++++++inlineTextBox ++++++++listBoxOption name='Item 5' setSize=5 posInSet=5 selected=false ++++++++++staticText name='Item 5' -++++++++++++inlineTextBox name='Item 5' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-slider-expected-blink.txt b/content/test/data/accessibility/aria/aria-slider-expected-blink.txt index c5f3278..be7e811 100644 --- a/content/test/data/accessibility/aria/aria-slider-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-slider-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++slider horizontal valueForRange=5.00 minValueForRange=1.00 maxValueForRange=10.00 ++++++++staticText name='Slider' -++++++++++inlineTextBox name='Slider' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt index 589ad36..5a229ecf 100644 --- a/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt
@@ -5,119 +5,119 @@ ++++++++row ++++++++++columnHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++columnHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++columnHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++columnHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++columnHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++rowHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++rowHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++rowHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++rowHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++++cell name='B' ++++++++++++staticText name='B' -++++++++++++++inlineTextBox name='B' +++++++++++++++inlineTextBox ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++grid ++++++++row ++++++++++rowHeader name='Alphabet' ++++++++++++staticText name='Alphabet' -++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++inlineTextBox ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox ++++++++++cell name='A' ++++++++++++staticText name='A' -++++++++++++++inlineTextBox name='A' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt b/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt index 017b601..2ac016c5 100644 --- a/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-sort-html-table-expected-blink.txt
@@ -6,148 +6,148 @@ ++++++++++row ++++++++++++columnHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++columnHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++columnHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++columnHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++columnHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++rowHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++rowHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++rowHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++rowHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++rowHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++table name='Data table' ++++++++rowGroup ignored ++++++++++row ++++++++++++columnHeader name='Alphabet' ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++none ignored ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++genericContainer ++++++++++++++staticText name='Alphabet' -++++++++++++++++inlineTextBox name='Alphabet' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-strong-expected-blink.txt b/content/test/data/accessibility/aria/aria-strong-expected-blink.txt index 77090944..eeec616e 100644 --- a/content/test/data/accessibility/aria/aria-strong-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-strong-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++strong ++++++++staticText name='role' -++++++++++inlineTextBox name='role' +++++++++++inlineTextBox ++++++strong ++++++++staticText name='element (no name)' -++++++++++inlineTextBox name='element (no name)' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++strong name='include me' ++++++++staticText name='element (with name)' -++++++++++inlineTextBox name='element (with name)' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-subscript-expected-blink.txt b/content/test/data/accessibility/aria/aria-subscript-expected-blink.txt index 3f3429f..293dee1 100644 --- a/content/test/data/accessibility/aria/aria-subscript-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-subscript-expected-blink.txt
@@ -3,31 +3,31 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This text contains ' -++++++++++inlineTextBox name='This text contains ' +++++++++++inlineTextBox ++++++++subscript textPosition=subscript ++++++++++staticText name='subscript' textPosition=subscript -++++++++++++inlineTextBox name='subscript' +++++++++++++inlineTextBox ++++++++staticText name=' text.' -++++++++++inlineTextBox name=' text.' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='H' -++++++++++inlineTextBox name='H' +++++++++++inlineTextBox ++++++++subscript textPosition=subscript ++++++++++staticText name=' ' textPosition=subscript -++++++++++++inlineTextBox name=' ' +++++++++++++inlineTextBox ++++++++++contentDeletion textPosition=subscript ++++++++++++genericContainer name='3' textPosition=subscript ++++++++++++++genericContainer name='oops' textPosition=subscript ++++++++++++++++staticText name='3' textPosition=subscript -++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++inlineTextBox ++++++++++staticText name=' ' textPosition=subscript -++++++++++++inlineTextBox name=' ' +++++++++++++inlineTextBox ++++++++++contentInsertion textPosition=subscript ++++++++++++link name='2' textPosition=subscript ++++++++++++++genericContainer name='better' textPosition=subscript ++++++++++++++++staticText name='2' textPosition=subscript -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++++staticText name=' ' textPosition=subscript -++++++++++++inlineTextBox name=' ' +++++++++++++inlineTextBox ++++++++staticText name='O' -++++++++++inlineTextBox name='O' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-superscript-expected-blink.txt b/content/test/data/accessibility/aria/aria-superscript-expected-blink.txt index 99ed94b..d8abfe88 100644 --- a/content/test/data/accessibility/aria/aria-superscript-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-superscript-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This text contains ' -++++++++++inlineTextBox name='This text contains ' +++++++++++inlineTextBox ++++++++superscript textPosition=superscript ++++++++++staticText name='superscript' textPosition=superscript -++++++++++++inlineTextBox name='superscript' +++++++++++++inlineTextBox ++++++++staticText name=' text.' -++++++++++inlineTextBox name=' text.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-switch-expected-blink.txt b/content/test/data/accessibility/aria/aria-switch-expected-blink.txt index 5cdca0e..6171884f 100644 --- a/content/test/data/accessibility/aria/aria-switch-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-switch-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++switch name='Switch1' checkedState=false ++++++++staticText name='Switch1' -++++++++++inlineTextBox name='Switch1' +++++++++++inlineTextBox ++++++switch name='Switch2' checkedState=false ++++++++staticText name='Switch2' -++++++++++inlineTextBox name='Switch2' +++++++++++inlineTextBox ++++++switch name='Switch3' checkedState=true ++++++++staticText name='Switch3' -++++++++++inlineTextBox name='Switch3' +++++++++++inlineTextBox ++++++switch name='Switch4' checkedState=false ++++++++staticText name='Switch4' -++++++++++inlineTextBox name='Switch4' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tab-expected-blink.txt b/content/test/data/accessibility/aria/aria-tab-expected-blink.txt index afdf0bf0..02a0f4f 100644 --- a/content/test/data/accessibility/aria/aria-tab-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tab-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++tabList horizontal setSize=2 ++++++++tab name='Tab 1' setSize=2 posInSet=1 selected=false ++++++++++staticText name='Tab 1' -++++++++++++inlineTextBox name='Tab 1' +++++++++++++inlineTextBox ++++++++tab name='Tab 2' setSize=2 posInSet=2 selected=false ++++++++++staticText name='Tab 2' -++++++++++++inlineTextBox name='Tab 2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tab-nested-in-lists-expected-blink.txt b/content/test/data/accessibility/aria/aria-tab-nested-in-lists-expected-blink.txt index a40afbc..c8311e4b 100644 --- a/content/test/data/accessibility/aria/aria-tab-nested-in-lists-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tab-nested-in-lists-expected-blink.txt
@@ -4,13 +4,13 @@ ++++++tabList horizontal setSize=5 ++++++++tab name='tab1' setSize=5 posInSet=2 selected=false ++++++++++staticText name='tab1' -++++++++++++inlineTextBox name='tab1' +++++++++++++inlineTextBox ++++++++tab name='tab2' setSize=5 posInSet=3 selected=false ++++++++++staticText name='tab2' -++++++++++++inlineTextBox name='tab2' +++++++++++++inlineTextBox ++++++++tab name='tab3' setSize=5 posInSet=4 selected=false ++++++++++staticText name='tab3' -++++++++++++inlineTextBox name='tab3' +++++++++++++inlineTextBox ++++++++tab name='tab4' setSize=5 posInSet=5 selected=false ++++++++++staticText name='tab4' -++++++++++++inlineTextBox name='tab4' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-table-expected-blink.txt b/content/test/data/accessibility/aria/aria-table-expected-blink.txt index c970851e..c4f8fe0 100644 --- a/content/test/data/accessibility/aria/aria-table-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-table-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++row ++++++++++columnHeader name='Browser' ++++++++++++staticText name='Browser' -++++++++++++++inlineTextBox name='Browser' +++++++++++++++inlineTextBox ++++++++++columnHeader name='Rendering Engine' ++++++++++++staticText name='Rendering Engine' -++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Chrome' ++++++++++++staticText name='Chrome' -++++++++++++++inlineTextBox name='Chrome' +++++++++++++++inlineTextBox ++++++++++cell name='Blink' ++++++++++++staticText name='Blink' -++++++++++++++inlineTextBox name='Blink' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tablist-aria-level-expected-blink.txt b/content/test/data/accessibility/aria/aria-tablist-aria-level-expected-blink.txt index adbb677..2ac5587 100644 --- a/content/test/data/accessibility/aria/aria-tablist-aria-level-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tablist-aria-level-expected-blink.txt
@@ -4,29 +4,29 @@ ++++++tabList horizontal setSize=2 ++++++++tab name='Tab 1 of 2, level 1' setSize=2 posInSet=1 selected=false ++++++++++staticText name='Tab 1 of 2, level 1' -++++++++++++inlineTextBox name='Tab 1 of 2, level 1' +++++++++++++inlineTextBox ++++++++tab name='Tab 2 of 2, level 1' setSize=2 posInSet=2 selected=false ++++++++++staticText name='Tab 2 of 2, level 1' -++++++++++++inlineTextBox name='Tab 2 of 2, level 1' +++++++++++++inlineTextBox ++++++tabList horizontal setSize=3 ++++++++tab name='Tab 1 of 3, level 2' setSize=3 posInSet=1 selected=false ++++++++++staticText name='Tab 1 of 3, level 2' -++++++++++++inlineTextBox name='Tab 1 of 3, level 2' +++++++++++++inlineTextBox ++++++++tab name='Tab 2 of 3, level 2' setSize=3 posInSet=2 selected=false ++++++++++staticText name='Tab 2 of 3, level 2' -++++++++++++inlineTextBox name='Tab 2 of 3, level 2' +++++++++++++inlineTextBox ++++++++tabList horizontal setSize=1 ++++++++++tab name='Tab 1 of 1, level 3' setSize=1 posInSet=1 selected=false ++++++++++++staticText name='Tab 1 of 1, level 3' -++++++++++++++inlineTextBox name='Tab 1 of 1, level 3' +++++++++++++++inlineTextBox ++++++++tab name='Tab 3 of 3, level 2' setSize=3 posInSet=3 selected=false ++++++++++staticText name='Tab 3 of 3, level 2' -++++++++++++inlineTextBox name='Tab 3 of 3, level 2' +++++++++++++inlineTextBox ++++++tabList horizontal setSize=1 ++++++++tab name='Tab 1 of 1, level 2' setSize=1 posInSet=1 selected=false ++++++++++staticText name='Tab 1 of 1, level 2' -++++++++++++inlineTextBox name='Tab 1 of 1, level 2' +++++++++++++inlineTextBox ++++++tabList horizontal setSize=1 ++++++++tab name='Tab 1 of 1, level 1' setSize=1 posInSet=1 selected=false ++++++++++staticText name='Tab 1 of 1, level 1' -++++++++++++inlineTextBox name='Tab 1 of 1, level 1' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt b/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt index f12b446..f8eb70f 100644 --- a/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt
@@ -4,21 +4,21 @@ ++++++tabList horizontal setSize=3 ++++++++tab name='Tab 1, level 1' setSize=3 posInSet=1 selected=false ++++++++++staticText name='Tab 1, level 1' -++++++++++++inlineTextBox name='Tab 1, level 1' +++++++++++++inlineTextBox ++++++++tab name='Tab 2, level 1' setSize=3 posInSet=2 selected=false ++++++++++staticText name='Tab 2, level 1' -++++++++++++inlineTextBox name='Tab 2, level 1' +++++++++++++inlineTextBox ++++++++tabList horizontal setSize=2 ++++++++++tab name='Tab 1, level 2' setSize=2 posInSet=1 selected=false ++++++++++++staticText name='Tab 1, level 2' -++++++++++++++inlineTextBox name='Tab 1, level 2' +++++++++++++++inlineTextBox ++++++++++tab name='Tab 2, level 2' setSize=2 posInSet=2 selected=false ++++++++++++staticText name='Tab 2, level 2' -++++++++++++++inlineTextBox name='Tab 2, level 2' +++++++++++++++inlineTextBox ++++++++++++tabList horizontal setSize=1 ++++++++++++++tab name='Tab 1, level 3' setSize=1 posInSet=1 selected=false ++++++++++++++++staticText name='Tab 1, level 3' -++++++++++++++++++inlineTextBox name='Tab 1, level 3' +++++++++++++++++++inlineTextBox ++++++++tab name='Tab 3, level 1' setSize=3 posInSet=3 selected=false ++++++++++staticText name='Tab 3, level 1' -++++++++++++inlineTextBox name='Tab 3, level 1' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt b/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt index c7cc488..ad9117e 100644 --- a/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt
@@ -5,11 +5,11 @@ ++++++++tab name='Item' selected=false ++++++++++heading name='Item' hierarchicalLevel=3 ++++++++++++staticText name='Item' -++++++++++++++inlineTextBox name='Item' +++++++++++++++inlineTextBox ++++++++tab name='Prices' selected=false ++++++++++heading name='Prices' hierarchicalLevel=3 ++++++++++++staticText name='Prices' -++++++++++++++inlineTextBox name='Prices' +++++++++++++++inlineTextBox ++++++tabPanel name='Item' ++++++++staticText name='Item tab content' -++++++++++inlineTextBox name='Item tab content' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-term-expected-blink.txt b/content/test/data/accessibility/aria/aria-term-expected-blink.txt index fe42249..7e5bf7dd 100644 --- a/content/test/data/accessibility/aria/aria-term-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-term-expected-blink.txt
@@ -4,13 +4,13 @@ ++++++list ++++++++term ++++++++++staticText name='Term1' -++++++++++++inlineTextBox name='Term1' +++++++++++++inlineTextBox ++++++++definition ++++++++++staticText name='Definition1' -++++++++++++inlineTextBox name='Definition1' +++++++++++++inlineTextBox ++++++++term ++++++++++staticText name='Term2' -++++++++++++inlineTextBox name='Term2' +++++++++++++inlineTextBox ++++++++definition ++++++++++staticText name='Definition2' -++++++++++++inlineTextBox name='Definition2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-textbox-with-aria-textbox-child-expected-blink.txt b/content/test/data/accessibility/aria/aria-textbox-with-aria-textbox-child-expected-blink.txt index 0974fed..a9956e2 100644 --- a/content/test/data/accessibility/aria/aria-textbox-with-aria-textbox-child-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-textbox-with-aria-textbox-child-expected-blink.txt
@@ -4,36 +4,36 @@ ++++++textField name='not editable' value='Foo<newline>Bar<newline>Bar<newline>Baz<newline>Baz' nonAtomicTextFieldRoot=true ++++++++paragraph ++++++++++staticText name='Foo' -++++++++++++inlineTextBox name='Foo' +++++++++++++inlineTextBox ++++++++textField name='nested, not editable, rich' value='Bar' nonAtomicTextFieldRoot=true ++++++++++paragraph ++++++++++++staticText name='Bar' -++++++++++++++inlineTextBox name='Bar' +++++++++++++++inlineTextBox ++++++++textField name='nested, not editable, plain' value='Bar' nonAtomicTextFieldRoot=true ++++++++++staticText name='Bar' -++++++++++++inlineTextBox name='Bar' +++++++++++++inlineTextBox ++++++++textField editable multiline richlyEditable name='nested, editable, rich' value='Baz' nonAtomicTextFieldRoot=true ++++++++++paragraph editable richlyEditable ++++++++++++staticText editable richlyEditable name='Baz' -++++++++++++++inlineTextBox editable richlyEditable name='Baz' +++++++++++++++inlineTextBox editable richlyEditable ++++++++textField editable multiline richlyEditable name='nested, editable, plain' value='Baz' nonAtomicTextFieldRoot=true ++++++++++staticText editable richlyEditable name='Baz' -++++++++++++inlineTextBox editable richlyEditable name='Baz' +++++++++++++inlineTextBox editable richlyEditable ++++++textField editable multiline richlyEditable name='editable' value='Foo<newline>Bar<newline>Bar<newline>Baz<newline>Baz' nonAtomicTextFieldRoot=true ++++++++paragraph editable richlyEditable ++++++++++staticText editable richlyEditable name='Foo' -++++++++++++inlineTextBox editable richlyEditable name='Foo' +++++++++++++inlineTextBox editable richlyEditable ++++++++textField editable richlyEditable name='nested, not editable, rich' value='Bar' nonAtomicTextFieldRoot=true ++++++++++paragraph editable richlyEditable ++++++++++++staticText editable richlyEditable name='Bar' -++++++++++++++inlineTextBox editable richlyEditable name='Bar' +++++++++++++++inlineTextBox editable richlyEditable ++++++++textField editable richlyEditable name='nested, not editable, plain' value='Bar' nonAtomicTextFieldRoot=true ++++++++++staticText editable richlyEditable name='Bar' -++++++++++++inlineTextBox editable richlyEditable name='Bar' +++++++++++++inlineTextBox editable richlyEditable ++++++++textField editable multiline richlyEditable name='nested, editable, rich' value='Baz' nonAtomicTextFieldRoot=true ++++++++++paragraph editable richlyEditable ++++++++++++staticText editable richlyEditable name='Baz' -++++++++++++++inlineTextBox editable richlyEditable name='Baz' +++++++++++++++inlineTextBox editable richlyEditable ++++++++textField editable multiline richlyEditable name='nested, editable, plain' value='Baz' nonAtomicTextFieldRoot=true ++++++++++staticText editable richlyEditable name='Baz' -++++++++++++inlineTextBox editable richlyEditable name='Baz' +++++++++++++inlineTextBox editable richlyEditable
diff --git a/content/test/data/accessibility/aria/aria-textbox-with-non-text-children-expected-blink.txt b/content/test/data/accessibility/aria/aria-textbox-with-non-text-children-expected-blink.txt index 71e53ca..b232f6ad 100644 --- a/content/test/data/accessibility/aria/aria-textbox-with-non-text-children-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-textbox-with-non-text-children-expected-blink.txt
@@ -3,50 +3,50 @@ ++++genericContainer ignored ++++++textField name='not editable' value='focusable: oklink name: <newline>' ++++++++staticText name='focusable: ' -++++++++++inlineTextBox name='focusable: ' +++++++++++inlineTextBox ++++++++button name='ok' ++++++++++staticText name='ok' -++++++++++++inlineTextBox name='ok' +++++++++++++inlineTextBox ++++++++link name='link' ++++++++++staticText name='link' -++++++++++++inlineTextBox name='link' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++labelText ++++++++++staticText name='name: ' -++++++++++++inlineTextBox name='name: ' +++++++++++++inlineTextBox ++++++++++textField name='name:' ++++++++++++genericContainer ++++++textField multiline name='editable' value='focusable: oklink name: <newline>' ++++++++staticText name='focusable: ' -++++++++++inlineTextBox name='focusable: ' +++++++++++inlineTextBox ++++++++button name='ok' ++++++++++staticText name='ok' -++++++++++++inlineTextBox name='ok' +++++++++++++inlineTextBox ++++++++link name='link' ++++++++++staticText name='link' -++++++++++++inlineTextBox name='link' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++labelText ++++++++++staticText name='name: ' -++++++++++++inlineTextBox name='name: ' +++++++++++++inlineTextBox ++++++++++textField name='name:' ++++++++++++genericContainer ++++++textField name='not editable or focusable' value='focusable: oklink name: <newline>' ++++++++staticText name='focusable: ' -++++++++++inlineTextBox name='focusable: ' +++++++++++inlineTextBox ++++++++button name='ok' ++++++++++staticText name='ok' -++++++++++++inlineTextBox name='ok' +++++++++++++inlineTextBox ++++++++link name='link' ++++++++++staticText name='link' -++++++++++++inlineTextBox name='link' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++labelText ++++++++++staticText name='name: ' -++++++++++++inlineTextBox name='name: ' +++++++++++++inlineTextBox ++++++++++textField name='name:' ++++++++++++genericContainer ++++++textField name='not editable, img child'
diff --git a/content/test/data/accessibility/aria/aria-time-expected-blink.txt b/content/test/data/accessibility/aria/aria-time-expected-blink.txt index c80bbd8..02cf971 100644 --- a/content/test/data/accessibility/aria/aria-time-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-time-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++time ++++++++staticText name='role' -++++++++++inlineTextBox name='role' +++++++++++inlineTextBox ++++++time ++++++++staticText name='element (no name)' -++++++++++inlineTextBox name='element (no name)' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++time name='include me' ++++++++staticText name='element (with name)' -++++++++++inlineTextBox name='element (with name)' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-timer-expected-blink.txt b/content/test/data/accessibility/aria/aria-timer-expected-blink.txt index 14fa0ac..a0ef9c733 100644 --- a/content/test/data/accessibility/aria/aria-timer-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-timer-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++timer ++++++++staticText name='This test is for aria-role = timer' -++++++++++inlineTextBox name='This test is for aria-role = timer' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt b/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt index 230e92b..0ec8238 100644 --- a/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-togglebutton-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++button name='Regular button' ++++++++staticText name='Regular button' -++++++++++inlineTextBox name='Regular button' +++++++++++inlineTextBox ++++++toggleButton name='Toggle button' checkedState=false ++++++++staticText name='Toggle button' -++++++++++inlineTextBox name='Toggle button' +++++++++++inlineTextBox ++++++toggleButton name='Toggle button' checkedState=true ++++++++staticText name='Toggle button' -++++++++++inlineTextBox name='Toggle button' +++++++++++inlineTextBox ++++++toggleButton name='Toggle button' checkedState=mixed ++++++++staticText name='Toggle button' -++++++++++inlineTextBox name='Toggle button' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt b/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt index 943c6bee..735bec6a 100644 --- a/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-toolbar-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++toolbar horizontal ++++++++staticText name='A toolbar' -++++++++++inlineTextBox name='A toolbar' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt b/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt index 0b068858..b7831ae 100644 --- a/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tooltip-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++genericContainer ++++++tooltip name='Your username should be your email id' ++++++++staticText name='Your username should be your email id' -++++++++++inlineTextBox name='Your username should be your email id' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tree-discontinuous-expected-blink.txt b/content/test/data/accessibility/aria/aria-tree-discontinuous-expected-blink.txt index 5aebcc1..6588d0b4 100644 --- a/content/test/data/accessibility/aria/aria-tree-discontinuous-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tree-discontinuous-expected-blink.txt
@@ -4,8 +4,8 @@ ++++++tree setSize=2 ++++++++treeItem name='card content' hierarchicalLevel=1 setSize=2 posInSet=1 selected=false ++++++++++staticText name='card content' -++++++++++++inlineTextBox name='card content' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++treeItem name='card content' hierarchicalLevel=1 setSize=2 posInSet=2 selected=false ++++++++++staticText name='card content' -++++++++++++inlineTextBox name='card content' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-tree-expected-blink.txt b/content/test/data/accessibility/aria/aria-tree-expected-blink.txt index 20f769ad..caf9dde 100644 --- a/content/test/data/accessibility/aria/aria-tree-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tree-expected-blink.txt
@@ -5,26 +5,26 @@ ++++++++treeItem name='Animals' hierarchicalLevel=1 setSize=2 posInSet=1 checkedState=mixed selected=false ++++++++++link name='Animals' ++++++++++++staticText name='Animals' -++++++++++++++inlineTextBox name='Animals' +++++++++++++++inlineTextBox ++++++++++group setSize=2 ++++++++++++treeItem name='Domesticated' hierarchicalLevel=2 setSize=2 posInSet=1 selected=false ++++++++++++++link name='Domesticated' ++++++++++++++++staticText name='Domesticated' -++++++++++++++++++inlineTextBox name='Domesticated' +++++++++++++++++++inlineTextBox ++++++++++++++group setSize=2 ++++++++++++++++treeItem name='Dog' hierarchicalLevel=3 setSize=2 posInSet=1 checkedState=true selected=false ++++++++++++++++++link name='Dog' ++++++++++++++++++++staticText name='Dog' -++++++++++++++++++++++inlineTextBox name='Dog' +++++++++++++++++++++++inlineTextBox ++++++++++++++++treeItem name='Cat' hierarchicalLevel=3 setSize=2 posInSet=2 checkedState=false selected=false ++++++++++++++++++link name='Cat' ++++++++++++++++++++staticText name='Cat' -++++++++++++++++++++++inlineTextBox name='Cat' +++++++++++++++++++++++inlineTextBox ++++++++++++treeItem name='Wild' hierarchicalLevel=2 setSize=2 posInSet=2 selected=false ++++++++++++++link name='Wild' ++++++++++++++++staticText name='Wild' -++++++++++++++++++inlineTextBox name='Wild' +++++++++++++++++++inlineTextBox ++++++++treeItem name='Plants' hierarchicalLevel=1 setSize=2 posInSet=2 selected=false ++++++++++link name='Plants' ++++++++++++staticText name='Plants' -++++++++++++++inlineTextBox name='Plants' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt b/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt index b694fd6a..d1bc73c 100644 --- a/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt
@@ -6,106 +6,106 @@ ++++++++++row name='Cell 1, row 1, level 1 Cell 2, row 1, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 1, level 1' ++++++++++++++staticText name='Cell 1, row 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, level 1' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell 2, row 1, level 1' ++++++++++++++staticText name='Cell 2, row 1, level 1' -++++++++++++++++inlineTextBox name='Cell 2, row 1, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 2, level 1 Cell 2, row 2, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 2, level 1' ++++++++++++++staticText name='Cell 1, row 2, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 2, level 1' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell 2, row 2, level 1' ++++++++++++++staticText name='Cell 2, row 2, level 1' -++++++++++++++++inlineTextBox name='Cell 2, row 2, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 3, level 1 Cell 2, row 3, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 3, level 1' ++++++++++++++staticText name='Cell 1, row 3, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 3, level 1' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell 2, row 3, level 1' ++++++++++++++staticText name='Cell 2, row 3, level 1' -++++++++++++++++inlineTextBox name='Cell 2, row 3, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 1, level 2' hierarchicalLevel=2 ++++++++++++cell name='Cell 1, row 1, level 2' ++++++++++++++staticText name='Cell 1, row 1, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 1, level 2' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 2, level 2' hierarchicalLevel=2 ++++++++++++cell name='Cell 1, row 2, level 2' ++++++++++++++staticText name='Cell 1, row 2, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 2, level 2' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 3, level 2' hierarchicalLevel=2 ++++++++++++cell name='Cell 1, row 3, level 2' ++++++++++++++staticText name='Cell 1, row 3, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 3, level 2' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 4, level 2' hierarchicalLevel=2 ++++++++++++cell name='Cell 1, row 4, level 2' ++++++++++++++staticText name='Cell 1, row 4, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 4, level 2' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 2, level 2' hierarchicalLevel=3 ++++++++++++cell name='Cell 1, row 2, level 2' ++++++++++++++staticText name='Cell 1, row 2, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 2, level 2' +++++++++++++++++inlineTextBox ++++++treeGrid ++++++++rowGroup setSize=4 ++++++++++row name='Cell 1, row 1, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 1, rowgroup 1, level 1' ++++++++++++++staticText name='Cell 1, row 1, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 2, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 2, rowgroup 1, level 1' ++++++++++++++staticText name='Cell 1, row 2, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 2, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 3, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 3, rowgroup 1, level 1' ++++++++++++++staticText name='Cell 1, row 3, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 3, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 1, rowgroup 1, level 2' hierarchicalLevel=2 ++++++++++++cell name='Cell 1, row 1, rowgroup 1, level 2' ++++++++++++++staticText name='Cell 1, row 1, rowgroup 1, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 1, level 2' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 1, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 1, rowgroup 1, level 1' ++++++++++++++staticText name='Cell 1, row 1, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++rowGroup setSize=1 ++++++++++row name='Cell 1, row 1, rowgroup 2, level 1 Cell 2, row 1, rowgroup 2, level 1' hierarchicalLevel=1 ++++++++++++cell name='Cell 1, row 1, rowgroup 2, level 1' ++++++++++++++staticText name='Cell 1, row 1, rowgroup 2, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 2, level 1' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell 2, row 1, rowgroup 2, level 1' ++++++++++++++staticText name='Cell 2, row 1, rowgroup 2, level 1' -++++++++++++++++inlineTextBox name='Cell 2, row 1, rowgroup 2, level 1' +++++++++++++++++inlineTextBox ++++++++++row name='Cell 1, row 1, rowgroup 2, level 2 Cell 2, row 1, rowgroup 2, level 2 Cell 3, row 1, rowgroup 2, level 2' hierarchicalLevel=2 ++++++++++++cell name='Cell 1, row 1, rowgroup 2, level 2' ++++++++++++++staticText name='Cell 1, row 1, rowgroup 2, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 2, level 2' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell 2, row 1, rowgroup 2, level 2' ++++++++++++++staticText name='Cell 2, row 1, rowgroup 2, level 2' -++++++++++++++++inlineTextBox name='Cell 2, row 1, rowgroup 2, level 2' +++++++++++++++++inlineTextBox ++++++++++++cell name='Cell 3, row 1, rowgroup 2, level 2' ++++++++++++++staticText name='Cell 3, row 1, rowgroup 2, level 2' -++++++++++++++++inlineTextBox name='Cell 3, row 1, rowgroup 2, level 2' +++++++++++++++++inlineTextBox ++++++treeGrid ++++++++genericContainer ignored ++++++++++rowGroup setSize=4 ++++++++++++row name='Cell 1, row 1, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++++staticText name='Cell 1, row 1, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++++row name='Cell 1, row 2, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++++staticText name='Cell 1, row 2, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 2, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++++row name='Cell 1, row 3, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++++staticText name='Cell 1, row 3, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 3, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++++row name='Cell 1, row 1, rowgroup 1, level 2' hierarchicalLevel=2 ++++++++++++++staticText name='Cell 1, row 1, rowgroup 1, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 1, level 2' +++++++++++++++++inlineTextBox ++++++++++++row name='Cell 1, row 1, rowgroup 1, level 1' hierarchicalLevel=1 ++++++++++++++staticText name='Cell 1, row 1, rowgroup 1, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 1, level 1' +++++++++++++++++inlineTextBox ++++++++++rowGroup setSize=1 ++++++++++++row name='Cell 1, row 1, rowgroup 2, level 1 Cell 2, row 1, rowgroup 2, level 1' hierarchicalLevel=1 ++++++++++++++staticText name='Cell 1, row 1, rowgroup 2, level 1 Cell 2, row 1, rowgroup 2, level 1' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 2, level 1 Cell 2, row 1, rowgroup 2, level 1' +++++++++++++++++inlineTextBox ++++++++++++row name='Cell 1, row 1, rowgroup 2, level 2 Cell 2, row 1, rowgroup 2, level 2 Cell 3, row 1, rowgroup 2, level 2' hierarchicalLevel=2 ++++++++++++++staticText name='Cell 1, row 1, rowgroup 2, level 2 Cell 2, row 1, rowgroup 2, level 2 Cell 3, row 1, rowgroup 2, level 2' -++++++++++++++++inlineTextBox name='Cell 1, row 1, rowgroup 2, level 2 Cell 2, row 1, rowgroup 2, level 2 Cell 3, row 1, rowgroup 2, level 2' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists-expected-blink.txt b/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists-expected-blink.txt index ce29886..1c1b56f 100644 --- a/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists-expected-blink.txt
@@ -4,52 +4,52 @@ ++++++tree setSize=5 isLineBreakingObject=true ++++++++treeItem name='treeitem 2 of 5, level 1' hierarchicalLevel=1 setSize=5 posInSet=2 selected=false isLineBreakingObject=true ++++++++++staticText name='treeitem 2 of 5, level 1' -++++++++++++inlineTextBox name='treeitem 2 of 5, level 1' +++++++++++++inlineTextBox ++++++++treeItem name='treeitem 3 of 5, level 1' hierarchicalLevel=1 setSize=5 posInSet=3 selected=false isLineBreakingObject=true ++++++++++staticText name='treeitem 3 of 5, level 1' -++++++++++++inlineTextBox name='treeitem 3 of 5, level 1' +++++++++++++inlineTextBox ++++++++treeItem name='treeitem 1 of 2, level 2' hierarchicalLevel=2 setSize=2 posInSet=1 selected=false isLineBreakingObject=true ++++++++++staticText name='treeitem 1 of 2, level 2' -++++++++++++inlineTextBox name='treeitem 1 of 2, level 2' +++++++++++++inlineTextBox ++++++++treeItem name='treeitem 1 of 1, level 3' hierarchicalLevel=3 setSize=1 posInSet=1 selected=false isLineBreakingObject=true ++++++++++staticText name='treeitem 1 of 1, level 3' -++++++++++++inlineTextBox name='treeitem 1 of 1, level 3' +++++++++++++inlineTextBox ++++++++treeItem name='treeitem 2 of 2, level 2' hierarchicalLevel=2 setSize=2 posInSet=2 selected=false isLineBreakingObject=true ++++++++++staticText name='treeitem 2 of 2, level 2' -++++++++++++inlineTextBox name='treeitem 2 of 2, level 2' +++++++++++++inlineTextBox ++++++tree setSize=3 isLineBreakingObject=true ++++++++staticText name='schedule' -++++++++++inlineTextBox name='schedule' +++++++++++inlineTextBox ++++++++treeItem name='wake up' hierarchicalLevel=1 setSize=3 posInSet=1 selected=false isLineBreakingObject=true ++++++++++none ignored -++++++++++++staticText name='%E2%80%A2 ' nextOnLineId=inlineTextBox:"wake up" -++++++++++++++inlineTextBox name='%E2%80%A2 ' nextOnLineId=inlineTextBox:"wake up" -++++++++++staticText name='wake up' previousOnLineId=inlineTextBox:"%E2%80%A2 " -++++++++++++inlineTextBox name='wake up' previousOnLineId=inlineTextBox:"%E2%80%A2 " +++++++++++++staticText name='%E2%80%A2 ' nextOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++staticText name='wake up' previousOnLineId=inlineTextBox +++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++treeItem name='drink coffee' hierarchicalLevel=1 setSize=3 posInSet=2 selected=false isLineBreakingObject=true ++++++++++none ignored -++++++++++++staticText name='%E2%80%A2 ' nextOnLineId=inlineTextBox:"drink coffee" -++++++++++++++inlineTextBox name='%E2%80%A2 ' nextOnLineId=inlineTextBox:"drink coffee" -++++++++++staticText name='drink coffee' previousOnLineId=inlineTextBox:"%E2%80%A2 " -++++++++++++inlineTextBox name='drink coffee' previousOnLineId=inlineTextBox:"%E2%80%A2 " +++++++++++++staticText name='%E2%80%A2 ' nextOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++staticText name='drink coffee' previousOnLineId=inlineTextBox +++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++++tree setSize=2 isLineBreakingObject=true ++++++++++++staticText name='tasks' -++++++++++++++inlineTextBox name='tasks' +++++++++++++++inlineTextBox ++++++++++++treeItem name='meeting' hierarchicalLevel=2 setSize=2 posInSet=1 selected=false isLineBreakingObject=true ++++++++++++++none ignored -++++++++++++++++staticText name='%E2%97%A6 ' nextOnLineId=inlineTextBox:"meeting" -++++++++++++++++++inlineTextBox name='%E2%97%A6 ' nextOnLineId=inlineTextBox:"meeting" -++++++++++++++staticText name='meeting' previousOnLineId=inlineTextBox:"%E2%97%A6 " -++++++++++++++++inlineTextBox name='meeting' previousOnLineId=inlineTextBox:"%E2%97%A6 " +++++++++++++++++staticText name='%E2%97%A6 ' nextOnLineId=inlineTextBox +++++++++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++++++staticText name='meeting' previousOnLineId=inlineTextBox +++++++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++++++treeItem name='lunch' hierarchicalLevel=2 setSize=2 posInSet=2 selected=false isLineBreakingObject=true ++++++++++++++none ignored -++++++++++++++++staticText name='%E2%97%A6 ' nextOnLineId=inlineTextBox:"lunch" -++++++++++++++++++inlineTextBox name='%E2%97%A6 ' nextOnLineId=inlineTextBox:"lunch" -++++++++++++++staticText name='lunch' previousOnLineId=inlineTextBox:"%E2%97%A6 " -++++++++++++++++inlineTextBox name='lunch' previousOnLineId=inlineTextBox:"%E2%97%A6 " +++++++++++++++++staticText name='%E2%97%A6 ' nextOnLineId=inlineTextBox +++++++++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++++++staticText name='lunch' previousOnLineId=inlineTextBox +++++++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++treeItem name='cook dinner' hierarchicalLevel=1 setSize=3 posInSet=3 selected=false isLineBreakingObject=true ++++++++++none ignored -++++++++++++staticText name='%E2%80%A2 ' nextOnLineId=inlineTextBox:"cook dinner" -++++++++++++++inlineTextBox name='%E2%80%A2 ' nextOnLineId=inlineTextBox:"cook dinner" -++++++++++staticText name='cook dinner' previousOnLineId=inlineTextBox:"%E2%80%A2 " -++++++++++++inlineTextBox name='cook dinner' previousOnLineId=inlineTextBox:"%E2%80%A2 " +++++++++++++staticText name='%E2%80%A2 ' nextOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++staticText name='cook dinner' previousOnLineId=inlineTextBox +++++++++++++inlineTextBox previousOnLineId=inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-two-owners-remove-one-expected-blink.txt b/content/test/data/accessibility/aria/aria-two-owners-remove-one-expected-blink.txt index 1bec84f..ffd3721 100644 --- a/content/test/data/accessibility/aria/aria-two-owners-remove-one-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-two-owners-remove-one-expected-blink.txt
@@ -7,13 +7,13 @@ ++++++++++++genericContainer ++++++++++++++button name='1' ++++++++++++++++staticText name='1' -++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++inlineTextBox ++++++genericContainer ignored ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='%E2%80%9C' -++++++++++++++inlineTextBox name='%E2%80%9C' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='%E2%80%9D' -++++++++++++++inlineTextBox name='%E2%80%9D' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria-virtualcontent-expected-blink.txt b/content/test/data/accessibility/aria/aria-virtualcontent-expected-blink.txt index 519b481..c2a088f 100644 --- a/content/test/data/accessibility/aria/aria-virtualcontent-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-virtualcontent-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++genericContainer virtualContent='block-end' ++++++++staticText name='hello world' -++++++++++inlineTextBox name='hello world' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt b/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt index dca2cb10..bf8fbdb8 100644 --- a/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='State' -++++++++++inlineTextBox name='State' +++++++++++inlineTextBox ++++++comboBoxGrouping name='State' haspopup=listbox ++++++++textField focusable activedescendantId=listBoxOption controlsIds=listBox ++++++++++genericContainer @@ -11,15 +11,15 @@ ++++++++listBoxOption focusable name='Alabama' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alabama' -++++++++++++inlineTextBox name='Alabama' +++++++++++++inlineTextBox ++++++++listBoxOption focusable name='Alaska' selected=true ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alaska' -++++++++++++inlineTextBox name='Alaska' +++++++++++++inlineTextBox ++++++comboBoxGrouping name='State' haspopup=listbox ++++++++textField focusable activedescendantId=listBoxOption controlsIds=listBox ++++++++++genericContainer @@ -27,12 +27,12 @@ ++++++++listBoxOption focusable name='Alabama' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alabama' -++++++++++++inlineTextBox name='Alabama' +++++++++++++inlineTextBox ++++++++listBoxOption focusable name='Alaska' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Alaska' -++++++++++++inlineTextBox name='Alaska' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/dpub-roles-computed-expected-blink.txt b/content/test/data/accessibility/aria/dpub-roles-computed-expected-blink.txt index a33344f..9932db4 100644 --- a/content/test/data/accessibility/aria/dpub-roles-computed-expected-blink.txt +++ b/content/test/data/accessibility/aria/dpub-roles-computed-expected-blink.txt
@@ -5,25 +5,25 @@ ++++++++list ++++++++++docBiblioEntry ++++++++++++staticText name='biblioentry' -++++++++++++++inlineTextBox name='biblioentry' +++++++++++++++inlineTextBox ++++++++++list ++++++++++++listItem ++++++++++++++staticText name='not a biblioentry' -++++++++++++++++inlineTextBox name='not a biblioentry' +++++++++++++++++inlineTextBox ++++++++list ++++++++++docBiblioEntry ++++++++++++staticText name='biblioentry' -++++++++++++++inlineTextBox name='biblioentry' +++++++++++++++inlineTextBox ++++++docEndnotes ++++++++list ++++++++++docEndnote ++++++++++++staticText name='endnote' -++++++++++++++inlineTextBox name='endnote' +++++++++++++++inlineTextBox ++++++++++list ++++++++++++listItem ++++++++++++++staticText name='not an endnote' -++++++++++++++++inlineTextBox name='not an endnote' +++++++++++++++++inlineTextBox ++++++++list ++++++++++docEndnote ++++++++++++staticText name='endnote' -++++++++++++++inlineTextBox name='endnote' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/input-text-aria-placeholder-expected-blink.txt b/content/test/data/accessibility/aria/input-text-aria-placeholder-expected-blink.txt index 9892aa7..2d6d0a6 100644 --- a/content/test/data/accessibility/aria/input-text-aria-placeholder-expected-blink.txt +++ b/content/test/data/accessibility/aria/input-text-aria-placeholder-expected-blink.txt
@@ -16,6 +16,6 @@ ++++++++genericContainer ++++++genericContainer ++++++++staticText name='aria-description5' -++++++++++inlineTextBox name='aria-description5' +++++++++++inlineTextBox ++++++textField name='title6' placeholder='aria-placeholder6' ++++++++genericContainer
diff --git a/content/test/data/accessibility/aria/label-with-selected-option-expected-blink.txt b/content/test/data/accessibility/aria/label-with-selected-option-expected-blink.txt index 07d708fe..42e6c69 100644 --- a/content/test/data/accessibility/aria/label-with-selected-option-expected-blink.txt +++ b/content/test/data/accessibility/aria/label-with-selected-option-expected-blink.txt
@@ -5,89 +5,89 @@ ++++++++checkBox name='Test 1: Flash the screen 2 times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 1: Flash the screen' -++++++++++++inlineTextBox name='Test 1: Flash the screen' +++++++++++++inlineTextBox ++++++++++listBox ++++++++++++listBoxOption name='1' selected=false ++++++++++++++staticText name='1' -++++++++++++++++inlineTextBox name='1' +++++++++++++++++inlineTextBox ++++++++++++listBoxOption name='2' selected=true ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++listBoxOption name='3' selected=false ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++++staticText name='times.' -++++++++++++inlineTextBox name='times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 2: Flash the screen 2 times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 2: Flash the screen' -++++++++++++inlineTextBox name='Test 2: Flash the screen' +++++++++++++inlineTextBox ++++++++++comboBoxGrouping ++++++++++++textField controlsIds=listBox ++++++++++++listBox ++++++++++++++listBoxOption name='1' selected=false ++++++++++++++++staticText name='1' -++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++inlineTextBox ++++++++++++++listBoxOption name='2' selected=true ++++++++++++++++staticText name='2' -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++++++++listBoxOption name='3' selected=false ++++++++++++++++staticText name='3' -++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++inlineTextBox ++++++++++staticText name='times.' -++++++++++++inlineTextBox name='times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 3: Flash the screen two times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 3: Flash the screen' -++++++++++++inlineTextBox name='Test 3: Flash the screen' +++++++++++++inlineTextBox ++++++++++listBox ++++++++++++listBoxOption name='1' selected=false ++++++++++++++staticText name='1' -++++++++++++++++inlineTextBox name='1' +++++++++++++++++inlineTextBox ++++++++++++listBoxOption name='two' selected=true ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++listBoxOption name='3' selected=false ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++++staticText name='times.' -++++++++++++inlineTextBox name='times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 4: Flash the screen two times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 4: Flash the screen' -++++++++++++inlineTextBox name='Test 4: Flash the screen' +++++++++++++inlineTextBox ++++++++++comboBoxGrouping ++++++++++++textField controlsIds=listBox ++++++++++++listBox ++++++++++++++listBoxOption name='1' selected=false ++++++++++++++++staticText name='1' -++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++inlineTextBox ++++++++++++++listBoxOption name='two' selected=true ++++++++++++++++staticText name='2' -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++++++++listBoxOption name='3' selected=false ++++++++++++++++staticText name='3' -++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++inlineTextBox ++++++++++staticText name='times.' -++++++++++++inlineTextBox name='times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 5: Flash the screen two times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 5: Flash the screen' -++++++++++++inlineTextBox name='Test 5: Flash the screen' +++++++++++++inlineTextBox ++++++++++comboBoxMenuButton value='two' ++++++++++++listBox ++++++++++++++listBoxOption name='1' selected=false ++++++++++++++++staticText name='1' -++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++inlineTextBox ++++++++++++++listBoxOption name='two' selected=true ++++++++++++++++staticText name='2' -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++++++++listBoxOption name='3' selected=false ++++++++++++++++staticText name='3' -++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++inlineTextBox ++++++++++staticText name='times.' -++++++++++++inlineTextBox name='times.' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/missing-relation-targets-added-later-expected-blink.txt b/content/test/data/accessibility/aria/missing-relation-targets-added-later-expected-blink.txt index da97b589..d7e592b25 100644 --- a/content/test/data/accessibility/aria/missing-relation-targets-added-later-expected-blink.txt +++ b/content/test/data/accessibility/aria/missing-relation-targets-added-later-expected-blink.txt
@@ -11,13 +11,13 @@ ++++++++genericContainer ++++++group ++++++++staticText name='controls target' -++++++++++inlineTextBox name='controls target' +++++++++++inlineTextBox ++++++group ++++++++staticText name='details target' -++++++++++inlineTextBox name='details target' +++++++++++inlineTextBox ++++++group ++++++++staticText name='errormessage target' -++++++++++inlineTextBox name='errormessage target' +++++++++++inlineTextBox ++++++group ++++++++staticText name='flowto target' -++++++++++inlineTextBox name='flowto target' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/presentational-expected-blink.txt b/content/test/data/accessibility/aria/presentational-expected-blink.txt index c8d5eea..51279cb 100644 --- a/content/test/data/accessibility/aria/presentational-expected-blink.txt +++ b/content/test/data/accessibility/aria/presentational-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++section ++++++++heading name='Heading with link' ++++++++++staticText name='Heading ' -++++++++++++inlineTextBox name='Heading ' +++++++++++++inlineTextBox ++++++++++link name='with link' ++++++++++++staticText name='with link' -++++++++++++++inlineTextBox name='with link' +++++++++++++++inlineTextBox ++++++++staticText name='Presentational heading ' -++++++++++inlineTextBox name='Presentational heading ' +++++++++++inlineTextBox ++++++++link name='with link' ++++++++++staticText name='with link' -++++++++++++inlineTextBox name='with link' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/presentational-menu-expected-blink.txt b/content/test/data/accessibility/aria/presentational-menu-expected-blink.txt index 741c7879..45bbcbc7 100644 --- a/content/test/data/accessibility/aria/presentational-menu-expected-blink.txt +++ b/content/test/data/accessibility/aria/presentational-menu-expected-blink.txt
@@ -7,10 +7,10 @@ ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='Menu item' -++++++++++++++inlineTextBox name='Menu item' +++++++++++++++inlineTextBox ++++++++none ignored ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Presentational menu item' -++++++++++++inlineTextBox name='Presentational menu item' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/presentational-ol-expected-blink.txt b/content/test/data/accessibility/aria/presentational-ol-expected-blink.txt index 77e3bb8..0523a2c 100644 --- a/content/test/data/accessibility/aria/presentational-ol-expected-blink.txt +++ b/content/test/data/accessibility/aria/presentational-ol-expected-blink.txt
@@ -7,10 +7,10 @@ ++++++++++++listMarker name='1. ' ++++++++++++++staticText ignored name='1. ' ++++++++++++staticText name='List' -++++++++++++++inlineTextBox name='List' +++++++++++++++inlineTextBox ++++++++none ignored ++++++++++none ignored ++++++++++++staticText name='1. ' -++++++++++++++inlineTextBox name='1. ' +++++++++++++++inlineTextBox ++++++++++staticText name='Presentational list item' -++++++++++++inlineTextBox name='Presentational list item' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/presentational-ul-expected-blink.txt b/content/test/data/accessibility/aria/presentational-ul-expected-blink.txt index ea70671..444dfd5 100644 --- a/content/test/data/accessibility/aria/presentational-ul-expected-blink.txt +++ b/content/test/data/accessibility/aria/presentational-ul-expected-blink.txt
@@ -7,23 +7,23 @@ ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='List' -++++++++++++++inlineTextBox name='List' +++++++++++++++inlineTextBox ++++++++list ++++++++++listItem ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='List role has no effect' -++++++++++++++inlineTextBox name='List role has no effect' +++++++++++++++inlineTextBox ++++++++none ignored ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Presentational list item' -++++++++++++inlineTextBox name='Presentational list item' +++++++++++++inlineTextBox ++++++++heading name='Another role also makes the item presentational' ++++++++++none ignored ++++++++++++none ignored ++++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++++inlineTextBox ++++++++++++staticText name='Another role also makes the item presentational' -++++++++++++++inlineTextBox name='Another role also makes the item presentational' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/role-change-delay-expected-blink.txt b/content/test/data/accessibility/aria/role-change-delay-expected-blink.txt index 092c218..03bd771 100644 --- a/content/test/data/accessibility/aria/role-change-delay-expected-blink.txt +++ b/content/test/data/accessibility/aria/role-change-delay-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++tabList horizontal ++++++++staticText name='tab list' -++++++++++inlineTextBox name='tab list' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/role-change-expected-blink.txt b/content/test/data/accessibility/aria/role-change-expected-blink.txt index b8aa0dd..b7eaf68 100644 --- a/content/test/data/accessibility/aria/role-change-expected-blink.txt +++ b/content/test/data/accessibility/aria/role-change-expected-blink.txt
@@ -5,10 +5,10 @@ ++++++++row ++++++++++cell name='Cell' ++++++++++++staticText name='Cell' -++++++++++++++inlineTextBox name='Cell' +++++++++++++++inlineTextBox ++++++++++cell name='Cell' ++++++++++++staticText name='Cell' -++++++++++++++inlineTextBox name='Cell' +++++++++++++++inlineTextBox ++++++table name='Real data table' ++++++++caption ++++++++++staticText name='Real data table' @@ -19,4 +19,4 @@ ++++++++++row ++++++++++++cell name='X' ++++++++++++++staticText name='X' -++++++++++++++++inlineTextBox name='X' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt b/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt index 93c34fd..b1361e8 100644 --- a/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt +++ b/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt
@@ -6,36 +6,36 @@ ++++++++++row ++++++++++++columnHeader name='Month' ariaCellColumnIndex=2 ariaCellRowIndex=2 ++++++++++++++staticText name='Month' -++++++++++++++++inlineTextBox name='Month' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Day' ariaCellColumnIndex=3 ariaCellRowIndex=2 ++++++++++++++staticText name='Day' -++++++++++++++++inlineTextBox name='Day' +++++++++++++++++inlineTextBox ++++++++++++columnHeader ignored invisible ++++++++++++columnHeader name='Weather' ariaCellColumnIndex=5 ariaCellRowIndex=2 ++++++++++++++staticText name='Weather' -++++++++++++++++inlineTextBox name='Weather' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='January' ariaCellColumnIndex=2 ariaCellRowIndex=3 ++++++++++++++staticText name='January' -++++++++++++++++inlineTextBox name='January' +++++++++++++++++inlineTextBox ++++++++++++cell name='01' ariaCellColumnIndex=3 ariaCellRowIndex=3 ++++++++++++++staticText name='01' -++++++++++++++++inlineTextBox name='01' +++++++++++++++++inlineTextBox ++++++++++++cell ignored invisible ++++++++++++cell name='Sunny' ariaCellColumnIndex=5 ariaCellRowIndex=3 ++++++++++++++staticText name='Sunny' -++++++++++++++++inlineTextBox name='Sunny' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='January' ariaCellColumnIndex=2 ariaCellRowIndex=4 ++++++++++++++staticText name='January' -++++++++++++++++inlineTextBox name='January' +++++++++++++++++inlineTextBox ++++++++++++cell name='02' ariaCellColumnIndex=3 ariaCellRowIndex=4 ++++++++++++++staticText name='02' -++++++++++++++++inlineTextBox name='02' +++++++++++++++++inlineTextBox ++++++++++++cell ignored invisible ++++++++++++cell name='Rainy' ariaCellColumnIndex=5 ariaCellRowIndex=4 ++++++++++++++staticText name='Rainy' -++++++++++++++++inlineTextBox name='Rainy' +++++++++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='done' -++++++++++inlineTextBox name='done' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/aria/toggle-button-expand-collapse-expected-blink.txt b/content/test/data/accessibility/aria/toggle-button-expand-collapse-expected-blink.txt index eef53376..bd06db30 100644 --- a/content/test/data/accessibility/aria/toggle-button-expand-collapse-expected-blink.txt +++ b/content/test/data/accessibility/aria/toggle-button-expand-collapse-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++toggleButton collapsed name='Toggle button, pressed, collapsed' checkedState=true ++++++++staticText name='Toggle button, pressed, collapsed' -++++++++++inlineTextBox name='Toggle button, pressed, collapsed' +++++++++++inlineTextBox ++++++toggleButton collapsed name='Toggle button, not pressed, collapsed' checkedState=false ++++++++staticText name='Toggle button, not pressed, collapsed' -++++++++++inlineTextBox name='Toggle button, not pressed, collapsed' +++++++++++inlineTextBox ++++++toggleButton expanded name='Toggle button, pressed, expanded' checkedState=true ++++++++staticText name='Toggle button, pressed, expanded' -++++++++++inlineTextBox name='Toggle button, pressed, expanded' +++++++++++inlineTextBox ++++++toggleButton expanded name='Toggle button, not pressed, collapsed"' checkedState=false ++++++++staticText name='Toggle button, not pressed, collapsed"' -++++++++++inlineTextBox name='Toggle button, not pressed, collapsed"' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/alt-text-expected-blink.txt b/content/test/data/accessibility/css/alt-text-expected-blink.txt index d8b9c9e..c997385 100644 --- a/content/test/data/accessibility/css/alt-text-expected-blink.txt +++ b/content/test/data/accessibility/css/alt-text-expected-blink.txt
@@ -4,63 +4,63 @@ ++++++genericContainer ++++++++genericContainer ignored ++++++++++staticText name='item1item2' -++++++++++++inlineTextBox name='item1item2' +++++++++++++inlineTextBox ++++++++++image ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='code' ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++staticText ignored ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++image name='star' ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++image ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='a list of items' ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++image ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++genericContainer ++++++++paragraph ++++++++++staticText name='Some Text' -++++++++++++inlineTextBox name='Some Text' +++++++++++++inlineTextBox ++++++image name='alt' ++++++genericContainer ++++++++staticText name='DOM Text' -++++++++++inlineTextBox name='DOM Text' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='DOM Text' -++++++++++inlineTextBox name='DOM Text' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/background-color-transparent-expected-blink.txt b/content/test/data/accessibility/css/background-color-transparent-expected-blink.txt index 0918606..9bde13d0 100644 --- a/content/test/data/accessibility/css/background-color-transparent-expected-blink.txt +++ b/content/test/data/accessibility/css/background-color-transparent-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored backgroundColor=ffffff color=000000 ++++++genericContainer backgroundColor=ffffff color=000000 ++++++++staticText name='Document base color.' backgroundColor=ffffff color=000000 -++++++++++inlineTextBox name='Document base color.' backgroundColor=ffffff color=000000 +++++++++++inlineTextBox backgroundColor=ffffff color=000000 ++++++genericContainer ignored backgroundColor=0000ff color=000000 ++++++++paragraph backgroundColor=0000ff color=000000 ++++++++++staticText name='Transparent color.' backgroundColor=0000ff color=000000 -++++++++++++inlineTextBox name='Transparent color.' backgroundColor=0000ff color=000000 +++++++++++++inlineTextBox backgroundColor=0000ff color=000000 ++++++genericContainer ignored backgroundColor=0000ff color=000000 ++++++++genericContainer ignored backgroundColor=008000 color=000000 ++++++++++paragraph backgroundColor=008000 color=000000 ++++++++++++staticText name='Obscuring background.' backgroundColor=008000 color=000000 -++++++++++++++inlineTextBox name='Obscuring background.' backgroundColor=008000 color=000000 +++++++++++++++inlineTextBox backgroundColor=008000 color=000000 ++++++paragraph backgroundColor=bfbfbf color=000000 ++++++++staticText name='Blended with document base color.' backgroundColor=9f9f9f color=000000 -++++++++++inlineTextBox name='Blended with document base color.' backgroundColor=9f9f9f color=000000 +++++++++++inlineTextBox backgroundColor=9f9f9f color=000000 ++++++genericContainer ignored backgroundColor=bfbfbf color=000000 ++++++++paragraph backgroundColor=9f9f9f color=000000 ++++++++++staticText name='Blended with background color.' backgroundColor=8f8f8f color=000000 -++++++++++++inlineTextBox name='Blended with background color.' backgroundColor=8f8f8f color=000000 +++++++++++++inlineTextBox backgroundColor=8f8f8f color=000000
diff --git a/content/test/data/accessibility/css/before-after-block-expected-blink.txt b/content/test/data/accessibility/css/before-after-block-expected-blink.txt index f8bb317e..5d73af7 100644 --- a/content/test/data/accessibility/css/before-after-block-expected-blink.txt +++ b/content/test/data/accessibility/css/before-after-block-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ignored htmlTag='body' ++++++genericContainer htmlTag='div' ++++++++staticText name='A' -++++++++++inlineTextBox name='A' +++++++++++inlineTextBox ++++++++genericContainer ignored htmlTag='b' ++++++++++genericContainer htmlTag='::before' ++++++++++staticText name='bold' -++++++++++++inlineTextBox name='bold' +++++++++++++inlineTextBox ++++++++staticText name=' element' -++++++++++inlineTextBox name=' element' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/color-expected-blink.txt b/content/test/data/accessibility/css/color-expected-blink.txt index fa22715..29670944 100644 --- a/content/test/data/accessibility/css/color-expected-blink.txt +++ b/content/test/data/accessibility/css/color-expected-blink.txt
@@ -3,15 +3,15 @@ ++++genericContainer ignored backgroundColor=ffffff color=000000 ++++++paragraph backgroundColor=0000ff color=ff0000 ++++++++staticText name='Red on blue.' backgroundColor=0000ff color=ff0000 -++++++++++inlineTextBox name='Red on blue.' backgroundColor=0000ff color=ff0000 +++++++++++inlineTextBox backgroundColor=0000ff color=ff0000 ++++++genericContainer multiline value='Default. Blue background. Green text.' backgroundColor=ffffff color=000000 ++++++++staticText name='Default.' backgroundColor=ffffff color=000000 -++++++++++inlineTextBox name='Default.' backgroundColor=ffffff color=000000 +++++++++++inlineTextBox backgroundColor=ffffff color=000000 ++++++++staticText name=' ' backgroundColor=ffffff color=000000 -++++++++++inlineTextBox name=' ' backgroundColor=ffffff color=000000 +++++++++++inlineTextBox backgroundColor=ffffff color=000000 ++++++++staticText name='Blue background.' backgroundColor=0000ff color=000000 -++++++++++inlineTextBox name='Blue background.' backgroundColor=0000ff color=000000 +++++++++++inlineTextBox backgroundColor=0000ff color=000000 ++++++++staticText name=' ' backgroundColor=ffffff color=000000 -++++++++++inlineTextBox name=' ' backgroundColor=ffffff color=000000 +++++++++++inlineTextBox backgroundColor=ffffff color=000000 ++++++++staticText name='Green text.' backgroundColor=ffffff color=00ff00 -++++++++++inlineTextBox name='Green text.' backgroundColor=ffffff color=00ff00 +++++++++++inlineTextBox backgroundColor=ffffff color=00ff00
diff --git a/content/test/data/accessibility/css/counter-text-expected-blink.txt b/content/test/data/accessibility/css/counter-text-expected-blink.txt index 53a953c..e37e180 100644 --- a/content/test/data/accessibility/css/counter-text-expected-blink.txt +++ b/content/test/data/accessibility/css/counter-text-expected-blink.txt
@@ -6,24 +6,24 @@ ++++++++++listItem ++++++++++++genericContainer ignored ++++++++++++++staticText name='1' -++++++++++++++++inlineTextBox name='1' +++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++staticText name='line1' -++++++++++++++inlineTextBox name='line1' +++++++++++++++inlineTextBox ++++++++++listItem ++++++++++++genericContainer ignored ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++staticText name='line2' -++++++++++++++inlineTextBox name='line2' +++++++++++++++inlineTextBox ++++++++++listItem ++++++++++++genericContainer ignored ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++staticText name='line3' -++++++++++++++inlineTextBox name='line3' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/display-contents-expected-blink.txt b/content/test/data/accessibility/css/display-contents-expected-blink.txt index c91b8bf..4db99a1 100644 --- a/content/test/data/accessibility/css/display-contents-expected-blink.txt +++ b/content/test/data/accessibility/css/display-contents-expected-blink.txt
@@ -4,20 +4,20 @@ ++++++paragraph ++++++++button name='Button' ++++++++++staticText name='Button' -++++++++++++inlineTextBox name='Button' +++++++++++++inlineTextBox ++++++paragraph ignored ++++++listBox ++++++++staticText name='Listbox' -++++++++++inlineTextBox name='Listbox' +++++++++++inlineTextBox ++++++paragraph ignored ++++++paragraph ignored ++++++genericContainer description='Description' descriptionFrom=relatedElement ++++++genericContainer ++++++++staticText name='Description' -++++++++++inlineTextBox name='Description' +++++++++++inlineTextBox ++++++paragraph ignored ++++++staticText name='Generic' -++++++++inlineTextBox name='Generic' +++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Generic (nested)' -++++++++++inlineTextBox name='Generic (nested)' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/display-list-item-expected-blink.txt b/content/test/data/accessibility/css/display-list-item-expected-blink.txt index 262395bf..3cef88e7 100644 --- a/content/test/data/accessibility/css/display-list-item-expected-blink.txt +++ b/content/test/data/accessibility/css/display-list-item-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++listMarker name='%E2%80%A2 ' ++++++++++staticText ignored name='%E2%80%A2 ' ++++++++staticText name='CSS list item' -++++++++++inlineTextBox name='CSS list item' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/display-table-pseudo-elements-expected-blink.txt b/content/test/data/accessibility/css/display-table-pseudo-elements-expected-blink.txt index 8e00385..82b84c8 100644 --- a/content/test/data/accessibility/css/display-table-pseudo-elements-expected-blink.txt +++ b/content/test/data/accessibility/css/display-table-pseudo-elements-expected-blink.txt
@@ -8,56 +8,56 @@ ++++++++++++++genericContainer ignored ++++++++++++++++genericContainer ++++++++++++++++++staticText name='1' -++++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++++inlineTextBox ++++++++++staticText name='Heading' -++++++++++++inlineTextBox name='Heading' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++genericContainer ignored ++++++++++++++++genericContainer ++++++++++++++++++staticText name='1' -++++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++++inlineTextBox ++++++++staticText name='\nParagraph' -++++++++++inlineTextBox name='\nParagraph' +++++++++++inlineTextBox ++++++genericContainer ignored ++++++++heading name='2 Heading 2' ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='2' -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++++staticText name='Heading' -++++++++++++inlineTextBox name='Heading' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='2' -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++staticText name='\nParagraph' -++++++++++inlineTextBox name='\nParagraph' +++++++++++inlineTextBox ++++++genericContainer ignored ++++++++heading name='3 Heading 3' ++++++++++genericContainer ignored ++++++++++++genericContainer ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++++staticText name='Heading' -++++++++++++inlineTextBox name='Heading' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++genericContainer ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++staticText name='\nParagraph' -++++++++++inlineTextBox name='\nParagraph' +++++++++++inlineTextBox ++++++genericContainer ignored ++++++++heading name='4 Heading 4' ++++++++++genericContainer ++++++++++++staticText name='4' -++++++++++++++inlineTextBox name='4' +++++++++++++++inlineTextBox ++++++++++staticText name='Heading' -++++++++++++inlineTextBox name='Heading' +++++++++++++inlineTextBox ++++++++++genericContainer ++++++++++++staticText name='4' -++++++++++++++inlineTextBox name='4' +++++++++++++++inlineTextBox ++++++++staticText name='\nParagraph' -++++++++++inlineTextBox name='\nParagraph' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/display-to-block-expected-blink.txt b/content/test/data/accessibility/css/display-to-block-expected-blink.txt index 2cef080..687212d 100644 --- a/content/test/data/accessibility/css/display-to-block-expected-blink.txt +++ b/content/test/data/accessibility/css/display-to-block-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++genericContainer ignored ++++++++genericContainer display='block' ++++++++++staticText name='Cats' -++++++++++++inlineTextBox name='Cats' +++++++++++++inlineTextBox ++++++++genericContainer display='block' ++++++++++checkBox display='inline-block' name='checkbox' checkedState=false ++++++++genericContainer display='block' ++++++++++code display='inline' ++++++++++++staticText name='done' -++++++++++++++inlineTextBox name='done' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/display-to-inline-expected-blink.txt b/content/test/data/accessibility/css/display-to-inline-expected-blink.txt index aa675cd..9130ca4 100644 --- a/content/test/data/accessibility/css/display-to-inline-expected-blink.txt +++ b/content/test/data/accessibility/css/display-to-inline-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ignored ++++++genericContainer ignored ++++++++staticText name='Cats ' -++++++++++inlineTextBox name='Cats ' +++++++++++inlineTextBox ++++++++genericContainer display='inline' ++++++++++checkBox display='inline-block' name='checkbox' checkedState=false ++++++++genericContainer display='block' ++++++++++code display='inline' ++++++++++++staticText name='done' -++++++++++++++inlineTextBox name='done' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/display-to-none-expected-blink.txt b/content/test/data/accessibility/css/display-to-none-expected-blink.txt index 9cd26f2..c1d14559 100644 --- a/content/test/data/accessibility/css/display-to-none-expected-blink.txt +++ b/content/test/data/accessibility/css/display-to-none-expected-blink.txt
@@ -4,8 +4,8 @@ ++++++genericContainer ignored ++++++++genericContainer display='block' ++++++++++staticText name='Cats' -++++++++++++inlineTextBox name='Cats' +++++++++++++inlineTextBox ++++++++genericContainer display='block' ++++++++++code display='inline' ++++++++++++staticText name='done' -++++++++++++++inlineTextBox name='done' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/first-letter-expected-blink.txt b/content/test/data/accessibility/css/first-letter-expected-blink.txt index c4a1b7d..a4c02ba 100644 --- a/content/test/data/accessibility/css/first-letter-expected-blink.txt +++ b/content/test/data/accessibility/css/first-letter-expected-blink.txt
@@ -3,17 +3,17 @@ ++++genericContainer ignored ++++++heading name='Chapter 1' ++++++++staticText name='Chapter 1' -++++++++++inlineTextBox name='Chapter 1' +++++++++++inlineTextBox ++++++paragraph ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='T' -++++++++++++++inlineTextBox name='T' +++++++++++++++inlineTextBox ++++++++staticText name='his starts with a large T.' -++++++++++inlineTextBox name='his starts with a large T.' +++++++++++inlineTextBox ++++++heading name='%E0%A4%B8%E0%A5%8D%E0%A4%A5%E0%A4%B2%E0%A5%8B%E0%A4%82' ++++++++staticText name='%E0%A4%B8%E0%A5%8D%E0%A4%A5%E0%A4%B2%E0%A5%8B%E0%A4%82' -++++++++++inlineTextBox name='%E0%A4%B8%E0%A5%8D%E0%A4%A5%E0%A4%B2%E0%A5%8B%E0%A4%82' +++++++++++inlineTextBox ++++++heading name='((AB))C' ++++++++staticText name='((AB))C' -++++++++++inlineTextBox name='((AB))C' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/font-size-expected-blink.txt b/content/test/data/accessibility/css/font-size-expected-blink.txt index 3ff03ed..0aeddf4 100644 --- a/content/test/data/accessibility/css/font-size-expected-blink.txt +++ b/content/test/data/accessibility/css/font-size-expected-blink.txt
@@ -3,67 +3,67 @@ ++++genericContainer ignored ++++++paragraph fontSize=10.23 ++++++++staticText name='10.2340920823px' fontSize=10.23 -++++++++++inlineTextBox name='10.2340920823px' +++++++++++inlineTextBox ++++++paragraph fontSize=10.00 ++++++++staticText name='10px' fontSize=10.00 -++++++++++inlineTextBox name='10px' +++++++++++inlineTextBox ++++++paragraph fontSize=11.00 ++++++++staticText name='11px' fontSize=11.00 -++++++++++inlineTextBox name='11px' +++++++++++inlineTextBox ++++++paragraph fontSize=12.00 ++++++++staticText name='12px' fontSize=12.00 -++++++++++inlineTextBox name='12px' +++++++++++inlineTextBox ++++++paragraph fontSize=13.00 ++++++++staticText name='13px' fontSize=13.00 -++++++++++inlineTextBox name='13px' +++++++++++inlineTextBox ++++++paragraph fontSize=14.00 ++++++++staticText name='14px' fontSize=14.00 -++++++++++inlineTextBox name='14px' +++++++++++inlineTextBox ++++++paragraph fontSize=15.00 ++++++++staticText name='15px' fontSize=15.00 -++++++++++inlineTextBox name='15px' +++++++++++inlineTextBox ++++++paragraph fontSize=20.00 ++++++++staticText name='20px' fontSize=20.00 -++++++++++inlineTextBox name='20px' +++++++++++inlineTextBox ++++++paragraph fontSize=40.00 ++++++++staticText name='40px' fontSize=40.00 -++++++++++inlineTextBox name='40px' +++++++++++inlineTextBox ++++++paragraph fontSize=50.00 ++++++++staticText name='50px' fontSize=50.00 -++++++++++inlineTextBox name='50px' +++++++++++inlineTextBox ++++++paragraph fontSize=100.00 ++++++++staticText name='100px' fontSize=100.00 -++++++++++inlineTextBox name='100px' +++++++++++inlineTextBox ++++++paragraph fontSize=13.65 ++++++++staticText name='10.2340920823pt' fontSize=13.65 -++++++++++inlineTextBox name='10.2340920823pt' +++++++++++inlineTextBox ++++++paragraph fontSize=13.33 ++++++++staticText name='10pt' fontSize=13.33 -++++++++++inlineTextBox name='10pt' +++++++++++inlineTextBox ++++++paragraph fontSize=14.67 ++++++++staticText name='11pt' fontSize=14.67 -++++++++++inlineTextBox name='11pt' +++++++++++inlineTextBox ++++++paragraph fontSize=16.00 ++++++++staticText name='12pt' fontSize=16.00 -++++++++++inlineTextBox name='12pt' +++++++++++inlineTextBox ++++++paragraph fontSize=17.33 ++++++++staticText name='13pt' fontSize=17.33 -++++++++++inlineTextBox name='13pt' +++++++++++inlineTextBox ++++++paragraph fontSize=18.67 ++++++++staticText name='14pt' fontSize=18.67 -++++++++++inlineTextBox name='14pt' +++++++++++inlineTextBox ++++++paragraph fontSize=20.00 ++++++++staticText name='15pt' fontSize=20.00 -++++++++++inlineTextBox name='15pt' +++++++++++inlineTextBox ++++++paragraph fontSize=26.67 ++++++++staticText name='20pt' fontSize=26.67 -++++++++++inlineTextBox name='20pt' +++++++++++inlineTextBox ++++++paragraph fontSize=53.33 ++++++++staticText name='40pt' fontSize=53.33 -++++++++++inlineTextBox name='40pt' +++++++++++inlineTextBox ++++++paragraph fontSize=66.67 ++++++++staticText name='50pt' fontSize=66.67 -++++++++++inlineTextBox name='50pt' +++++++++++inlineTextBox ++++++paragraph fontSize=133.33 ++++++++staticText name='100pt' fontSize=133.33 -++++++++++inlineTextBox name='100pt' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/font-style-expected-blink.txt b/content/test/data/accessibility/css/font-style-expected-blink.txt index 691a0428..14b75463 100644 --- a/content/test/data/accessibility/css/font-style-expected-blink.txt +++ b/content/test/data/accessibility/css/font-style-expected-blink.txt
@@ -3,53 +3,53 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='The ' -++++++++++inlineTextBox name='The ' +++++++++++inlineTextBox ++++++++staticText name='quick' textStyle=2 -++++++++++inlineTextBox name='quick' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='brown' textStyle=4 -++++++++++inlineTextBox name='brown' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='fox' textStyle=8 -++++++++++inlineTextBox name='fox' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='jumped' textStyle=6 -++++++++++inlineTextBox name='jumped' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='over' textStyle=12 -++++++++++inlineTextBox name='over' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='dog' textStyle=14 -++++++++++inlineTextBox name='dog' +++++++++++inlineTextBox ++++++genericContainer multiline value='Normal bold italic underline line-through subscript superscript' ++++++++staticText name='Normal' -++++++++++inlineTextBox name='Normal' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='bold' textStyle=2 -++++++++++inlineTextBox name='bold' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='italic' textStyle=4 -++++++++++inlineTextBox name='italic' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='underline' textStyle=8 -++++++++++inlineTextBox name='underline' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='line-through' textStyle=16 -++++++++++inlineTextBox name='line-through' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='subscript' textPosition=subscript -++++++++++inlineTextBox name='subscript' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='superscript' textPosition=superscript -++++++++++inlineTextBox name='superscript' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/head-style-script-display-block-expected-blink.txt b/content/test/data/accessibility/css/head-style-script-display-block-expected-blink.txt index 37cfe9d..7cc2270 100644 --- a/content/test/data/accessibility/css/head-style-script-display-block-expected-blink.txt +++ b/content/test/data/accessibility/css/head-style-script-display-block-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored htmlTag='head' ++++++genericContainer htmlTag='style' ++++++++staticText name='head,style,script { display:block; }' -++++++++++inlineTextBox name='head,style,script { display:block; }' +++++++++++inlineTextBox ++++++genericContainer htmlTag='script' ++++++++staticText name='var x = 3;' -++++++++++inlineTextBox name='var x = 3;' +++++++++++inlineTextBox ++++genericContainer ignored htmlTag='body' ++++++genericContainer htmlTag='style' ++++++++staticText name='p { outline: 2px solid green; }' -++++++++++inlineTextBox name='p { outline: 2px solid green; }' +++++++++++inlineTextBox ++++++genericContainer htmlTag='script' ++++++++staticText name='var x = 3;' -++++++++++inlineTextBox name='var x = 3;' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/iframe-hidden-expected-blink.txt b/content/test/data/accessibility/css/iframe-hidden-expected-blink.txt index b00fd1d..6879f2d9 100644 --- a/content/test/data/accessibility/css/iframe-hidden-expected-blink.txt +++ b/content/test/data/accessibility/css/iframe-hidden-expected-blink.txt
@@ -4,16 +4,16 @@ ++++++main ++++++++paragraph ++++++++++staticText name='Before visibility:collapse iframes' -++++++++++++inlineTextBox name='Before visibility:collapse iframes' +++++++++++++inlineTextBox ++++++++paragraph ++++++++++staticText name='After visibility:collapse iframes' -++++++++++++inlineTextBox name='After visibility:collapse iframes' +++++++++++++inlineTextBox ++++++genericContainer ignored ++++++++splitter horizontal ++++++footer ++++++++paragraph ++++++++++staticText name='Before display:none iframes' -++++++++++++inlineTextBox name='Before display:none iframes' +++++++++++++inlineTextBox ++++++++paragraph ++++++++++staticText name='After display:none iframes' -++++++++++++inlineTextBox name='After display:none iframes' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/inline-position-relative-expected-blink.txt b/content/test/data/accessibility/css/inline-position-relative-expected-blink.txt index cbab5dd5..676ee6f 100644 --- a/content/test/data/accessibility/css/inline-position-relative-expected-blink.txt +++ b/content/test/data/accessibility/css/inline-position-relative-expected-blink.txt
@@ -4,6 +4,6 @@ ++++++genericContainer pageLocation=(0, 0) ++++++++genericContainer pageLocation=(0, 0) ++++++++++staticText pageLocation=(0, 0) name='Before' -++++++++++++inlineTextBox pageLocation=(0, 0) name='Before' +++++++++++++inlineTextBox pageLocation=(0, 0) ++++++++staticText pageLocation=(100, 0) name='After' -++++++++++inlineTextBox pageLocation=(100, 0) name='After' +++++++++++inlineTextBox pageLocation=(100, 0)
diff --git a/content/test/data/accessibility/css/language-expected-blink.txt b/content/test/data/accessibility/css/language-expected-blink.txt index 6bfe5b6..856a35b 100644 --- a/content/test/data/accessibility/css/language-expected-blink.txt +++ b/content/test/data/accessibility/css/language-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored language='en-US' ++++++paragraph language='es-ES' ++++++++staticText language='es-ES' name='Espanyol' -++++++++++inlineTextBox language='es-ES' name='Espanyol' +++++++++++inlineTextBox language='es-ES' ++++++none ignored language='fr-FR' ++++++++staticText language='fr-FR' name='Comment allez-vous?' -++++++++++inlineTextBox language='fr-FR' name='Comment allez-vous?' +++++++++++inlineTextBox language='fr-FR'
diff --git a/content/test/data/accessibility/css/list-marker-styles-custom-expected-blink.txt b/content/test/data/accessibility/css/list-marker-styles-custom-expected-blink.txt index 53705ec..c00c89f 100644 --- a/content/test/data/accessibility/css/list-marker-styles-custom-expected-blink.txt +++ b/content/test/data/accessibility/css/list-marker-styles-custom-expected-blink.txt
@@ -6,37 +6,37 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='disc' -++++++++++++inlineTextBox name='disc' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=circle ++++++++++listMarker name='%E2%97%A6 ' ++++++++++++staticText ignored name='%E2%97%A6 ' ++++++++++staticText name='circle' -++++++++++++inlineTextBox name='circle' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=square ++++++++++listMarker name='%E2%96%A0 ' ++++++++++++staticText ignored name='%E2%96%A0 ' ++++++++++staticText name='square' -++++++++++++inlineTextBox name='square' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker name='%E2%96%BE ' ++++++++++++staticText ignored name='%E2%96%BE ' ++++++++++staticText name='disclosure-open' -++++++++++++inlineTextBox name='disclosure-open' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker name='%E2%96%B8 ' ++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++staticText name='disclosure-closed' -++++++++++++inlineTextBox name='disclosure-closed' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=disc ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='explicit-bullets' -++++++++++++inlineTextBox name='explicit-bullets' +++++++++++++inlineTextBox ++++++++listItem listStyle=disc ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='Two. ' @@ -48,7 +48,7 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='explicit-numbers' -++++++++++++inlineTextBox name='explicit-numbers' +++++++++++++inlineTextBox ++++++++listItem listStyle=numeric ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='Two. ' @@ -60,7 +60,7 @@ ++++++++++listMarker name='One. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='explicit-words' -++++++++++++inlineTextBox name='explicit-words' +++++++++++++inlineTextBox ++++++++listItem listStyle=other ++++++++++listMarker name='Two. ' ++++++++++++staticText ignored name='Two. ' @@ -72,7 +72,7 @@ ++++++++++listMarker name='One. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-alphabetic' -++++++++++++inlineTextBox name='auto-alphabetic' +++++++++++++inlineTextBox ++++++++listItem listStyle=other ++++++++++listMarker name='Two. ' ++++++++++++staticText ignored name='Two. ' @@ -84,7 +84,7 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-cyclic' -++++++++++++inlineTextBox name='auto-cyclic' +++++++++++++inlineTextBox ++++++++listItem listStyle=disc ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='Two. ' @@ -96,7 +96,7 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-extends' -++++++++++++inlineTextBox name='auto-extends' +++++++++++++inlineTextBox ++++++++listItem listStyle=disc ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='Two. ' @@ -108,7 +108,7 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-fixed' -++++++++++++inlineTextBox name='auto-fixed' +++++++++++++inlineTextBox ++++++++listItem listStyle=numeric ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='Two. ' @@ -120,7 +120,7 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-symbolic' -++++++++++++inlineTextBox name='auto-symbolic' +++++++++++++inlineTextBox ++++++++listItem listStyle=numeric ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='Two. ' @@ -132,7 +132,7 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-numeric' -++++++++++++inlineTextBox name='auto-numeric' +++++++++++++inlineTextBox ++++++++listItem listStyle=numeric ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='Two. ' @@ -144,7 +144,7 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='One. ' ++++++++++staticText name='auto-additive' -++++++++++++inlineTextBox name='auto-additive' +++++++++++++inlineTextBox ++++++++listItem listStyle=numeric ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='Two. ' @@ -156,7 +156,7 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='Yi> ' ++++++++++staticText name='reference-bullets' -++++++++++++inlineTextBox name='reference-bullets' +++++++++++++inlineTextBox ++++++++listItem listStyle=disc ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='Er> ' @@ -168,7 +168,7 @@ ++++++++++listMarker name='1> ' ++++++++++++staticText ignored name='Yi> ' ++++++++++staticText name='reference-numbers' -++++++++++++inlineTextBox name='reference-numbers' +++++++++++++inlineTextBox ++++++++listItem listStyle=numeric ++++++++++listMarker name='2> ' ++++++++++++staticText ignored name='Er> ' @@ -180,7 +180,7 @@ ++++++++++listMarker name='One> ' ++++++++++++staticText ignored name='Yi> ' ++++++++++staticText name='reference-words' -++++++++++++inlineTextBox name='reference-words' +++++++++++++inlineTextBox ++++++++listItem listStyle=other ++++++++++listMarker name='Two> ' ++++++++++++staticText ignored name='Er> '
diff --git a/content/test/data/accessibility/css/next-on-line-check-failure-expected-blink.txt b/content/test/data/accessibility/css/next-on-line-check-failure-expected-blink.txt index 387611d..6ccd8c1 100644 --- a/content/test/data/accessibility/css/next-on-line-check-failure-expected-blink.txt +++ b/content/test/data/accessibility/css/next-on-line-check-failure-expected-blink.txt
@@ -4,4 +4,4 @@ ++++list ++++++genericContainer ignored ++++++++staticText name='0' -++++++++++inlineTextBox name='0' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/pseudo-element-alternative-text-expected-blink.txt b/content/test/data/accessibility/css/pseudo-element-alternative-text-expected-blink.txt index 09f91d9..30842f83 100644 --- a/content/test/data/accessibility/css/pseudo-element-alternative-text-expected-blink.txt +++ b/content/test/data/accessibility/css/pseudo-element-alternative-text-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++genericContainer ++++++++image name='alternative text' ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='DOM text' -++++++++++inlineTextBox name='DOM text' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++image
diff --git a/content/test/data/accessibility/css/pseudo-element-highlight-expected-blink.txt b/content/test/data/accessibility/css/pseudo-element-highlight-expected-blink.txt index 4dc972b..38ef088 100644 --- a/content/test/data/accessibility/css/pseudo-element-highlight-expected-blink.txt +++ b/content/test/data/accessibility/css/pseudo-element-highlight-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='This is some highlighted text.' markerTypes=64 markerStarts=0 markerEnds=30 -++++++++inlineTextBox name='This is some highlighted text.' markerTypes=64 markerStarts=0 markerEnds=30 +++++++++inlineTextBox markerTypes=64 markerStarts=0 markerEnds=30
diff --git a/content/test/data/accessibility/css/pseudo-element-positioned-expected-blink.txt b/content/test/data/accessibility/css/pseudo-element-positioned-expected-blink.txt index 82c3c5f1..8a4cc35 100644 --- a/content/test/data/accessibility/css/pseudo-element-positioned-expected-blink.txt +++ b/content/test/data/accessibility/css/pseudo-element-positioned-expected-blink.txt
@@ -3,16 +3,16 @@ ++++genericContainer ignored htmlTag='body' ++++++genericContainer ignored htmlTag='div' ++++++++staticText name='Empty before and after' -++++++++++inlineTextBox name='Empty before and after' +++++++++++inlineTextBox ++++++genericContainer htmlTag='div' ++++++++staticText name='Empty positioned before and after' -++++++++++inlineTextBox name='Empty positioned before and after' +++++++++++inlineTextBox ++++++genericContainer ignored htmlTag='div' ++++++++genericContainer htmlTag='::before' ++++++++++staticText name='pseudo' -++++++++++++inlineTextBox name='pseudo' +++++++++++++inlineTextBox ++++++++staticText name='Positioned before and after with content' -++++++++++inlineTextBox name='Positioned before and after with content' +++++++++++inlineTextBox ++++++++genericContainer htmlTag='::after' ++++++++++staticText name='pseudo' -++++++++++++inlineTextBox name='pseudo' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/pseudo-elements-expected-blink.txt b/content/test/data/accessibility/css/pseudo-elements-expected-blink.txt index d97a51dc..93988df 100644 --- a/content/test/data/accessibility/css/pseudo-elements-expected-blink.txt +++ b/content/test/data/accessibility/css/pseudo-elements-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++heading name='[ Foo ]' ++++++++genericContainer ignored ++++++++++staticText name='[ ' -++++++++++++inlineTextBox name='[ ' +++++++++++++inlineTextBox ++++++++staticText name='Foo' -++++++++++inlineTextBox name='Foo' +++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++staticText name=' ]' -++++++++++++inlineTextBox name=' ]' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/pseudo-elements-ignored-parent-expected-blink.txt b/content/test/data/accessibility/css/pseudo-elements-ignored-parent-expected-blink.txt index 2e6d83c..2c52cb7a 100644 --- a/content/test/data/accessibility/css/pseudo-elements-ignored-parent-expected-blink.txt +++ b/content/test/data/accessibility/css/pseudo-elements-ignored-parent-expected-blink.txt
@@ -2,16 +2,16 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='Parent div not included' -++++++++inlineTextBox name='Parent div not included' +++++++++inlineTextBox ++++++none ignored className='before' ++++++++genericContainer ignored ++++++++++staticText name='[' -++++++++++++inlineTextBox name='[' +++++++++++++inlineTextBox ++++++++staticText name='Has ::before' -++++++++++inlineTextBox name='Has ::before' +++++++++++inlineTextBox ++++++none ignored className='after' ++++++++staticText name='Has ::after' -++++++++++inlineTextBox name='Has ::after' +++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++staticText name=']' -++++++++++++inlineTextBox name=']' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/pseudo-elements-separated-by-whitespace-expected-blink.txt b/content/test/data/accessibility/css/pseudo-elements-separated-by-whitespace-expected-blink.txt index d65f8c3..ae5a8d1 100644 --- a/content/test/data/accessibility/css/pseudo-elements-separated-by-whitespace-expected-blink.txt +++ b/content/test/data/accessibility/css/pseudo-elements-separated-by-whitespace-expected-blink.txt
@@ -5,118 +5,118 @@ ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='1' -++++++++++++inlineTextBox name='1' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='2' -++++++++++++inlineTextBox name='2' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='3' -++++++++++++inlineTextBox name='3' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='4' -++++++++++++inlineTextBox name='4' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name=']' -++++++++++++++inlineTextBox name=']' +++++++++++++++inlineTextBox ++++++genericContainer name='whitespace with spans' ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='1' -++++++++++++inlineTextBox name='1' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='2' -++++++++++++inlineTextBox name='2' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='3' -++++++++++++inlineTextBox name='3' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='4' -++++++++++++inlineTextBox name='4' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name=']' -++++++++++++++inlineTextBox name=']' +++++++++++++++inlineTextBox ++++++genericContainer name='whitespace with spans and text' ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='1' -++++++++++++inlineTextBox name='1' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++staticText name='abc' -++++++++++inlineTextBox name='abc' +++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='2' -++++++++++++inlineTextBox name='2' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++staticText name='def' -++++++++++inlineTextBox name='def' +++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='3' -++++++++++++inlineTextBox name='3' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++staticText name='ghi' -++++++++++inlineTextBox name='ghi' +++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='[' -++++++++++++++inlineTextBox name='[' +++++++++++++++inlineTextBox ++++++++++staticText name='4' -++++++++++++inlineTextBox name='4' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='] ' -++++++++++++++inlineTextBox name='] ' +++++++++++++++inlineTextBox ++++++++staticText name='jkl' -++++++++++inlineTextBox name='jkl' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/table-cell-bad-parent-expected-blink.txt b/content/test/data/accessibility/css/table-cell-bad-parent-expected-blink.txt index 794247d..bc9b7fee 100644 --- a/content/test/data/accessibility/css/table-cell-bad-parent-expected-blink.txt +++ b/content/test/data/accessibility/css/table-cell-bad-parent-expected-blink.txt
@@ -2,12 +2,12 @@ ++genericContainer ignored htmlTag='html' ++++genericContainer htmlTag='body' ++++++staticText name='one' -++++++++inlineTextBox name='one' +++++++++inlineTextBox ++++++genericContainer className='two' htmlTag='span' ++++++++staticText name='two' -++++++++++inlineTextBox name='two' +++++++++++inlineTextBox ++++++genericContainer ignored className='three' htmlTag='span' ++++++++staticText name='three' -++++++++++inlineTextBox name='three' +++++++++++inlineTextBox ++++++staticText name='four' -++++++++inlineTextBox name='four' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/table-custom-row-element-expected-blink.txt b/content/test/data/accessibility/css/table-custom-row-element-expected-blink.txt index 479766f..8c2e704b 100644 --- a/content/test/data/accessibility/css/table-custom-row-element-expected-blink.txt +++ b/content/test/data/accessibility/css/table-custom-row-element-expected-blink.txt
@@ -6,31 +6,31 @@ ++++++++++layoutTableRow ++++++++++++layoutTableCell name='a' ++++++++++++++staticText name='a' -++++++++++++++++inlineTextBox name='a' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='b' ++++++++++++++staticText name='b' -++++++++++++++++inlineTextBox name='b' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='c' ++++++++++++++staticText name='c' -++++++++++++++++inlineTextBox name='c' +++++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++layoutTableRow ++++++++++++layoutTableCell name='a' ++++++++++++++staticText name='a' -++++++++++++++++inlineTextBox name='a' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='b' ++++++++++++++staticText name='b' -++++++++++++++++inlineTextBox name='b' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='c' ++++++++++++++staticText name='c' -++++++++++++++++inlineTextBox name='c' +++++++++++++++++inlineTextBox ++++++++++layoutTableRow ++++++++++++layoutTableCell name='a' ++++++++++++++staticText name='a' -++++++++++++++++inlineTextBox name='a' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='b' ++++++++++++++staticText name='b' -++++++++++++++++inlineTextBox name='b' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='c' ++++++++++++++staticText name='c' -++++++++++++++++inlineTextBox name='c' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/table-data-display-other-expected-blink.txt b/content/test/data/accessibility/css/table-data-display-other-expected-blink.txt index 1ae6b18..269b0a8 100644 --- a/content/test/data/accessibility/css/table-data-display-other-expected-blink.txt +++ b/content/test/data/accessibility/css/table-data-display-other-expected-blink.txt
@@ -6,21 +6,21 @@ ++++++++++row tableRowIndex=0 ++++++++++++columnHeader name='1' tableCellColumnIndex=0 tableCellRowIndex=0 ++++++++++++++staticText name='1' -++++++++++++++++inlineTextBox name='1' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='2' tableCellColumnIndex=1 tableCellRowIndex=0 ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='3' tableCellColumnIndex=2 tableCellRowIndex=0 ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++rowGroup ignored ++++++++++row tableRowIndex=1 ++++++++++++cell name='a' tableCellColumnIndex=0 tableCellRowIndex=1 ++++++++++++++staticText name='a' -++++++++++++++++inlineTextBox name='a' +++++++++++++++++inlineTextBox ++++++++++++cell name='b' tableCellColumnIndex=1 tableCellRowIndex=1 ++++++++++++++staticText name='b' -++++++++++++++++inlineTextBox name='b' +++++++++++++++++inlineTextBox ++++++++++++cell name='c' tableCellColumnIndex=2 tableCellRowIndex=1 ++++++++++++++staticText name='c' -++++++++++++++++inlineTextBox name='c' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/table-display-expected-blink.txt b/content/test/data/accessibility/css/table-display-expected-blink.txt index e27a7782..4a244c8 100644 --- a/content/test/data/accessibility/css/table-display-expected-blink.txt +++ b/content/test/data/accessibility/css/table-display-expected-blink.txt
@@ -6,13 +6,13 @@ ++++++++++layoutTableRow ++++++++++++layoutTableCell name='Cats' ++++++++++++++staticText name='Cats' -++++++++++++++++inlineTextBox name='Cats' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='Dogs' ++++++++++++++staticText name='Dogs' -++++++++++++++++inlineTextBox name='Dogs' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='Iguanas' ++++++++++++++staticText name='Iguanas' -++++++++++++++++inlineTextBox name='Iguanas' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='Fish' ++++++++++++++staticText name='Fish' -++++++++++++++++inlineTextBox name='Fish' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/table-display-other-expected-blink.txt b/content/test/data/accessibility/css/table-display-other-expected-blink.txt index fdf06d7..f798180c 100644 --- a/content/test/data/accessibility/css/table-display-other-expected-blink.txt +++ b/content/test/data/accessibility/css/table-display-other-expected-blink.txt
@@ -6,4 +6,4 @@ ++++++++++layoutTableRow ++++++++++++layoutTableCell name='cat' ++++++++++++++staticText name='cat' -++++++++++++++++inlineTextBox name='cat' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/table-incomplete-expected-blink.txt b/content/test/data/accessibility/css/table-incomplete-expected-blink.txt index 66a5d62..4eae572 100644 --- a/content/test/data/accessibility/css/table-incomplete-expected-blink.txt +++ b/content/test/data/accessibility/css/table-incomplete-expected-blink.txt
@@ -6,7 +6,7 @@ ++++++++++row ++++++++++++cell name='Fred' ++++++++++++++staticText name='Fred' -++++++++++++++++inlineTextBox name='Fred' +++++++++++++++++inlineTextBox ++++++++++++cell name='Jackson' ++++++++++++++staticText name='Jackson' -++++++++++++++++inlineTextBox name='Jackson' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/text-overflow-ellipsis-expected-blink.txt b/content/test/data/accessibility/css/text-overflow-ellipsis-expected-blink.txt index 4b1b21d..966c0c97 100644 --- a/content/test/data/accessibility/css/text-overflow-ellipsis-expected-blink.txt +++ b/content/test/data/accessibility/css/text-overflow-ellipsis-expected-blink.txt
@@ -7,4 +7,4 @@ ++++++++++inlineTextBox name='SPAN NESTED INS' ++++++++++inlineTextBox name='%E2%80%A6' ++++++++staticText name=' CONTAINER DIV' -++++++++++inlineTextBox name=' CONTAINER DIV' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/transform-expected-blink.txt b/content/test/data/accessibility/css/transform-expected-blink.txt index 1f3a20e39..8657105 100644 --- a/content/test/data/accessibility/css/transform-expected-blink.txt +++ b/content/test/data/accessibility/css/transform-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++genericContainer pageLocation=(0, 50) ++++++++paragraph pageLocation=(0, 50) ++++++++++staticText pageLocation=(0, 50) name='content' -++++++++++++inlineTextBox pageLocation=(0, 50) name='content' \ No newline at end of file +++++++++++++inlineTextBox pageLocation=(0, 50)
diff --git a/content/test/data/accessibility/css/user-select-expected-blink.txt b/content/test/data/accessibility/css/user-select-expected-blink.txt index 5937d390..883c9087 100644 --- a/content/test/data/accessibility/css/user-select-expected-blink.txt +++ b/content/test/data/accessibility/css/user-select-expected-blink.txt
@@ -3,23 +3,23 @@ ++++genericContainer ignored ++++++genericContainer notUserSelectableStyle=true ++++++++staticText name='1. unselectable' notUserSelectableStyle=true -++++++++++inlineTextBox name='1. unselectable' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='2. Selectable' -++++++++++inlineTextBox name='2. Selectable' +++++++++++inlineTextBox ++++++genericContainer notUserSelectableStyle=true ++++++++staticText name='3. unselectable' notUserSelectableStyle=true -++++++++++inlineTextBox name='3. unselectable' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='4. Selectable' -++++++++++inlineTextBox name='4. Selectable' +++++++++++inlineTextBox ++++++list ++++++++listItem ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='One' -++++++++++++inlineTextBox name='One' +++++++++++++inlineTextBox ++++++genericContainer ignored ++++++++genericContainer notUserSelectableStyle=true ++++++++++staticText name='Inner' notUserSelectableStyle=true -++++++++++++inlineTextBox name='Inner' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/visibility-expected-blink.txt b/content/test/data/accessibility/css/visibility-expected-blink.txt index 6aa1ef8..cf458b96 100644 --- a/content/test/data/accessibility/css/visibility-expected-blink.txt +++ b/content/test/data/accessibility/css/visibility-expected-blink.txt
@@ -2,6 +2,6 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='visible link' -++++++++inlineTextBox name='visible link' +++++++++inlineTextBox ++++++staticText name='visible link' -++++++++inlineTextBox name='visible link' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/visibility-to-collapsed-expected-blink.txt b/content/test/data/accessibility/css/visibility-to-collapsed-expected-blink.txt index 5cdbddbb..15d025c 100644 --- a/content/test/data/accessibility/css/visibility-to-collapsed-expected-blink.txt +++ b/content/test/data/accessibility/css/visibility-to-collapsed-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++genericContainer ignored ++++++++staticText name='Cats ' -++++++++++inlineTextBox name='Cats ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++checkBox name='checkbox' checkedState=false ++++++++genericContainer ++++++++++code ++++++++++++staticText name='done' -++++++++++++++inlineTextBox name='done' +++++++++++++++inlineTextBox ++++++group ++++++++mark ++++++++++staticText name='text' -++++++++++++inlineTextBox name='text' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/visibility-to-hidden-expected-blink.txt b/content/test/data/accessibility/css/visibility-to-hidden-expected-blink.txt index a9bc7f1..850135b 100644 --- a/content/test/data/accessibility/css/visibility-to-hidden-expected-blink.txt +++ b/content/test/data/accessibility/css/visibility-to-hidden-expected-blink.txt
@@ -3,8 +3,8 @@ ++++genericContainer ignored ++++++genericContainer ignored ++++++++staticText name='Cats ' -++++++++++inlineTextBox name='Cats ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++code ++++++++++++staticText name='done' -++++++++++++++inlineTextBox name='done' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/css/visibility-to-visible-expected-blink.txt b/content/test/data/accessibility/css/visibility-to-visible-expected-blink.txt index 5cdbddbb..15d025c 100644 --- a/content/test/data/accessibility/css/visibility-to-visible-expected-blink.txt +++ b/content/test/data/accessibility/css/visibility-to-visible-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++genericContainer ignored ++++++++staticText name='Cats ' -++++++++++inlineTextBox name='Cats ' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++checkBox name='checkbox' checkedState=false ++++++++genericContainer ++++++++++code ++++++++++++staticText name='done' -++++++++++++++inlineTextBox name='done' +++++++++++++++inlineTextBox ++++++group ++++++++mark ++++++++++staticText name='text' -++++++++++++inlineTextBox name='text' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/display-locking/all-committed-expected-blink.txt b/content/test/data/accessibility/display-locking/all-committed-expected-blink.txt index bd4f653..0d412d20 100644 --- a/content/test/data/accessibility/display-locking/all-committed-expected-blink.txt +++ b/content/test/data/accessibility/display-locking/all-committed-expected-blink.txt
@@ -4,24 +4,24 @@ ++++++genericContainer ignored ++++++++genericContainer ++++++++++staticText name='spacer so that everything below will be offscreen (and won't get viewport-activated)' -++++++++++++inlineTextBox name='spacer so that everything below will be offscreen (and won't get viewport-activated)' +++++++++++++inlineTextBox ++++++++genericContainer offscreen ++++++++++genericContainer offscreen ++++++++++++staticText offscreen name='child text will be in AX tree but without layout' -++++++++++++++inlineTextBox offscreen name='child text will be in AX tree but without layout' +++++++++++++++inlineTextBox offscreen ++++++++++genericContainer offscreen ++++++++++++staticText offscreen name='nested activatable locked element will be in AX tree but without layout' -++++++++++++++inlineTextBox offscreen name='nested activatable locked element will be in AX tree but without layout' +++++++++++++++inlineTextBox offscreen ++++++++staticText offscreen name='normal text 1' -++++++++++inlineTextBox offscreen name='normal text 1' +++++++++++inlineTextBox offscreen ++++++++genericContainer offscreen ++++++++staticText offscreen name='normal text 2' -++++++++++inlineTextBox offscreen name='normal text 2' +++++++++++inlineTextBox offscreen ++++++++genericContainer offscreen ++++++++++staticText offscreen name='nested non-activatable locked element will not be in AX tree' -++++++++++++inlineTextBox offscreen name='nested non-activatable locked element will not be in AX tree' +++++++++++++inlineTextBox offscreen ++++++++staticText offscreen name='normal text 3' -++++++++++inlineTextBox offscreen name='normal text 3' +++++++++++inlineTextBox offscreen ++++++++genericContainer offscreen ++++++++++staticText offscreen name='doneCommitting' -++++++++++++inlineTextBox offscreen name='doneCommitting' +++++++++++++inlineTextBox offscreen
diff --git a/content/test/data/accessibility/display-locking/all-expected-blink.txt b/content/test/data/accessibility/display-locking/all-expected-blink.txt index df01c23..76618d9 100644 --- a/content/test/data/accessibility/display-locking/all-expected-blink.txt +++ b/content/test/data/accessibility/display-locking/all-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++genericContainer ignored ++++++++genericContainer ++++++++++staticText name='spacer so that everything below will be offscreen (and won't get viewport-activated)' -++++++++++++inlineTextBox name='spacer so that everything below will be offscreen (and won't get viewport-activated)' +++++++++++++inlineTextBox ++++++++genericContainer offscreen ++++++++++staticText offscreen name='<newline> ' ++++++++++genericContainer ignored offscreen @@ -14,10 +14,10 @@ ++++++++++++staticText offscreen name='<newline> nested activatable locked element will be in AX tree but without layout<newline> ' ++++++++++staticText offscreen name='<newline> ' ++++++++staticText offscreen name='normal text 1' -++++++++++inlineTextBox offscreen name='normal text 1' +++++++++++inlineTextBox offscreen ++++++++genericContainer offscreen ++++++++staticText offscreen name='normal text 2' -++++++++++inlineTextBox offscreen name='normal text 2' +++++++++++inlineTextBox offscreen ++++++++genericContainer offscreen ++++++++staticText offscreen name='normal text 3' -++++++++++inlineTextBox offscreen name='normal text 3' +++++++++++inlineTextBox offscreen
diff --git a/content/test/data/accessibility/display-locking/viewport-activation-expected-blink.txt b/content/test/data/accessibility/display-locking/viewport-activation-expected-blink.txt index 4a3d7a2..8abeb5b 100644 --- a/content/test/data/accessibility/display-locking/viewport-activation-expected-blink.txt +++ b/content/test/data/accessibility/display-locking/viewport-activation-expected-blink.txt
@@ -4,18 +4,18 @@ ++++++genericContainer ignored ++++++++genericContainer ++++++++++staticText offscreen name='initial spacer, will initially make everything below this far away from the viewport' -++++++++++++inlineTextBox offscreen name='initial spacer, will initially make everything below this far away from the viewport' +++++++++++++inlineTextBox offscreen ++++++++genericContainer ++++++++++staticText name='This text will get viewport-activated because it's in the viewport, and will be in AX tree with layout.' -++++++++++++inlineTextBox name='This text will get viewport-activated because it's in the viewport, and will be in AX tree with layout.' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='This text is also in viewport.' -++++++++++++inlineTextBox name='This text is also in viewport.' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='spacer so that everything below will be offscreen (and won't get viewport-activated)' -++++++++++++inlineTextBox name='spacer so that everything below will be offscreen (and won't get viewport-activated)' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText offscreen name='<newline> This text will not get viewport-activated, and will be in AX tree but without layout.<newline> ' ++++++++genericContainer offscreen ++++++++++staticText offscreen name='doneActivating' -++++++++++++inlineTextBox offscreen name='doneActivating' +++++++++++++inlineTextBox offscreen
diff --git a/content/test/data/accessibility/event/aria-combo-box-focus-expected-mac.txt b/content/test/data/accessibility/event/aria-combo-box-focus-expected-mac.txt index 28cc1894..02a5f9d 100644 --- a/content/test/data/accessibility/event/aria-combo-box-focus-expected-mac.txt +++ b/content/test/data/accessibility/event/aria-combo-box-focus-expected-mac.txt
@@ -1,7 +1,5 @@ -AXFocusedUIElementChanged on AXStaticText AXValue='Apple' AXSelectedChildrenChanged on AXList AXSelectedTextChanged on AXStaticText AXValue='Apple' AXTextSelectionDirection=AXTextSelectionDirectionUnknown AXTextSelectionGranularity=AXTextSelectionGranularityUnknown AXTextStateChangeType=AXTextStateChangeTypeSelectionMove -AXSelectedTextChanged on AXWebArea AXTextSelectionDirection=AXTextSelectionDirectionUnknown AXTextSelectionGranularity=AXTextSelectionGranularityUnknown AXTextStateChangeType=AXTextStateChangeTypeSelectionMove === Start Continuation === AXFocusedUIElementChanged on AXButton AXSelectedChildrenChanged on AXList
diff --git a/content/test/data/accessibility/html/a-expected-blink.txt b/content/test/data/accessibility/html/a-expected-blink.txt index fcd4272a..9ed1489 100644 --- a/content/test/data/accessibility/html/a-expected-blink.txt +++ b/content/test/data/accessibility/html/a-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++link linked name='normal link' ++++++++staticText linked name='normal link' -++++++++++inlineTextBox name='normal link' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/a-expected-fuchsia.txt b/content/test/data/accessibility/html/a-expected-fuchsia.txt index 3d7a22c..865f5ed3 100644 --- a/content/test/data/accessibility/html/a-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++LINK focusable label='normal link' actions='{DEFAULT}' ++++++++STATIC_TEXT label='normal link' actions='{DEFAULT}' -++++++++++UNKNOWN label='normal link' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/a-href-update-expected-blink.txt b/content/test/data/accessibility/html/a-href-update-expected-blink.txt index 1cb4429..cf88b85 100644 --- a/content/test/data/accessibility/html/a-href-update-expected-blink.txt +++ b/content/test/data/accessibility/html/a-href-update-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='done' -++++++++++inlineTextBox name='done' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++link name='Link set without delay' ++++++++++staticText name='Link set without delay' -++++++++++++inlineTextBox name='Link set without delay' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++link name='Link set with delay' ++++++++++staticText name='Link set with delay' -++++++++++++inlineTextBox name='Link set with delay' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/a-name-calc-expected-blink.txt b/content/test/data/accessibility/html/a-name-calc-expected-blink.txt index 8730656..f42e728 100644 --- a/content/test/data/accessibility/html/a-name-calc-expected-blink.txt +++ b/content/test/data/accessibility/html/a-name-calc-expected-blink.txt
@@ -3,22 +3,22 @@ ++++genericContainer ignored ++++++link name='InnerText0' nameFrom=contents ++++++++staticText name='InnerText0' nameFrom=contents -++++++++++inlineTextBox name='InnerText0' nameFrom=contents +++++++++++inlineTextBox ++++++staticText name=' ' nameFrom=contents -++++++++inlineTextBox name=' ' nameFrom=contents +++++++++inlineTextBox ++++++link description='Title1' name='InnerText1' nameFrom=contents descriptionFrom=title ++++++++staticText name='InnerText1' nameFrom=contents -++++++++++inlineTextBox name='InnerText1' nameFrom=contents +++++++++++inlineTextBox ++++++staticText name=' ' nameFrom=contents -++++++++inlineTextBox name=' ' nameFrom=contents +++++++++inlineTextBox ++++++link name='Title2' nameFrom=attribute ++++++++staticText name='InnerText2' nameFrom=contents -++++++++++inlineTextBox name='InnerText2' nameFrom=contents +++++++++++inlineTextBox ++++++staticText name=' ' nameFrom=contents -++++++++inlineTextBox name=' ' nameFrom=contents +++++++++inlineTextBox ++++++link name='LabelledBy3' nameFrom=relatedElement ++++++++staticText name='InnerText3' nameFrom=contents -++++++++++inlineTextBox name='InnerText3' nameFrom=contents +++++++++++inlineTextBox ++++++link name='Title4' nameFrom=title ++++++link name='Label5' nameFrom=attribute ++++++link name='LabelledBy6' nameFrom=relatedElement
diff --git a/content/test/data/accessibility/html/a-name-calc-expected-fuchsia.txt b/content/test/data/accessibility/html/a-name-calc-expected-fuchsia.txt index 79055f2..cae84b4b 100644 --- a/content/test/data/accessibility/html/a-name-calc-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-name-calc-expected-fuchsia.txt
@@ -3,22 +3,22 @@ ++++UNKNOWN hidden ++++++LINK focusable label='InnerText0' actions='{DEFAULT}' ++++++++STATIC_TEXT label='InnerText0' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText0' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='InnerText1' actions='{DEFAULT}' secondary_label='Title1' ++++++++STATIC_TEXT label='InnerText1' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText1' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Title2' actions='{DEFAULT}' ++++++++STATIC_TEXT label='InnerText2' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText2' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='LabelledBy3' actions='{DEFAULT}' ++++++++STATIC_TEXT label='InnerText3' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText3' +++++++++++UNKNOWN ++++++LINK focusable label='Title4' actions='{DEFAULT}' ++++++LINK focusable label='Label5' actions='{DEFAULT}' ++++++LINK focusable label='LabelledBy6' actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/a-name-expected-blink.txt b/content/test/data/accessibility/html/a-name-expected-blink.txt index f82600d..db01c1dd 100644 --- a/content/test/data/accessibility/html/a-name-expected-blink.txt +++ b/content/test/data/accessibility/html/a-name-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='named anchor' -++++++++++inlineTextBox name='named anchor' +++++++++++inlineTextBox ++++++link name='both a named anchor and a link' ++++++++staticText name='both a named anchor and a link' -++++++++++inlineTextBox name='both a named anchor and a link' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/a-name-expected-fuchsia.txt b/content/test/data/accessibility/html/a-name-expected-fuchsia.txt index 8a77da9..2ea0d32 100644 --- a/content/test/data/accessibility/html/a-name-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-name-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='named anchor' -++++++++++UNKNOWN label='named anchor' +++++++++++UNKNOWN ++++++LINK focusable label='both a named anchor and a link' actions='{DEFAULT}' ++++++++STATIC_TEXT label='both a named anchor and a link' actions='{DEFAULT}' -++++++++++UNKNOWN label='both a named anchor and a link' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/a-nested-structure-expected-blink.txt b/content/test/data/accessibility/html/a-nested-structure-expected-blink.txt index 579028a..5d150431 100644 --- a/content/test/data/accessibility/html/a-nested-structure-expected-blink.txt +++ b/content/test/data/accessibility/html/a-nested-structure-expected-blink.txt
@@ -4,20 +4,20 @@ ++++++link name='Header 1 List element 1 List element 2 List element 3' ++++++++heading name='Header 1' hierarchicalLevel=1 ++++++++++staticText name='Header 1' -++++++++++++inlineTextBox name='Header 1' +++++++++++++inlineTextBox ++++++++list ++++++++++listItem hierarchicalLevel=1 ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='List element 1' -++++++++++++++inlineTextBox name='List element 1' +++++++++++++++inlineTextBox ++++++++++listItem hierarchicalLevel=1 ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='List element 2' -++++++++++++++inlineTextBox name='List element 2' +++++++++++++++inlineTextBox ++++++++++listItem hierarchicalLevel=1 ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='List element 3' -++++++++++++++inlineTextBox name='List element 3' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/a-no-text-expected-blink.txt b/content/test/data/accessibility/html/a-no-text-expected-blink.txt index 0b0100d..9c5f778c 100644 --- a/content/test/data/accessibility/html/a-no-text-expected-blink.txt +++ b/content/test/data/accessibility/html/a-no-text-expected-blink.txt
@@ -20,6 +20,6 @@ ++++++link ++++++++image ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link ++++++++image
diff --git a/content/test/data/accessibility/html/a-no-text-expected-fuchsia.txt b/content/test/data/accessibility/html/a-no-text-expected-fuchsia.txt index c4948846..e9eca9b 100644 --- a/content/test/data/accessibility/html/a-no-text-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-no-text-expected-fuchsia.txt
@@ -20,6 +20,6 @@ ++++++LINK focusable actions='{DEFAULT}' ++++++++IMAGE actions='{DEFAULT}' ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable actions='{DEFAULT}' ++++++++IMAGE actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/a-onclick-expected-blink.txt b/content/test/data/accessibility/html/a-onclick-expected-blink.txt index 96ce168..06ba67f 100644 --- a/content/test/data/accessibility/html/a-onclick-expected-blink.txt +++ b/content/test/data/accessibility/html/a-onclick-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++genericContainer name='Done' ++++++link name='link with no href but onclick' defaultActionVerb=jump ++++++++staticText name='link with no href but onclick' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='link with no href but onclick' +++++++++++inlineTextBox ++++++link name='link with no href and click handler added via script' defaultActionVerb=jump ++++++++staticText name='link with no href and click handler added via script' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='link with no href and click handler added via script' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Link with no event handler' -++++++++++inlineTextBox name='Link with no event handler' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/a-onclick-expected-fuchsia.txt b/content/test/data/accessibility/html/a-onclick-expected-fuchsia.txt index fe47b76..54e03d5 100644 --- a/content/test/data/accessibility/html/a-onclick-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-onclick-expected-fuchsia.txt
@@ -4,10 +4,10 @@ ++++++UNKNOWN focusable label='Done' ++++++LINK label='link with no href but onclick' actions='{DEFAULT}' ++++++++STATIC_TEXT label='link with no href but onclick' actions='{DEFAULT}' -++++++++++UNKNOWN label='link with no href but onclick' +++++++++++UNKNOWN ++++++LINK label='link with no href and click handler added via script' actions='{DEFAULT}' ++++++++STATIC_TEXT label='link with no href and click handler added via script' actions='{DEFAULT}' -++++++++++UNKNOWN label='link with no href and click handler added via script' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Link with no event handler' -++++++++++UNKNOWN label='Link with no event handler' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/a-with-before-expected-blink.txt b/content/test/data/accessibility/html/a-with-before-expected-blink.txt index 4224753..ecb381c 100644 --- a/content/test/data/accessibility/html/a-with-before-expected-blink.txt +++ b/content/test/data/accessibility/html/a-with-before-expected-blink.txt
@@ -2,12 +2,12 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Here is a ' -++++++++inlineTextBox name='Here is a ' +++++++++inlineTextBox ++++++link linked name='[linked] link' ++++++++genericContainer ignored ++++++++++staticText linked name='[linked] ' -++++++++++++inlineTextBox name='[linked] ' +++++++++++++inlineTextBox ++++++++staticText linked name='link' -++++++++++inlineTextBox name='link' +++++++++++inlineTextBox ++++++staticText name='.' -++++++++inlineTextBox name='.' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/a-with-before-expected-fuchsia.txt b/content/test/data/accessibility/html/a-with-before-expected-fuchsia.txt index a974a73..44f72470 100644 --- a/content/test/data/accessibility/html/a-with-before-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-with-before-expected-fuchsia.txt
@@ -2,12 +2,12 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label='Here is a ' -++++++++UNKNOWN label='Here is a ' +++++++++UNKNOWN ++++++LINK focusable label='[linked] link' actions='{DEFAULT}' ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT label='[linked] ' actions='{DEFAULT}' -++++++++++++UNKNOWN label='[linked] ' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label='link' actions='{DEFAULT}' -++++++++++UNKNOWN label='link' +++++++++++UNKNOWN ++++++STATIC_TEXT label='.' -++++++++UNKNOWN label='.' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/a-with-img-expected-blink.txt b/content/test/data/accessibility/html/a-with-img-expected-blink.txt index 703a649..7c42f9f9 100644 --- a/content/test/data/accessibility/html/a-with-img-expected-blink.txt +++ b/content/test/data/accessibility/html/a-with-img-expected-blink.txt
@@ -4,26 +4,26 @@ ++++++link linked name='Link with image at start.' ++++++++image linked name='Link' ++++++++staticText linked name=' with image at start.' -++++++++++inlineTextBox name=' with image at start.' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link linked name='Link with bullet image in the middle.' ++++++++staticText linked name='Link with ' -++++++++++inlineTextBox name='Link with ' +++++++++++inlineTextBox ++++++++image linked name='bullet image' ++++++++staticText linked name=' in the middle.' -++++++++++inlineTextBox name=' in the middle.' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link linked name='Link with broken in the middle.' ++++++++staticText linked name='Link with ' -++++++++++inlineTextBox name='Link with ' +++++++++++inlineTextBox ++++++++image linked name='broken' ++++++++staticText linked name=' in the middle.' -++++++++++inlineTextBox name=' in the middle.' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link linked name='Link with image at the end, it's a bullet' ++++++++staticText linked name='Link with image at the ' -++++++++++inlineTextBox name='Link with image at the ' +++++++++++inlineTextBox ++++++++image linked name='end, it's a bullet'
diff --git a/content/test/data/accessibility/html/a-with-img-expected-fuchsia.txt b/content/test/data/accessibility/html/a-with-img-expected-fuchsia.txt index 276b148..85c4f5b 100644 --- a/content/test/data/accessibility/html/a-with-img-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/a-with-img-expected-fuchsia.txt
@@ -4,26 +4,26 @@ ++++++LINK focusable label='Link with image at start.' actions='{DEFAULT}' ++++++++IMAGE label='Link' actions='{DEFAULT}' ++++++++STATIC_TEXT label=' with image at start.' actions='{DEFAULT}' -++++++++++UNKNOWN label=' with image at start.' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Link with bullet image in the middle.' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Link with ' actions='{DEFAULT}' -++++++++++UNKNOWN label='Link with ' +++++++++++UNKNOWN ++++++++IMAGE label='bullet image' actions='{DEFAULT}' ++++++++STATIC_TEXT label=' in the middle.' actions='{DEFAULT}' -++++++++++UNKNOWN label=' in the middle.' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Link with broken in the middle.' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Link with ' actions='{DEFAULT}' -++++++++++UNKNOWN label='Link with ' +++++++++++UNKNOWN ++++++++IMAGE label='broken' actions='{DEFAULT}' ++++++++STATIC_TEXT label=' in the middle.' actions='{DEFAULT}' -++++++++++UNKNOWN label=' in the middle.' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Link with image at the end, it's a bullet' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Link with image at the ' actions='{DEFAULT}' -++++++++++UNKNOWN label='Link with image at the ' +++++++++++UNKNOWN ++++++++IMAGE label='end, it's a bullet' actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/abbr-expected-blink.txt b/content/test/data/accessibility/html/abbr-expected-blink.txt index 1602a8e..9d8dcad 100644 --- a/content/test/data/accessibility/html/abbr-expected-blink.txt +++ b/content/test/data/accessibility/html/abbr-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='The ' -++++++++++inlineTextBox name='The ' +++++++++++inlineTextBox ++++++++abbr name='World Health Organization' ++++++++++staticText name='WHO' -++++++++++++inlineTextBox name='WHO' +++++++++++++inlineTextBox ++++++++staticText name=' was founded in 1948.' -++++++++++inlineTextBox name=' was founded in 1948.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/abbr-expected-fuchsia.txt b/content/test/data/accessibility/html/abbr-expected-fuchsia.txt index 8f70ca7..062eaa9 100644 --- a/content/test/data/accessibility/html/abbr-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/abbr-expected-fuchsia.txt
@@ -3,9 +3,9 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='The ' -++++++++++UNKNOWN label='The ' +++++++++++UNKNOWN ++++++++UNKNOWN label='World Health Organization' ++++++++++STATIC_TEXT label='WHO' -++++++++++++UNKNOWN label='WHO' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' was founded in 1948.' -++++++++++UNKNOWN label=' was founded in 1948.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/absolute-offscreen-expected-blink.txt b/content/test/data/accessibility/html/absolute-offscreen-expected-blink.txt index 1623e2d..61c9a9dd 100644 --- a/content/test/data/accessibility/html/absolute-offscreen-expected-blink.txt +++ b/content/test/data/accessibility/html/absolute-offscreen-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++genericContainer size=(0, 0) pageSize=(50, 20) unclippedSize=(50, 20) ++++++++genericContainer pageSize=(50, 20) unclippedSize=(50, 20) ++++++++++staticText name='Visible' -++++++++++++inlineTextBox name='Visible' +++++++++++++inlineTextBox ++++++genericContainer size=(0, 0) pageSize=(1, 1) unclippedSize=(50, 20) clipsChildren=true ++++++++genericContainer offscreen pageSize=(1, 1) unclippedSize=(50, 20) ++++++++++staticText offscreen pageSize=(1, 1) name='Invisible' -++++++++++++inlineTextBox offscreen pageSize=(1, 1) name='Invisible' +++++++++++++inlineTextBox offscreen pageSize=(1, 1) ++++++genericContainer clipsChildren=true ++++++++genericContainer offscreen pageSize=(50, 1) unclippedSize=(50, 20) ++++++++++staticText offscreen name='Invisible' -++++++++++++inlineTextBox offscreen name='Invisible' +++++++++++++inlineTextBox offscreen
diff --git a/content/test/data/accessibility/html/accordion-expected-blink.txt b/content/test/data/accessibility/html/accordion-expected-blink.txt index 6588884..7faef7bc 100644 --- a/content/test/data/accessibility/html/accordion-expected-blink.txt +++ b/content/test/data/accessibility/html/accordion-expected-blink.txt
@@ -5,27 +5,27 @@ ++++++++button expanded name='Accordion Section #1' controlsIds=region ++++++++++paragraph ++++++++++++staticText name='Accordion Section #1' -++++++++++++++inlineTextBox name='Accordion Section #1' +++++++++++++++inlineTextBox ++++++region name='Accordion Section #1' ++++++++paragraph ++++++++++staticText name='Content for first section of accordion element.' -++++++++++++inlineTextBox name='Content for first section of accordion element.' +++++++++++++inlineTextBox ++++++heading name='Accordion Section #2' ++++++++button collapsed name='Accordion Section #2' controlsIds= ++++++++++paragraph ++++++++++++staticText name='Accordion Section #2' -++++++++++++++inlineTextBox name='Accordion Section #2' +++++++++++++++inlineTextBox ++++++heading name='Accordion Section #3' ++++++++button collapsed name='Accordion Section #3' controlsIds= ++++++++++paragraph ++++++++++++staticText name='Accordion Section #3' -++++++++++++++inlineTextBox name='Accordion Section #3' +++++++++++++++inlineTextBox ++++++heading name='Accordion Section #4' ++++++++button expanded name='Accordion Section #4' restriction=disabled ++++++++++paragraph ++++++++++++staticText name='Accordion Section #4' -++++++++++++++inlineTextBox name='Accordion Section #4' +++++++++++++++inlineTextBox ++++++region name='Accordion Section #4' ++++++++paragraph ++++++++++staticText name='Content for forth section of accordion element. This section will always be visible but disabled.' -++++++++++++inlineTextBox name='Content for forth section of accordion element. This section will always be visible but disabled.' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/action-verbs-expected-blink.txt b/content/test/data/accessibility/html/action-verbs-expected-blink.txt index 7fbf10c..22d98a8 100644 --- a/content/test/data/accessibility/html/action-verbs-expected-blink.txt +++ b/content/test/data/accessibility/html/action-verbs-expected-blink.txt
@@ -3,16 +3,16 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='Generic div' -++++++++++inlineTextBox name='Generic div' +++++++++++inlineTextBox ++++++heading name='Heading' hierarchicalLevel=1 ++++++++staticText name='Heading' -++++++++++inlineTextBox name='Heading' +++++++++++inlineTextBox ++++++button name='Button' defaultActionVerb=press ++++++++staticText name='Button' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Button' +++++++++++inlineTextBox ++++++link name='Link' defaultActionVerb=jump ++++++++staticText name='Link' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Link' +++++++++++inlineTextBox ++++++textField defaultActionVerb=activate ++++++++genericContainer ++++++searchBox defaultActionVerb=activate @@ -25,14 +25,14 @@ ++++++radioButton defaultActionVerb=check checkedState=false ++++++switch name='ARIA Switch' defaultActionVerb=check checkedState=false ++++++++staticText name='ARIA Switch' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='ARIA Switch' +++++++++++inlineTextBox ++++++details ++++++++genericContainer ignored ++++++++++disclosureTriangle collapsed name='Summary' defaultActionVerb=press ++++++++++++listMarker ignored ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='Summary' defaultActionVerb=clickAncestor -++++++++++++++inlineTextBox name='Summary' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++staticText ignored invisible name='Details' ++++++comboBoxSelect collapsed value='Pop-up button' defaultActionVerb=open haspopup=menu @@ -40,38 +40,38 @@ ++++++++++menuListOption name='Pop-up button' defaultActionVerb=select selected=true ++++++genericContainer defaultActionVerb=click ++++++++staticText name='Div with click handler' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Div with click handler' +++++++++++inlineTextBox ++++++group defaultActionVerb=click ++++++++paragraph defaultActionVerb=clickAncestor ++++++++++staticText name='Paragraph with click handler on parent' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='Paragraph with click handler on parent' +++++++++++++inlineTextBox ++++++menu ++++++++menuItem name='Menu item 1' defaultActionVerb=select ++++++++++staticText name='Menu item 1' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='Menu item 1' +++++++++++++inlineTextBox ++++++++menuItemCheckBox name='Menu item 2' defaultActionVerb=uncheck checkedState=true ++++++++++staticText name='Menu item 2' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='Menu item 2' +++++++++++++inlineTextBox ++++++++menuItemRadio name='Menu item 3' defaultActionVerb=check checkedState=false ++++++++++staticText name='Menu item 3' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='Menu item 3' +++++++++++++inlineTextBox ++++++button name='ARIA Button' defaultActionVerb=press ++++++++staticText name='ARIA Button' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='ARIA Button' +++++++++++inlineTextBox ++++++button name='ARIA button with tab index' defaultActionVerb=press ++++++++staticText name='ARIA button with tab index' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='ARIA button with tab index' +++++++++++inlineTextBox ++++++button name='ARIA button with negative tab index' defaultActionVerb=press ++++++++staticText name='ARIA button with negative tab index' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='ARIA button with negative tab index' +++++++++++inlineTextBox ++++++genericContainer defaultActionVerb=click activedescendantId=button ++++++++button name='ARIA button that is an active descendant' defaultActionVerb=press ++++++++++staticText name='ARIA button that is an active descendant' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='ARIA button that is an active descendant' +++++++++++++inlineTextBox ++++++genericContainer defaultActionVerb=click ++++++++switch name='ARIA switch in clickable container' defaultActionVerb=check checkedState=false ++++++++++staticText name='ARIA switch in clickable container' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='ARIA switch in clickable container' +++++++++++++inlineTextBox ++++++++genericContainer defaultActionVerb=clickAncestor ++++++++++staticText name='Generic in clickable container' defaultActionVerb=clickAncestor -++++++++++++inlineTextBox name='Generic in clickable container' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/action-verbs-expected-fuchsia.txt b/content/test/data/accessibility/html/action-verbs-expected-fuchsia.txt index 0865c1e..9e88746 100644 --- a/content/test/data/accessibility/html/action-verbs-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/action-verbs-expected-fuchsia.txt
@@ -3,16 +3,16 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Generic div' -++++++++++UNKNOWN label='Generic div' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading' ++++++++STATIC_TEXT label='Heading' -++++++++++UNKNOWN label='Heading' +++++++++++UNKNOWN ++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Button' actions='{DEFAULT}' -++++++++++UNKNOWN label='Button' +++++++++++UNKNOWN ++++++LINK focusable label='Link' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Link' actions='{DEFAULT}' -++++++++++UNKNOWN label='Link' +++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' ++++++++UNKNOWN ++++++SEARCH_BOX focusable actions='{DEFAULT, SET_VALUE}' @@ -25,14 +25,14 @@ ++++++RADIO_BUTTON focusable actions='{DEFAULT}' checked_state='UNCHECKED' ++++++UNKNOWN focusable label='ARIA Switch' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++STATIC_TEXT label='ARIA Switch' actions='{DEFAULT}' -++++++++++UNKNOWN label='ARIA Switch' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN focusable label='Summary' actions='{DEFAULT}' ++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++STATIC_TEXT label='Summary' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Summary' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT hidden label='Details' ++++++UNKNOWN focusable actions='{DEFAULT}' value='Pop-up button' @@ -40,38 +40,38 @@ ++++++++++UNKNOWN focusable selected label='Pop-up button' actions='{DEFAULT}' ++++++UNKNOWN actions='{DEFAULT}' ++++++++STATIC_TEXT label='Div with click handler' actions='{DEFAULT}' -++++++++++UNKNOWN label='Div with click handler' +++++++++++UNKNOWN ++++++UNKNOWN actions='{DEFAULT}' ++++++++PARAGRAPH actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Paragraph with click handler on parent' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Paragraph with click handler on parent' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN label='Menu item 1' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Menu item 1' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Menu item 1' +++++++++++++UNKNOWN ++++++++UNKNOWN label='Menu item 2' actions='{DEFAULT}' checked_state='CHECKED' ++++++++++STATIC_TEXT label='Menu item 2' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Menu item 2' +++++++++++++UNKNOWN ++++++++UNKNOWN label='Menu item 3' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++++STATIC_TEXT label='Menu item 3' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Menu item 3' +++++++++++++UNKNOWN ++++++BUTTON label='ARIA Button' actions='{DEFAULT}' ++++++++STATIC_TEXT label='ARIA Button' actions='{DEFAULT}' -++++++++++UNKNOWN label='ARIA Button' +++++++++++UNKNOWN ++++++BUTTON focusable label='ARIA button with tab index' actions='{DEFAULT}' ++++++++STATIC_TEXT label='ARIA button with tab index' actions='{DEFAULT}' -++++++++++UNKNOWN label='ARIA button with tab index' +++++++++++UNKNOWN ++++++BUTTON focusable label='ARIA button with negative tab index' actions='{DEFAULT}' ++++++++STATIC_TEXT label='ARIA button with negative tab index' actions='{DEFAULT}' -++++++++++UNKNOWN label='ARIA button with negative tab index' +++++++++++UNKNOWN ++++++UNKNOWN actions='{DEFAULT}' ++++++++BUTTON focusable label='ARIA button that is an active descendant' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='ARIA button that is an active descendant' actions='{DEFAULT}' -++++++++++++UNKNOWN label='ARIA button that is an active descendant' +++++++++++++UNKNOWN ++++++UNKNOWN actions='{DEFAULT}' ++++++++UNKNOWN label='ARIA switch in clickable container' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++++STATIC_TEXT label='ARIA switch in clickable container' actions='{DEFAULT}' -++++++++++++UNKNOWN label='ARIA switch in clickable container' +++++++++++++UNKNOWN ++++++++UNKNOWN actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Generic in clickable container' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Generic in clickable container' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/address-expected-blink.txt b/content/test/data/accessibility/html/address-expected-blink.txt index 575479ac..7f4eeaa 100644 --- a/content/test/data/accessibility/html/address-expected-blink.txt +++ b/content/test/data/accessibility/html/address-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++group ++++++++staticText name='Please contact John Citizen for more information.' -++++++++++inlineTextBox name='Please contact John Citizen for more information.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/address-expected-fuchsia.txt b/content/test/data/accessibility/html/address-expected-fuchsia.txt index f61495dad..0f0a0d9 100644 --- a/content/test/data/accessibility/html/address-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/address-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Please contact John Citizen for more information.' -++++++++++UNKNOWN label='Please contact John Citizen for more information.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/area-crash-expected-blink.txt b/content/test/data/accessibility/html/area-crash-expected-blink.txt index a55b23f..a7f0aae 100644 --- a/content/test/data/accessibility/html/area-crash-expected-blink.txt +++ b/content/test/data/accessibility/html/area-crash-expected-blink.txt
@@ -2,6 +2,6 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++staticText name='done' -++++++++inlineTextBox name='done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/area-serialization-crash-expected-blink.txt b/content/test/data/accessibility/html/area-serialization-crash-expected-blink.txt index 2dcf05f..f0a0be0 100644 --- a/content/test/data/accessibility/html/area-serialization-crash-expected-blink.txt +++ b/content/test/data/accessibility/html/area-serialization-crash-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored htmlTag='html' ++++genericContainer htmlTag='body' ++++++staticText name='done' -++++++++inlineTextBox name='done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/area-with-aria-owns-expected-blink.txt b/content/test/data/accessibility/html/area-with-aria-owns-expected-blink.txt index ad8ae49..f4869d3 100644 --- a/content/test/data/accessibility/html/area-with-aria-owns-expected-blink.txt +++ b/content/test/data/accessibility/html/area-with-aria-owns-expected-blink.txt
@@ -6,4 +6,4 @@ ++++++++link name='pipe1' ++++++paragraph ++++++++staticText name='Paragraph' -++++++++++inlineTextBox name='Paragraph' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/article-expected-blink.txt b/content/test/data/accessibility/html/article-expected-blink.txt index 07dcb57..ae297bb 100644 --- a/content/test/data/accessibility/html/article-expected-blink.txt +++ b/content/test/data/accessibility/html/article-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++article ++++++++staticText name='This is an article element.' -++++++++++inlineTextBox name='This is an article element.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/article-expected-fuchsia.txt b/content/test/data/accessibility/html/article-expected-fuchsia.txt index b03b3ce..4e4dec3d 100644 --- a/content/test/data/accessibility/html/article-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/article-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an article element.' -++++++++++UNKNOWN label='This is an article element.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/aside-expected-blink.txt b/content/test/data/accessibility/html/aside-expected-blink.txt index 01c2e04..865eb2a4 100644 --- a/content/test/data/accessibility/html/aside-expected-blink.txt +++ b/content/test/data/accessibility/html/aside-expected-blink.txt
@@ -3,22 +3,22 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='The aside tag defines some content aside from the content it is placed in.' -++++++++++inlineTextBox name='The aside tag defines some content aside from the content it is placed in.' +++++++++++inlineTextBox ++++++complementary ++++++++heading name='Body aside' hierarchicalLevel=4 ++++++++++staticText name='Body aside' -++++++++++++inlineTextBox name='Body aside' +++++++++++++inlineTextBox ++++++++paragraph ++++++++++staticText name='The aside content should be related to the surrounding content.' -++++++++++++inlineTextBox name='The aside content should be related to the surrounding content.' +++++++++++++inlineTextBox ++++++main ++++++++paragraph ++++++++++staticText name='The main content' -++++++++++++inlineTextBox name='The main content' +++++++++++++inlineTextBox ++++++++complementary ++++++++++heading name='Main aside' hierarchicalLevel=4 ++++++++++++staticText name='Main aside' -++++++++++++++inlineTextBox name='Main aside' +++++++++++++++inlineTextBox ++++++++++paragraph ++++++++++++staticText name='The aside content should be related to the surrounding content.' -++++++++++++++inlineTextBox name='The aside content should be related to the surrounding content.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/aside-expected-fuchsia.txt b/content/test/data/accessibility/html/aside-expected-fuchsia.txt index caf59e89..1468e33 100644 --- a/content/test/data/accessibility/html/aside-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/aside-expected-fuchsia.txt
@@ -3,22 +3,22 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='The aside tag defines some content aside from the content it is placed in.' -++++++++++UNKNOWN label='The aside tag defines some content aside from the content it is placed in.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN label='Body aside' ++++++++++STATIC_TEXT label='Body aside' -++++++++++++UNKNOWN label='Body aside' +++++++++++++UNKNOWN ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='The aside content should be related to the surrounding content.' -++++++++++++UNKNOWN label='The aside content should be related to the surrounding content.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='The main content' -++++++++++++UNKNOWN label='The main content' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++UNKNOWN label='Main aside' ++++++++++++STATIC_TEXT label='Main aside' -++++++++++++++UNKNOWN label='Main aside' +++++++++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='The aside content should be related to the surrounding content.' -++++++++++++++UNKNOWN label='The aside content should be related to the surrounding content.' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/aside-inside-other-section-expected-blink.txt b/content/test/data/accessibility/html/aside-inside-other-section-expected-blink.txt index 6ab736a8..9046ef7d 100644 --- a/content/test/data/accessibility/html/aside-inside-other-section-expected-blink.txt +++ b/content/test/data/accessibility/html/aside-inside-other-section-expected-blink.txt
@@ -5,17 +5,17 @@ ++++++++genericContainer ++++++++++paragraph ++++++++++++staticText name='Unnamed aside inside article.' -++++++++++++++inlineTextBox name='Unnamed aside inside article.' +++++++++++++++inlineTextBox ++++++++complementary name='aside' ++++++++++paragraph ++++++++++++staticText name='Named aside inside article.' -++++++++++++++inlineTextBox name='Named aside inside article.' +++++++++++++++inlineTextBox ++++++section ++++++++genericContainer ++++++++++paragraph ++++++++++++staticText name='Unnamed aside inside section.' -++++++++++++++inlineTextBox name='Unnamed aside inside section.' +++++++++++++++inlineTextBox ++++++++complementary name='aside' ++++++++++paragraph ++++++++++++staticText name='Named aside inside section.' -++++++++++++++inlineTextBox name='Named aside inside section.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/aside-inside-section-role-generic-expected-blink.txt b/content/test/data/accessibility/html/aside-inside-section-role-generic-expected-blink.txt index ee16941..fbeec1c 100644 --- a/content/test/data/accessibility/html/aside-inside-section-role-generic-expected-blink.txt +++ b/content/test/data/accessibility/html/aside-inside-section-role-generic-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++complementary ++++++++paragraph ++++++++++staticText name='aside inside section with role presentational.' -++++++++++++inlineTextBox name='aside inside section with role presentational.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++complementary ++++++++++paragraph ++++++++++++staticText name='aside inside section with role generic.' -++++++++++++++inlineTextBox name='aside inside section with role generic.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/b-expected-blink.txt b/content/test/data/accessibility/html/b-expected-blink.txt index bb1fde8..27d7a38 100644 --- a/content/test/data/accessibility/html/b-expected-blink.txt +++ b/content/test/data/accessibility/html/b-expected-blink.txt
@@ -3,8 +3,8 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Some ' -++++++++++inlineTextBox name='Some ' +++++++++++inlineTextBox ++++++++staticText name='bold' textStyle=2 -++++++++++inlineTextBox name='bold' +++++++++++inlineTextBox ++++++++staticText name=' text' -++++++++++inlineTextBox name=' text' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/b-expected-fuchsia.txt b/content/test/data/accessibility/html/b-expected-fuchsia.txt index b6b6096..b46d667 100644 --- a/content/test/data/accessibility/html/b-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/b-expected-fuchsia.txt
@@ -3,8 +3,8 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='Some ' -++++++++++UNKNOWN label='Some ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='bold' -++++++++++UNKNOWN label='bold' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' text' -++++++++++UNKNOWN label=' text' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/bdo-expected-blink.txt b/content/test/data/accessibility/html/bdo-expected-blink.txt index 03ec285..a6c8b31 100644 --- a/content/test/data/accessibility/html/bdo-expected-blink.txt +++ b/content/test/data/accessibility/html/bdo-expected-blink.txt
@@ -2,10 +2,10 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Some LTR text' -++++++++inlineTextBox name='Some LTR text' +++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++staticText name='Some RTL text ' -++++++++inlineTextBox name='Some RTL text ' +++++++++inlineTextBox ++++++staticText name='with some LTR text embedded' -++++++++inlineTextBox name='with some LTR text embedded' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/bdo-expected-fuchsia.txt b/content/test/data/accessibility/html/bdo-expected-fuchsia.txt index cff4806f0..b2e1877 100644 --- a/content/test/data/accessibility/html/bdo-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/bdo-expected-fuchsia.txt
@@ -2,10 +2,10 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label='Some LTR text' -++++++++UNKNOWN label='Some LTR text' +++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++STATIC_TEXT label='Some RTL text ' -++++++++UNKNOWN label='Some RTL text ' +++++++++UNKNOWN ++++++STATIC_TEXT label='with some LTR text embedded' -++++++++UNKNOWN label='with some LTR text embedded' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/blockquote-expected-blink.txt b/content/test/data/accessibility/html/blockquote-expected-blink.txt index c37ef3f..0a797ec7 100644 --- a/content/test/data/accessibility/html/blockquote-expected-blink.txt +++ b/content/test/data/accessibility/html/blockquote-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++blockquote ++++++++paragraph ++++++++++staticText name='First blockquote has a child element.' -++++++++++++inlineTextBox name='First blockquote has a child element.' +++++++++++++inlineTextBox ++++++blockquote ++++++++staticText name='Second blockquote has no child.' -++++++++++inlineTextBox name='Second blockquote has no child.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/blockquote-expected-fuchsia.txt b/content/test/data/accessibility/html/blockquote-expected-fuchsia.txt index 5c2497f..12b9ecb 100644 --- a/content/test/data/accessibility/html/blockquote-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/blockquote-expected-fuchsia.txt
@@ -4,7 +4,7 @@ ++++++UNKNOWN ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='First blockquote has a child element.' -++++++++++++UNKNOWN label='First blockquote has a child element.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Second blockquote has no child.' -++++++++++UNKNOWN label='Second blockquote has no child.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/blockquote-levels-expected-blink.txt b/content/test/data/accessibility/html/blockquote-levels-expected-blink.txt index c87b4f4..61cb2092 100644 --- a/content/test/data/accessibility/html/blockquote-levels-expected-blink.txt +++ b/content/test/data/accessibility/html/blockquote-levels-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++genericContainer ignored ++++++++blockquote ++++++++++staticText name='Top level' -++++++++++++inlineTextBox name='Top level' +++++++++++++inlineTextBox ++++++++++blockquote ++++++++++++staticText name='Sub' -++++++++++++++inlineTextBox name='Sub' +++++++++++++++inlineTextBox ++++++++++++blockquote ++++++++++++++staticText name='Sub-sub' -++++++++++++++++inlineTextBox name='Sub-sub' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/blockquote-levels-expected-fuchsia.txt b/content/test/data/accessibility/html/blockquote-levels-expected-fuchsia.txt index 169c865..595468b3 100644 --- a/content/test/data/accessibility/html/blockquote-levels-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/blockquote-levels-expected-fuchsia.txt
@@ -4,10 +4,10 @@ ++++++UNKNOWN hidden ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Top level' -++++++++++++UNKNOWN label='Top level' +++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='Sub' -++++++++++++++UNKNOWN label='Sub' +++++++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='Sub-sub' -++++++++++++++++UNKNOWN label='Sub-sub' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/body-expected-blink.txt b/content/test/data/accessibility/html/body-expected-blink.txt index 0712a4e..ebdc9c0 100644 --- a/content/test/data/accessibility/html/body-expected-blink.txt +++ b/content/test/data/accessibility/html/body-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This test is for body tag' -++++++++++inlineTextBox name='This test is for body tag' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/body-expected-fuchsia.txt b/content/test/data/accessibility/html/body-expected-fuchsia.txt index 897fdf5e..5638932 100644 --- a/content/test/data/accessibility/html/body-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/body-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This test is for body tag' -++++++++++UNKNOWN label='This test is for body tag' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/body-tabindex-expected-blink.txt b/content/test/data/accessibility/html/body-tabindex-expected-blink.txt index 07da43f..ecb30b0 100644 --- a/content/test/data/accessibility/html/body-tabindex-expected-blink.txt +++ b/content/test/data/accessibility/html/body-tabindex-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This test is for the body tag with a tabindex' -++++++++++inlineTextBox name='This test is for the body tag with a tabindex' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/bounds-absolute-expected-blink.txt b/content/test/data/accessibility/html/bounds-absolute-expected-blink.txt index a110ddf4..4904bcf 100644 --- a/content/test/data/accessibility/html/bounds-absolute-expected-blink.txt +++ b/content/test/data/accessibility/html/bounds-absolute-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++dialog size=(200, 200) pageLocation=(150, 50) pageSize=(200, 200) unclippedLocation=(150, 50) unclippedSize=(200, 200) ++++++++++button size=(160, 50) pageSize=(160, 50) name='Button 1' ++++++++++++staticText name='Button 1' -++++++++++++++inlineTextBox name='Button 1' +++++++++++++++inlineTextBox ++++++++++button size=(160, 50) pageSize=(160, 50) name='Button 2' ++++++++++++staticText name='Button 2' -++++++++++++++inlineTextBox name='Button 2' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/bounds-clips-expected-blink.txt b/content/test/data/accessibility/html/bounds-clips-expected-blink.txt index 553d3c3..a270c1ad 100644 --- a/content/test/data/accessibility/html/bounds-clips-expected-blink.txt +++ b/content/test/data/accessibility/html/bounds-clips-expected-blink.txt
@@ -3,11 +3,11 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='Visible' -++++++++++inlineTextBox name='Visible' +++++++++++inlineTextBox ++++++genericContainer ignored ++++++++genericContainer size=(200, 100) ++++++++++staticText name='Also visible' -++++++++++++inlineTextBox name='Also visible' +++++++++++++inlineTextBox ++++++genericContainer ignored ++++++++genericContainer ++++++++++staticText name='Also visible' @@ -15,7 +15,7 @@ ++++++++++++inlineTextBox name='visible' ++++++genericContainer ++++++++staticText offscreen name='Hidden' -++++++++++inlineTextBox offscreen name='Hidden' +++++++++++inlineTextBox offscreen ++++++genericContainer size=(10, 10) ++++++++genericContainer ++++++++++staticText offscreen name='Also hidden'
diff --git a/content/test/data/accessibility/html/bounds-fixed-expected-blink.txt b/content/test/data/accessibility/html/bounds-fixed-expected-blink.txt index 199c949..65216de 100644 --- a/content/test/data/accessibility/html/bounds-fixed-expected-blink.txt +++ b/content/test/data/accessibility/html/bounds-fixed-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++dialog size=(200, 200) pageLocation=(150, 50) pageSize=(200, 200) unclippedLocation=(150, 50) unclippedSize=(200, 200) ++++++++++button size=(160, 50) pageSize=(160, 50) name='Button 1' ++++++++++++staticText name='Button 1' -++++++++++++++inlineTextBox name='Button 1' +++++++++++++++inlineTextBox ++++++++++button size=(160, 50) pageSize=(160, 50) name='Button 2' ++++++++++++staticText name='Button 2' -++++++++++++++inlineTextBox name='Button 2' \ No newline at end of file +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/bounds-fixed-scrolling-expected-blink.txt b/content/test/data/accessibility/html/bounds-fixed-scrolling-expected-blink.txt index f3bca46f..6c4a2cb 100644 --- a/content/test/data/accessibility/html/bounds-fixed-scrolling-expected-blink.txt +++ b/content/test/data/accessibility/html/bounds-fixed-scrolling-expected-blink.txt
@@ -3,35 +3,35 @@ ++++genericContainer ignored ++++++button name='Scroll' ++++++++staticText name='Scroll' -++++++++++inlineTextBox name='Scroll' +++++++++++inlineTextBox ++++++genericContainer location=(8, 70) ++++++++staticText name='title' -++++++++++inlineTextBox name='title' +++++++++++inlineTextBox ++++++genericContainer ++++++++heading name='Heading #1' ++++++++++staticText name='Heading #1' -++++++++++++inlineTextBox name='Heading #1' +++++++++++++inlineTextBox ++++++++heading name='Heading #2' ++++++++++staticText name='Heading #2' -++++++++++++inlineTextBox name='Heading #2' +++++++++++++inlineTextBox ++++++++heading name='Heading #3' ++++++++++staticText name='Heading #3' -++++++++++++inlineTextBox name='Heading #3' +++++++++++++inlineTextBox ++++++++heading name='Heading #4' ++++++++++staticText name='Heading #4' -++++++++++++inlineTextBox name='Heading #4' +++++++++++++inlineTextBox ++++++++heading name='Heading #5' ++++++++++staticText name='Heading #5' -++++++++++++inlineTextBox name='Heading #5' +++++++++++++inlineTextBox ++++++++heading name='Heading #6' ++++++++++staticText name='Heading #6' -++++++++++++inlineTextBox name='Heading #6' +++++++++++++inlineTextBox ++++++++heading name='Heading #7' ++++++++++staticText name='Heading #7' -++++++++++++inlineTextBox name='Heading #7' +++++++++++++inlineTextBox ++++++++heading name='Heading #8' ++++++++++staticText name='Heading #8' -++++++++++++inlineTextBox name='Heading #8' +++++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='done' -++++++++++inlineTextBox name='done' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/br-expected-blink.txt b/content/test/data/accessibility/html/br-expected-blink.txt index 358c3d1..982b46eb 100644 --- a/content/test/data/accessibility/html/br-expected-blink.txt +++ b/content/test/data/accessibility/html/br-expected-blink.txt
@@ -2,15 +2,15 @@ ++genericContainer ignored ++++genericContainer ignored ++++++lineBreak name='<newline>' -++++++++inlineTextBox name='<newline>' +++++++++inlineTextBox ++++++staticText name='Text line 1' -++++++++inlineTextBox name='Text line 1' +++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Text line 2' -++++++++++inlineTextBox name='Text line 2' +++++++++++inlineTextBox ++++++++lineBreak name='<newline>' -++++++++++inlineTextBox name='<newline>' +++++++++++inlineTextBox ++++++++staticText name='Text line 3' -++++++++++inlineTextBox name='Text line 3' +++++++++++inlineTextBox ++++++lineBreak name='<newline>' -++++++++inlineTextBox name='<newline>' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/br-expected-fuchsia.txt b/content/test/data/accessibility/html/br-expected-fuchsia.txt index 97c78ae..0c369c43 100644 --- a/content/test/data/accessibility/html/br-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/br-expected-fuchsia.txt
@@ -2,15 +2,15 @@ ++UNKNOWN hidden ++++UNKNOWN hidden ++++++UNKNOWN label='<newline>' -++++++++UNKNOWN label='<newline>' +++++++++UNKNOWN ++++++STATIC_TEXT label='Text line 1' -++++++++UNKNOWN label='Text line 1' +++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='Text line 2' -++++++++++UNKNOWN label='Text line 2' +++++++++++UNKNOWN ++++++++UNKNOWN label='<newline>' -++++++++++UNKNOWN label='<newline>' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='Text line 3' -++++++++++UNKNOWN label='Text line 3' +++++++++++UNKNOWN ++++++UNKNOWN label='<newline>' -++++++++UNKNOWN label='<newline>' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/br-with-child-expected-blink.txt b/content/test/data/accessibility/html/br-with-child-expected-blink.txt index 0aec0c4..312f3a8 100644 --- a/content/test/data/accessibility/html/br-with-child-expected-blink.txt +++ b/content/test/data/accessibility/html/br-with-child-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Text line 1' -++++++++++inlineTextBox name='Text line 1' +++++++++++inlineTextBox ++++++++lineBreak name='<newline>' ++++++++staticText name='Text line 2' -++++++++++inlineTextBox name='Text line 2' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/button-content-changed-expected-blink.txt b/content/test/data/accessibility/html/button-content-changed-expected-blink.txt index 5087641..7ca5ed57 100644 --- a/content/test/data/accessibility/html/button-content-changed-expected-blink.txt +++ b/content/test/data/accessibility/html/button-content-changed-expected-blink.txt
@@ -6,11 +6,11 @@ ++++++++paragraph ignored ++++++++genericContainer ++++++++++staticText name='After' -++++++++++++inlineTextBox name='After' +++++++++++++inlineTextBox ++++++++paragraph ignored ++++++button name='After' ++++++++paragraph ignored ++++++++genericContainer ++++++++++staticText name='After' -++++++++++++inlineTextBox name='After' +++++++++++++inlineTextBox ++++++++paragraph ignored
diff --git a/content/test/data/accessibility/html/button-expected-blink.txt b/content/test/data/accessibility/html/button-expected-blink.txt index 21e9aaa..bace23fb 100644 --- a/content/test/data/accessibility/html/button-expected-blink.txt +++ b/content/test/data/accessibility/html/button-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++button name='Click me!' ++++++++staticText name='Click me!' -++++++++++inlineTextBox name='Click me!' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/button-expected-fuchsia.txt b/content/test/data/accessibility/html/button-expected-fuchsia.txt index cda94c3..3108509f 100644 --- a/content/test/data/accessibility/html/button-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/button-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++BUTTON focusable label='Click me!' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Click me!' actions='{DEFAULT}' -++++++++++UNKNOWN label='Click me!' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/button-name-calc-expected-blink.txt b/content/test/data/accessibility/html/button-name-calc-expected-blink.txt index 0d3f4f7..858a7f4 100644 --- a/content/test/data/accessibility/html/button-name-calc-expected-blink.txt +++ b/content/test/data/accessibility/html/button-name-calc-expected-blink.txt
@@ -3,38 +3,38 @@ ++++genericContainer ignored ++++++button name='InnerText0' ++++++++staticText name='InnerText0' -++++++++++inlineTextBox name='InnerText0' +++++++++++inlineTextBox ++++++button description='Title1' name='InnerText1' descriptionFrom=title ++++++++staticText name='InnerText1' -++++++++++inlineTextBox name='InnerText1' +++++++++++inlineTextBox ++++++button description='Title2' name='AriaLabel2' descriptionFrom=title ++++++++staticText name='InnerText2' -++++++++++inlineTextBox name='InnerText2' +++++++++++inlineTextBox ++++++button description='Title3' name='LabelledBy3' descriptionFrom=title ++++++++staticText name='InnerText3' -++++++++++inlineTextBox name='InnerText3' +++++++++++inlineTextBox ++++++button description='DescribedBy4' name='LabelledBy4' descriptionFrom=relatedElement ++++++++staticText name='InnerText4' -++++++++++inlineTextBox name='InnerText4' +++++++++++inlineTextBox ++++++button description='DescribedBy5' name='InnerText5' descriptionFrom=relatedElement ++++++++staticText name='InnerText5' -++++++++++inlineTextBox name='InnerText5' +++++++++++inlineTextBox ++++++button name='Outer inner' ++++++++staticText name='Outer' -++++++++++inlineTextBox name='Outer' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='inner' -++++++++++++inlineTextBox name='inner' +++++++++++++inlineTextBox ++++++button name='Outer inner1' ++++++++staticText name='Outer' -++++++++++inlineTextBox name='Outer' +++++++++++inlineTextBox ++++++++genericContainer name='inner1' ++++++++++staticText name='inner2' -++++++++++++inlineTextBox name='inner2' +++++++++++++inlineTextBox ++++++button name='Outer grandchild' ++++++++staticText name='Outer' -++++++++++inlineTextBox name='Outer' +++++++++++inlineTextBox ++++++++section ++++++++++genericContainer ++++++++++++staticText name='grandchild' -++++++++++++++inlineTextBox name='grandchild' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/button-name-calc-expected-fuchsia.txt b/content/test/data/accessibility/html/button-name-calc-expected-fuchsia.txt index 5920cf0..1814de6d 100644 --- a/content/test/data/accessibility/html/button-name-calc-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/button-name-calc-expected-fuchsia.txt
@@ -3,38 +3,38 @@ ++++UNKNOWN hidden ++++++BUTTON focusable label='InnerText0' actions='{DEFAULT}' ++++++++STATIC_TEXT label='InnerText0' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText0' +++++++++++UNKNOWN ++++++BUTTON focusable label='InnerText1' actions='{DEFAULT}' secondary_label='Title1' ++++++++STATIC_TEXT label='InnerText1' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText1' +++++++++++UNKNOWN ++++++BUTTON focusable label='AriaLabel2' actions='{DEFAULT}' secondary_label='Title2' ++++++++STATIC_TEXT label='InnerText2' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText2' +++++++++++UNKNOWN ++++++BUTTON focusable label='LabelledBy3' actions='{DEFAULT}' secondary_label='Title3' ++++++++STATIC_TEXT label='InnerText3' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText3' +++++++++++UNKNOWN ++++++BUTTON focusable label='LabelledBy4' actions='{DEFAULT}' secondary_label='DescribedBy4' ++++++++STATIC_TEXT label='InnerText4' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText4' +++++++++++UNKNOWN ++++++BUTTON focusable label='InnerText5' actions='{DEFAULT}' secondary_label='DescribedBy5' ++++++++STATIC_TEXT label='InnerText5' actions='{DEFAULT}' -++++++++++UNKNOWN label='InnerText5' +++++++++++UNKNOWN ++++++BUTTON focusable label='Outer inner' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Outer' actions='{DEFAULT}' -++++++++++UNKNOWN label='Outer' +++++++++++UNKNOWN ++++++++UNKNOWN actions='{DEFAULT}' ++++++++++STATIC_TEXT label='inner' actions='{DEFAULT}' -++++++++++++UNKNOWN label='inner' +++++++++++++UNKNOWN ++++++BUTTON focusable label='Outer inner1' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Outer' actions='{DEFAULT}' -++++++++++UNKNOWN label='Outer' +++++++++++UNKNOWN ++++++++UNKNOWN label='inner1' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='inner2' actions='{DEFAULT}' -++++++++++++UNKNOWN label='inner2' +++++++++++++UNKNOWN ++++++BUTTON focusable label='Outer grandchild' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Outer' actions='{DEFAULT}' -++++++++++UNKNOWN label='Outer' +++++++++++UNKNOWN ++++++++UNKNOWN actions='{DEFAULT}' ++++++++++UNKNOWN actions='{DEFAULT}' ++++++++++++STATIC_TEXT label='grandchild' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='grandchild' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/button-submit-expected-blink.txt b/content/test/data/accessibility/html/button-submit-expected-blink.txt index 9f56b14..dc068032 100644 --- a/content/test/data/accessibility/html/button-submit-expected-blink.txt +++ b/content/test/data/accessibility/html/button-submit-expected-blink.txt
@@ -6,19 +6,19 @@ ++++++++++genericContainer ++++++++button default name='First submit in a form is a valid default button' ++++++++++staticText name='First submit in a form is a valid default button' -++++++++++++inlineTextBox name='First submit in a form is a valid default button' +++++++++++++inlineTextBox ++++++++button name='Second submit in a form not a valid default button' ++++++++++staticText name='Second submit in a form not a valid default button' -++++++++++++inlineTextBox name='Second submit in a form not a valid default button' +++++++++++++inlineTextBox ++++++section ++++++++textField ++++++++++genericContainer ++++++++button default name='First button in form is a valid default button' ++++++++++staticText name='First button in form is a valid default button' -++++++++++++inlineTextBox name='First button in form is a valid default button' +++++++++++++inlineTextBox ++++++++button name='Second button in form not a valid default button' ++++++++++staticText name='Second button in form not a valid default button' -++++++++++++inlineTextBox name='Second button in form not a valid default button' +++++++++++++inlineTextBox ++++++button name='Submit outside of form not a valid default button' ++++++++staticText name='Submit outside of form not a valid default button' -++++++++++inlineTextBox name='Submit outside of form not a valid default button' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/button-with-listbox-popup-expected-blink.txt b/content/test/data/accessibility/html/button-with-listbox-popup-expected-blink.txt index 2f74e0bc..e57f801 100644 --- a/content/test/data/accessibility/html/button-with-listbox-popup-expected-blink.txt +++ b/content/test/data/accessibility/html/button-with-listbox-popup-expected-blink.txt
@@ -4,26 +4,26 @@ ++++++genericContainer ++++++++genericContainer ++++++++++staticText name='Choose one:' -++++++++++++inlineTextBox name='Choose one:' +++++++++++++inlineTextBox ++++++++popUpButton name='Choose one: Foo' ++++++++++staticText name='Foo' -++++++++++++inlineTextBox name='Foo' +++++++++++++inlineTextBox ++++++++listBox name='Choose one:' ++++++++++listBoxOption name='Baz' selected=false ++++++++++++none ignored ++++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++++inlineTextBox ++++++++++++staticText name='Baz' -++++++++++++++inlineTextBox name='Baz' +++++++++++++++inlineTextBox ++++++++++listBoxOption name='Bar' selected=false ++++++++++++none ignored ++++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++++inlineTextBox ++++++++++++staticText name='Bar' -++++++++++++++inlineTextBox name='Bar' +++++++++++++++inlineTextBox ++++++++++listBoxOption name='Foo' selected=false ++++++++++++none ignored ++++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++++inlineTextBox ++++++++++++staticText name='Foo' -++++++++++++++inlineTextBox name='Foo' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/button-with-listbox-popup-expected-fuchsia.txt b/content/test/data/accessibility/html/button-with-listbox-popup-expected-fuchsia.txt index f7813778..cd500be9 100644 --- a/content/test/data/accessibility/html/button-with-listbox-popup-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/button-with-listbox-popup-expected-fuchsia.txt
@@ -4,26 +4,26 @@ ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Choose one:' -++++++++++++UNKNOWN label='Choose one:' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='Choose one: Foo' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Foo' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Foo' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='Choose one:' actions='{DEFAULT}' ++++++++++UNKNOWN label='Baz' actions='{DEFAULT}' ++++++++++++UNKNOWN hidden ++++++++++++++STATIC_TEXT label='%E2%80%A2 ' actions='{DEFAULT}' -++++++++++++++++UNKNOWN label='%E2%80%A2 ' +++++++++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='Baz' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Baz' +++++++++++++++UNKNOWN ++++++++++UNKNOWN label='Bar' actions='{DEFAULT}' ++++++++++++UNKNOWN hidden ++++++++++++++STATIC_TEXT label='%E2%80%A2 ' actions='{DEFAULT}' -++++++++++++++++UNKNOWN label='%E2%80%A2 ' +++++++++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='Bar' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Bar' +++++++++++++++UNKNOWN ++++++++++UNKNOWN label='Foo' actions='{DEFAULT}' ++++++++++++UNKNOWN hidden ++++++++++++++STATIC_TEXT label='%E2%80%A2 ' actions='{DEFAULT}' -++++++++++++++++UNKNOWN label='%E2%80%A2 ' +++++++++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='Foo' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Foo' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/caption-expected-blink.txt b/content/test/data/accessibility/html/caption-expected-blink.txt index 4ff13c9..e4eb74e 100644 --- a/content/test/data/accessibility/html/caption-expected-blink.txt +++ b/content/test/data/accessibility/html/caption-expected-blink.txt
@@ -10,33 +10,33 @@ ++++++++++row ++++++++++++columnHeader name='Browser' ++++++++++++++staticText name='Browser' -++++++++++++++++inlineTextBox name='Browser' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Engine' ++++++++++++++staticText name='Engine' -++++++++++++++++inlineTextBox name='Engine' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='Chrome' ++++++++++++++staticText name='Chrome' -++++++++++++++++inlineTextBox name='Chrome' +++++++++++++++++inlineTextBox ++++++++++++cell name='Blink' ++++++++++++++staticText name='Blink' -++++++++++++++++inlineTextBox name='Blink' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='Safari' ++++++++++++++staticText name='Safari' -++++++++++++++++inlineTextBox name='Safari' +++++++++++++++++inlineTextBox ++++++++++++cell name='WebKit' ++++++++++++++staticText name='WebKit' -++++++++++++++++inlineTextBox name='WebKit' +++++++++++++++++inlineTextBox ++++++table description='Description' name='Name' descriptionFrom=tableCaption ++++++++caption ++++++++++staticText name='Description' -++++++++++++inlineTextBox name='Description' +++++++++++++inlineTextBox ++++++++rowGroup ignored ++++++++++row ++++++++++++cell name='A' ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/caption-expected-fuchsia.txt b/content/test/data/accessibility/html/caption-expected-fuchsia.txt index 4d4edcf..a930383 100644 --- a/content/test/data/accessibility/html/caption-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/caption-expected-fuchsia.txt
@@ -10,33 +10,33 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Browser' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Browser' -++++++++++++++++UNKNOWN label='Browser' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Engine' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Engine' -++++++++++++++++UNKNOWN label='Engine' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='Chrome' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Chrome' -++++++++++++++++UNKNOWN label='Chrome' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Blink' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Blink' -++++++++++++++++UNKNOWN label='Blink' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=2 ++++++++++++CELL label='Safari' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Safari' -++++++++++++++++UNKNOWN label='Safari' +++++++++++++++++UNKNOWN ++++++++++++CELL label='WebKit' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='WebKit' -++++++++++++++++UNKNOWN label='WebKit' +++++++++++++++++UNKNOWN ++++++TABLE label='Name' secondary_label='Description' number_of_rows=1 number_of_columns=2 ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Description' -++++++++++++UNKNOWN label='Description' +++++++++++++UNKNOWN ++++++++ROW_GROUP hidden ++++++++++TABLE_ROW ++++++++++++CELL label='A' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='A' -++++++++++++++++UNKNOWN label='A' +++++++++++++++++UNKNOWN ++++++++++++CELL label='B' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='B' -++++++++++++++++UNKNOWN label='B' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/character-locations-expected-fuchsia.txt b/content/test/data/accessibility/html/character-locations-expected-fuchsia.txt index 39ae271..1c2f70d 100644 --- a/content/test/data/accessibility/html/character-locations-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/character-locations-expected-fuchsia.txt
@@ -3,23 +3,23 @@ ++++UNKNOWN hidden ++++++UNKNOWN label='Heading' ++++++++STATIC_TEXT label='Heading' -++++++++++UNKNOWN label='Heading' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='Paragraph' -++++++++++UNKNOWN label='Paragraph' +++++++++++UNKNOWN ++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Button' actions='{DEFAULT}' -++++++++++UNKNOWN label='Button' +++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='Input' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Input' -++++++++++++UNKNOWN label='Input' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='Textarea' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Textarea' -++++++++++++UNKNOWN label='Textarea' +++++++++++++UNKNOWN ++++++IMAGE label='Image with alt text' ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Image inside link' actions='{DEFAULT}' ++++++++IMAGE label='Image inside link' actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/cite-expected-blink.txt b/content/test/data/accessibility/html/cite-expected-blink.txt index c301178..48b10f93 100644 --- a/content/test/data/accessibility/html/cite-expected-blink.txt +++ b/content/test/data/accessibility/html/cite-expected-blink.txt
@@ -4,6 +4,6 @@ ++++++image name='Pipe' ++++++paragraph ++++++++staticText name='The pipe' -++++++++++inlineTextBox name='The pipe' +++++++++++inlineTextBox ++++++++staticText name=' clicked by SomeOne.' -++++++++++inlineTextBox name=' clicked by SomeOne.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/cite-expected-fuchsia.txt b/content/test/data/accessibility/html/cite-expected-fuchsia.txt index cdd782c..d6bc6a0f 100644 --- a/content/test/data/accessibility/html/cite-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/cite-expected-fuchsia.txt
@@ -4,6 +4,6 @@ ++++++IMAGE label='Pipe' ++++++PARAGRAPH ++++++++STATIC_TEXT label='The pipe' -++++++++++UNKNOWN label='The pipe' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' clicked by SomeOne.' -++++++++++UNKNOWN label=' clicked by SomeOne.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/clickable-ancestor-expected-fuchsia.txt b/content/test/data/accessibility/html/clickable-ancestor-expected-fuchsia.txt index ec17315a05..96c1fa0 100644 --- a/content/test/data/accessibility/html/clickable-ancestor-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/clickable-ancestor-expected-fuchsia.txt
@@ -3,14 +3,14 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Generic div' -++++++++++UNKNOWN label='Generic div' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading' ++++++++STATIC_TEXT label='Heading' -++++++++++UNKNOWN label='Heading' +++++++++++UNKNOWN ++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Button' actions='{DEFAULT}' -++++++++++UNKNOWN label='Button' +++++++++++UNKNOWN ++++++UNKNOWN actions='{DEFAULT}' ++++++++PARAGRAPH actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Paragraph with click handler on parent and should be not marked as clickable' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Paragraph with click handler on parent and should be not marked as clickable' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/code-expected-blink.txt b/content/test/data/accessibility/html/code-expected-blink.txt index 55aa86f2..4a53caa9 100644 --- a/content/test/data/accessibility/html/code-expected-blink.txt +++ b/content/test/data/accessibility/html/code-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++code ++++++++staticText name='A piece of computer code' -++++++++++inlineTextBox name='A piece of computer code' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/code-expected-fuchsia.txt b/content/test/data/accessibility/html/code-expected-fuchsia.txt index 3341dd6a..83c28128 100644 --- a/content/test/data/accessibility/html/code-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/code-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='A piece of computer code' -++++++++++UNKNOWN label='A piece of computer code' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/col-expected-blink.txt b/content/test/data/accessibility/html/col-expected-blink.txt index 569f67e..ec0b62a5 100644 --- a/content/test/data/accessibility/html/col-expected-blink.txt +++ b/content/test/data/accessibility/html/col-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++row ++++++++++++columnHeader name='Browser' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='Browser' -++++++++++++++++inlineTextBox name='Browser' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Rendering Engine' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Rendering Engine' -++++++++++++++++inlineTextBox name='Rendering Engine' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='Chrome' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='Chrome' -++++++++++++++++inlineTextBox name='Chrome' +++++++++++++++++inlineTextBox ++++++++++++cell name='Blink' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Blink' -++++++++++++++++inlineTextBox name='Blink' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/col-expected-fuchsia.txt b/content/test/data/accessibility/html/col-expected-fuchsia.txt index e160948..ae736c0 100644 --- a/content/test/data/accessibility/html/col-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/col-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Browser' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Browser' -++++++++++++++++UNKNOWN label='Browser' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Rendering Engine' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Rendering Engine' -++++++++++++++++UNKNOWN label='Rendering Engine' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='Chrome' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Chrome' -++++++++++++++++UNKNOWN label='Chrome' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Blink' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Blink' -++++++++++++++++UNKNOWN label='Blink' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/colgroup-expected-blink.txt b/content/test/data/accessibility/html/colgroup-expected-blink.txt index 2f6715a84..c7e6e49 100644 --- a/content/test/data/accessibility/html/colgroup-expected-blink.txt +++ b/content/test/data/accessibility/html/colgroup-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++row ++++++++++++columnHeader name='Single' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='Single' -++++++++++++++++inlineTextBox name='Single' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Pair' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Pair' -++++++++++++++++inlineTextBox name='Pair' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='A' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='A' -++++++++++++++++inlineTextBox name='A' +++++++++++++++++inlineTextBox ++++++++++++cell name='AA' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='AA' -++++++++++++++++inlineTextBox name='AA' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/colgroup-expected-fuchsia.txt b/content/test/data/accessibility/html/colgroup-expected-fuchsia.txt index 1869a1ac..e85f2ac 100644 --- a/content/test/data/accessibility/html/colgroup-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/colgroup-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Single' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Single' -++++++++++++++++UNKNOWN label='Single' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Pair' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Pair' -++++++++++++++++UNKNOWN label='Pair' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='A' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='A' -++++++++++++++++UNKNOWN label='A' +++++++++++++++++UNKNOWN ++++++++++++CELL label='AA' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='AA' -++++++++++++++++UNKNOWN label='AA' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/contenteditable-br-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-br-expected-blink.txt index ac292ac..042fd1a 100644 --- a/content/test/data/accessibility/html/contenteditable-br-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-br-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++textField multiline value='A paragraph with a br<newline>inside of it' ++++++++paragraph -++++++++++staticText name='A paragraph with a br' nextOnLineId=inlineTextBox:"<newline>" -++++++++++++inlineTextBox name='A paragraph with a br' nextOnLineId=inlineTextBox:"<newline>" -++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox:"A paragraph with a br" -++++++++++++inlineTextBox name='<newline>' previousOnLineId=inlineTextBox:"A paragraph with a br" +++++++++++staticText name='A paragraph with a br' nextOnLineId=inlineTextBox +++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox +++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++++staticText name='inside of it' -++++++++++++inlineTextBox name='inside of it' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt index fe6f97f..d770dcb 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-descendants-expected-blink.txt
@@ -4,35 +4,35 @@ ++++++genericContainer editable multiline richlyEditable value='A contenteditable with a link and an <newline><newline> and a Button.<newline>Always expose editable tables as tables.<newline>1. Editable list item.' nonAtomicTextFieldRoot=true ++++++++paragraph editable richlyEditable ++++++++++staticText editable richlyEditable name='A contenteditable with a ' -++++++++++++inlineTextBox editable richlyEditable name='A contenteditable with a ' +++++++++++++inlineTextBox editable richlyEditable ++++++++++link editable linked richlyEditable name='link' ++++++++++++staticText editable linked richlyEditable name='link' -++++++++++++++inlineTextBox editable richlyEditable name='link' +++++++++++++++inlineTextBox editable richlyEditable ++++++++++staticText editable richlyEditable name=' and an ' -++++++++++++inlineTextBox editable richlyEditable name=' and an ' +++++++++++++inlineTextBox editable richlyEditable ++++++++++image editable name='Image' ++++++++++staticText editable richlyEditable name=' and a ' -++++++++++++inlineTextBox editable richlyEditable name=' and a ' +++++++++++++inlineTextBox editable richlyEditable ++++++++++button editable name='Button' ++++++++++++staticText name='Button' -++++++++++++++inlineTextBox name='Button' +++++++++++++++inlineTextBox ++++++++++staticText editable richlyEditable name='.' -++++++++++++inlineTextBox editable richlyEditable name='.' +++++++++++++inlineTextBox editable richlyEditable ++++++++table editable richlyEditable ++++++++++rowGroup editable ignored richlyEditable ++++++++++++row editable richlyEditable ++++++++++++++cell editable richlyEditable name='Always expose editable tables as tables.' ++++++++++++++++staticText editable richlyEditable name='Always expose editable tables as tables.' -++++++++++++++++++inlineTextBox editable richlyEditable name='Always expose editable tables as tables.' +++++++++++++++++++inlineTextBox editable richlyEditable ++++++++list editable richlyEditable ++++++++++listItem editable richlyEditable ++++++++++++listMarker name='1. ' ++++++++++++++staticText ignored name='1. ' ++++++++++++staticText editable richlyEditable name='Editable list item.' -++++++++++++++inlineTextBox editable richlyEditable name='Editable list item.' +++++++++++++++inlineTextBox editable richlyEditable ++++++paragraph ++++++++staticText name='Non-editable paragraph.' -++++++++++inlineTextBox name='Non-editable paragraph.' +++++++++++inlineTextBox ++++++paragraph editable multiline richlyEditable value='Should keep the role but change the state.' nonAtomicTextFieldRoot=true ++++++++staticText editable richlyEditable name='Should keep the role but change the state.' -++++++++++inlineTextBox editable richlyEditable name='Should keep the role but change the state.' +++++++++++inlineTextBox editable richlyEditable
diff --git a/content/test/data/accessibility/html/contenteditable-descendants-expected-fuchsia.txt b/content/test/data/accessibility/html/contenteditable-descendants-expected-fuchsia.txt index 468c6622..23d6a17c 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/contenteditable-descendants-expected-fuchsia.txt
@@ -4,35 +4,35 @@ ++++++UNKNOWN focusable actions='{DEFAULT}' value='A contenteditable with a link and an <newline><newline> and a Button.<newline>Always expose editable tables as tables.<newline>1. Editable list item.' ++++++++PARAGRAPH actions='{DEFAULT}' ++++++++++STATIC_TEXT label='A contenteditable with a ' actions='{DEFAULT}' -++++++++++++UNKNOWN label='A contenteditable with a ' +++++++++++++UNKNOWN ++++++++++LINK label='link' actions='{DEFAULT}' ++++++++++++STATIC_TEXT label='link' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='link' +++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' and an ' actions='{DEFAULT}' -++++++++++++UNKNOWN label=' and an ' +++++++++++++UNKNOWN ++++++++++IMAGE label='Image' actions='{DEFAULT}' ++++++++++STATIC_TEXT label=' and a ' actions='{DEFAULT}' -++++++++++++UNKNOWN label=' and a ' +++++++++++++UNKNOWN ++++++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++++++STATIC_TEXT label='Button' -++++++++++++++UNKNOWN label='Button' +++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='.' actions='{DEFAULT}' -++++++++++++UNKNOWN label='.' +++++++++++++UNKNOWN ++++++++TABLE actions='{DEFAULT}' number_of_rows=1 number_of_columns=1 ++++++++++ROW_GROUP hidden ++++++++++++TABLE_ROW actions='{DEFAULT}' ++++++++++++++CELL label='Always expose editable tables as tables.' actions='{DEFAULT}' cell_row_span=1 cell_column_span=1 ++++++++++++++++STATIC_TEXT label='Always expose editable tables as tables.' actions='{DEFAULT}' -++++++++++++++++++UNKNOWN label='Always expose editable tables as tables.' +++++++++++++++++++UNKNOWN ++++++++LIST actions='{DEFAULT}' list_size=1 ++++++++++LIST_ELEMENT actions='{DEFAULT}' list_element_index=1 ++++++++++++LIST_ELEMENT_MARKER label='1. ' actions='{DEFAULT}' ++++++++++++++STATIC_TEXT hidden label='1. ' ++++++++++++STATIC_TEXT label='Editable list item.' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Editable list item.' +++++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='Non-editable paragraph.' -++++++++++UNKNOWN label='Non-editable paragraph.' +++++++++++UNKNOWN ++++++PARAGRAPH focusable actions='{DEFAULT}' value='Should keep the role but change the state.' ++++++++STATIC_TEXT label='Should keep the role but change the state.' actions='{DEFAULT}' -++++++++++UNKNOWN label='Should keep the role but change the state.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-blink.txt index 8d4091b..fafff8bc 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-blink.txt
@@ -4,29 +4,29 @@ ++++++genericContainer editable multiline richlyEditable value='A contenteditable with a link and an <newline><newline> and a Button.<newline>Always expose editable tables as tables.<newline>1. Editable list item.' nonAtomicTextFieldRoot=true TreeData.textSelStartOffset=0 TreeData.textSelEndOffset=3 ++++++++paragraph editable richlyEditable ++++++++++staticText editable richlyEditable name='A contenteditable with a ' -++++++++++++inlineTextBox editable richlyEditable name='A contenteditable with a ' +++++++++++++inlineTextBox editable richlyEditable ++++++++++link editable richlyEditable name='link' ++++++++++++staticText editable richlyEditable name='link' -++++++++++++++inlineTextBox editable richlyEditable name='link' +++++++++++++++inlineTextBox editable richlyEditable ++++++++++staticText editable richlyEditable name=' and an ' -++++++++++++inlineTextBox editable richlyEditable name=' and an ' +++++++++++++inlineTextBox editable richlyEditable ++++++++++image editable name='Image' ++++++++++staticText editable richlyEditable name=' and a ' -++++++++++++inlineTextBox editable richlyEditable name=' and a ' +++++++++++++inlineTextBox editable richlyEditable ++++++++++button editable name='Button' ++++++++++++staticText name='Button' -++++++++++++++inlineTextBox name='Button' +++++++++++++++inlineTextBox ++++++++++staticText editable richlyEditable name='.' -++++++++++++inlineTextBox editable richlyEditable name='.' +++++++++++++inlineTextBox editable richlyEditable ++++++++table editable richlyEditable ++++++++++rowGroup editable ignored richlyEditable ++++++++++++row editable richlyEditable ++++++++++++++cell editable richlyEditable name='Always expose editable tables as tables.' ++++++++++++++++staticText editable richlyEditable name='Always expose editable tables as tables.' -++++++++++++++++++inlineTextBox editable richlyEditable name='Always expose editable tables as tables.' +++++++++++++++++++inlineTextBox editable richlyEditable ++++++++list editable richlyEditable ++++++++++listItem editable richlyEditable ++++++++++++listMarker name='1. ' ++++++++++++++staticText ignored name='1. ' ++++++++++++staticText editable richlyEditable name='Editable list item.' -++++++++++++++inlineTextBox editable richlyEditable name='Editable list item.' +++++++++++++++inlineTextBox editable richlyEditable
diff --git a/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-fuchsia.txt b/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-fuchsia.txt index 248954c..a23a76e 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/contenteditable-descendants-with-selection-expected-fuchsia.txt
@@ -4,29 +4,29 @@ ++++++UNKNOWN focusable has_input_focus actions='{DEFAULT}' value='A contenteditable with a link and an <newline><newline> and a Button.<newline>Always expose editable tables as tables.<newline>1. Editable list item.' ++++++++PARAGRAPH actions='{DEFAULT}' ++++++++++STATIC_TEXT label='A contenteditable with a ' actions='{DEFAULT}' -++++++++++++UNKNOWN label='A contenteditable with a ' +++++++++++++UNKNOWN ++++++++++LINK label='link' actions='{DEFAULT}' ++++++++++++STATIC_TEXT label='link' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='link' +++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' and an ' actions='{DEFAULT}' -++++++++++++UNKNOWN label=' and an ' +++++++++++++UNKNOWN ++++++++++IMAGE label='Image' actions='{DEFAULT}' ++++++++++STATIC_TEXT label=' and a ' actions='{DEFAULT}' -++++++++++++UNKNOWN label=' and a ' +++++++++++++UNKNOWN ++++++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++++++STATIC_TEXT label='Button' -++++++++++++++UNKNOWN label='Button' +++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='.' actions='{DEFAULT}' -++++++++++++UNKNOWN label='.' +++++++++++++UNKNOWN ++++++++TABLE actions='{DEFAULT}' number_of_rows=1 number_of_columns=1 ++++++++++ROW_GROUP hidden ++++++++++++TABLE_ROW actions='{DEFAULT}' ++++++++++++++CELL label='Always expose editable tables as tables.' actions='{DEFAULT}' cell_row_span=1 cell_column_span=1 ++++++++++++++++STATIC_TEXT label='Always expose editable tables as tables.' actions='{DEFAULT}' -++++++++++++++++++UNKNOWN label='Always expose editable tables as tables.' +++++++++++++++++++UNKNOWN ++++++++LIST actions='{DEFAULT}' list_size=1 ++++++++++LIST_ELEMENT actions='{DEFAULT}' list_element_index=1 ++++++++++++LIST_ELEMENT_MARKER label='1. ' actions='{DEFAULT}' ++++++++++++++STATIC_TEXT hidden label='1. ' ++++++++++++STATIC_TEXT label='Editable list item.' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Editable list item.' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/contenteditable-docs-li-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-docs-li-expected-blink.txt index b350361e..252e2688 100644 --- a/content/test/data/accessibility/html/contenteditable-docs-li-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-docs-li-expected-blink.txt
@@ -4,93 +4,93 @@ ++++++textField multiline value='Beginning<newline>1. A plain list item<newline>2. A list item<newline>with a br (line break) inside it<newline>3. A list item with an inner p role=presentation<newline>4. A list item with both a br and<newline>an inner p role=presentation<newline>5. A list item with inner spans on each line<newline>and separated by a br<newline>6. A list item with a role presentation, and two inner spans, each separated by a space<newline>7. A list item with a role presentation, and two inner spans,<newline>each separated by a br<newline>8. Hello world this is like docs markup without the weird presentational br<newline>9. Hello world this is just like docs, and your kitchen sink<newline>The end' isLineBreakingObject=true ++++++++paragraph isLineBreakingObject=true ++++++++++staticText name='Beginning' -++++++++++++inlineTextBox name='Beginning' +++++++++++++inlineTextBox ++++++++list isLineBreakingObject=true ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox:"A plain list item" +++++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='1. ' ++++++++++++staticText name='A plain list item' previousOnLineId=staticText:"1. " -++++++++++++++inlineTextBox name='A plain list item' previousOnLineId=staticText:"1. " +++++++++++++++inlineTextBox previousOnLineId=staticText:"1. " ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox:"A list item" +++++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='2. ' -++++++++++++staticText name='A list item' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"2. " -++++++++++++++inlineTextBox name='A list item' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"2. " -++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox:"A list item" isLineBreakingObject=true -++++++++++++++inlineTextBox name='<newline>' previousOnLineId=inlineTextBox:"A list item" isLineBreakingObject=true +++++++++++++staticText name='A list item' nextOnLineId=inlineTextBox previousOnLineId=staticText:"2. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"2. " +++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox isLineBreakingObject=true +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox isLineBreakingObject=true ++++++++++++staticText name='with a br (line break) inside it' -++++++++++++++inlineTextBox name='with a br (line break) inside it' +++++++++++++++inlineTextBox ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='3. ' nextOnLineId=inlineTextBox:"A list item with an inner p role=presentation" +++++++++++++listMarker name='3. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='3. ' ++++++++++++staticText name='A list item with an inner p role=presentation' previousOnLineId=staticText:"3. " -++++++++++++++inlineTextBox name='A list item with an inner p role=presentation' previousOnLineId=staticText:"3. " +++++++++++++++inlineTextBox previousOnLineId=staticText:"3. " ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='4. ' nextOnLineId=inlineTextBox:"A list item with both a br and" +++++++++++++listMarker name='4. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='4. ' -++++++++++++staticText name='A list item with both a br and' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"4. " -++++++++++++++inlineTextBox name='A list item with both a br and' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"4. " -++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox:"A list item with both a br and" isLineBreakingObject=true -++++++++++++++inlineTextBox name='<newline>' previousOnLineId=inlineTextBox:"A list item with both a br and" isLineBreakingObject=true +++++++++++++staticText name='A list item with both a br and' nextOnLineId=inlineTextBox previousOnLineId=staticText:"4. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"4. " +++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox isLineBreakingObject=true +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox isLineBreakingObject=true ++++++++++++staticText name='an inner p role=presentation' -++++++++++++++inlineTextBox name='an inner p role=presentation' +++++++++++++++inlineTextBox ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='5. ' nextOnLineId=inlineTextBox:"A list item with " +++++++++++++listMarker name='5. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='5. ' -++++++++++++staticText name='A list item with ' nextOnLineId=inlineTextBox:"inner " previousOnLineId=staticText:"5. " -++++++++++++++inlineTextBox name='A list item with ' nextOnLineId=inlineTextBox:"inner " previousOnLineId=staticText:"5. " -++++++++++++staticText name='inner ' nextOnLineId=inlineTextBox:"spans" previousOnLineId=inlineTextBox:"A list item with " -++++++++++++++inlineTextBox name='inner ' nextOnLineId=inlineTextBox:"spans" previousOnLineId=inlineTextBox:"A list item with " -++++++++++++staticText name='spans' nextOnLineId=inlineTextBox:" " previousOnLineId=inlineTextBox:"inner " -++++++++++++++inlineTextBox name='spans' nextOnLineId=inlineTextBox:" " previousOnLineId=inlineTextBox:"inner " -++++++++++++staticText name=' ' nextOnLineId=inlineTextBox:"on each line" previousOnLineId=inlineTextBox:"spans" -++++++++++++++inlineTextBox name=' ' nextOnLineId=inlineTextBox:"on each line" previousOnLineId=inlineTextBox:"spans" -++++++++++++staticText name='on each line' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=inlineTextBox:" " -++++++++++++++inlineTextBox name='on each line' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=inlineTextBox:" " -++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox:"on each line" isLineBreakingObject=true -++++++++++++++inlineTextBox name='<newline>' previousOnLineId=inlineTextBox:"on each line" isLineBreakingObject=true +++++++++++++staticText name='A list item with ' nextOnLineId=inlineTextBox previousOnLineId=staticText:"5. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"5. " +++++++++++++staticText name='inner ' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name='spans' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name=' ' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name='on each line' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox isLineBreakingObject=true +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox isLineBreakingObject=true ++++++++++++staticText name='and separated by a br' -++++++++++++++inlineTextBox name='and separated by a br' +++++++++++++++inlineTextBox ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='6. ' nextOnLineId=inlineTextBox:"A list item with a role presentation, and two inner spans, " +++++++++++++listMarker name='6. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='6. ' -++++++++++++staticText name='A list item with a role presentation, and two inner spans, ' nextOnLineId=inlineTextBox:"each separated by a space" previousOnLineId=staticText:"6. " -++++++++++++++inlineTextBox name='A list item with a role presentation, and two inner spans, ' nextOnLineId=inlineTextBox:"each separated by a space" previousOnLineId=staticText:"6. " -++++++++++++staticText name='each separated by a space' previousOnLineId=inlineTextBox:"A list item with a role presentation, and two inner spans, " -++++++++++++++inlineTextBox name='each separated by a space' previousOnLineId=inlineTextBox:"A list item with a role presentation, and two inner spans, " +++++++++++++staticText name='A list item with a role presentation, and two inner spans, ' nextOnLineId=inlineTextBox previousOnLineId=staticText:"6. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"6. " +++++++++++++staticText name='each separated by a space' previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='7. ' nextOnLineId=inlineTextBox:"A list item with a role presentation, and two inner spans," +++++++++++++listMarker name='7. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='7. ' -++++++++++++staticText name='A list item with a role presentation, and two inner spans,' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"7. " -++++++++++++++inlineTextBox name='A list item with a role presentation, and two inner spans,' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"7. " -++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox:"A list item with a role presentation, and two inner spans," isLineBreakingObject=true -++++++++++++++inlineTextBox name='<newline>' previousOnLineId=inlineTextBox:"A list item with a role presentation, and two inner spans," isLineBreakingObject=true +++++++++++++staticText name='A list item with a role presentation, and two inner spans,' nextOnLineId=inlineTextBox previousOnLineId=staticText:"7. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"7. " +++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox isLineBreakingObject=true +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox isLineBreakingObject=true ++++++++++++staticText name='each separated by a br' -++++++++++++++inlineTextBox name='each separated by a br' +++++++++++++++inlineTextBox ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='8. ' nextOnLineId=inlineTextBox:"Hello" +++++++++++++listMarker name='8. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='8. ' -++++++++++++staticText name='Hello' nextOnLineId=inlineTextBox:" " previousOnLineId=staticText:"8. " -++++++++++++++inlineTextBox name='Hello' nextOnLineId=inlineTextBox:" " previousOnLineId=staticText:"8. " -++++++++++++staticText name=' ' nextOnLineId=inlineTextBox:"world this" previousOnLineId=inlineTextBox:"Hello" -++++++++++++++inlineTextBox name=' ' nextOnLineId=inlineTextBox:"world this" previousOnLineId=inlineTextBox:"Hello" -++++++++++++staticText name='world this' nextOnLineId=inlineTextBox:" " previousOnLineId=inlineTextBox:" " -++++++++++++++inlineTextBox name='world this' nextOnLineId=inlineTextBox:" " previousOnLineId=inlineTextBox:" " -++++++++++++staticText name=' ' nextOnLineId=inlineTextBox:"is like docs markup without the weird presentational br" previousOnLineId=inlineTextBox:"world this" -++++++++++++++inlineTextBox name=' ' nextOnLineId=inlineTextBox:"is like docs markup without the weird presentational br" previousOnLineId=inlineTextBox:"world this" -++++++++++++staticText name='is like docs markup without the weird presentational br' previousOnLineId=inlineTextBox:" " -++++++++++++++inlineTextBox name='is like docs markup without the weird presentational br' previousOnLineId=inlineTextBox:" " +++++++++++++staticText name='Hello' nextOnLineId=inlineTextBox previousOnLineId=staticText:"8. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"8. " +++++++++++++staticText name=' ' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name='world this' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name=' ' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name='is like docs markup without the weird presentational br' previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='9. ' nextOnLineId=inlineTextBox:"Hello" +++++++++++++listMarker name='9. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='9. ' ++++++++++++staticText name='Hello' previousOnLineId=staticText:"9. " -++++++++++++++inlineTextBox name='Hello' previousOnLineId=staticText:"9. " -++++++++++++staticText name=' ' previousOnLineId=inlineTextBox:"Hello" +++++++++++++++inlineTextBox previousOnLineId=staticText:"9. " +++++++++++++staticText name=' ' previousOnLineId=inlineTextBox ++++++++++++staticText name='world this' -++++++++++++++inlineTextBox name='world this' -++++++++++++staticText name=' ' previousOnLineId=inlineTextBox:"world this" +++++++++++++++inlineTextBox +++++++++++++staticText name=' ' previousOnLineId=inlineTextBox ++++++++++++staticText name='is just like docs, and your kitchen sink' -++++++++++++++inlineTextBox name='is just like docs, and your kitchen sink' +++++++++++++++inlineTextBox ++++++++paragraph isLineBreakingObject=true ++++++++++staticText name='The end' -++++++++++++inlineTextBox name='The end' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/contenteditable-font-size-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-font-size-expected-blink.txt index 691fd767..3f81d9d 100644 --- a/content/test/data/accessibility/html/contenteditable-font-size-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-font-size-expected-blink.txt
@@ -2,11 +2,11 @@ ++genericContainer ignored ++++genericContainer ignored ++++++genericContainer multiline value='Testxy' -++++++++genericContainer className='outer' nextOnLineId=inlineTextBox:"y" -++++++++++staticText name='Test' nextOnLineId=inlineTextBox:"x" -++++++++++++inlineTextBox name='Test' nextOnLineId=inlineTextBox:"x" -++++++++++genericContainer className='inner' nextOnLineId=inlineTextBox:"y" previousOnLineId=inlineTextBox:"Test" -++++++++++++staticText name='x' nextOnLineId=inlineTextBox:"y" previousOnLineId=inlineTextBox:"Test" -++++++++++++++inlineTextBox name='x' nextOnLineId=inlineTextBox:"y" previousOnLineId=inlineTextBox:"Test" -++++++++staticText name='y' previousOnLineId=inlineTextBox:"x" -++++++++++inlineTextBox name='y' previousOnLineId=inlineTextBox:"x" +++++++++genericContainer className='outer' nextOnLineId=inlineTextBox +++++++++++staticText name='Test' nextOnLineId=inlineTextBox +++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++genericContainer className='inner' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++staticText name='x' nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=inlineTextBox +++++++++staticText name='y' previousOnLineId=inlineTextBox +++++++++++inlineTextBox previousOnLineId=inlineTextBox
diff --git a/content/test/data/accessibility/html/contenteditable-li-contains-presentation-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-li-contains-presentation-expected-blink.txt index 992180f..5d57ac3 100644 --- a/content/test/data/accessibility/html/contenteditable-li-contains-presentation-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-li-contains-presentation-expected-blink.txt
@@ -4,16 +4,16 @@ ++++++genericContainer multiline value='1. text in span in presentational paragraph in li<newline>2. A list item with both a br and<newline>an inner p role=presentation' isLineBreakingObject=true ++++++++list isLineBreakingObject=true ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox:"text in span in presentational paragraph in li" +++++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='1. ' ++++++++++++staticText name='text in span in presentational paragraph in li' previousOnLineId=staticText:"1. " -++++++++++++++inlineTextBox name='text in span in presentational paragraph in li' previousOnLineId=staticText:"1. " +++++++++++++++inlineTextBox previousOnLineId=staticText:"1. " ++++++++++listItem isLineBreakingObject=true -++++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox:"A list item with both a br and" +++++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox ++++++++++++++staticText ignored name='2. ' -++++++++++++staticText name='A list item with both a br and' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"2. " -++++++++++++++inlineTextBox name='A list item with both a br and' nextOnLineId=inlineTextBox:"<newline>" previousOnLineId=staticText:"2. " -++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox:"A list item with both a br and" isLineBreakingObject=true -++++++++++++++inlineTextBox name='<newline>' previousOnLineId=inlineTextBox:"A list item with both a br and" isLineBreakingObject=true +++++++++++++staticText name='A list item with both a br and' nextOnLineId=inlineTextBox previousOnLineId=staticText:"2. " +++++++++++++++inlineTextBox nextOnLineId=inlineTextBox previousOnLineId=staticText:"2. " +++++++++++++lineBreak name='<newline>' previousOnLineId=inlineTextBox isLineBreakingObject=true +++++++++++++++inlineTextBox previousOnLineId=inlineTextBox isLineBreakingObject=true ++++++++++++staticText name='an inner p role=presentation' -++++++++++++++inlineTextBox name='an inner p role=presentation' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/contenteditable-plaintext-with-role-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-plaintext-with-role-expected-blink.txt index e8cad86..7699bff 100644 --- a/content/test/data/accessibility/html/contenteditable-plaintext-with-role-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-plaintext-with-role-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++menuItemRadio editable multiline name='x' value='x' checkedState=false nonAtomicTextFieldRoot=true ++++++++staticText editable name='x' -++++++++++inlineTextBox editable name='x' +++++++++++inlineTextBox editable
diff --git a/content/test/data/accessibility/html/contenteditable-spans-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-spans-expected-blink.txt index dba3337..4b252e8a 100644 --- a/content/test/data/accessibility/html/contenteditable-spans-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-spans-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++textField multiline value='ABCDEF<newline>XYZ123' ++++++++paragraph -++++++++++staticText name='ABC' nextOnLineId=inlineTextBox:"DEF" -++++++++++++inlineTextBox name='ABC' nextOnLineId=inlineTextBox:"DEF" -++++++++++staticText name='DEF' previousOnLineId=inlineTextBox:"ABC" -++++++++++++inlineTextBox name='DEF' previousOnLineId=inlineTextBox:"ABC" +++++++++++staticText name='ABC' nextOnLineId=inlineTextBox +++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++staticText name='DEF' previousOnLineId=inlineTextBox +++++++++++++inlineTextBox previousOnLineId=inlineTextBox ++++++++paragraph -++++++++++staticText name='XYZ' nextOnLineId=inlineTextBox:"123" -++++++++++++inlineTextBox name='XYZ' nextOnLineId=inlineTextBox:"123" -++++++++++staticText name='123' previousOnLineId=inlineTextBox:"XYZ" -++++++++++++inlineTextBox name='123' previousOnLineId=inlineTextBox:"XYZ" +++++++++++staticText name='XYZ' nextOnLineId=inlineTextBox +++++++++++++inlineTextBox nextOnLineId=inlineTextBox +++++++++++staticText name='123' previousOnLineId=inlineTextBox +++++++++++++inlineTextBox previousOnLineId=inlineTextBox
diff --git a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt index 5fbaf68..19069a81 100644 --- a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-blink.txt
@@ -4,15 +4,15 @@ ++++++genericContainer editable multiline richlyEditable value='This is editable.<newline>This is not editable.<newline>But this one is.<newline>So is this one.' nonAtomicTextFieldRoot=true ++++++++paragraph editable richlyEditable ++++++++++staticText editable richlyEditable name='This is editable.' -++++++++++++inlineTextBox editable richlyEditable name='This is editable.' +++++++++++++inlineTextBox editable richlyEditable ++++++++genericContainer ignored ++++++++++staticText name='This is not editable.' -++++++++++++inlineTextBox name='This is not editable.' +++++++++++++inlineTextBox ++++++++++lineBreak name='<newline>' -++++++++++++inlineTextBox name='<newline>' +++++++++++++inlineTextBox ++++++++++paragraph editable multiline richlyEditable value='But this one is.' nonAtomicTextFieldRoot=true ++++++++++++staticText editable richlyEditable name='But this one is.' -++++++++++++++inlineTextBox editable richlyEditable name='But this one is.' +++++++++++++++inlineTextBox editable richlyEditable ++++++++paragraph editable multiline richlyEditable value='So is this one.' nonAtomicTextFieldRoot=true ++++++++++staticText editable richlyEditable name='So is this one.' -++++++++++++inlineTextBox editable richlyEditable name='So is this one.' +++++++++++++inlineTextBox editable richlyEditable
diff --git a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-fuchsia.txt b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-fuchsia.txt index eda651b1..e1c248dc 100644 --- a/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-fuchsia.txt
@@ -4,15 +4,15 @@ ++++++UNKNOWN focusable actions='{DEFAULT}' value='This is editable.<newline>This is not editable.<newline>But this one is.<newline>So is this one.' ++++++++PARAGRAPH actions='{DEFAULT}' ++++++++++STATIC_TEXT label='This is editable.' actions='{DEFAULT}' -++++++++++++UNKNOWN label='This is editable.' +++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT label='This is not editable.' actions='{DEFAULT}' -++++++++++++UNKNOWN label='This is not editable.' +++++++++++++UNKNOWN ++++++++++UNKNOWN label='<newline>' actions='{DEFAULT}' -++++++++++++UNKNOWN label='<newline>' +++++++++++++UNKNOWN ++++++++++PARAGRAPH focusable actions='{DEFAULT}' value='But this one is.' ++++++++++++STATIC_TEXT label='But this one is.' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='But this one is.' +++++++++++++++UNKNOWN ++++++++PARAGRAPH actions='{DEFAULT}' value='So is this one.' ++++++++++STATIC_TEXT label='So is this one.' actions='{DEFAULT}' -++++++++++++UNKNOWN label='So is this one.' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt b/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt index c768433..9179507 100644 --- a/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt +++ b/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-blink.txt
@@ -6,4 +6,4 @@ ++++++genericContainer editable multiline richlyEditable name='title' ++++++paragraph ++++++++staticText name='description' -++++++++++inlineTextBox name='description' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-fuchsia.txt b/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-fuchsia.txt index 97b2e59a..f14affe0 100644 --- a/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-fuchsia.txt
@@ -6,4 +6,4 @@ ++++++UNKNOWN focusable label='title' actions='{DEFAULT}' ++++++PARAGRAPH ++++++++STATIC_TEXT label='description' -++++++++++UNKNOWN label='description' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/continuations-expected-blink.txt b/content/test/data/accessibility/html/continuations-expected-blink.txt index e03d621..12589f59 100644 --- a/content/test/data/accessibility/html/continuations-expected-blink.txt +++ b/content/test/data/accessibility/html/continuations-expected-blink.txt
@@ -5,49 +5,49 @@ ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++button display='inline-block' name='Before' ++++++++++++staticText name='Before' -++++++++++++++inlineTextBox name='Before' +++++++++++++++inlineTextBox ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++staticText name='After' -++++++++++++inlineTextBox name='After' +++++++++++++inlineTextBox ++++++group display='block' name='Group 2' isLineBreakingObject=true ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++staticText name='Before' -++++++++++++inlineTextBox name='Before' +++++++++++++inlineTextBox ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++staticText name='After' -++++++++++++inlineTextBox name='After' +++++++++++++inlineTextBox ++++++group display='block' name='Group 3' isLineBreakingObject=true ++++++++genericContainer display='inline' ++++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++++staticText name='Before' -++++++++++++++inlineTextBox name='Before' +++++++++++++++inlineTextBox ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++genericContainer display='inline' ++++++++++++staticText name='Ever ' -++++++++++++++inlineTextBox name='Ever ' +++++++++++++++inlineTextBox ++++++++++link display='inline' name='After' ++++++++++++staticText name='After' -++++++++++++++inlineTextBox name='After' +++++++++++++++inlineTextBox ++++++group display='block' name='Group 4' isLineBreakingObject=true ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++staticText name='Before' -++++++++++++inlineTextBox name='Before' +++++++++++++inlineTextBox ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++paragraph display='block' isLineBreakingObject=true ++++++++++++staticText name='After' -++++++++++++++inlineTextBox name='After' +++++++++++++++inlineTextBox ++++++group display='block' name='Group 5' isLineBreakingObject=true ++++++++staticText name='Italic only ' -++++++++++inlineTextBox name='Italic only ' +++++++++++inlineTextBox ++++++++staticText name='italic and bold' -++++++++++inlineTextBox name='italic and bold' +++++++++++inlineTextBox ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++staticText name='Wow, a block!' -++++++++++++inlineTextBox name='Wow, a block!' +++++++++++++inlineTextBox ++++++++genericContainer display='block' isLineBreakingObject=true ++++++++++staticText name='Wow, another block!' -++++++++++++inlineTextBox name='Wow, another block!' +++++++++++++inlineTextBox ++++++++staticText name='More italic and bold text' -++++++++++inlineTextBox name='More italic and bold text' +++++++++++inlineTextBox ++++++++staticText name=' More italic text' -++++++++++inlineTextBox name=' More italic text' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/continuations-parser-splits-markup-expected-blink.txt b/content/test/data/accessibility/html/continuations-parser-splits-markup-expected-blink.txt index e481b90..945460a 100644 --- a/content/test/data/accessibility/html/continuations-parser-splits-markup-expected-blink.txt +++ b/content/test/data/accessibility/html/continuations-parser-splits-markup-expected-blink.txt
@@ -5,11 +5,11 @@ ++++++++genericContainer className='copied-element' display='inline' ++++++++++genericContainer className='before' display='block' isLineBreakingObject=true ++++++++++++staticText name='Before' -++++++++++++++inlineTextBox name='Before' +++++++++++++++inlineTextBox ++++++++genericContainer className='ever' display='block' isLineBreakingObject=true ++++++++++genericContainer className='copied-element' display='inline' ++++++++++++staticText name='Ever ' -++++++++++++++inlineTextBox name='Ever ' +++++++++++++++inlineTextBox ++++++++++link className='after' display='inline' name='After' ++++++++++++staticText name='After' -++++++++++++++inlineTextBox name='After' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/custom-element-expected-blink.txt b/content/test/data/accessibility/html/custom-element-expected-blink.txt index 12ea6c09..3c2e39d 100644 --- a/content/test/data/accessibility/html/custom-element-expected-blink.txt +++ b/content/test/data/accessibility/html/custom-element-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++splitter horizontal name='Outside custom element' ++++++genericContainer ++++++++staticText name='a' -++++++++++inlineTextBox name='a' +++++++++++inlineTextBox ++++++splitter horizontal name='Inside custom element' ++++++genericContainer ignored ++++++++genericContainer ignored ++++++++++staticText name='a' -++++++++++++inlineTextBox name='a' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/custom-element-nested-slots-expected-blink.txt b/content/test/data/accessibility/html/custom-element-nested-slots-expected-blink.txt index f094fb6..a783b49f 100644 --- a/content/test/data/accessibility/html/custom-element-nested-slots-expected-blink.txt +++ b/content/test/data/accessibility/html/custom-element-nested-slots-expected-blink.txt
@@ -7,4 +7,4 @@ ++++++++++++genericContainer ignored className='inner' htmlTag='slot' ++++++++++++++paragraph htmlTag='p' ++++++++++++++++staticText name='Slot contents' -++++++++++++++++++inlineTextBox name='Slot contents' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/custom-element-remove-nodes-expected-blink.txt b/content/test/data/accessibility/html/custom-element-remove-nodes-expected-blink.txt index 4312912..605b38c 100644 --- a/content/test/data/accessibility/html/custom-element-remove-nodes-expected-blink.txt +++ b/content/test/data/accessibility/html/custom-element-remove-nodes-expected-blink.txt
@@ -7,39 +7,39 @@ ++++++++++++listMarker htmlTag='::marker' name='%E2%96%B8 ' ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='Details' -++++++++++++++inlineTextBox name='Details' +++++++++++++++inlineTextBox ++++++genericContainer className='dt2' htmlTag='x-details' ++++++++genericContainer ignored htmlTag='slot' ++++++++++genericContainer description='Details' htmlTag='summary' descriptionFrom=summary ++++++++++++listMarker htmlTag='::marker' name='%E2%96%B8 ' ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='Details' -++++++++++++++inlineTextBox name='Details' +++++++++++++++inlineTextBox ++++++genericContainer className='dt3' htmlTag='x-details' ++++++++genericContainer ignored htmlTag='slot' ++++++++++genericContainer description='Details' htmlTag='summary' descriptionFrom=summary ++++++++++++listMarker htmlTag='::marker' name='%E2%96%B8 ' ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='Details' -++++++++++++++inlineTextBox name='Details' +++++++++++++++inlineTextBox ++++++genericContainer className='dt4' htmlTag='x-details' ++++++++genericContainer ignored htmlTag='slot' ++++++++++genericContainer description='Details' htmlTag='summary' descriptionFrom=summary ++++++++++++listMarker htmlTag='::marker' name='%E2%96%BE ' ++++++++++++++staticText ignored name='%E2%96%BE ' ++++++++++++staticText name='Details' -++++++++++++++inlineTextBox name='Details' +++++++++++++++inlineTextBox ++++++genericContainer className='dt5' htmlTag='x-details' ++++++++genericContainer ignored htmlTag='slot' ++++++++++genericContainer description='Details' htmlTag='summary' descriptionFrom=summary ++++++++++++listMarker htmlTag='::marker' name='%E2%96%BE ' ++++++++++++++staticText ignored name='%E2%96%BE ' ++++++++++++staticText name='Details' -++++++++++++++inlineTextBox name='Details' +++++++++++++++inlineTextBox ++++++genericContainer className='dt6' htmlTag='x-details' ++++++++genericContainer ignored htmlTag='slot' ++++++++++genericContainer description='Details' htmlTag='summary' descriptionFrom=summary ++++++++++++listMarker htmlTag='::marker' name='%E2%96%BE ' ++++++++++++++staticText ignored name='%E2%96%BE ' ++++++++++++staticText name='Details' -++++++++++++++inlineTextBox name='Details' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-expected-blink.txt b/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-expected-blink.txt index 2251051..4666828 100644 --- a/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-expected-blink.txt +++ b/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++docEndnotes ++++++++++docEndnote ++++++++++++staticText name='Endnote 1' -++++++++++++++inlineTextBox name='Endnote 1' +++++++++++++++inlineTextBox ++++++++++docEndnote ++++++++++++staticText name='Endnote 2' -++++++++++++++inlineTextBox name='Endnote 2' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-slot-expected-blink.txt b/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-slot-expected-blink.txt index 9a776199..1775d04 100644 --- a/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-slot-expected-blink.txt +++ b/content/test/data/accessibility/html/custom-element-with-aria-owns-inside-slot-expected-blink.txt
@@ -5,15 +5,15 @@ ++++++++docEndnotes ++++++++++docEndnote ++++++++++++staticText name='Endnote 1' -++++++++++++++inlineTextBox name='Endnote 1' +++++++++++++++inlineTextBox ++++++++++docEndnote ++++++++++++staticText name='Endnote 2' -++++++++++++++inlineTextBox name='Endnote 2' +++++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++group ++++++++button name='1' ++++++++++staticText name='1' -++++++++++++inlineTextBox name='1' +++++++++++++inlineTextBox ++++++++button name='2' ++++++++++staticText name='2' -++++++++++++inlineTextBox name='2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/custom-element-with-aria-owns-outside-expected-blink.txt b/content/test/data/accessibility/html/custom-element-with-aria-owns-outside-expected-blink.txt index 23168935..dd4ba65 100644 --- a/content/test/data/accessibility/html/custom-element-with-aria-owns-outside-expected-blink.txt +++ b/content/test/data/accessibility/html/custom-element-with-aria-owns-outside-expected-blink.txt
@@ -4,14 +4,14 @@ ++++++splitter horizontal name='Outside custom element' ++++++paragraph ++++++++staticText name='Hello, world' -++++++++++inlineTextBox name='Hello, world' +++++++++++inlineTextBox ++++++splitter horizontal name='Inside custom element' ++++++group ++++++++button name='something' ++++++++++staticText name='something' -++++++++++++inlineTextBox name='something' +++++++++++++inlineTextBox ++++++++button name='something' ++++++++++staticText name='something' -++++++++++++inlineTextBox name='something' +++++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/dd-expected-blink.txt b/content/test/data/accessibility/html/dd-expected-blink.txt index 1d47cf3..7696fc04 100644 --- a/content/test/data/accessibility/html/dd-expected-blink.txt +++ b/content/test/data/accessibility/html/dd-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++descriptionList ++++++++term ++++++++++staticText name='Coffee' -++++++++++++inlineTextBox name='Coffee' +++++++++++++inlineTextBox ++++++++definition ++++++++++staticText name='Black hot drink' -++++++++++++inlineTextBox name='Black hot drink' \ No newline at end of file +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/dd-expected-fuchsia.txt b/content/test/data/accessibility/html/dd-expected-fuchsia.txt index e757d45..51420ca 100644 --- a/content/test/data/accessibility/html/dd-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/dd-expected-fuchsia.txt
@@ -4,7 +4,7 @@ ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Coffee' -++++++++++++UNKNOWN label='Coffee' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Black hot drink' -++++++++++++UNKNOWN label='Black hot drink' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/del-expected-blink.txt b/content/test/data/accessibility/html/del-expected-blink.txt index d6ed541..d8fd5fd3 100644 --- a/content/test/data/accessibility/html/del-expected-blink.txt +++ b/content/test/data/accessibility/html/del-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='I am ' -++++++++++inlineTextBox name='I am ' +++++++++++inlineTextBox ++++++++contentDeletion ++++++++++staticText name='vegetarian' -++++++++++++inlineTextBox name='vegetarian' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/del-expected-fuchsia.txt b/content/test/data/accessibility/html/del-expected-fuchsia.txt index 8c425ca..fe14e93 100644 --- a/content/test/data/accessibility/html/del-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/del-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='I am ' -++++++++++UNKNOWN label='I am ' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='vegetarian' -++++++++++++UNKNOWN label='vegetarian' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/delete-selection-crash-expected-blink.txt b/content/test/data/accessibility/html/delete-selection-crash-expected-blink.txt index e646991..663f9fd7 100644 --- a/content/test/data/accessibility/html/delete-selection-crash-expected-blink.txt +++ b/content/test/data/accessibility/html/delete-selection-crash-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/design-mode-expected-blink.txt b/content/test/data/accessibility/html/design-mode-expected-blink.txt index a5646013..663a987 100644 --- a/content/test/data/accessibility/html/design-mode-expected-blink.txt +++ b/content/test/data/accessibility/html/design-mode-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer editable richlyEditable htmlTag='body' value='Hello' nonAtomicTextFieldRoot=true ++++++paragraph editable richlyEditable htmlTag='p' ++++++++staticText editable richlyEditable name='Hello' -++++++++++inlineTextBox editable richlyEditable name='Hello' +++++++++++inlineTextBox editable richlyEditable
diff --git a/content/test/data/accessibility/html/details-expected-blink.txt b/content/test/data/accessibility/html/details-expected-blink.txt index 742e8504..cb63985 100644 --- a/content/test/data/accessibility/html/details-expected-blink.txt +++ b/content/test/data/accessibility/html/details-expected-blink.txt
@@ -7,7 +7,7 @@ ++++++++++++listMarker ignored ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='details tag' -++++++++++++++inlineTextBox name='details tag' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++staticText ignored invisible name='<newline> ' ++++++++++staticText ignored invisible name='<newline> ' @@ -19,8 +19,8 @@ ++++++++++++listMarker ignored ++++++++++++++staticText ignored name='%E2%96%BE ' ++++++++++++staticText name='details tag open' -++++++++++++++inlineTextBox name='details tag open' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++paragraph ++++++++++++staticText name='The details tag with open specifies that the details should be visible (open) to the user.' -++++++++++++++inlineTextBox name='The details tag with open specifies that the details should be visible (open) to the user.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/details-expected-fuchsia.txt b/content/test/data/accessibility/html/details-expected-fuchsia.txt index 50f3088..f304e19 100644 --- a/content/test/data/accessibility/html/details-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/details-expected-fuchsia.txt
@@ -7,7 +7,7 @@ ++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++STATIC_TEXT label='details tag' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='details tag' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT hidden label='<newline> ' ++++++++++STATIC_TEXT hidden label='<newline> ' @@ -19,8 +19,8 @@ ++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++STATIC_TEXT hidden label='%E2%96%BE ' ++++++++++++STATIC_TEXT label='details tag open' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='details tag open' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='The details tag with open specifies that the details should be visible (open) to the user.' -++++++++++++++UNKNOWN label='The details tag with open specifies that the details should be visible (open) to the user.' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/details-name-expected-blink.txt b/content/test/data/accessibility/html/details-name-expected-blink.txt index 95a9716..d5a2012 100644 --- a/content/test/data/accessibility/html/details-name-expected-blink.txt +++ b/content/test/data/accessibility/html/details-name-expected-blink.txt
@@ -7,7 +7,7 @@ ++++++++++++listMarker ignored ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='the summary' -++++++++++++++inlineTextBox name='the summary' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++staticText ignored invisible name='<newline> ' ++++++++++staticText ignored invisible name='<newline> ' @@ -20,18 +20,18 @@ ++++++++++++++listMarker ignored ++++++++++++++++staticText ignored name='%E2%96%BE ' ++++++++++++++staticText name='materials' -++++++++++++++++inlineTextBox name='materials' +++++++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++paragraph ++++++++++++++staticText name='Info about what it's made of.' -++++++++++++++++inlineTextBox name='Info about what it's made of.' +++++++++++++++++inlineTextBox ++++++++details ++++++++++genericContainer ignored ++++++++++++disclosureTriangleGrouped collapsed name='dimensions' setSize=3 posInSet=2 ++++++++++++++listMarker ignored ++++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++++staticText name='dimensions' -++++++++++++++++inlineTextBox name='dimensions' +++++++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText ignored invisible name='<newline> ' ++++++++++++staticText ignored invisible name='<newline> ' @@ -43,7 +43,7 @@ ++++++++++++++listMarker ignored ++++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++++staticText name='origin' -++++++++++++++++inlineTextBox name='origin' +++++++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText ignored invisible name='<newline> ' ++++++++++++staticText ignored invisible name='<newline> '
diff --git a/content/test/data/accessibility/html/details-name-expected-fuchsia.txt b/content/test/data/accessibility/html/details-name-expected-fuchsia.txt index a476db3..fac2d84d 100644 --- a/content/test/data/accessibility/html/details-name-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/details-name-expected-fuchsia.txt
@@ -7,7 +7,7 @@ ++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++STATIC_TEXT label='the summary' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='the summary' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT hidden label='<newline> ' ++++++++++STATIC_TEXT hidden label='<newline> ' @@ -20,18 +20,18 @@ ++++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++++STATIC_TEXT hidden label='%E2%96%BE ' ++++++++++++++STATIC_TEXT label='materials' actions='{DEFAULT}' -++++++++++++++++UNKNOWN label='materials' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++PARAGRAPH ++++++++++++++STATIC_TEXT label='Info about what it's made of.' -++++++++++++++++UNKNOWN label='Info about what it's made of.' +++++++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN focusable label='dimensions' actions='{DEFAULT}' ++++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++++STATIC_TEXT label='dimensions' actions='{DEFAULT}' -++++++++++++++++UNKNOWN label='dimensions' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++STATIC_TEXT hidden label='<newline> ' ++++++++++++STATIC_TEXT hidden label='<newline> ' @@ -43,7 +43,7 @@ ++++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++++STATIC_TEXT label='origin' actions='{DEFAULT}' -++++++++++++++++UNKNOWN label='origin' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++STATIC_TEXT hidden label='<newline> ' ++++++++++++STATIC_TEXT hidden label='<newline> '
diff --git a/content/test/data/accessibility/html/dfn-expected-fuchsia.txt b/content/test/data/accessibility/html/dfn-expected-fuchsia.txt index 8bca9c5..4c5c2544 100644 --- a/content/test/data/accessibility/html/dfn-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/dfn-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Web Browser' -++++++++++UNKNOWN label='Web Browser' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' A computer program with a graphical user interface for displaying HTML files, used to navigate the World Wide Web.' ++++++++UNKNOWN label=' A computer program with a graphical user interface for displaying HTML files, used to navigate ' ++++++++UNKNOWN label='the World Wide Web.'
diff --git a/content/test/data/accessibility/html/dialog-expected-blink.txt b/content/test/data/accessibility/html/dialog-expected-blink.txt index c457d0b..b57ac6a4 100644 --- a/content/test/data/accessibility/html/dialog-expected-blink.txt +++ b/content/test/data/accessibility/html/dialog-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++dialog ++++++++staticText name='Text in dialog' -++++++++++inlineTextBox name='Text in dialog' \ No newline at end of file +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/dialog-expected-fuchsia.txt b/content/test/data/accessibility/html/dialog-expected-fuchsia.txt index 52c5583..28e47bf 100644 --- a/content/test/data/accessibility/html/dialog-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/dialog-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++UNKNOWN focusable ++++++++STATIC_TEXT label='Text in dialog' -++++++++++UNKNOWN label='Text in dialog' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/disabled-expected-blink.txt b/content/test/data/accessibility/html/disabled-expected-blink.txt index 7720a09..4846e92 100644 --- a/content/test/data/accessibility/html/disabled-expected-blink.txt +++ b/content/test/data/accessibility/html/disabled-expected-blink.txt
@@ -5,21 +5,21 @@ ++++++checkBox name='Disabled' restriction=disabled checkedState=false ++++++button name='Enabled' ++++++++staticText name='Enabled' -++++++++++inlineTextBox name='Enabled' +++++++++++inlineTextBox ++++++button name='Disabled' restriction=disabled ++++++++staticText name='Disabled' -++++++++++inlineTextBox name='Disabled' +++++++++++inlineTextBox ++++++section ++++++++staticText name='Enabled form ' -++++++++++inlineTextBox name='Enabled form ' +++++++++++inlineTextBox ++++++++checkBox name='Checkbox' checkedState=false ++++++++button name='Button' ++++++++++staticText name='Button' -++++++++++++inlineTextBox name='Button' +++++++++++++inlineTextBox ++++++section restriction=disabled ++++++++staticText name='Disabled form ' -++++++++++inlineTextBox name='Disabled form ' +++++++++++inlineTextBox ++++++++checkBox name='Checkbox' restriction=disabled checkedState=false ++++++++button name='Button' restriction=disabled ++++++++++staticText name='Button' -++++++++++++inlineTextBox name='Button' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/disabled-with-subtree-expected-blink.txt b/content/test/data/accessibility/html/disabled-with-subtree-expected-blink.txt index bce04cf..f608e97 100644 --- a/content/test/data/accessibility/html/disabled-with-subtree-expected-blink.txt +++ b/content/test/data/accessibility/html/disabled-with-subtree-expected-blink.txt
@@ -3,6 +3,5 @@ ++++genericContainer ++++++button name='new' restriction=disabled ++++++++staticText name='new' -++++++++++inlineTextBox name='new' +++++++++++inlineTextBox ++++++++genericContainer ignored -
diff --git a/content/test/data/accessibility/html/div-expected-blink.txt b/content/test/data/accessibility/html/div-expected-blink.txt index 61f42aa2..839a659 100644 --- a/content/test/data/accessibility/html/div-expected-blink.txt +++ b/content/test/data/accessibility/html/div-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='Unfocusable div' -++++++++++inlineTextBox name='Unfocusable div' +++++++++++inlineTextBox ++++++genericContainer name='Focusable div' ++++++++staticText name='Focusable div' -++++++++++inlineTextBox name='Focusable div' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/div-expected-fuchsia.txt b/content/test/data/accessibility/html/div-expected-fuchsia.txt index 0d2203ec..c375791 100644 --- a/content/test/data/accessibility/html/div-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/div-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Unfocusable div' -++++++++++UNKNOWN label='Unfocusable div' +++++++++++UNKNOWN ++++++UNKNOWN focusable label='Focusable div' ++++++++STATIC_TEXT label='Focusable div' -++++++++++UNKNOWN label='Focusable div' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/dl-expected-blink.txt b/content/test/data/accessibility/html/dl-expected-blink.txt index b1c7152..527b0ef 100644 --- a/content/test/data/accessibility/html/dl-expected-blink.txt +++ b/content/test/data/accessibility/html/dl-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++descriptionList ++++++++term ++++++++++staticText name='Term' -++++++++++++inlineTextBox name='Term' +++++++++++++inlineTextBox ++++++++definition ++++++++++staticText name='Description' -++++++++++++inlineTextBox name='Description' +++++++++++++inlineTextBox ++++++definition ++++++++staticText name='Definition' -++++++++++inlineTextBox name='Definition' \ No newline at end of file +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/dl-expected-fuchsia.txt b/content/test/data/accessibility/html/dl-expected-fuchsia.txt index bb3aa777..f3eb540 100644 --- a/content/test/data/accessibility/html/dl-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/dl-expected-fuchsia.txt
@@ -4,10 +4,10 @@ ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Term' -++++++++++++UNKNOWN label='Term' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Description' -++++++++++++UNKNOWN label='Description' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Definition' -++++++++++UNKNOWN label='Definition' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/dt-expected-blink.txt b/content/test/data/accessibility/html/dt-expected-blink.txt index 1d47cf3..7696fc04 100644 --- a/content/test/data/accessibility/html/dt-expected-blink.txt +++ b/content/test/data/accessibility/html/dt-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++descriptionList ++++++++term ++++++++++staticText name='Coffee' -++++++++++++inlineTextBox name='Coffee' +++++++++++++inlineTextBox ++++++++definition ++++++++++staticText name='Black hot drink' -++++++++++++inlineTextBox name='Black hot drink' \ No newline at end of file +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/dt-expected-fuchsia.txt b/content/test/data/accessibility/html/dt-expected-fuchsia.txt index e757d45..51420ca 100644 --- a/content/test/data/accessibility/html/dt-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/dt-expected-fuchsia.txt
@@ -4,7 +4,7 @@ ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Coffee' -++++++++++++UNKNOWN label='Coffee' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Black hot drink' -++++++++++++UNKNOWN label='Black hot drink' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt b/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt index 5cda4e87..145ba01 100644 --- a/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt +++ b/content/test/data/accessibility/html/element-class-id-src-attr-expected-blink.txt
@@ -3,5 +3,5 @@ ++++genericContainer ignored htmlTag='body' ++++++heading className='headerClass' htmlTag='h1' name='Image' ++++++++staticText name='Image' -++++++++++inlineTextBox name='Image' +++++++++++inlineTextBox ++++++image className='imageClass' htmlTag='img' name='ImageAlt'
diff --git a/content/test/data/accessibility/html/element-class-id-src-attr-expected-fuchsia.txt b/content/test/data/accessibility/html/element-class-id-src-attr-expected-fuchsia.txt index d0791c3..fa1235a 100644 --- a/content/test/data/accessibility/html/element-class-id-src-attr-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/element-class-id-src-attr-expected-fuchsia.txt
@@ -3,5 +3,5 @@ ++++UNKNOWN hidden ++++++UNKNOWN label='Image' ++++++++STATIC_TEXT label='Image' -++++++++++UNKNOWN label='Image' +++++++++++UNKNOWN ++++++IMAGE label='ImageAlt'
diff --git a/content/test/data/accessibility/html/em-expected-blink.txt b/content/test/data/accessibility/html/em-expected-blink.txt index 6552083..a43b6fec 100644 --- a/content/test/data/accessibility/html/em-expected-blink.txt +++ b/content/test/data/accessibility/html/em-expected-blink.txt
@@ -2,9 +2,9 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='One word is ' -++++++++inlineTextBox name='One word is ' +++++++++inlineTextBox ++++++emphasis ++++++++staticText name='emphasized' -++++++++++inlineTextBox name='emphasized' +++++++++++inlineTextBox ++++++staticText name='.' -++++++++inlineTextBox name='.' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/em-expected-fuchsia.txt b/content/test/data/accessibility/html/em-expected-fuchsia.txt index 3415fbd..a3e7af07 100644 --- a/content/test/data/accessibility/html/em-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/em-expected-fuchsia.txt
@@ -2,9 +2,9 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label='One word is ' -++++++++UNKNOWN label='One word is ' +++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='emphasized' -++++++++++UNKNOWN label='emphasized' +++++++++++UNKNOWN ++++++STATIC_TEXT label='.' -++++++++UNKNOWN label='.' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/embed-image-error-expected-blink.txt b/content/test/data/accessibility/html/embed-image-error-expected-blink.txt index e700218..669c0ae9 100644 --- a/content/test/data/accessibility/html/embed-image-error-expected-blink.txt +++ b/content/test/data/accessibility/html/embed-image-error-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++genericContainer ++++++++staticText name='Fallback' -++++++++++inlineTextBox name='Fallback' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/fencedframe-scrollable-mparch-expected-blink.txt b/content/test/data/accessibility/html/fencedframe-scrollable-mparch-expected-blink.txt index 4b82482..4c645f4 100644 --- a/content/test/data/accessibility/html/fencedframe-scrollable-mparch-expected-blink.txt +++ b/content/test/data/accessibility/html/fencedframe-scrollable-mparch-expected-blink.txt
@@ -7,8 +7,8 @@ ++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='visible text' -++++++++++++++++++inlineTextBox name='visible text' +++++++++++++++++++inlineTextBox ++++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='hidden from viewport' -++++++++++++++++++inlineTextBox name='hidden from viewport' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/fieldset-expected-blink.txt b/content/test/data/accessibility/html/fieldset-expected-blink.txt index b52de92b..8c46832 100644 --- a/content/test/data/accessibility/html/fieldset-expected-blink.txt +++ b/content/test/data/accessibility/html/fieldset-expected-blink.txt
@@ -5,9 +5,9 @@ ++++++++group name='Browser Engines:' ++++++++++legend ++++++++++++staticText name='Browser Engines:' -++++++++++++++inlineTextBox name='Browser Engines:' +++++++++++++++inlineTextBox ++++++group name='Which cake do you prefer?' ++++++++legend ++++++++++heading name='Which cake do you prefer?' ++++++++++++staticText name='Which cake do you prefer?' -++++++++++++++inlineTextBox name='Which cake do you prefer?' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/fieldset-expected-fuchsia.txt b/content/test/data/accessibility/html/fieldset-expected-fuchsia.txt index a45d44e..39172d0 100644 --- a/content/test/data/accessibility/html/fieldset-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/fieldset-expected-fuchsia.txt
@@ -5,9 +5,9 @@ ++++++++UNKNOWN label='Browser Engines:' ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='Browser Engines:' -++++++++++++++UNKNOWN label='Browser Engines:' +++++++++++++++UNKNOWN ++++++UNKNOWN label='Which cake do you prefer?' ++++++++UNKNOWN ++++++++++UNKNOWN label='Which cake do you prefer?' ++++++++++++STATIC_TEXT label='Which cake do you prefer?' -++++++++++++++UNKNOWN label='Which cake do you prefer?' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/figcaption-expected-blink.txt b/content/test/data/accessibility/html/figcaption-expected-blink.txt index 20dab35a..71bc60c1 100644 --- a/content/test/data/accessibility/html/figcaption-expected-blink.txt +++ b/content/test/data/accessibility/html/figcaption-expected-blink.txt
@@ -5,9 +5,9 @@ ++++++++image name='This is a green box.' ++++++++figcaption ++++++++++staticText name='Fig.1 - A green Box' -++++++++++++inlineTextBox name='Fig.1 - A green Box' +++++++++++++inlineTextBox ++++++figure ++++++++image name='This is a blue box.' ++++++++figcaption ++++++++++staticText name='Fig.2 - A blue Box' -++++++++++++inlineTextBox name='Fig.2 - A blue Box' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/figcaption-expected-fuchsia.txt b/content/test/data/accessibility/html/figcaption-expected-fuchsia.txt index 35eca72..5f7c6ae 100644 --- a/content/test/data/accessibility/html/figcaption-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/figcaption-expected-fuchsia.txt
@@ -5,9 +5,9 @@ ++++++++IMAGE label='This is a green box.' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Fig.1 - A green Box' -++++++++++++UNKNOWN label='Fig.1 - A green Box' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++IMAGE label='This is a blue box.' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Fig.2 - A blue Box' -++++++++++++UNKNOWN label='Fig.2 - A blue Box' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/figcaption-nested-expected-blink.txt b/content/test/data/accessibility/html/figcaption-nested-expected-blink.txt index e9f1a61e..0136fdd 100644 --- a/content/test/data/accessibility/html/figcaption-nested-expected-blink.txt +++ b/content/test/data/accessibility/html/figcaption-nested-expected-blink.txt
@@ -4,18 +4,18 @@ ++++++figure detailsIds=figcaption ++++++++figcaption ++++++++++staticText name='External Caption' -++++++++++++inlineTextBox name='External Caption' +++++++++++++inlineTextBox ++++++++figure detailsIds=figcaption ++++++++++image name='This is a green box.' ++++++++++figcaption ++++++++++++staticText name='Internal caption' -++++++++++++++inlineTextBox name='Internal caption' +++++++++++++++inlineTextBox ++++++figure detailsIds=figcaption ++++++++figure detailsIds=figcaption ++++++++++image name='This is a green box.' ++++++++++figcaption ++++++++++++staticText name='Internal caption' -++++++++++++++inlineTextBox name='Internal caption' +++++++++++++++inlineTextBox ++++++++figcaption ++++++++++staticText name='External Caption' -++++++++++++inlineTextBox name='External Caption' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/footer-expected-blink.txt b/content/test/data/accessibility/html/footer-expected-blink.txt index 90d503f..0dc23d2b4 100644 --- a/content/test/data/accessibility/html/footer-expected-blink.txt +++ b/content/test/data/accessibility/html/footer-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++footer ++++++++staticText name='Footer element' -++++++++++inlineTextBox name='Footer element' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/footer-expected-fuchsia.txt b/content/test/data/accessibility/html/footer-expected-fuchsia.txt index 6465ea8..f592e2e 100644 --- a/content/test/data/accessibility/html/footer-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/footer-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Footer element' -++++++++++UNKNOWN label='Footer element' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt b/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt index e80f2f8..d429e58c 100644 --- a/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt +++ b/content/test/data/accessibility/html/footer-inside-other-section-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++footerAsNonLandmark ++++++++++paragraph ++++++++++++staticText name='footer inside article.' -++++++++++++++inlineTextBox name='footer inside article.' +++++++++++++++inlineTextBox ++++++section ++++++++footerAsNonLandmark ++++++++++paragraph ++++++++++++staticText name='footer inside section.' -++++++++++++++inlineTextBox name='footer inside section.' +++++++++++++++inlineTextBox ++++++main ++++++++footerAsNonLandmark ++++++++++paragraph ++++++++++++staticText name='footer inside main.' -++++++++++++++inlineTextBox name='footer inside main.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/footer-inside-other-section-expected-fuchsia.txt b/content/test/data/accessibility/html/footer-inside-other-section-expected-fuchsia.txt index a5f054ed..02ca6d8 100644 --- a/content/test/data/accessibility/html/footer-inside-other-section-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/footer-inside-other-section-expected-fuchsia.txt
@@ -5,14 +5,14 @@ ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='footer inside article.' -++++++++++++++UNKNOWN label='footer inside article.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='footer inside section.' -++++++++++++++UNKNOWN label='footer inside section.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='footer inside main.' -++++++++++++++UNKNOWN label='footer inside main.' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/form-expected-blink.txt b/content/test/data/accessibility/html/form-expected-blink.txt index 6886326..aaa72137 100644 --- a/content/test/data/accessibility/html/form-expected-blink.txt +++ b/content/test/data/accessibility/html/form-expected-blink.txt
@@ -4,8 +4,8 @@ ++++++section ++++++++button default name='Submit' ++++++++++staticText name='Submit' -++++++++++++inlineTextBox name='Submit' +++++++++++++inlineTextBox ++++++form name='Name' ++++++++button default name='Submit' ++++++++++staticText name='Submit' -++++++++++++inlineTextBox name='Submit' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/form-expected-fuchsia.txt b/content/test/data/accessibility/html/form-expected-fuchsia.txt index e2fb473..d505f44b 100644 --- a/content/test/data/accessibility/html/form-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/form-expected-fuchsia.txt
@@ -4,8 +4,8 @@ ++++++UNKNOWN ++++++++BUTTON focusable label='Submit' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Submit' -++++++++++++UNKNOWN label='Submit' +++++++++++++UNKNOWN ++++++UNKNOWN label='Name' ++++++++BUTTON focusable label='Submit' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Submit' -++++++++++++UNKNOWN label='Submit' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/form-validation-message-expected-blink.txt b/content/test/data/accessibility/html/form-validation-message-expected-blink.txt index ee1573ecd..2fc74296 100644 --- a/content/test/data/accessibility/html/form-validation-message-expected-blink.txt +++ b/content/test/data/accessibility/html/form-validation-message-expected-blink.txt
@@ -5,6 +5,6 @@ ++++++section ++++++++labelText ++++++++++staticText name='Pet name:' -++++++++++++inlineTextBox name='Pet name:' +++++++++++++inlineTextBox ++++++++textField required name='Pet name:' invalidState=true errorMessageIds=alert ++++++++++genericContainer
diff --git a/content/test/data/accessibility/html/form-validation-message-expected-fuchsia.txt b/content/test/data/accessibility/html/form-validation-message-expected-fuchsia.txt index 118d1c4..0b9e13a 100644 --- a/content/test/data/accessibility/html/form-validation-message-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/form-validation-message-expected-fuchsia.txt
@@ -5,6 +5,6 @@ ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Pet name:' -++++++++++++UNKNOWN label='Pet name:' +++++++++++++UNKNOWN ++++++++TEXT_FIELD focusable has_input_focus label='Pet name:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/frameset-expected-blink.txt b/content/test/data/accessibility/html/frameset-expected-blink.txt index 3dbef151..2e15dd8 100644 --- a/content/test/data/accessibility/html/frameset-expected-blink.txt +++ b/content/test/data/accessibility/html/frameset-expected-blink.txt
@@ -7,26 +7,26 @@ ++++++++++++genericContainer ignored ++++++++++++++paragraph ++++++++++++++++staticText name='My favorite browser is ' -++++++++++++++++++inlineTextBox name='My favorite browser is ' +++++++++++++++++++inlineTextBox ++++++++++++++++contentDeletion ++++++++++++++++++staticText name='ABC' -++++++++++++++++++++inlineTextBox name='ABC' +++++++++++++++++++++inlineTextBox ++++++++++++++++staticText name=' ' -++++++++++++++++++inlineTextBox name=' ' +++++++++++++++++++inlineTextBox ++++++++++++++++contentInsertion ++++++++++++++++++staticText name='Chrome' -++++++++++++++++++++inlineTextBox name='Chrome' +++++++++++++++++++++inlineTextBox ++++++++++++++++staticText name='!' -++++++++++++++++++inlineTextBox name='!' +++++++++++++++++++inlineTextBox ++++++iframe ++++++++rootWebArea ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++paragraph ++++++++++++++++staticText name='This test is to check ' -++++++++++++++++++inlineTextBox name='This test is to check ' +++++++++++++++++++inlineTextBox ++++++++++++++++mark ++++++++++++++++++staticText name='mark tag' -++++++++++++++++++++inlineTextBox name='mark tag' +++++++++++++++++++++inlineTextBox ++++++++++++++++staticText name='.' -++++++++++++++++++inlineTextBox name='.' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/frameset-expected-fuchsia.txt b/content/test/data/accessibility/html/frameset-expected-fuchsia.txt index 0ec9831..a809a2c 100644 --- a/content/test/data/accessibility/html/frameset-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/frameset-expected-fuchsia.txt
@@ -7,26 +7,26 @@ ++++++++++++UNKNOWN hidden ++++++++++++++PARAGRAPH ++++++++++++++++STATIC_TEXT label='My favorite browser is ' -++++++++++++++++++UNKNOWN label='My favorite browser is ' +++++++++++++++++++UNKNOWN ++++++++++++++++UNKNOWN ++++++++++++++++++STATIC_TEXT label='ABC' -++++++++++++++++++++UNKNOWN label='ABC' +++++++++++++++++++++UNKNOWN ++++++++++++++++STATIC_TEXT label=' ' -++++++++++++++++++UNKNOWN label=' ' +++++++++++++++++++UNKNOWN ++++++++++++++++UNKNOWN ++++++++++++++++++STATIC_TEXT label='Chrome' -++++++++++++++++++++UNKNOWN label='Chrome' +++++++++++++++++++++UNKNOWN ++++++++++++++++STATIC_TEXT label='!' -++++++++++++++++++UNKNOWN label='!' +++++++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN focusable ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN hidden ++++++++++++++PARAGRAPH ++++++++++++++++STATIC_TEXT label='This test is to check ' -++++++++++++++++++UNKNOWN label='This test is to check ' +++++++++++++++++++UNKNOWN ++++++++++++++++UNKNOWN ++++++++++++++++++STATIC_TEXT label='mark tag' -++++++++++++++++++++UNKNOWN label='mark tag' +++++++++++++++++++++UNKNOWN ++++++++++++++++STATIC_TEXT label='.' -++++++++++++++++++UNKNOWN label='.' +++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/generated-content-after-hidden-input-expected-blink.txt b/content/test/data/accessibility/html/generated-content-after-hidden-input-expected-blink.txt index 9d6d10c..a28e7d0 100644 --- a/content/test/data/accessibility/html/generated-content-after-hidden-input-expected-blink.txt +++ b/content/test/data/accessibility/html/generated-content-after-hidden-input-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++paragraph ++++++++genericContainer ignored ++++++++++staticText name='*' -++++++++++++inlineTextBox name='*' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/generated-content-in-empty-page-expected-blink.txt b/content/test/data/accessibility/html/generated-content-in-empty-page-expected-blink.txt index 4d2d815..045fa95 100644 --- a/content/test/data/accessibility/html/generated-content-in-empty-page-expected-blink.txt +++ b/content/test/data/accessibility/html/generated-content-in-empty-page-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++genericContainer ignored ++++++++staticText name='%E2%80%9C' -++++++++++inlineTextBox name='%E2%80%9C' +++++++++++inlineTextBox ++++genericContainer ++++++genericContainer ignored ++++++++genericContainer ignored ++++++++++staticText name='%E2%80%98' -++++++++++++inlineTextBox name='%E2%80%98' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/header-expected-blink.txt b/content/test/data/accessibility/html/header-expected-blink.txt index ab32db2..637e49c 100644 --- a/content/test/data/accessibility/html/header-expected-blink.txt +++ b/content/test/data/accessibility/html/header-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++header ++++++++staticText name='Chromium Browser' -++++++++++inlineTextBox name='Chromium Browser' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/header-expected-fuchsia.txt b/content/test/data/accessibility/html/header-expected-fuchsia.txt index 361ec091..6f7d997 100644 --- a/content/test/data/accessibility/html/header-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/header-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN hidden ++++++HEADER ++++++++STATIC_TEXT label='Chromium Browser' -++++++++++UNKNOWN label='Chromium Browser' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt b/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt index cee42b5..f7905d2 100644 --- a/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt +++ b/content/test/data/accessibility/html/header-inside-other-section-expected-blink.txt
@@ -5,14 +5,14 @@ ++++++++headerAsNonLandmark ++++++++++paragraph ++++++++++++staticText name='Header inside article.' -++++++++++++++inlineTextBox name='Header inside article.' +++++++++++++++inlineTextBox ++++++section ++++++++headerAsNonLandmark ++++++++++paragraph ++++++++++++staticText name='Header inside section.' -++++++++++++++inlineTextBox name='Header inside section.' +++++++++++++++inlineTextBox ++++++main ++++++++headerAsNonLandmark ++++++++++paragraph ++++++++++++staticText name='Header inside main.' -++++++++++++++inlineTextBox name='Header inside main.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/header-inside-other-section-expected-fuchsia.txt b/content/test/data/accessibility/html/header-inside-other-section-expected-fuchsia.txt index df12452..cd73d3f8 100644 --- a/content/test/data/accessibility/html/header-inside-other-section-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/header-inside-other-section-expected-fuchsia.txt
@@ -5,14 +5,14 @@ ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='Header inside article.' -++++++++++++++UNKNOWN label='Header inside article.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='Header inside section.' -++++++++++++++UNKNOWN label='Header inside section.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='Header inside main.' -++++++++++++++UNKNOWN label='Header inside main.' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/heading-expected-blink.txt b/content/test/data/accessibility/html/heading-expected-blink.txt index 7afc3ed..f4ac5df8 100644 --- a/content/test/data/accessibility/html/heading-expected-blink.txt +++ b/content/test/data/accessibility/html/heading-expected-blink.txt
@@ -3,19 +3,19 @@ ++++genericContainer ignored ++++++heading name='Heading 1' hierarchicalLevel=1 ++++++++staticText name='Heading 1' -++++++++++inlineTextBox name='Heading 1' +++++++++++inlineTextBox ++++++heading name='Heading 2' hierarchicalLevel=2 ++++++++staticText name='Heading 2' -++++++++++inlineTextBox name='Heading 2' +++++++++++inlineTextBox ++++++heading name='Heading 3' hierarchicalLevel=3 ++++++++staticText name='Heading 3' -++++++++++inlineTextBox name='Heading 3' +++++++++++inlineTextBox ++++++heading name='Heading 4' hierarchicalLevel=4 ++++++++staticText name='Heading 4' -++++++++++inlineTextBox name='Heading 4' +++++++++++inlineTextBox ++++++heading name='Heading 5' hierarchicalLevel=5 ++++++++staticText name='Heading 5' -++++++++++inlineTextBox name='Heading 5' +++++++++++inlineTextBox ++++++heading name='Heading 6' hierarchicalLevel=6 ++++++++staticText name='Heading 6' -++++++++++inlineTextBox name='Heading 6' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/heading-expected-fuchsia.txt b/content/test/data/accessibility/html/heading-expected-fuchsia.txt index a20ba71..a1e9412 100644 --- a/content/test/data/accessibility/html/heading-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/heading-expected-fuchsia.txt
@@ -3,19 +3,19 @@ ++++UNKNOWN hidden ++++++UNKNOWN label='Heading 1' ++++++++STATIC_TEXT label='Heading 1' -++++++++++UNKNOWN label='Heading 1' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading 2' ++++++++STATIC_TEXT label='Heading 2' -++++++++++UNKNOWN label='Heading 2' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading 3' ++++++++STATIC_TEXT label='Heading 3' -++++++++++UNKNOWN label='Heading 3' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading 4' ++++++++STATIC_TEXT label='Heading 4' -++++++++++UNKNOWN label='Heading 4' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading 5' ++++++++STATIC_TEXT label='Heading 5' -++++++++++UNKNOWN label='Heading 5' +++++++++++UNKNOWN ++++++UNKNOWN label='Heading 6' ++++++++STATIC_TEXT label='Heading 6' -++++++++++UNKNOWN label='Heading 6' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/heading-with-tabIndex-expected-blink.txt b/content/test/data/accessibility/html/heading-with-tabIndex-expected-blink.txt index 975b355e..06b4db7 100644 --- a/content/test/data/accessibility/html/heading-with-tabIndex-expected-blink.txt +++ b/content/test/data/accessibility/html/heading-with-tabIndex-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored ++++++heading name='Heading 2, no tabIndex' hierarchicalLevel=2 ++++++++staticText name='Heading 2, no tabIndex' -++++++++++inlineTextBox name='Heading 2, no tabIndex' +++++++++++inlineTextBox ++++++heading name='Heading 1, tabIndex of negative 1' hierarchicalLevel=1 ++++++++staticText name='Heading 1, tabIndex of negative 1' -++++++++++inlineTextBox name='Heading 1, tabIndex of negative 1' +++++++++++inlineTextBox ++++++heading name='Heading 3, tabIndex of 0' hierarchicalLevel=3 ++++++++staticText name='Heading 3, tabIndex of 0' -++++++++++inlineTextBox name='Heading 3, tabIndex of 0' +++++++++++inlineTextBox ++++++heading name='Heading 4, tabIndex of 1' hierarchicalLevel=4 ++++++++staticText name='Heading 4, tabIndex of 1' -++++++++++inlineTextBox name='Heading 4, tabIndex of 1' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/heading-with-tabIndex-expected-fuchsia.txt b/content/test/data/accessibility/html/heading-with-tabIndex-expected-fuchsia.txt index b627e33..0efce89e4 100644 --- a/content/test/data/accessibility/html/heading-with-tabIndex-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/heading-with-tabIndex-expected-fuchsia.txt
@@ -3,13 +3,13 @@ ++++UNKNOWN hidden ++++++UNKNOWN label='Heading 2, no tabIndex' ++++++++STATIC_TEXT label='Heading 2, no tabIndex' -++++++++++UNKNOWN label='Heading 2, no tabIndex' +++++++++++UNKNOWN ++++++UNKNOWN focusable label='Heading 1, tabIndex of negative 1' ++++++++STATIC_TEXT label='Heading 1, tabIndex of negative 1' -++++++++++UNKNOWN label='Heading 1, tabIndex of negative 1' +++++++++++UNKNOWN ++++++UNKNOWN focusable label='Heading 3, tabIndex of 0' ++++++++STATIC_TEXT label='Heading 3, tabIndex of 0' -++++++++++UNKNOWN label='Heading 3, tabIndex of 0' +++++++++++UNKNOWN ++++++UNKNOWN focusable label='Heading 4, tabIndex of 1' ++++++++STATIC_TEXT label='Heading 4, tabIndex of 1' -++++++++++UNKNOWN label='Heading 4, tabIndex of 1' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/hgroup-expected-blink.txt b/content/test/data/accessibility/html/hgroup-expected-blink.txt index d9cbe2d..3ea23e5 100644 --- a/content/test/data/accessibility/html/hgroup-expected-blink.txt +++ b/content/test/data/accessibility/html/hgroup-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++group ++++++++heading name='Heading 1' hierarchicalLevel=1 ++++++++++staticText name='Heading 1' -++++++++++++inlineTextBox name='Heading 1' +++++++++++++inlineTextBox ++++++++heading name='Heading 2' hierarchicalLevel=6 ++++++++++staticText name='Heading 2' -++++++++++++inlineTextBox name='Heading 2' +++++++++++++inlineTextBox ++++++++paragraph ++++++++++staticText name='My test' -++++++++++++inlineTextBox name='My test' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/hr-expected-blink.txt b/content/test/data/accessibility/html/hr-expected-blink.txt index 4b07c6a..a25f844 100644 --- a/content/test/data/accessibility/html/hr-expected-blink.txt +++ b/content/test/data/accessibility/html/hr-expected-blink.txt
@@ -3,12 +3,12 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Before.' -++++++++++inlineTextBox name='Before.' +++++++++++inlineTextBox ++++++splitter horizontal name='Dividing line' ++++++paragraph ++++++++staticText name='Middle.' -++++++++++inlineTextBox name='Middle.' +++++++++++inlineTextBox ++++++splitter horizontal ++++++paragraph ++++++++staticText name='After.' -++++++++++inlineTextBox name='After.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/hr-expected-fuchsia.txt b/content/test/data/accessibility/html/hr-expected-fuchsia.txt index 681c4d3..dcdd4d8 100644 --- a/content/test/data/accessibility/html/hr-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/hr-expected-fuchsia.txt
@@ -3,12 +3,12 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='Before.' -++++++++++UNKNOWN label='Before.' +++++++++++UNKNOWN ++++++UNKNOWN label='Dividing line' actions='{SET_VALUE}' ++++++PARAGRAPH ++++++++STATIC_TEXT label='Middle.' -++++++++++UNKNOWN label='Middle.' +++++++++++UNKNOWN ++++++UNKNOWN actions='{SET_VALUE}' ++++++PARAGRAPH ++++++++STATIC_TEXT label='After.' -++++++++++UNKNOWN label='After.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/html-attributes-and-tag-names-expected-blink.txt b/content/test/data/accessibility/html/html-attributes-and-tag-names-expected-blink.txt index fbd3b6f..4b4146f 100644 --- a/content/test/data/accessibility/html/html-attributes-and-tag-names-expected-blink.txt +++ b/content/test/data/accessibility/html/html-attributes-and-tag-names-expected-blink.txt
@@ -3,16 +3,16 @@ ++++genericContainer ignored ++++++heading name='Heading' ++++++++staticText name='Heading' -++++++++++inlineTextBox name='Heading' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Paragraph' -++++++++++inlineTextBox name='Paragraph' +++++++++++inlineTextBox ++++++genericContainer ++++++++textField ++++++++++genericContainer ++++++button name='c' ++++++++staticText name='D' -++++++++++inlineTextBox name='D' +++++++++++inlineTextBox ++++++button name='Click' ++++++++staticText name='Click' -++++++++++inlineTextBox name='Click' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/html-expected-blink.txt b/content/test/data/accessibility/html/html-expected-blink.txt index 819dd09..20a8836 100644 --- a/content/test/data/accessibility/html/html-expected-blink.txt +++ b/content/test/data/accessibility/html/html-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer htmlTag='body' name='BODY element' ++++++button htmlTag='button' name='Button element' ++++++++staticText name='Button' -++++++++++inlineTextBox name='Button' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/html-expected-fuchsia.txt b/content/test/data/accessibility/html/html-expected-fuchsia.txt index 3402073..068586f 100644 --- a/content/test/data/accessibility/html/html-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/html-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN label='BODY element' ++++++BUTTON focusable label='Button element' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Button' actions='{DEFAULT}' -++++++++++UNKNOWN label='Button' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/i-expected-blink.txt b/content/test/data/accessibility/html/i-expected-blink.txt index 2c7a645..6f76755f 100644 --- a/content/test/data/accessibility/html/i-expected-blink.txt +++ b/content/test/data/accessibility/html/i-expected-blink.txt
@@ -3,8 +3,8 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This is to check ' -++++++++++inlineTextBox name='This is to check ' +++++++++++inlineTextBox ++++++++staticText name='italic property' -++++++++++inlineTextBox name='italic property' +++++++++++inlineTextBox ++++++++staticText name=' using i tag.' -++++++++++inlineTextBox name=' using i tag.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/i-expected-fuchsia.txt b/content/test/data/accessibility/html/i-expected-fuchsia.txt index 7a3eb76..39ebed8 100644 --- a/content/test/data/accessibility/html/i-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/i-expected-fuchsia.txt
@@ -3,8 +3,8 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This is to check ' -++++++++++UNKNOWN label='This is to check ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='italic property' -++++++++++UNKNOWN label='italic property' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' using i tag.' -++++++++++UNKNOWN label=' using i tag.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/id-expected-blink.txt b/content/test/data/accessibility/html/id-expected-blink.txt index 4f50399..9fce170 100644 --- a/content/test/data/accessibility/html/id-expected-blink.txt +++ b/content/test/data/accessibility/html/id-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='No id' -++++++++++inlineTextBox name='No id' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Has id' -++++++++++inlineTextBox name='Has id' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/id-expected-fuchsia.txt b/content/test/data/accessibility/html/id-expected-fuchsia.txt index 86b8d819..0763102 100644 --- a/content/test/data/accessibility/html/id-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/id-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='No id' -++++++++++UNKNOWN label='No id' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='Has id' -++++++++++UNKNOWN label='Has id' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/iframe-coordinates-expected-blink.txt b/content/test/data/accessibility/html/iframe-coordinates-expected-blink.txt index cdc7d29d..e7c55cc 100644 --- a/content/test/data/accessibility/html/iframe-coordinates-expected-blink.txt +++ b/content/test/data/accessibility/html/iframe-coordinates-expected-blink.txt
@@ -4,11 +4,11 @@ ++++++genericContainer size=(300, 150) pageLocation=(0, 0) ++++++++button size=(250, 50) pageLocation=(25, 25) unclippedSize=(250, 50) name='Button' ++++++++++staticText name='Button' -++++++++++++inlineTextBox name='Button' +++++++++++++inlineTextBox ++++++genericContainer size=(300, 150) pageLocation=(0, 150) ++++++++button size=(250, 50) pageLocation=(25, 175) unclippedSize=(250, 50) name='Button' ++++++++++staticText name='Button' -++++++++++++inlineTextBox name='Button' +++++++++++++inlineTextBox ++++++genericContainer size=(300, 150) pageLocation=(0, 300) ++++++++iframe size=(300, 100) pageLocation=(0, 300) unclippedSize=(300, 100) ++++++++++rootWebArea size=(300, 100) pageLocation=(0, 300) unclippedSize=(300, 100) scrollX=0 scrollY=0 scrollable=false @@ -17,7 +17,7 @@ ++++++++++++++++genericContainer size=(300, 100) pageLocation=(0, 300) unclippedSize=(300, 100) ++++++++++++++++++button size=(250, 50) pageLocation=(25, 325) unclippedSize=(250, 50) name='Ordinary Button' ++++++++++++++++++++staticText name='Ordinary Button' -++++++++++++++++++++++inlineTextBox name='Ordinary Button' +++++++++++++++++++++++inlineTextBox ++++++genericContainer size=(300, 150) pageLocation=(0, 450) ++++++++iframe size=(150, 50) pageLocation=(0, 450) ++++++++++rootWebArea size=(150, 50) pageLocation=(0, 450) scrollX=150 scrollY=50 scrollable=true @@ -26,4 +26,4 @@ ++++++++++++++++genericContainer size=(300, 100) pageLocation=(0, 450) unclippedLocation=(-150, 400) unclippedSize=(300, 100) ++++++++++++++++++button size=(250, 50) pageLocation=(0, 450) unclippedLocation=(-125, 425) unclippedSize=(250, 50) name='Scrolled Button' ++++++++++++++++++++staticText pageLocation=(0, 450) name='Scrolled Button' -++++++++++++++++++++++inlineTextBox pageLocation=(0, 450) name='Scrolled Button' +++++++++++++++++++++++inlineTextBox pageLocation=(0, 450)
diff --git a/content/test/data/accessibility/html/iframe-coordinates-expected-fuchsia.txt b/content/test/data/accessibility/html/iframe-coordinates-expected-fuchsia.txt index 3ece1a0..e63a645 100644 --- a/content/test/data/accessibility/html/iframe-coordinates-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/iframe-coordinates-expected-fuchsia.txt
@@ -4,11 +4,11 @@ ++++++UNKNOWN ++++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Button' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Button' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Button' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Button' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++UNKNOWN focusable @@ -17,7 +17,7 @@ ++++++++++++++++UNKNOWN ++++++++++++++++++BUTTON focusable label='Ordinary Button' actions='{DEFAULT}' ++++++++++++++++++++STATIC_TEXT label='Ordinary Button' actions='{DEFAULT}' -++++++++++++++++++++++UNKNOWN label='Ordinary Button' +++++++++++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++UNKNOWN focusable @@ -26,4 +26,4 @@ ++++++++++++++++UNKNOWN ++++++++++++++++++BUTTON focusable label='Scrolled Button' actions='{DEFAULT}' ++++++++++++++++++++STATIC_TEXT label='Scrolled Button' actions='{DEFAULT}' -++++++++++++++++++++++UNKNOWN label='Scrolled Button' +++++++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/iframe-create-expected-blink.txt b/content/test/data/accessibility/html/iframe-create-expected-blink.txt index 4add46a..41bb909 100644 --- a/content/test/data/accessibility/html/iframe-create-expected-blink.txt +++ b/content/test/data/accessibility/html/iframe-create-expected-blink.txt
@@ -7,4 +7,4 @@ ++++++++++++genericContainer ++++++++++++++link name='done' ++++++++++++++++staticText name='done' -++++++++++++++++++inlineTextBox name='done' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/iframe-create-expected-fuchsia.txt b/content/test/data/accessibility/html/iframe-create-expected-fuchsia.txt index a3859e5d..8b65853 100644 --- a/content/test/data/accessibility/html/iframe-create-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/iframe-create-expected-fuchsia.txt
@@ -7,4 +7,4 @@ ++++++++++++UNKNOWN ++++++++++++++LINK focusable label='done' actions='{DEFAULT}' ++++++++++++++++STATIC_TEXT label='done' actions='{DEFAULT}' -++++++++++++++++++UNKNOWN label='done' +++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/iframe-padding-expected-blink.txt b/content/test/data/accessibility/html/iframe-padding-expected-blink.txt index 797d2997..c983a207 100644 --- a/content/test/data/accessibility/html/iframe-padding-expected-blink.txt +++ b/content/test/data/accessibility/html/iframe-padding-expected-blink.txt
@@ -9,7 +9,7 @@ ++++++++++++++++genericContainer pageLocation=(0, 0) pageSize=(300, 100) ++++++++++++++++++button pageLocation=(25, 25) pageSize=(250, 50) name='Ordinary Button' ++++++++++++++++++++staticText name='Ordinary Button' -++++++++++++++++++++++inlineTextBox name='Ordinary Button' +++++++++++++++++++++++inlineTextBox ++++++genericContainer pageLocation=(30, 230) pageSize=(300, 100) ++++++++iframe pageLocation=(30, 230) pageSize=(300, 100) ++++++++++rootWebArea pageLocation=(30, 230) pageSize=(300, 100) @@ -18,4 +18,4 @@ ++++++++++++++++genericContainer pageLocation=(30, 230) pageSize=(300, 100) ++++++++++++++++++button pageLocation=(55, 255) pageSize=(250, 50) name='Second Button' ++++++++++++++++++++staticText name='Second Button' -++++++++++++++++++++++inlineTextBox name='Second Button' \ No newline at end of file +++++++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/iframe-scrollable-expected-blink.txt b/content/test/data/accessibility/html/iframe-scrollable-expected-blink.txt index 4b82482..4c645f4 100644 --- a/content/test/data/accessibility/html/iframe-scrollable-expected-blink.txt +++ b/content/test/data/accessibility/html/iframe-scrollable-expected-blink.txt
@@ -7,8 +7,8 @@ ++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='visible text' -++++++++++++++++++inlineTextBox name='visible text' +++++++++++++++++++inlineTextBox ++++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='hidden from viewport' -++++++++++++++++++inlineTextBox name='hidden from viewport' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/iframe-scrollable-expected-fuchsia.txt b/content/test/data/accessibility/html/iframe-scrollable-expected-fuchsia.txt index 6d4466e..4bbc311a 100644 --- a/content/test/data/accessibility/html/iframe-scrollable-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/iframe-scrollable-expected-fuchsia.txt
@@ -7,8 +7,8 @@ ++++++++++++UNKNOWN hidden ++++++++++++++UNKNOWN ++++++++++++++++STATIC_TEXT label='visible text' -++++++++++++++++++UNKNOWN label='visible text' +++++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN hidden ++++++++++++++UNKNOWN ++++++++++++++++STATIC_TEXT label='hidden from viewport' -++++++++++++++++++UNKNOWN label='hidden from viewport' +++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/iframe-transform-scrolled-expected-blink.txt b/content/test/data/accessibility/html/iframe-transform-scrolled-expected-blink.txt index e2c8ceb..177274fc6 100644 --- a/content/test/data/accessibility/html/iframe-transform-scrolled-expected-blink.txt +++ b/content/test/data/accessibility/html/iframe-transform-scrolled-expected-blink.txt
@@ -8,4 +8,4 @@ ++++++++++++++genericContainer pageLocation=(300, 300) ++++++++++++++++button pageLocation=(300, 300) pageSize=(250, 50) name='Scrolled Button' ++++++++++++++++++staticText pageLocation=(300, 300) name='Scrolled Button' -++++++++++++++++++++inlineTextBox pageLocation=(300, 300) name='Scrolled Button' +++++++++++++++++++++inlineTextBox pageLocation=(300, 300)
diff --git a/content/test/data/accessibility/html/iframe-with-region-role-expected-blink.txt b/content/test/data/accessibility/html/iframe-with-region-role-expected-blink.txt index 537fb9c..274ee33 100644 --- a/content/test/data/accessibility/html/iframe-with-region-role-expected-blink.txt +++ b/content/test/data/accessibility/html/iframe-with-region-role-expected-blink.txt
@@ -8,4 +8,4 @@ ++++++++++++++genericContainer ++++++++++++++++button name='Ordinary Button' ++++++++++++++++++staticText name='Ordinary Button' -++++++++++++++++++++inlineTextBox name='Ordinary Button' +++++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ignored-selection-between-text-expected-blink.txt b/content/test/data/accessibility/html/ignored-selection-between-text-expected-blink.txt index cc821eade..68482ff 100644 --- a/content/test/data/accessibility/html/ignored-selection-between-text-expected-blink.txt +++ b/content/test/data/accessibility/html/ignored-selection-between-text-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++genericContainer ignored ++++++++genericContainer ++++++++++staticText name='before selection' TreeData.textSelStartOffset=0 -++++++++++++inlineTextBox name='before selection' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='this text is not ignored' -++++++++++++inlineTextBox name='this text is not ignored' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='after selection' TreeData.textSelEndOffset=15 -++++++++++++inlineTextBox name='after selection' +++++++++++++inlineTextBox ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ignored-selection-between-text-expected-fuchsia.txt b/content/test/data/accessibility/html/ignored-selection-between-text-expected-fuchsia.txt index f8b21315..4c7d958 100644 --- a/content/test/data/accessibility/html/ignored-selection-between-text-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ignored-selection-between-text-expected-fuchsia.txt
@@ -4,12 +4,12 @@ ++++++UNKNOWN hidden ++++++++UNKNOWN ++++++++++STATIC_TEXT label='before selection' -++++++++++++UNKNOWN label='before selection' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='this text is not ignored' -++++++++++++UNKNOWN label='this text is not ignored' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='after selection' -++++++++++++UNKNOWN label='after selection' +++++++++++++UNKNOWN ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/ignored-selection-expected-blink.txt b/content/test/data/accessibility/html/ignored-selection-expected-blink.txt index d9d63f4..1f94980 100644 --- a/content/test/data/accessibility/html/ignored-selection-expected-blink.txt +++ b/content/test/data/accessibility/html/ignored-selection-expected-blink.txt
@@ -2,9 +2,9 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='this text is not ignored' TreeData.textSelStartOffset=0 -++++++++inlineTextBox name='this text is not ignored' +++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='after selection' -++++++++++inlineTextBox name='after selection' +++++++++++inlineTextBox ++++++staticText name='Done' TreeData.textSelEndOffset=4 -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ignored-selection-expected-fuchsia.txt b/content/test/data/accessibility/html/ignored-selection-expected-fuchsia.txt index bfc7a8a..ce80159 100644 --- a/content/test/data/accessibility/html/ignored-selection-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ignored-selection-expected-fuchsia.txt
@@ -2,9 +2,9 @@ ++UNKNOWN hidden ++++UNKNOWN hidden ++++++STATIC_TEXT label='this text is not ignored' -++++++++UNKNOWN label='this text is not ignored' +++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='after selection' -++++++++++UNKNOWN label='after selection' +++++++++++UNKNOWN ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-blink.txt b/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-blink.txt index 457079a..c1443b1c 100644 --- a/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-blink.txt +++ b/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ignored ++++++genericContainer ignored ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-fuchsia.txt b/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-fuchsia.txt index 907887a..6e2e854 100644 --- a/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ignored-selection-no-unignored-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN hidden ++++++UNKNOWN hidden ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/img-empty-alt-expected-blink.txt b/content/test/data/accessibility/html/img-empty-alt-expected-blink.txt index a4740ab..55878de 100644 --- a/content/test/data/accessibility/html/img-empty-alt-expected-blink.txt +++ b/content/test/data/accessibility/html/img-empty-alt-expected-blink.txt
@@ -2,15 +2,15 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='full'
diff --git a/content/test/data/accessibility/html/img-empty-alt-expected-fuchsia.txt b/content/test/data/accessibility/html/img-empty-alt-expected-fuchsia.txt index 2c9b505..bf7bbd8 100644 --- a/content/test/data/accessibility/html/img-empty-alt-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/img-empty-alt-expected-fuchsia.txt
@@ -2,15 +2,15 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++IMAGE ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++IMAGE ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++IMAGE label='full'
diff --git a/content/test/data/accessibility/html/img-link-empty-alt-expected-blink.txt b/content/test/data/accessibility/html/img-link-empty-alt-expected-blink.txt index fe61950..e237a711 100644 --- a/content/test/data/accessibility/html/img-link-empty-alt-expected-blink.txt +++ b/content/test/data/accessibility/html/img-link-empty-alt-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ++++++link name='unread ' ++++++++staticText name='unread ' -++++++++++inlineTextBox name='unread ' +++++++++++inlineTextBox ++++++link name='read ' ++++++++staticText name='read ' -++++++++++inlineTextBox name='read ' +++++++++++inlineTextBox ++++++link name='read ' ++++++++staticText name='read ' -++++++++++inlineTextBox name='read ' +++++++++++inlineTextBox ++++++link name='read' ++++++++image ++++++++staticText name='read' -++++++++++inlineTextBox name='read' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/img-link-empty-alt-expected-fuchsia.txt b/content/test/data/accessibility/html/img-link-empty-alt-expected-fuchsia.txt index 8080b63..fdba276e 100644 --- a/content/test/data/accessibility/html/img-link-empty-alt-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/img-link-empty-alt-expected-fuchsia.txt
@@ -3,14 +3,14 @@ ++++UNKNOWN ++++++LINK focusable label='unread ' actions='{DEFAULT}' ++++++++STATIC_TEXT label='unread ' actions='{DEFAULT}' -++++++++++UNKNOWN label='unread ' +++++++++++UNKNOWN ++++++LINK focusable label='read ' actions='{DEFAULT}' ++++++++STATIC_TEXT label='read ' actions='{DEFAULT}' -++++++++++UNKNOWN label='read ' +++++++++++UNKNOWN ++++++LINK focusable label='read ' actions='{DEFAULT}' ++++++++STATIC_TEXT label='read ' actions='{DEFAULT}' -++++++++++UNKNOWN label='read ' +++++++++++UNKNOWN ++++++LINK focusable label='read' actions='{DEFAULT}' ++++++++IMAGE actions='{DEFAULT}' ++++++++STATIC_TEXT label='read' actions='{DEFAULT}' -++++++++++UNKNOWN label='read' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/in-page-links-expected-blink.txt b/content/test/data/accessibility/html/in-page-links-expected-blink.txt index 75cfe31..72455a2f 100644 --- a/content/test/data/accessibility/html/in-page-links-expected-blink.txt +++ b/content/test/data/accessibility/html/in-page-links-expected-blink.txt
@@ -3,52 +3,52 @@ ++++genericContainer ignored ++++++link name='Empty anchor' defaultActionVerb=jump inPageLinkTargetId=genericContainer ++++++++staticText name='Empty anchor' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Empty anchor' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Anchor with content' defaultActionVerb=jump inPageLinkTargetId=genericContainer ++++++++staticText name='Anchor with content' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Anchor with content' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Anchor with ID' defaultActionVerb=jump inPageLinkTargetId=genericContainer ++++++++staticText name='Anchor with ID' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Anchor with ID' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Empty span' defaultActionVerb=jump inPageLinkTargetId=genericContainer ++++++++staticText name='Empty span' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Empty span' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Span with content' defaultActionVerb=jump inPageLinkTargetId=genericContainer ++++++++staticText name='Span with content' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Span with content' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++link name='Paragraph with content' defaultActionVerb=jump inPageLinkTargetId=paragraph ++++++++staticText name='Paragraph with content' defaultActionVerb=clickAncestor -++++++++++inlineTextBox name='Paragraph with content' +++++++++++inlineTextBox ++++++paragraph ++++++++genericContainer ++++++++staticText name='After empty anchor' -++++++++++inlineTextBox name='After empty anchor' +++++++++++inlineTextBox ++++++paragraph ++++++++genericContainer ++++++++++staticText name='Anchor with content' -++++++++++++inlineTextBox name='Anchor with content' +++++++++++++inlineTextBox ++++++paragraph ++++++++genericContainer ++++++++++staticText name='Anchor with ID' -++++++++++++inlineTextBox name='Anchor with ID' +++++++++++++inlineTextBox ++++++paragraph ++++++++genericContainer ++++++++staticText name='After empty span' -++++++++++inlineTextBox name='After empty span' +++++++++++inlineTextBox ++++++paragraph ++++++++genericContainer ++++++++++staticText name='Span with content' -++++++++++++inlineTextBox name='Span with content' +++++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Paragraph with content' -++++++++++inlineTextBox name='Paragraph with content' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/in-page-links-expected-fuchsia.txt b/content/test/data/accessibility/html/in-page-links-expected-fuchsia.txt index ed65eee..64963e6e 100644 --- a/content/test/data/accessibility/html/in-page-links-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/in-page-links-expected-fuchsia.txt
@@ -3,52 +3,52 @@ ++++UNKNOWN hidden ++++++LINK focusable label='Empty anchor' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Empty anchor' actions='{DEFAULT}' -++++++++++UNKNOWN label='Empty anchor' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Anchor with content' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Anchor with content' actions='{DEFAULT}' -++++++++++UNKNOWN label='Anchor with content' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Anchor with ID' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Anchor with ID' actions='{DEFAULT}' -++++++++++UNKNOWN label='Anchor with ID' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Empty span' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Empty span' actions='{DEFAULT}' -++++++++++UNKNOWN label='Empty span' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Span with content' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Span with content' actions='{DEFAULT}' -++++++++++UNKNOWN label='Span with content' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++LINK focusable label='Paragraph with content' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Paragraph with content' actions='{DEFAULT}' -++++++++++UNKNOWN label='Paragraph with content' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++UNKNOWN ++++++++STATIC_TEXT label='After empty anchor' -++++++++++UNKNOWN label='After empty anchor' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Anchor with content' -++++++++++++UNKNOWN label='Anchor with content' +++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Anchor with ID' -++++++++++++UNKNOWN label='Anchor with ID' +++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++UNKNOWN ++++++++STATIC_TEXT label='After empty span' -++++++++++UNKNOWN label='After empty span' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Span with content' -++++++++++++UNKNOWN label='Span with content' +++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='Paragraph with content' -++++++++++UNKNOWN label='Paragraph with content' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/inert-attribute-expected-blink.txt b/content/test/data/accessibility/html/inert-attribute-expected-blink.txt index 0f856229..4f735c3d 100644 --- a/content/test/data/accessibility/html/inert-attribute-expected-blink.txt +++ b/content/test/data/accessibility/html/inert-attribute-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++genericContainer ignored htmlTag='slot' ++++++++++genericContainer focusable htmlTag='span' name='sit' ++++++++++++staticText name='sit' -++++++++++++++inlineTextBox name='sit' +++++++++++++++inlineTextBox ++++++++genericContainer ignored invisible htmlTag='slot' ++++++++++staticText ignored invisible name=' dolor ' ++++++++++genericContainer ignored invisible htmlTag='span' @@ -41,4 +41,4 @@ ++++++++++++genericContainer ignored htmlTag='body' ++++++++++++++genericContainer focusable htmlTag='div' name='Normal frame' ++++++++++++++++staticText name='Normal frame' -++++++++++++++++++inlineTextBox name='Normal frame' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-button-expected-blink.txt b/content/test/data/accessibility/html/input-button-expected-blink.txt index 23ed173..c6abf57 100644 --- a/content/test/data/accessibility/html/input-button-expected-blink.txt +++ b/content/test/data/accessibility/html/input-button-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ++++++button inputType='button' name='Button' ++++++++staticText name='Button' -++++++++++inlineTextBox name='Button' +++++++++++inlineTextBox ++++++button description='Description' inputType='button' name='Name' descriptionFrom=buttonLabel ++++++++staticText name='Description' -++++++++++inlineTextBox name='Description' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-button-expected-fuchsia.txt b/content/test/data/accessibility/html/input-button-expected-fuchsia.txt index 44293be..4264a2c 100644 --- a/content/test/data/accessibility/html/input-button-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-button-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN ++++++BUTTON focusable label='Button' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Button' -++++++++++UNKNOWN label='Button' +++++++++++UNKNOWN ++++++BUTTON focusable label='Name' actions='{DEFAULT}' secondary_label='Description' ++++++++STATIC_TEXT label='Description' -++++++++++UNKNOWN label='Description' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-date-disabled-expected-blink.txt b/content/test/data/accessibility/html/input-date-disabled-expected-blink.txt index 354c42b..267f24f 100644 --- a/content/test/data/accessibility/html/input-date-disabled-expected-blink.txt +++ b/content/test/data/accessibility/html/input-date-disabled-expected-blink.txt
@@ -7,14 +7,14 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='mm' restriction=disabled valueForRange=0.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='mm' -++++++++++++++++++inlineTextBox name='mm' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day' placeholder='dd' restriction=disabled valueForRange=0.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='dd' -++++++++++++++++++inlineTextBox name='dd' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='yyyy' restriction=disabled valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='yyyy' -++++++++++++++++++inlineTextBox name='yyyy' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-date-expected-blink.txt b/content/test/data/accessibility/html/input-date-expected-blink.txt index fed79ef..e391c8087 100644 --- a/content/test/data/accessibility/html/input-date-expected-blink.txt +++ b/content/test/data/accessibility/html/input-date-expected-blink.txt
@@ -7,17 +7,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++date inputType='date' name='When' value='2008-09-01' ++++++++genericContainer ignored @@ -25,15 +25,15 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month When' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day When' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year When' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title
diff --git a/content/test/data/accessibility/html/input-date-expected-fuchsia.txt b/content/test/data/accessibility/html/input-date-expected-fuchsia.txt index d1465106..bbd68f8b 100644 --- a/content/test/data/accessibility/html/input-date-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-date-expected-fuchsia.txt
@@ -7,17 +7,17 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Month' actions='{SET_VALUE}' value='09' ++++++++++++++++STATIC_TEXT label='09' -++++++++++++++++++UNKNOWN label='09' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='/' -++++++++++++++++UNKNOWN label='/' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Day' actions='{SET_VALUE}' value='01' ++++++++++++++++STATIC_TEXT label='01' -++++++++++++++++++UNKNOWN label='01' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='/' -++++++++++++++++UNKNOWN label='/' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Year' actions='{SET_VALUE}' value='2008' ++++++++++++++++STATIC_TEXT label='2008' -++++++++++++++++++UNKNOWN label='2008' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show date picker' actions='{DEFAULT}' secondary_label='Show date picker' ++++++UNKNOWN focusable label='When' actions='{DEFAULT, SET_VALUE}' value='2008-09-01' ++++++++UNKNOWN hidden @@ -25,16 +25,16 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Month When' actions='{SET_VALUE}' value='09' ++++++++++++++++STATIC_TEXT label='09' -++++++++++++++++++UNKNOWN label='09' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='/' -++++++++++++++++UNKNOWN label='/' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Day When' actions='{SET_VALUE}' value='01' ++++++++++++++++STATIC_TEXT label='01' -++++++++++++++++++UNKNOWN label='01' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='/' -++++++++++++++++UNKNOWN label='/' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Year When' actions='{SET_VALUE}' value='2008' ++++++++++++++++STATIC_TEXT label='2008' -++++++++++++++++++UNKNOWN label='2008' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show date picker' actions='{DEFAULT}' secondary_label='Show date picker'
diff --git a/content/test/data/accessibility/html/input-date-with-popup-open-multiple-expected-blink.txt b/content/test/data/accessibility/html/input-date-with-popup-open-multiple-expected-blink.txt index 947b4c8..d1f7770 100644 --- a/content/test/data/accessibility/html/input-date-with-popup-open-multiple-expected-blink.txt +++ b/content/test/data/accessibility/html/input-date-with-popup-open-multiple-expected-blink.txt
@@ -7,17 +7,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++date inputType='date' value='2008-09-01' ++++++++genericContainer ignored @@ -25,17 +25,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++date inputType='date' name='Third date picker' value='2008-09-01' controlsIds=group ++++++++genericContainer ignored @@ -43,17 +43,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month Third date picker' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day Third date picker' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year Third date picker' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++++group ++++++++++genericContainer ignored @@ -74,162 +74,162 @@ ++++++++++++++++++++genericContainer ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='S' -++++++++++++++++++++++++++inlineTextBox name='S' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='M' -++++++++++++++++++++++++++inlineTextBox name='M' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='T' -++++++++++++++++++++++++++inlineTextBox name='T' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='W' -++++++++++++++++++++++++++inlineTextBox name='W' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='T' -++++++++++++++++++++++++++inlineTextBox name='T' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='F' -++++++++++++++++++++++++++inlineTextBox name='F' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='S' -++++++++++++++++++++++++++inlineTextBox name='S' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++genericContainer ignored ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++row name='Sunday, August 31, 2008 Monday, September 1, 2008 Tuesday, September 2, 2008 Wednesday, September 3, 2008 Thursday, September 4, 2008 Friday, September 5, 2008 Saturday, September 6, 2008' ++++++++++++++++++++++++++cell name='Sunday, August 31, 2008' selected=false ++++++++++++++++++++++++++++staticText name='31' -++++++++++++++++++++++++++++++inlineTextBox name='31' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 1, 2008' selected=true ++++++++++++++++++++++++++++staticText name='1' -++++++++++++++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 2, 2008' selected=false ++++++++++++++++++++++++++++staticText name='2' -++++++++++++++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 3, 2008' selected=false ++++++++++++++++++++++++++++staticText name='3' -++++++++++++++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 4, 2008' selected=false ++++++++++++++++++++++++++++staticText name='4' -++++++++++++++++++++++++++++++inlineTextBox name='4' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 5, 2008' selected=false ++++++++++++++++++++++++++++staticText name='5' -++++++++++++++++++++++++++++++inlineTextBox name='5' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 6, 2008' selected=false ++++++++++++++++++++++++++++staticText name='6' -++++++++++++++++++++++++++++++inlineTextBox name='6' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 7, 2008 Monday, September 8, 2008 Tuesday, September 9, 2008 Wednesday, September 10, 2008 Thursday, September 11, 2008 Friday, September 12, 2008 Saturday, September 13, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 7, 2008' selected=false ++++++++++++++++++++++++++++staticText name='7' -++++++++++++++++++++++++++++++inlineTextBox name='7' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 8, 2008' selected=false ++++++++++++++++++++++++++++staticText name='8' -++++++++++++++++++++++++++++++inlineTextBox name='8' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 9, 2008' selected=false ++++++++++++++++++++++++++++staticText name='9' -++++++++++++++++++++++++++++++inlineTextBox name='9' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 10, 2008' selected=false ++++++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 11, 2008' selected=false ++++++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 12, 2008' selected=false ++++++++++++++++++++++++++++staticText name='12' -++++++++++++++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 13, 2008' selected=false ++++++++++++++++++++++++++++staticText name='13' -++++++++++++++++++++++++++++++inlineTextBox name='13' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 14, 2008 Monday, September 15, 2008 Tuesday, September 16, 2008 Wednesday, September 17, 2008 Thursday, September 18, 2008 Friday, September 19, 2008 Saturday, September 20, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 14, 2008' selected=false ++++++++++++++++++++++++++++staticText name='14' -++++++++++++++++++++++++++++++inlineTextBox name='14' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 15, 2008' selected=false ++++++++++++++++++++++++++++staticText name='15' -++++++++++++++++++++++++++++++inlineTextBox name='15' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 16, 2008' selected=false ++++++++++++++++++++++++++++staticText name='16' -++++++++++++++++++++++++++++++inlineTextBox name='16' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 17, 2008' selected=false ++++++++++++++++++++++++++++staticText name='17' -++++++++++++++++++++++++++++++inlineTextBox name='17' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 18, 2008' selected=false ++++++++++++++++++++++++++++staticText name='18' -++++++++++++++++++++++++++++++inlineTextBox name='18' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 19, 2008' selected=false ++++++++++++++++++++++++++++staticText name='19' -++++++++++++++++++++++++++++++inlineTextBox name='19' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 20, 2008' selected=false ++++++++++++++++++++++++++++staticText name='20' -++++++++++++++++++++++++++++++inlineTextBox name='20' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 21, 2008 Monday, September 22, 2008 Tuesday, September 23, 2008 Wednesday, September 24, 2008 Thursday, September 25, 2008 Friday, September 26, 2008 Saturday, September 27, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 21, 2008' selected=false ++++++++++++++++++++++++++++staticText name='21' -++++++++++++++++++++++++++++++inlineTextBox name='21' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 22, 2008' selected=false ++++++++++++++++++++++++++++staticText name='22' -++++++++++++++++++++++++++++++inlineTextBox name='22' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 23, 2008' selected=false ++++++++++++++++++++++++++++staticText name='23' -++++++++++++++++++++++++++++++inlineTextBox name='23' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 24, 2008' selected=false ++++++++++++++++++++++++++++staticText name='24' -++++++++++++++++++++++++++++++inlineTextBox name='24' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 25, 2008' selected=false ++++++++++++++++++++++++++++staticText name='25' -++++++++++++++++++++++++++++++inlineTextBox name='25' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 26, 2008' selected=false ++++++++++++++++++++++++++++staticText name='26' -++++++++++++++++++++++++++++++inlineTextBox name='26' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 27, 2008' selected=false ++++++++++++++++++++++++++++staticText name='27' -++++++++++++++++++++++++++++++inlineTextBox name='27' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 28, 2008 Monday, September 29, 2008 Tuesday, September 30, 2008 Wednesday, October 1, 2008 Thursday, October 2, 2008 Friday, October 3, 2008 Saturday, October 4, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 28, 2008' selected=false ++++++++++++++++++++++++++++staticText name='28' -++++++++++++++++++++++++++++++inlineTextBox name='28' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 29, 2008' selected=false ++++++++++++++++++++++++++++staticText name='29' -++++++++++++++++++++++++++++++inlineTextBox name='29' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 30, 2008' selected=false ++++++++++++++++++++++++++++staticText name='30' -++++++++++++++++++++++++++++++inlineTextBox name='30' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, October 1, 2008' selected=false ++++++++++++++++++++++++++++staticText name='1' -++++++++++++++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, October 2, 2008' selected=false ++++++++++++++++++++++++++++staticText name='2' -++++++++++++++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, October 3, 2008' selected=false ++++++++++++++++++++++++++++staticText name='3' -++++++++++++++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, October 4, 2008' selected=false ++++++++++++++++++++++++++++staticText name='4' -++++++++++++++++++++++++++++++inlineTextBox name='4' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, October 5, 2008 Monday, October 6, 2008 Tuesday, October 7, 2008 Wednesday, October 8, 2008 Thursday, October 9, 2008 Friday, October 10, 2008 Saturday, October 11, 2008' ++++++++++++++++++++++++++cell name='Sunday, October 5, 2008' selected=false ++++++++++++++++++++++++++++staticText name='5' -++++++++++++++++++++++++++++++inlineTextBox name='5' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, October 6, 2008' selected=false ++++++++++++++++++++++++++++staticText name='6' -++++++++++++++++++++++++++++++inlineTextBox name='6' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, October 7, 2008' selected=false ++++++++++++++++++++++++++++staticText name='7' -++++++++++++++++++++++++++++++inlineTextBox name='7' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, October 8, 2008' selected=false ++++++++++++++++++++++++++++staticText name='8' -++++++++++++++++++++++++++++++inlineTextBox name='8' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, October 9, 2008' selected=false ++++++++++++++++++++++++++++staticText name='9' -++++++++++++++++++++++++++++++inlineTextBox name='9' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, October 10, 2008' selected=false ++++++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, October 11, 2008' selected=false ++++++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++button name='Clear' ++++++++++++++++++++++staticText name='Clear' -++++++++++++++++++++++++inlineTextBox name='Clear' +++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++button name='Today' ++++++++++++++++++++++staticText name='Today' -++++++++++++++++++++++++inlineTextBox name='Today' +++++++++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-date-with-popup-open-multiple-for-win-expected-blink.txt b/content/test/data/accessibility/html/input-date-with-popup-open-multiple-for-win-expected-blink.txt index 075886a9..412656b 100644 --- a/content/test/data/accessibility/html/input-date-with-popup-open-multiple-for-win-expected-blink.txt +++ b/content/test/data/accessibility/html/input-date-with-popup-open-multiple-for-win-expected-blink.txt
@@ -7,17 +7,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++date inputType='date' value='2008-09-01' ++++++++genericContainer ignored @@ -25,17 +25,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++date inputType='date' name='Third date picker' value='2008-09-01' controlsIds=group ++++++++genericContainer ignored @@ -43,17 +43,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month Third date picker' placeholder='mm' value='09' valueForRange=9.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='09' -++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Day Third date picker' placeholder='dd' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=31.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='/' -++++++++++++++++inlineTextBox name='/' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year Third date picker' placeholder='yyyy' value='2008' valueForRange=2008.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='2008' -++++++++++++++++++inlineTextBox name='2008' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show date picker' name='Show date picker' descriptionFrom=title ++++++++group ++++++++++genericContainer ignored @@ -74,162 +74,162 @@ ++++++++++++++++++++genericContainer ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='Su' -++++++++++++++++++++++++++inlineTextBox name='Su' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='Mo' -++++++++++++++++++++++++++inlineTextBox name='Mo' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='Tu' -++++++++++++++++++++++++++inlineTextBox name='Tu' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='We' -++++++++++++++++++++++++++inlineTextBox name='We' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='Th' -++++++++++++++++++++++++++inlineTextBox name='Th' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='Fr' -++++++++++++++++++++++++++inlineTextBox name='Fr' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++staticText name='Sa' -++++++++++++++++++++++++++inlineTextBox name='Sa' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++genericContainer ignored ++++++++++++++++++++++genericContainer ++++++++++++++++++++++++row name='Sunday, August 31, 2008 Monday, September 1, 2008 Tuesday, September 2, 2008 Wednesday, September 3, 2008 Thursday, September 4, 2008 Friday, September 5, 2008 Saturday, September 6, 2008' ++++++++++++++++++++++++++cell name='Sunday, August 31, 2008' selected=false ++++++++++++++++++++++++++++staticText name='31' -++++++++++++++++++++++++++++++inlineTextBox name='31' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 1, 2008' selected=true ++++++++++++++++++++++++++++staticText name='1' -++++++++++++++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 2, 2008' selected=false ++++++++++++++++++++++++++++staticText name='2' -++++++++++++++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 3, 2008' selected=false ++++++++++++++++++++++++++++staticText name='3' -++++++++++++++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 4, 2008' selected=false ++++++++++++++++++++++++++++staticText name='4' -++++++++++++++++++++++++++++++inlineTextBox name='4' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 5, 2008' selected=false ++++++++++++++++++++++++++++staticText name='5' -++++++++++++++++++++++++++++++inlineTextBox name='5' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 6, 2008' selected=false ++++++++++++++++++++++++++++staticText name='6' -++++++++++++++++++++++++++++++inlineTextBox name='6' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 7, 2008 Monday, September 8, 2008 Tuesday, September 9, 2008 Wednesday, September 10, 2008 Thursday, September 11, 2008 Friday, September 12, 2008 Saturday, September 13, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 7, 2008' selected=false ++++++++++++++++++++++++++++staticText name='7' -++++++++++++++++++++++++++++++inlineTextBox name='7' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 8, 2008' selected=false ++++++++++++++++++++++++++++staticText name='8' -++++++++++++++++++++++++++++++inlineTextBox name='8' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 9, 2008' selected=false ++++++++++++++++++++++++++++staticText name='9' -++++++++++++++++++++++++++++++inlineTextBox name='9' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 10, 2008' selected=false ++++++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 11, 2008' selected=false ++++++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 12, 2008' selected=false ++++++++++++++++++++++++++++staticText name='12' -++++++++++++++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 13, 2008' selected=false ++++++++++++++++++++++++++++staticText name='13' -++++++++++++++++++++++++++++++inlineTextBox name='13' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 14, 2008 Monday, September 15, 2008 Tuesday, September 16, 2008 Wednesday, September 17, 2008 Thursday, September 18, 2008 Friday, September 19, 2008 Saturday, September 20, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 14, 2008' selected=false ++++++++++++++++++++++++++++staticText name='14' -++++++++++++++++++++++++++++++inlineTextBox name='14' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 15, 2008' selected=false ++++++++++++++++++++++++++++staticText name='15' -++++++++++++++++++++++++++++++inlineTextBox name='15' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 16, 2008' selected=false ++++++++++++++++++++++++++++staticText name='16' -++++++++++++++++++++++++++++++inlineTextBox name='16' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 17, 2008' selected=false ++++++++++++++++++++++++++++staticText name='17' -++++++++++++++++++++++++++++++inlineTextBox name='17' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 18, 2008' selected=false ++++++++++++++++++++++++++++staticText name='18' -++++++++++++++++++++++++++++++inlineTextBox name='18' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 19, 2008' selected=false ++++++++++++++++++++++++++++staticText name='19' -++++++++++++++++++++++++++++++inlineTextBox name='19' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 20, 2008' selected=false ++++++++++++++++++++++++++++staticText name='20' -++++++++++++++++++++++++++++++inlineTextBox name='20' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 21, 2008 Monday, September 22, 2008 Tuesday, September 23, 2008 Wednesday, September 24, 2008 Thursday, September 25, 2008 Friday, September 26, 2008 Saturday, September 27, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 21, 2008' selected=false ++++++++++++++++++++++++++++staticText name='21' -++++++++++++++++++++++++++++++inlineTextBox name='21' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 22, 2008' selected=false ++++++++++++++++++++++++++++staticText name='22' -++++++++++++++++++++++++++++++inlineTextBox name='22' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 23, 2008' selected=false ++++++++++++++++++++++++++++staticText name='23' -++++++++++++++++++++++++++++++inlineTextBox name='23' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, September 24, 2008' selected=false ++++++++++++++++++++++++++++staticText name='24' -++++++++++++++++++++++++++++++inlineTextBox name='24' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, September 25, 2008' selected=false ++++++++++++++++++++++++++++staticText name='25' -++++++++++++++++++++++++++++++inlineTextBox name='25' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, September 26, 2008' selected=false ++++++++++++++++++++++++++++staticText name='26' -++++++++++++++++++++++++++++++inlineTextBox name='26' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, September 27, 2008' selected=false ++++++++++++++++++++++++++++staticText name='27' -++++++++++++++++++++++++++++++inlineTextBox name='27' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, September 28, 2008 Monday, September 29, 2008 Tuesday, September 30, 2008 Wednesday, October 1, 2008 Thursday, October 2, 2008 Friday, October 3, 2008 Saturday, October 4, 2008' ++++++++++++++++++++++++++cell name='Sunday, September 28, 2008' selected=false ++++++++++++++++++++++++++++staticText name='28' -++++++++++++++++++++++++++++++inlineTextBox name='28' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, September 29, 2008' selected=false ++++++++++++++++++++++++++++staticText name='29' -++++++++++++++++++++++++++++++inlineTextBox name='29' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, September 30, 2008' selected=false ++++++++++++++++++++++++++++staticText name='30' -++++++++++++++++++++++++++++++inlineTextBox name='30' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, October 1, 2008' selected=false ++++++++++++++++++++++++++++staticText name='1' -++++++++++++++++++++++++++++++inlineTextBox name='1' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, October 2, 2008' selected=false ++++++++++++++++++++++++++++staticText name='2' -++++++++++++++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, October 3, 2008' selected=false ++++++++++++++++++++++++++++staticText name='3' -++++++++++++++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, October 4, 2008' selected=false ++++++++++++++++++++++++++++staticText name='4' -++++++++++++++++++++++++++++++inlineTextBox name='4' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++row name='Sunday, October 5, 2008 Monday, October 6, 2008 Tuesday, October 7, 2008 Wednesday, October 8, 2008 Thursday, October 9, 2008 Friday, October 10, 2008 Saturday, October 11, 2008' ++++++++++++++++++++++++++cell name='Sunday, October 5, 2008' selected=false ++++++++++++++++++++++++++++staticText name='5' -++++++++++++++++++++++++++++++inlineTextBox name='5' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Monday, October 6, 2008' selected=false ++++++++++++++++++++++++++++staticText name='6' -++++++++++++++++++++++++++++++inlineTextBox name='6' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Tuesday, October 7, 2008' selected=false ++++++++++++++++++++++++++++staticText name='7' -++++++++++++++++++++++++++++++inlineTextBox name='7' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Wednesday, October 8, 2008' selected=false ++++++++++++++++++++++++++++staticText name='8' -++++++++++++++++++++++++++++++inlineTextBox name='8' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Thursday, October 9, 2008' selected=false ++++++++++++++++++++++++++++staticText name='9' -++++++++++++++++++++++++++++++inlineTextBox name='9' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Friday, October 10, 2008' selected=false ++++++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++++++cell name='Saturday, October 11, 2008' selected=false ++++++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++button name='Clear' ++++++++++++++++++++++staticText name='Clear' -++++++++++++++++++++++++inlineTextBox name='Clear' +++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++button name='Today' ++++++++++++++++++++++staticText name='Today' -++++++++++++++++++++++++inlineTextBox name='Today' +++++++++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-datetime-expected-blink.txt b/content/test/data/accessibility/html/input-datetime-expected-blink.txt index c3fab14..792a02d 100644 --- a/content/test/data/accessibility/html/input-datetime-expected-blink.txt +++ b/content/test/data/accessibility/html/input-datetime-expected-blink.txt
@@ -4,8 +4,8 @@ ++++++textField inputType='datetime' value='1/1/2015 1:00AM' ++++++++genericContainer ++++++++++staticText name='1/1/2015 1:00AM' -++++++++++++inlineTextBox name='1/1/2015 1:00AM' +++++++++++++inlineTextBox ++++++textField inputType='datetime' name='Launch' value='1/1/2015 1:00AM' ++++++++genericContainer ++++++++++staticText name='1/1/2015 1:00AM' -++++++++++++inlineTextBox name='1/1/2015 1:00AM' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-datetime-expected-fuchsia.txt b/content/test/data/accessibility/html/input-datetime-expected-fuchsia.txt index e25bd66..2685a32 100644 --- a/content/test/data/accessibility/html/input-datetime-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-datetime-expected-fuchsia.txt
@@ -4,8 +4,8 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='1/1/2015 1:00AM' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='1/1/2015 1:00AM' -++++++++++++UNKNOWN label='1/1/2015 1:00AM' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable label='Launch' actions='{DEFAULT, SET_VALUE}' value='1/1/2015 1:00AM' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='1/1/2015 1:00AM' -++++++++++++UNKNOWN label='1/1/2015 1:00AM' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-datetime-local-expected-fuchsia.txt b/content/test/data/accessibility/html/input-datetime-local-expected-fuchsia.txt index 0716846e..55ee5b47 100644 --- a/content/test/data/accessibility/html/input-datetime-local-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-datetime-local-expected-fuchsia.txt
@@ -7,30 +7,30 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Month' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='mm' -++++++++++++++++++UNKNOWN label='mm' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='/' -++++++++++++++++UNKNOWN label='/' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Day' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='dd' -++++++++++++++++++UNKNOWN label='dd' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='/' -++++++++++++++++UNKNOWN label='/' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Year' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='yyyy' -++++++++++++++++++UNKNOWN label='yyyy' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=', ' -++++++++++++++++UNKNOWN label=', ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Hours' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='--' -++++++++++++++++++UNKNOWN label='--' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=':' -++++++++++++++++UNKNOWN label=':' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Minutes' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='--' -++++++++++++++++++UNKNOWN label='--' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=' ' -++++++++++++++++UNKNOWN label=' ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='AM/PM' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='--' -++++++++++++++++++UNKNOWN label='--' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show local date and time picker' actions='{DEFAULT}' secondary_label='Show local date and time picker'
diff --git a/content/test/data/accessibility/html/input-email-expected-blink.txt b/content/test/data/accessibility/html/input-email-expected-blink.txt index 0a4eaab2..015beb0 100644 --- a/content/test/data/accessibility/html/input-email-expected-blink.txt +++ b/content/test/data/accessibility/html/input-email-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++textField inputType='email' value='someone@example.com' textSelStart=0 textSelEnd=0 ++++++++genericContainer ++++++++++staticText name='someone@example.com' -++++++++++++inlineTextBox name='someone@example.com' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-email-expected-fuchsia.txt b/content/test/data/accessibility/html/input-email-expected-fuchsia.txt index 5f9ff35f..99ff436 100644 --- a/content/test/data/accessibility/html/input-email-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-email-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='someone@example.com' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='someone@example.com' -++++++++++++UNKNOWN label='someone@example.com' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-image-with-title-expected-blink.txt b/content/test/data/accessibility/html/input-image-with-title-expected-blink.txt index 4862440..1fa5fae 100644 --- a/content/test/data/accessibility/html/input-image-with-title-expected-blink.txt +++ b/content/test/data/accessibility/html/input-image-with-title-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++button inputType='image' name='email' ++++++++image ++++++++staticText name='email' -++++++++++inlineTextBox name='email' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-inside-label-expected-blink.txt b/content/test/data/accessibility/html/input-inside-label-expected-blink.txt index 91c6579..79fbe154 100644 --- a/content/test/data/accessibility/html/input-inside-label-expected-blink.txt +++ b/content/test/data/accessibility/html/input-inside-label-expected-blink.txt
@@ -4,20 +4,20 @@ ++++++checkBox inputType='checkbox' name='foo bar baz' checkedState=false ++++++labelText ++++++++staticText name='foo' -++++++++++inlineTextBox name='foo' +++++++++++inlineTextBox ++++++++textField inputType='text' value='bar' ++++++++++genericContainer ++++++++++++staticText name='bar' -++++++++++++++inlineTextBox name='bar' +++++++++++++++inlineTextBox ++++++++staticText name='baz' -++++++++++inlineTextBox name='baz' +++++++++++inlineTextBox ++++++checkBox inputType='checkbox' name='foo bar baz' checkedState=false ++++++labelText ++++++++staticText name='foo ' -++++++++++inlineTextBox name='foo ' +++++++++++inlineTextBox ++++++++textField inputType='text' value='bar' ++++++++++genericContainer ++++++++++++staticText name='bar' -++++++++++++++inlineTextBox name='bar' +++++++++++++++inlineTextBox ++++++++staticText name=' baz' -++++++++++inlineTextBox name=' baz' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-list-expected-blink.txt b/content/test/data/accessibility/html/input-list-expected-blink.txt index f60e25f..dba2412 100644 --- a/content/test/data/accessibility/html/input-list-expected-blink.txt +++ b/content/test/data/accessibility/html/input-list-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ++++++labelText ++++++++staticText name='Choose a pokemon ' -++++++++++inlineTextBox name='Choose a pokemon ' +++++++++++inlineTextBox ++++++++textFieldWithComboBox editable focusable autoComplete='list' inputType='text' name='Choose a pokemon' haspopup=listbox ++++++++++genericContainer ignored ++++++++++++genericContainer ignored
diff --git a/content/test/data/accessibility/html/input-list-expected-fuchsia.txt b/content/test/data/accessibility/html/input-list-expected-fuchsia.txt index 505a698..14ea826 100644 --- a/content/test/data/accessibility/html/input-list-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-list-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Choose a pokemon ' -++++++++++UNKNOWN label='Choose a pokemon ' +++++++++++UNKNOWN ++++++++TEXT_FIELD_WITH_COMBO_BOX focusable label='Choose a pokemon' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN hidden
diff --git a/content/test/data/accessibility/html/input-month-expected-blink.txt b/content/test/data/accessibility/html/input-month-expected-blink.txt index 51403ae..9cab8cc 100644 --- a/content/test/data/accessibility/html/input-month-expected-blink.txt +++ b/content/test/data/accessibility/html/input-month-expected-blink.txt
@@ -7,10 +7,10 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Month' placeholder='---------' valueForRange=0.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='---------' -++++++++++++++++++inlineTextBox name='---------' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=' ' -++++++++++++++++inlineTextBox name=' ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='----' valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='----' -++++++++++++++++++inlineTextBox name='----' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show month picker' name='Show month picker' descriptionFrom=title haspopup=menu
diff --git a/content/test/data/accessibility/html/input-month-expected-fuchsia.txt b/content/test/data/accessibility/html/input-month-expected-fuchsia.txt index cae5538..b35fdc4 100644 --- a/content/test/data/accessibility/html/input-month-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-month-expected-fuchsia.txt
@@ -7,10 +7,10 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Month' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='---------' -++++++++++++++++++UNKNOWN label='---------' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=' ' -++++++++++++++++UNKNOWN label=' ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Year' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='----' -++++++++++++++++++UNKNOWN label='----' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show month picker' actions='{DEFAULT}' secondary_label='Show month picker'
diff --git a/content/test/data/accessibility/html/input-number-expected-blink.txt b/content/test/data/accessibility/html/input-number-expected-blink.txt index 5e80b1ca..81e20b0 100644 --- a/content/test/data/accessibility/html/input-number-expected-blink.txt +++ b/content/test/data/accessibility/html/input-number-expected-blink.txt
@@ -4,8 +4,8 @@ ++++++spinButton inputType='number' value='1' valueForRange=1.00 ++++++++genericContainer ++++++++++staticText name='1' -++++++++++++inlineTextBox name='1' +++++++++++++inlineTextBox ++++++spinButton inputType='number' value='6' valueForRange=6.00 minValueForRange=5.00 maxValueForRange=10.00 ++++++++genericContainer ++++++++++staticText name='6' -++++++++++++inlineTextBox name='6' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-number-expected-fuchsia.txt b/content/test/data/accessibility/html/input-number-expected-fuchsia.txt index b9eb3842e..0fc88ef 100644 --- a/content/test/data/accessibility/html/input-number-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-number-expected-fuchsia.txt
@@ -4,8 +4,8 @@ ++++++UNKNOWN focusable actions='{DEFAULT, SET_VALUE}' value='1' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='1' -++++++++++++UNKNOWN label='1' +++++++++++++UNKNOWN ++++++UNKNOWN focusable actions='{DEFAULT, SET_VALUE}' value='6' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='6' -++++++++++++UNKNOWN label='6' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-password-expected-blink.txt b/content/test/data/accessibility/html/input-password-expected-blink.txt index 250e7d4..dc0bdd32 100644 --- a/content/test/data/accessibility/html/input-password-expected-blink.txt +++ b/content/test/data/accessibility/html/input-password-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++textField protected inputType='password' value='%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2' textSelStart=6 textSelEnd=6 ++++++++genericContainer ++++++++++staticText name='%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2' -++++++++++++inlineTextBox name='%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-password-expected-fuchsia.txt b/content/test/data/accessibility/html/input-password-expected-fuchsia.txt index 026369bc..b45a81ba 100644 --- a/content/test/data/accessibility/html/input-password-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-password-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++TEXT_FIELD focusable has_input_focus actions='{DEFAULT, SET_VALUE}' value='%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2' -++++++++++++UNKNOWN label='%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2%E2%80%A2' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-password-obscured-expected-blink.txt b/content/test/data/accessibility/html/input-password-obscured-expected-blink.txt index e8a397c..868d677 100644 --- a/content/test/data/accessibility/html/input-password-obscured-expected-blink.txt +++ b/content/test/data/accessibility/html/input-password-obscured-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++textField protected value='%E2%80%A2%E2%80%A2%E2%80%A2' ++++++++genericContainer ++++++++++staticText name='%E2%80%A2%E2%80%A2%E2%80%A2' -++++++++++++inlineTextBox name='%E2%80%A2%E2%80%A2%E2%80%A2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-radio-checkbox-label-expected-blink.txt b/content/test/data/accessibility/html/input-radio-checkbox-label-expected-blink.txt index 8ee8042..d725833 100644 --- a/content/test/data/accessibility/html/input-radio-checkbox-label-expected-blink.txt +++ b/content/test/data/accessibility/html/input-radio-checkbox-label-expected-blink.txt
@@ -9,7 +9,7 @@ ++++++++checkBox name='label ignored for checkbox' checkedState=false ++++++labelText name='label exposed for radio button ' ++++++++staticText name='label exposed for radio button ' -++++++++++inlineTextBox name='label exposed for radio button ' +++++++++++inlineTextBox ++++++++radioButton name='label exposed for radio button' checkedState=false ++++++labelText name='label exposed for checkbox ' ++++++++staticText name='label exposed for checkbox '
diff --git a/content/test/data/accessibility/html/input-radio-chunked-expected-blink.txt b/content/test/data/accessibility/html/input-radio-chunked-expected-blink.txt index 24751456..b327906 100644 --- a/content/test/data/accessibility/html/input-radio-chunked-expected-blink.txt +++ b/content/test/data/accessibility/html/input-radio-chunked-expected-blink.txt
@@ -4,14 +4,14 @@ ++++++genericContainer ignored ++++++++radioButton setSize=4 posInSet=1 checkedState=false ++++++++staticText name='Airedale' -++++++++++inlineTextBox name='Airedale' +++++++++++inlineTextBox ++++++++genericContainer ++++++++++radioButton setSize=4 posInSet=2 checkedState=false ++++++++++staticText name='Beagle' -++++++++++++inlineTextBox name='Beagle' +++++++++++++inlineTextBox ++++++++radioButton setSize=4 posInSet=3 checkedState=false ++++++++staticText name='Chihuahua ' -++++++++++inlineTextBox name='Chihuahua ' +++++++++++inlineTextBox ++++++++radioButton setSize=4 posInSet=4 checkedState=false ++++++++staticText name='Dachshund' -++++++++++inlineTextBox name='Dachshund' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-radio-expected-blink.txt b/content/test/data/accessibility/html/input-radio-expected-blink.txt index 78a0eb8..1e0945a6 100644 --- a/content/test/data/accessibility/html/input-radio-expected-blink.txt +++ b/content/test/data/accessibility/html/input-radio-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++section ++++++++radioButton inputType='radio' setSize=2 posInSet=1 checkedState=false radioGroupIds=radioButton ++++++++staticText name='Radio1' -++++++++++inlineTextBox name='Radio1' +++++++++++inlineTextBox ++++++++lineBreak name='<newline>' -++++++++++inlineTextBox name='<newline>' +++++++++++inlineTextBox ++++++++radioButton inputType='radio' setSize=2 posInSet=2 checkedState=false radioGroupIds=radioButton ++++++++staticText name='Radio2' -++++++++++inlineTextBox name='Radio2' +++++++++++inlineTextBox ++++++section ++++++++labelText ignored ++++++++++radioButton inputType='radio' name='Radio3' setSize=2 posInSet=1 checkedState=false radioGroupIds=radioButton,radioButton
diff --git a/content/test/data/accessibility/html/input-radio-expected-fuchsia.txt b/content/test/data/accessibility/html/input-radio-expected-fuchsia.txt index d79a2c21..5db3945 100644 --- a/content/test/data/accessibility/html/input-radio-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-radio-expected-fuchsia.txt
@@ -4,12 +4,12 @@ ++++++UNKNOWN ++++++++RADIO_BUTTON focusable actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++STATIC_TEXT label='Radio1' -++++++++++UNKNOWN label='Radio1' +++++++++++UNKNOWN ++++++++UNKNOWN label='<newline>' -++++++++++UNKNOWN label='<newline>' +++++++++++UNKNOWN ++++++++RADIO_BUTTON focusable actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++STATIC_TEXT label='Radio2' -++++++++++UNKNOWN label='Radio2' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++RADIO_BUTTON focusable label='Radio3' actions='{DEFAULT}' checked_state='UNCHECKED'
diff --git a/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt b/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt index 434d658..9b6503df 100644 --- a/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt +++ b/content/test/data/accessibility/html/input-radio-in-menu-expected-blink.txt
@@ -4,10 +4,10 @@ ++++++menu setSize=0 ++++++++radioButton inputType='radio' setSize=3 posInSet=1 checkedState=true ++++++++staticText name='Radio0 ' -++++++++++inlineTextBox name='Radio0 ' +++++++++++inlineTextBox ++++++++radioButton inputType='radio' setSize=3 posInSet=2 checkedState=false ++++++++staticText name='Radio1 ' -++++++++++inlineTextBox name='Radio1 ' +++++++++++inlineTextBox ++++++++labelText ignored ++++++++++radioButton inputType='radio' name='Radio2' setSize=3 posInSet=3 checkedState=false ++++++++++staticText ignored name='Radio2'
diff --git a/content/test/data/accessibility/html/input-radio-in-menu-expected-fuchsia.txt b/content/test/data/accessibility/html/input-radio-in-menu-expected-fuchsia.txt index d4bca3a..e80283c 100644 --- a/content/test/data/accessibility/html/input-radio-in-menu-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-radio-in-menu-expected-fuchsia.txt
@@ -4,10 +4,10 @@ ++++++UNKNOWN ++++++++RADIO_BUTTON focusable actions='{DEFAULT}' checked_state='CHECKED' ++++++++STATIC_TEXT label='Radio0 ' -++++++++++UNKNOWN label='Radio0 ' +++++++++++UNKNOWN ++++++++RADIO_BUTTON focusable actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++STATIC_TEXT label='Radio1 ' -++++++++++UNKNOWN label='Radio1 ' +++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++RADIO_BUTTON focusable label='Radio2' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++++STATIC_TEXT hidden label='Radio2'
diff --git a/content/test/data/accessibility/html/input-radio-unhidden-expected-blink.txt b/content/test/data/accessibility/html/input-radio-unhidden-expected-blink.txt index f02c117..dd19c50 100644 --- a/content/test/data/accessibility/html/input-radio-unhidden-expected-blink.txt +++ b/content/test/data/accessibility/html/input-radio-unhidden-expected-blink.txt
@@ -5,24 +5,24 @@ ++++++++group name='These radio buttons will randomly not have a label on Chromium web browsers.' ++++++++++legend ++++++++++++staticText name='These radio buttons will randomly not have a label on Chromium web browsers.' -++++++++++++++inlineTextBox name='These radio buttons will randomly not have a label on Chromium web browsers.' +++++++++++++++inlineTextBox ++++++++++radioButton name='Apple' checkedState=false ++++++++++labelText ++++++++++++staticText name='Apple' -++++++++++++++inlineTextBox name='Apple' +++++++++++++++inlineTextBox ++++++++++radioButton name='Banana' checkedState=false ++++++++++labelText ++++++++++++staticText name='Banana' -++++++++++++++inlineTextBox name='Banana' +++++++++++++++inlineTextBox ++++++++++radioButton name='Cherry' checkedState=false ++++++++++labelText ++++++++++++staticText name='Cherry' -++++++++++++++inlineTextBox name='Cherry' +++++++++++++++inlineTextBox ++++++++++radioButton name='Durian' checkedState=false ++++++++++labelText ++++++++++++staticText name='Durian' -++++++++++++++inlineTextBox name='Durian' +++++++++++++++inlineTextBox ++++++++++radioButton name='Eggplant' checkedState=false ++++++++++labelText ++++++++++++staticText name='Eggplant' -++++++++++++++inlineTextBox name='Eggplant' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-radio-wrapped-label-expected-blink.txt b/content/test/data/accessibility/html/input-radio-wrapped-label-expected-blink.txt index 7801ba10..3e75b1e 100644 --- a/content/test/data/accessibility/html/input-radio-wrapped-label-expected-blink.txt +++ b/content/test/data/accessibility/html/input-radio-wrapped-label-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++group name='Appearance' setSize=0 ++++++++legend ++++++++++staticText name='Appearance' -++++++++++++inlineTextBox name='Appearance' +++++++++++++inlineTextBox ++++++++labelText ++++++++++radioButton inputType='radio' name='System' setSize=2 posInSet=1 checkedState=false radioGroupIds=radioButton,radioButton ++++++++++staticText name='System' -++++++++++++inlineTextBox name='System' +++++++++++++inlineTextBox ++++++++labelText ++++++++++radioButton inputType='radio' name='Dark' setSize=2 posInSet=2 checkedState=false radioGroupIds=radioButton,radioButton ++++++++++staticText name='Dark' -++++++++++++inlineTextBox name='Dark' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-radio-wrapped-label-expected-fuchsia.txt b/content/test/data/accessibility/html/input-radio-wrapped-label-expected-fuchsia.txt index a18311c..9f3d75de 100644 --- a/content/test/data/accessibility/html/input-radio-wrapped-label-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-radio-wrapped-label-expected-fuchsia.txt
@@ -4,12 +4,12 @@ ++++++UNKNOWN label='Appearance' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Appearance' -++++++++++++UNKNOWN label='Appearance' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++RADIO_BUTTON focusable label='System' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++++STATIC_TEXT label='System' -++++++++++++UNKNOWN label='System' +++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++RADIO_BUTTON focusable label='Dark' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++++++STATIC_TEXT label='Dark' -++++++++++++UNKNOWN label='Dark' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-reset-expected-blink.txt b/content/test/data/accessibility/html/input-reset-expected-blink.txt index 3056469f..1b7ab157 100644 --- a/content/test/data/accessibility/html/input-reset-expected-blink.txt +++ b/content/test/data/accessibility/html/input-reset-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++genericContainer ++++++button inputType='reset' name='Reset' ++++++++staticText name='Reset' -++++++++++inlineTextBox name='Reset' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-reset-expected-fuchsia.txt b/content/test/data/accessibility/html/input-reset-expected-fuchsia.txt index a7fac5a..a1d6527d9 100644 --- a/content/test/data/accessibility/html/input-reset-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-reset-expected-fuchsia.txt
@@ -5,4 +5,4 @@ ++++++++UNKNOWN ++++++BUTTON focusable label='Reset' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Reset' -++++++++++UNKNOWN label='Reset' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-search-expected-blink.txt b/content/test/data/accessibility/html/input-search-expected-blink.txt index 6756c6e..0c38ba0 100644 --- a/content/test/data/accessibility/html/input-search-expected-blink.txt +++ b/content/test/data/accessibility/html/input-search-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++searchBox value='Search terms' ++++++++genericContainer ++++++++++staticText name='Search terms' -++++++++++++inlineTextBox name='Search terms' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-search-expected-fuchsia.txt b/content/test/data/accessibility/html/input-search-expected-fuchsia.txt index 64e9477..e342b1c 100644 --- a/content/test/data/accessibility/html/input-search-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-search-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++SEARCH_BOX focusable actions='{DEFAULT, SET_VALUE}' value='Search terms' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Search terms' -++++++++++++UNKNOWN label='Search terms' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-submit-expected-blink.txt b/content/test/data/accessibility/html/input-submit-expected-blink.txt index 9663d0d..cbe1c73 100644 --- a/content/test/data/accessibility/html/input-submit-expected-blink.txt +++ b/content/test/data/accessibility/html/input-submit-expected-blink.txt
@@ -6,22 +6,22 @@ ++++++++++genericContainer ++++++++button default inputType='submit' name='First submit in a form is a valid default button' ++++++++++staticText name='First submit in a form is a valid default button' -++++++++++++inlineTextBox name='First submit in a form is a valid default button' +++++++++++++inlineTextBox ++++++++button inputType='submit' name='Second submit in a form not a valid default button' ++++++++++staticText name='Second submit in a form not a valid default button' -++++++++++++inlineTextBox name='Second submit in a form not a valid default button' +++++++++++++inlineTextBox ++++++section ++++++++textField inputType='text' ++++++++++genericContainer ++++++++button default inputType='image' name='First image button in a form is a valid default button' ++++++++++image ++++++++++staticText name='First image button in a form is a valid default button' -++++++++++++inlineTextBox name='First image button in a form is a valid default button' +++++++++++++inlineTextBox ++++++++staticText name=' ' ++++++++button inputType='image' name='Second image button in a form not a valid default button' ++++++++++image ++++++++++staticText name='Second image button in a form not a valid default button' -++++++++++++inlineTextBox name='Second image button in a form not a valid default button' +++++++++++++inlineTextBox ++++++button inputType='submit' name='Submit outside of form not a valid default button' ++++++++staticText name='Submit outside of form not a valid default button' -++++++++++inlineTextBox name='Submit outside of form not a valid default button' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-submit-expected-fuchsia.txt b/content/test/data/accessibility/html/input-submit-expected-fuchsia.txt index 87f284c6..87e73ca 100644 --- a/content/test/data/accessibility/html/input-submit-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-submit-expected-fuchsia.txt
@@ -6,22 +6,22 @@ ++++++++++UNKNOWN ++++++++BUTTON focusable label='First submit in a form is a valid default button' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='First submit in a form is a valid default button' -++++++++++++UNKNOWN label='First submit in a form is a valid default button' +++++++++++++UNKNOWN ++++++++BUTTON focusable label='Second submit in a form not a valid default button' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Second submit in a form not a valid default button' -++++++++++++UNKNOWN label='Second submit in a form not a valid default button' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++++BUTTON focusable label='First image button in a form is a valid default button' actions='{DEFAULT}' ++++++++++IMAGE ++++++++++STATIC_TEXT label='First image button in a form is a valid default button' -++++++++++++UNKNOWN label='First image button in a form is a valid default button' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' ++++++++BUTTON focusable label='Second image button in a form not a valid default button' actions='{DEFAULT}' ++++++++++IMAGE ++++++++++STATIC_TEXT label='Second image button in a form not a valid default button' -++++++++++++UNKNOWN label='Second image button in a form not a valid default button' +++++++++++++UNKNOWN ++++++BUTTON focusable label='Submit outside of form not a valid default button' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Submit outside of form not a valid default button' -++++++++++UNKNOWN label='Submit outside of form not a valid default button' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-tel-expected-blink.txt b/content/test/data/accessibility/html/input-tel-expected-blink.txt index dacdf5c..72aa5c02 100644 --- a/content/test/data/accessibility/html/input-tel-expected-blink.txt +++ b/content/test/data/accessibility/html/input-tel-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++textField inputType='tel' value='123-456-7890' ++++++++genericContainer ++++++++++staticText name='123-456-7890' -++++++++++++inlineTextBox name='123-456-7890' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-tel-expected-fuchsia.txt b/content/test/data/accessibility/html/input-tel-expected-fuchsia.txt index 5280dca..dc759abf 100644 --- a/content/test/data/accessibility/html/input-tel-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-tel-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='123-456-7890' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='123-456-7890' -++++++++++++UNKNOWN label='123-456-7890' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt b/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt index 0c66cc8c..7e20c9dc0 100644 --- a/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt +++ b/content/test/data/accessibility/html/input-text-value-changed-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++textField inputType='text' value='aaYYYYbb' ++++++++genericContainer ++++++++++staticText name='aaYYYYbb' -++++++++++++inlineTextBox name='aaYYYYbb' +++++++++++++inlineTextBox ++++++textField inputType='text' value='aa' ++++++++genericContainer ++++++++++staticText name='aa' -++++++++++++inlineTextBox name='aa' +++++++++++++inlineTextBox ++++++textField inputType='text' value='After' ++++++++genericContainer ++++++++++staticText name='After' -++++++++++++inlineTextBox name='After' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-text-value-changed-expected-fuchsia.txt b/content/test/data/accessibility/html/input-text-value-changed-expected-fuchsia.txt index 8b88e887..a3217fd 100644 --- a/content/test/data/accessibility/html/input-text-value-changed-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-text-value-changed-expected-fuchsia.txt
@@ -4,12 +4,12 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='aaYYYYbb' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='aaYYYYbb' -++++++++++++UNKNOWN label='aaYYYYbb' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='aa' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='aa' -++++++++++++UNKNOWN label='aa' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='After' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='After' -++++++++++++UNKNOWN label='After' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-text-value-expected-blink.txt b/content/test/data/accessibility/html/input-text-value-expected-blink.txt index d5e2b176..cfcb1b78 100644 --- a/content/test/data/accessibility/html/input-text-value-expected-blink.txt +++ b/content/test/data/accessibility/html/input-text-value-expected-blink.txt
@@ -3,39 +3,39 @@ ++++genericContainer ++++++labelText ++++++++staticText name='l1' -++++++++++inlineTextBox name='l1' +++++++++++inlineTextBox ++++++textField focusable inputType='text' name='l1' ++++++++genericContainer ++++++labelText ++++++++staticText name='l2' -++++++++++inlineTextBox name='l2' +++++++++++inlineTextBox ++++++textField focusable inputType='text' name='l2' value='value' ++++++++genericContainer ++++++++++staticText name='value' -++++++++++++inlineTextBox name='value' +++++++++++++inlineTextBox ++++++textField focusable inputType='text' name='l2' ++++++++genericContainer ++++++textField focusable inputType='text' name='l2' value='value *' ++++++++genericContainer ++++++++++staticText name='value *' -++++++++++++inlineTextBox name='value *' +++++++++++++inlineTextBox ++++++labelText ++++++++staticText name='Email' -++++++++++inlineTextBox name='Email' +++++++++++inlineTextBox ++++++genericContainer ++++++textField focusable inputType='text' name='Email' ++++++++genericContainer ++++++textField focusable inputType='text' name='Email' value='value' ++++++++genericContainer ++++++++++staticText name='value' -++++++++++++inlineTextBox name='value' +++++++++++++inlineTextBox ++++++textField focusable multiline name='l5' ++++++++genericContainer ++++++textField focusable multiline name='l6' value='Value' ++++++++genericContainer ++++++++++staticText name='Value' -++++++++++++inlineTextBox name='Value' +++++++++++++inlineTextBox ++++++textField focusable description='Description' inputType='text' name='Name' value='value' descriptionFrom=title ++++++++genericContainer ++++++++++staticText name='value' -++++++++++++inlineTextBox name='value' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-text-value-expected-fuchsia.txt b/content/test/data/accessibility/html/input-text-value-expected-fuchsia.txt index 7d152aa..5389d3f 100644 --- a/content/test/data/accessibility/html/input-text-value-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-text-value-expected-fuchsia.txt
@@ -3,39 +3,39 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='l1' -++++++++++UNKNOWN label='l1' +++++++++++UNKNOWN ++++++TEXT_FIELD focusable label='l1' actions='{DEFAULT, SET_VALUE}' ++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='l2' -++++++++++UNKNOWN label='l2' +++++++++++UNKNOWN ++++++TEXT_FIELD focusable label='l2' actions='{DEFAULT, SET_VALUE}' value='value' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='value' -++++++++++++UNKNOWN label='value' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable label='l2' actions='{DEFAULT, SET_VALUE}' ++++++++UNKNOWN ++++++TEXT_FIELD focusable label='l2' actions='{DEFAULT, SET_VALUE}' value='value *' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='value *' -++++++++++++UNKNOWN label='value *' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Email' -++++++++++UNKNOWN label='Email' +++++++++++UNKNOWN ++++++UNKNOWN ++++++TEXT_FIELD focusable label='Email' actions='{DEFAULT, SET_VALUE}' ++++++++UNKNOWN ++++++TEXT_FIELD focusable label='Email' actions='{DEFAULT, SET_VALUE}' value='value' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='value' -++++++++++++UNKNOWN label='value' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable label='l5' actions='{DEFAULT, SET_VALUE}' ++++++++UNKNOWN ++++++TEXT_FIELD focusable label='l6' actions='{DEFAULT, SET_VALUE}' value='Value' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Value' -++++++++++++UNKNOWN label='Value' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable label='Name' actions='{DEFAULT, SET_VALUE}' secondary_label='Description' value='value' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='value' -++++++++++++UNKNOWN label='value' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-text-with-selection-expected-fuchsia.txt b/content/test/data/accessibility/html/input-text-with-selection-expected-fuchsia.txt index bf65addf..c4ff304 100644 --- a/content/test/data/accessibility/html/input-text-with-selection-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-text-with-selection-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++TEXT_FIELD focusable has_input_focus actions='{DEFAULT, SET_VALUE}' value='Selection' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Selection' -++++++++++++UNKNOWN label='Selection' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-time-expected-blink.txt b/content/test/data/accessibility/html/input-time-expected-blink.txt index 8ecd2fc..7e9370e2 100644 --- a/content/test/data/accessibility/html/input-time-expected-blink.txt +++ b/content/test/data/accessibility/html/input-time-expected-blink.txt
@@ -7,17 +7,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Hours' placeholder='--' value='12' valueForRange=12.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='12' -++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Minutes' placeholder='--' value='00' valueForRange=0.00 minValueForRange=0.00 maxValueForRange=59.00 ++++++++++++++++staticText name='00' -++++++++++++++++++inlineTextBox name='00' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=' ' -++++++++++++++++inlineTextBox name=' ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='AM/PM' placeholder='--' value='AM' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=2.00 ++++++++++++++++staticText name='AM' -++++++++++++++++++inlineTextBox name='AM' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show time picker' name='Show time picker' descriptionFrom=title ++++++inputTime inputType='time' name='Breakfast' value='00:00:00' ++++++++genericContainer ignored @@ -25,15 +25,15 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Hours Breakfast' placeholder='--' value='12' valueForRange=12.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='12' -++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Minutes Breakfast' placeholder='--' value='00' valueForRange=0.00 minValueForRange=0.00 maxValueForRange=59.00 ++++++++++++++++staticText name='00' -++++++++++++++++++inlineTextBox name='00' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=' ' -++++++++++++++++inlineTextBox name=' ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='AM/PM Breakfast' placeholder='--' value='AM' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=2.00 ++++++++++++++++staticText name='AM' -++++++++++++++++++inlineTextBox name='AM' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show time picker' name='Show time picker' descriptionFrom=title
diff --git a/content/test/data/accessibility/html/input-time-expected-fuchsia.txt b/content/test/data/accessibility/html/input-time-expected-fuchsia.txt index 883c640..71c6325 100644 --- a/content/test/data/accessibility/html/input-time-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-time-expected-fuchsia.txt
@@ -7,17 +7,17 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Hours' actions='{SET_VALUE}' value='12' ++++++++++++++++STATIC_TEXT label='12' -++++++++++++++++++UNKNOWN label='12' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=':' -++++++++++++++++UNKNOWN label=':' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Minutes' actions='{SET_VALUE}' value='00' ++++++++++++++++STATIC_TEXT label='00' -++++++++++++++++++UNKNOWN label='00' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=' ' -++++++++++++++++UNKNOWN label=' ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='AM/PM' actions='{SET_VALUE}' value='AM' ++++++++++++++++STATIC_TEXT label='AM' -++++++++++++++++++UNKNOWN label='AM' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show time picker' actions='{DEFAULT}' secondary_label='Show time picker' ++++++UNKNOWN focusable label='Breakfast' actions='{DEFAULT, SET_VALUE}' value='00:00:00' ++++++++UNKNOWN hidden @@ -25,15 +25,15 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Hours Breakfast' actions='{SET_VALUE}' value='12' ++++++++++++++++STATIC_TEXT label='12' -++++++++++++++++++UNKNOWN label='12' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=':' -++++++++++++++++UNKNOWN label=':' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Minutes Breakfast' actions='{SET_VALUE}' value='00' ++++++++++++++++STATIC_TEXT label='00' -++++++++++++++++++UNKNOWN label='00' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=' ' -++++++++++++++++UNKNOWN label=' ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='AM/PM Breakfast' actions='{SET_VALUE}' value='AM' ++++++++++++++++STATIC_TEXT label='AM' -++++++++++++++++++UNKNOWN label='AM' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show time picker' actions='{DEFAULT}' secondary_label='Show time picker'
diff --git a/content/test/data/accessibility/html/input-time-with-popup-open-expected-blink.txt b/content/test/data/accessibility/html/input-time-with-popup-open-expected-blink.txt index c5184681..2b844b24 100644 --- a/content/test/data/accessibility/html/input-time-with-popup-open-expected-blink.txt +++ b/content/test/data/accessibility/html/input-time-with-popup-open-expected-blink.txt
@@ -7,27 +7,27 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Hours' placeholder='--' value='01' valueForRange=1.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='01' -++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Minutes' placeholder='--' value='50' valueForRange=50.00 minValueForRange=0.00 maxValueForRange=59.00 ++++++++++++++++staticText name='50' -++++++++++++++++++inlineTextBox name='50' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Seconds' placeholder='--' value='02' restriction=disabled valueForRange=2.00 minValueForRange=0.00 maxValueForRange=59.00 ++++++++++++++++staticText name='02' -++++++++++++++++++inlineTextBox name='02' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name='.' -++++++++++++++++inlineTextBox name='.' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Milliseconds' placeholder='---' value='922' restriction=disabled valueForRange=922.00 minValueForRange=0.00 maxValueForRange=999.00 ++++++++++++++++staticText name='922' -++++++++++++++++++inlineTextBox name='922' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=' ' -++++++++++++++++inlineTextBox name=' ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='AM/PM' placeholder='--' value='PM' valueForRange=2.00 minValueForRange=1.00 maxValueForRange=2.00 ++++++++++++++++staticText name='PM' -++++++++++++++++++inlineTextBox name='PM' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show time picker' name='Show time picker' descriptionFrom=title ++++++++group ++++++++++genericContainer ignored @@ -38,437 +38,437 @@ ++++++++++++++++++++listBox name='Hours' activedescendantId=listBoxOption ++++++++++++++++++++++listBoxOption name='01' selected=true ++++++++++++++++++++++++staticText name='01' -++++++++++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='02' selected=false ++++++++++++++++++++++++staticText name='02' -++++++++++++++++++++++++++inlineTextBox name='02' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='03' selected=false ++++++++++++++++++++++++staticText name='03' -++++++++++++++++++++++++++inlineTextBox name='03' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='04' selected=false ++++++++++++++++++++++++staticText name='04' -++++++++++++++++++++++++++inlineTextBox name='04' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='05' selected=false ++++++++++++++++++++++++staticText name='05' -++++++++++++++++++++++++++inlineTextBox name='05' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='06' selected=false ++++++++++++++++++++++++staticText name='06' -++++++++++++++++++++++++++inlineTextBox name='06' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='07' selected=false ++++++++++++++++++++++++staticText name='07' -++++++++++++++++++++++++++inlineTextBox name='07' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='08' selected=false ++++++++++++++++++++++++staticText name='08' -++++++++++++++++++++++++++inlineTextBox name='08' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='09' selected=false ++++++++++++++++++++++++staticText name='09' -++++++++++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='10' selected=false ++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='11' selected=false ++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='12' selected=false ++++++++++++++++++++++++staticText name='12' -++++++++++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++listBox name='Minutes' activedescendantId=listBoxOption ++++++++++++++++++++++listBoxOption name='01' selected=false ++++++++++++++++++++++++staticText name='01' -++++++++++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='02' selected=false ++++++++++++++++++++++++staticText name='02' -++++++++++++++++++++++++++inlineTextBox name='02' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='03' selected=false ++++++++++++++++++++++++staticText name='03' -++++++++++++++++++++++++++inlineTextBox name='03' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='04' selected=false ++++++++++++++++++++++++staticText name='04' -++++++++++++++++++++++++++inlineTextBox name='04' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='05' selected=false ++++++++++++++++++++++++staticText name='05' -++++++++++++++++++++++++++inlineTextBox name='05' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='06' selected=false ++++++++++++++++++++++++staticText name='06' -++++++++++++++++++++++++++inlineTextBox name='06' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='07' selected=false ++++++++++++++++++++++++staticText name='07' -++++++++++++++++++++++++++inlineTextBox name='07' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='08' selected=false ++++++++++++++++++++++++staticText name='08' -++++++++++++++++++++++++++inlineTextBox name='08' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='09' selected=false ++++++++++++++++++++++++staticText name='09' -++++++++++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='10' selected=false ++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='11' selected=false ++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='12' selected=false ++++++++++++++++++++++++staticText name='12' -++++++++++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='13' selected=false ++++++++++++++++++++++++staticText name='13' -++++++++++++++++++++++++++inlineTextBox name='13' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='14' selected=false ++++++++++++++++++++++++staticText name='14' -++++++++++++++++++++++++++inlineTextBox name='14' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='15' selected=false ++++++++++++++++++++++++staticText name='15' -++++++++++++++++++++++++++inlineTextBox name='15' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='16' selected=false ++++++++++++++++++++++++staticText name='16' -++++++++++++++++++++++++++inlineTextBox name='16' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='17' selected=false ++++++++++++++++++++++++staticText name='17' -++++++++++++++++++++++++++inlineTextBox name='17' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='18' selected=false ++++++++++++++++++++++++staticText name='18' -++++++++++++++++++++++++++inlineTextBox name='18' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='19' selected=false ++++++++++++++++++++++++staticText name='19' -++++++++++++++++++++++++++inlineTextBox name='19' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='20' selected=false ++++++++++++++++++++++++staticText name='20' -++++++++++++++++++++++++++inlineTextBox name='20' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='21' selected=false ++++++++++++++++++++++++staticText name='21' -++++++++++++++++++++++++++inlineTextBox name='21' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='22' selected=false ++++++++++++++++++++++++staticText name='22' -++++++++++++++++++++++++++inlineTextBox name='22' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='23' selected=false ++++++++++++++++++++++++staticText name='23' -++++++++++++++++++++++++++inlineTextBox name='23' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='24' selected=false ++++++++++++++++++++++++staticText name='24' -++++++++++++++++++++++++++inlineTextBox name='24' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='25' selected=false ++++++++++++++++++++++++staticText name='25' -++++++++++++++++++++++++++inlineTextBox name='25' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='26' selected=false ++++++++++++++++++++++++staticText name='26' -++++++++++++++++++++++++++inlineTextBox name='26' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='27' selected=false ++++++++++++++++++++++++staticText name='27' -++++++++++++++++++++++++++inlineTextBox name='27' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='28' selected=false ++++++++++++++++++++++++staticText name='28' -++++++++++++++++++++++++++inlineTextBox name='28' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='29' selected=false ++++++++++++++++++++++++staticText name='29' -++++++++++++++++++++++++++inlineTextBox name='29' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='30' selected=false ++++++++++++++++++++++++staticText name='30' -++++++++++++++++++++++++++inlineTextBox name='30' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='31' selected=false ++++++++++++++++++++++++staticText name='31' -++++++++++++++++++++++++++inlineTextBox name='31' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='32' selected=false ++++++++++++++++++++++++staticText name='32' -++++++++++++++++++++++++++inlineTextBox name='32' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='33' selected=false ++++++++++++++++++++++++staticText name='33' -++++++++++++++++++++++++++inlineTextBox name='33' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='34' selected=false ++++++++++++++++++++++++staticText name='34' -++++++++++++++++++++++++++inlineTextBox name='34' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='35' selected=false ++++++++++++++++++++++++staticText name='35' -++++++++++++++++++++++++++inlineTextBox name='35' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='36' selected=false ++++++++++++++++++++++++staticText name='36' -++++++++++++++++++++++++++inlineTextBox name='36' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='37' selected=false ++++++++++++++++++++++++staticText name='37' -++++++++++++++++++++++++++inlineTextBox name='37' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='38' selected=false ++++++++++++++++++++++++staticText name='38' -++++++++++++++++++++++++++inlineTextBox name='38' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='39' selected=false ++++++++++++++++++++++++staticText name='39' -++++++++++++++++++++++++++inlineTextBox name='39' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='40' selected=false ++++++++++++++++++++++++staticText name='40' -++++++++++++++++++++++++++inlineTextBox name='40' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='41' selected=false ++++++++++++++++++++++++staticText name='41' -++++++++++++++++++++++++++inlineTextBox name='41' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='42' selected=false ++++++++++++++++++++++++staticText name='42' -++++++++++++++++++++++++++inlineTextBox name='42' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='43' selected=false ++++++++++++++++++++++++staticText name='43' -++++++++++++++++++++++++++inlineTextBox name='43' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='44' selected=false ++++++++++++++++++++++++staticText name='44' -++++++++++++++++++++++++++inlineTextBox name='44' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='45' selected=false ++++++++++++++++++++++++staticText name='45' -++++++++++++++++++++++++++inlineTextBox name='45' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='46' selected=false ++++++++++++++++++++++++staticText name='46' -++++++++++++++++++++++++++inlineTextBox name='46' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='47' selected=false ++++++++++++++++++++++++staticText name='47' -++++++++++++++++++++++++++inlineTextBox name='47' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='48' selected=false ++++++++++++++++++++++++staticText name='48' -++++++++++++++++++++++++++inlineTextBox name='48' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='49' selected=false ++++++++++++++++++++++++staticText name='49' -++++++++++++++++++++++++++inlineTextBox name='49' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='50' selected=true ++++++++++++++++++++++++staticText name='50' -++++++++++++++++++++++++++inlineTextBox name='50' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='51' selected=false ++++++++++++++++++++++++staticText name='51' -++++++++++++++++++++++++++inlineTextBox name='51' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='52' selected=false ++++++++++++++++++++++++staticText name='52' -++++++++++++++++++++++++++inlineTextBox name='52' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='53' selected=false ++++++++++++++++++++++++staticText name='53' -++++++++++++++++++++++++++inlineTextBox name='53' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='54' selected=false ++++++++++++++++++++++++staticText name='54' -++++++++++++++++++++++++++inlineTextBox name='54' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='55' selected=false ++++++++++++++++++++++++staticText name='55' -++++++++++++++++++++++++++inlineTextBox name='55' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='56' selected=false ++++++++++++++++++++++++staticText name='56' -++++++++++++++++++++++++++inlineTextBox name='56' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='57' selected=false ++++++++++++++++++++++++staticText name='57' -++++++++++++++++++++++++++inlineTextBox name='57' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='58' selected=false ++++++++++++++++++++++++staticText name='58' -++++++++++++++++++++++++++inlineTextBox name='58' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='59' selected=false ++++++++++++++++++++++++staticText name='59' -++++++++++++++++++++++++++inlineTextBox name='59' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='00' selected=false ++++++++++++++++++++++++staticText name='00' -++++++++++++++++++++++++++inlineTextBox name='00' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++listBox name='Seconds' activedescendantId=listBoxOption ++++++++++++++++++++++listBoxOption name='01' selected=false ++++++++++++++++++++++++staticText name='01' -++++++++++++++++++++++++++inlineTextBox name='01' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='02' selected=true ++++++++++++++++++++++++staticText name='02' -++++++++++++++++++++++++++inlineTextBox name='02' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='03' selected=false ++++++++++++++++++++++++staticText name='03' -++++++++++++++++++++++++++inlineTextBox name='03' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='04' selected=false ++++++++++++++++++++++++staticText name='04' -++++++++++++++++++++++++++inlineTextBox name='04' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='05' selected=false ++++++++++++++++++++++++staticText name='05' -++++++++++++++++++++++++++inlineTextBox name='05' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='06' selected=false ++++++++++++++++++++++++staticText name='06' -++++++++++++++++++++++++++inlineTextBox name='06' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='07' selected=false ++++++++++++++++++++++++staticText name='07' -++++++++++++++++++++++++++inlineTextBox name='07' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='08' selected=false ++++++++++++++++++++++++staticText name='08' -++++++++++++++++++++++++++inlineTextBox name='08' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='09' selected=false ++++++++++++++++++++++++staticText name='09' -++++++++++++++++++++++++++inlineTextBox name='09' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='10' selected=false ++++++++++++++++++++++++staticText name='10' -++++++++++++++++++++++++++inlineTextBox name='10' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='11' selected=false ++++++++++++++++++++++++staticText name='11' -++++++++++++++++++++++++++inlineTextBox name='11' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='12' selected=false ++++++++++++++++++++++++staticText name='12' -++++++++++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='13' selected=false ++++++++++++++++++++++++staticText name='13' -++++++++++++++++++++++++++inlineTextBox name='13' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='14' selected=false ++++++++++++++++++++++++staticText name='14' -++++++++++++++++++++++++++inlineTextBox name='14' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='15' selected=false ++++++++++++++++++++++++staticText name='15' -++++++++++++++++++++++++++inlineTextBox name='15' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='16' selected=false ++++++++++++++++++++++++staticText name='16' -++++++++++++++++++++++++++inlineTextBox name='16' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='17' selected=false ++++++++++++++++++++++++staticText name='17' -++++++++++++++++++++++++++inlineTextBox name='17' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='18' selected=false ++++++++++++++++++++++++staticText name='18' -++++++++++++++++++++++++++inlineTextBox name='18' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='19' selected=false ++++++++++++++++++++++++staticText name='19' -++++++++++++++++++++++++++inlineTextBox name='19' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='20' selected=false ++++++++++++++++++++++++staticText name='20' -++++++++++++++++++++++++++inlineTextBox name='20' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='21' selected=false ++++++++++++++++++++++++staticText name='21' -++++++++++++++++++++++++++inlineTextBox name='21' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='22' selected=false ++++++++++++++++++++++++staticText name='22' -++++++++++++++++++++++++++inlineTextBox name='22' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='23' selected=false ++++++++++++++++++++++++staticText name='23' -++++++++++++++++++++++++++inlineTextBox name='23' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='24' selected=false ++++++++++++++++++++++++staticText name='24' -++++++++++++++++++++++++++inlineTextBox name='24' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='25' selected=false ++++++++++++++++++++++++staticText name='25' -++++++++++++++++++++++++++inlineTextBox name='25' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='26' selected=false ++++++++++++++++++++++++staticText name='26' -++++++++++++++++++++++++++inlineTextBox name='26' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='27' selected=false ++++++++++++++++++++++++staticText name='27' -++++++++++++++++++++++++++inlineTextBox name='27' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='28' selected=false ++++++++++++++++++++++++staticText name='28' -++++++++++++++++++++++++++inlineTextBox name='28' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='29' selected=false ++++++++++++++++++++++++staticText name='29' -++++++++++++++++++++++++++inlineTextBox name='29' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='30' selected=false ++++++++++++++++++++++++staticText name='30' -++++++++++++++++++++++++++inlineTextBox name='30' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='31' selected=false ++++++++++++++++++++++++staticText name='31' -++++++++++++++++++++++++++inlineTextBox name='31' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='32' selected=false ++++++++++++++++++++++++staticText name='32' -++++++++++++++++++++++++++inlineTextBox name='32' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='33' selected=false ++++++++++++++++++++++++staticText name='33' -++++++++++++++++++++++++++inlineTextBox name='33' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='34' selected=false ++++++++++++++++++++++++staticText name='34' -++++++++++++++++++++++++++inlineTextBox name='34' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='35' selected=false ++++++++++++++++++++++++staticText name='35' -++++++++++++++++++++++++++inlineTextBox name='35' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='36' selected=false ++++++++++++++++++++++++staticText name='36' -++++++++++++++++++++++++++inlineTextBox name='36' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='37' selected=false ++++++++++++++++++++++++staticText name='37' -++++++++++++++++++++++++++inlineTextBox name='37' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='38' selected=false ++++++++++++++++++++++++staticText name='38' -++++++++++++++++++++++++++inlineTextBox name='38' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='39' selected=false ++++++++++++++++++++++++staticText name='39' -++++++++++++++++++++++++++inlineTextBox name='39' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='40' selected=false ++++++++++++++++++++++++staticText name='40' -++++++++++++++++++++++++++inlineTextBox name='40' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='41' selected=false ++++++++++++++++++++++++staticText name='41' -++++++++++++++++++++++++++inlineTextBox name='41' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='42' selected=false ++++++++++++++++++++++++staticText name='42' -++++++++++++++++++++++++++inlineTextBox name='42' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='43' selected=false ++++++++++++++++++++++++staticText name='43' -++++++++++++++++++++++++++inlineTextBox name='43' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='44' selected=false ++++++++++++++++++++++++staticText name='44' -++++++++++++++++++++++++++inlineTextBox name='44' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='45' selected=false ++++++++++++++++++++++++staticText name='45' -++++++++++++++++++++++++++inlineTextBox name='45' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='46' selected=false ++++++++++++++++++++++++staticText name='46' -++++++++++++++++++++++++++inlineTextBox name='46' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='47' selected=false ++++++++++++++++++++++++staticText name='47' -++++++++++++++++++++++++++inlineTextBox name='47' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='48' selected=false ++++++++++++++++++++++++staticText name='48' -++++++++++++++++++++++++++inlineTextBox name='48' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='49' selected=false ++++++++++++++++++++++++staticText name='49' -++++++++++++++++++++++++++inlineTextBox name='49' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='50' selected=false ++++++++++++++++++++++++staticText name='50' -++++++++++++++++++++++++++inlineTextBox name='50' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='51' selected=false ++++++++++++++++++++++++staticText name='51' -++++++++++++++++++++++++++inlineTextBox name='51' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='52' selected=false ++++++++++++++++++++++++staticText name='52' -++++++++++++++++++++++++++inlineTextBox name='52' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='53' selected=false ++++++++++++++++++++++++staticText name='53' -++++++++++++++++++++++++++inlineTextBox name='53' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='54' selected=false ++++++++++++++++++++++++staticText name='54' -++++++++++++++++++++++++++inlineTextBox name='54' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='55' selected=false ++++++++++++++++++++++++staticText name='55' -++++++++++++++++++++++++++inlineTextBox name='55' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='56' selected=false ++++++++++++++++++++++++staticText name='56' -++++++++++++++++++++++++++inlineTextBox name='56' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='57' selected=false ++++++++++++++++++++++++staticText name='57' -++++++++++++++++++++++++++inlineTextBox name='57' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='58' selected=false ++++++++++++++++++++++++staticText name='58' -++++++++++++++++++++++++++inlineTextBox name='58' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='59' selected=false ++++++++++++++++++++++++staticText name='59' -++++++++++++++++++++++++++inlineTextBox name='59' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='00' selected=false ++++++++++++++++++++++++staticText name='00' -++++++++++++++++++++++++++inlineTextBox name='00' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++listBox name='Milliseconds' activedescendantId=listBoxOption ++++++++++++++++++++++listBoxOption name='100' selected=false ++++++++++++++++++++++++staticText name='100' -++++++++++++++++++++++++++inlineTextBox name='100' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='200' selected=false ++++++++++++++++++++++++staticText name='200' -++++++++++++++++++++++++++inlineTextBox name='200' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='300' selected=false ++++++++++++++++++++++++staticText name='300' -++++++++++++++++++++++++++inlineTextBox name='300' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='400' selected=false ++++++++++++++++++++++++staticText name='400' -++++++++++++++++++++++++++inlineTextBox name='400' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='500' selected=false ++++++++++++++++++++++++staticText name='500' -++++++++++++++++++++++++++inlineTextBox name='500' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='600' selected=false ++++++++++++++++++++++++staticText name='600' -++++++++++++++++++++++++++inlineTextBox name='600' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='700' selected=false ++++++++++++++++++++++++staticText name='700' -++++++++++++++++++++++++++inlineTextBox name='700' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='800' selected=false ++++++++++++++++++++++++staticText name='800' -++++++++++++++++++++++++++inlineTextBox name='800' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='922' selected=true ++++++++++++++++++++++++staticText name='922' -++++++++++++++++++++++++++inlineTextBox name='922' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='000' selected=false ++++++++++++++++++++++++staticText name='000' -++++++++++++++++++++++++++inlineTextBox name='000' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++listBox name='AM/PM' activedescendantId=listBoxOption ++++++++++++++++++++++listBoxOption name='PM' selected=true ++++++++++++++++++++++++staticText name='PM' -++++++++++++++++++++++++++inlineTextBox name='PM' +++++++++++++++++++++++++++inlineTextBox ++++++++++++++++++++++listBoxOption name='AM' selected=false ++++++++++++++++++++++++staticText name='AM' -++++++++++++++++++++++++++inlineTextBox name='AM' +++++++++++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/input-time-with-popup-open-expected-fuchsia.txt b/content/test/data/accessibility/html/input-time-with-popup-open-expected-fuchsia.txt index ecf3344..69c7e0c 100644 --- a/content/test/data/accessibility/html/input-time-with-popup-open-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-time-with-popup-open-expected-fuchsia.txt
@@ -7,27 +7,27 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Hours' actions='{SET_VALUE}' value='01' ++++++++++++++++STATIC_TEXT label='01' -++++++++++++++++++UNKNOWN label='01' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=':' -++++++++++++++++UNKNOWN label=':' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Minutes' actions='{SET_VALUE}' value='50' ++++++++++++++++STATIC_TEXT label='50' -++++++++++++++++++UNKNOWN label='50' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=':' -++++++++++++++++UNKNOWN label=':' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN label='Seconds' value='02' ++++++++++++++++STATIC_TEXT label='02' -++++++++++++++++++UNKNOWN label='02' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='.' -++++++++++++++++UNKNOWN label='.' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN label='Milliseconds' value='922' ++++++++++++++++STATIC_TEXT label='922' -++++++++++++++++++UNKNOWN label='922' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=' ' -++++++++++++++++UNKNOWN label=' ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='AM/PM' actions='{SET_VALUE}' value='PM' ++++++++++++++++STATIC_TEXT label='PM' -++++++++++++++++++UNKNOWN label='PM' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show time picker' actions='{DEFAULT}' secondary_label='Show time picker' ++++++++UNKNOWN ++++++++++UNKNOWN hidden @@ -38,437 +38,437 @@ ++++++++++++++++++++UNKNOWN focusable label='Hours' actions='{DEFAULT}' ++++++++++++++++++++++UNKNOWN focusable has_input_focus selected label='01' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='01' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='01' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='02' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='02' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='02' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='03' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='03' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='03' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='04' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='04' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='04' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='05' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='05' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='05' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='06' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='06' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='06' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='07' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='07' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='07' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='08' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='08' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='08' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='09' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='09' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='09' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='10' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='10' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='10' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='11' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='11' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='11' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='12' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='12' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='12' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++UNKNOWN focusable label='Minutes' actions='{DEFAULT}' ++++++++++++++++++++++UNKNOWN focusable label='01' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='01' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='01' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='02' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='02' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='02' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='03' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='03' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='03' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='04' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='04' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='04' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='05' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='05' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='05' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='06' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='06' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='06' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='07' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='07' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='07' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='08' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='08' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='08' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='09' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='09' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='09' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='10' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='10' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='10' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='11' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='11' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='11' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='12' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='12' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='12' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='13' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='13' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='13' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='14' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='14' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='14' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='15' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='15' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='15' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='16' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='16' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='16' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='17' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='17' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='17' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='18' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='18' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='18' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='19' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='19' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='19' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='20' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='20' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='20' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='21' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='21' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='21' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='22' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='22' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='22' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='23' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='23' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='23' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='24' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='24' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='24' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='25' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='25' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='25' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='26' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='26' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='26' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='27' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='27' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='27' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='28' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='28' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='28' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='29' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='29' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='29' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='30' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='30' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='30' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='31' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='31' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='31' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='32' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='32' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='32' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='33' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='33' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='33' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='34' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='34' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='34' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='35' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='35' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='35' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='36' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='36' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='36' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='37' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='37' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='37' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='38' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='38' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='38' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='39' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='39' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='39' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='40' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='40' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='40' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='41' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='41' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='41' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='42' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='42' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='42' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='43' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='43' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='43' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='44' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='44' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='44' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='45' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='45' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='45' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='46' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='46' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='46' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='47' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='47' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='47' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='48' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='48' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='48' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='49' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='49' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='49' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable selected label='50' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='50' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='50' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='51' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='51' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='51' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='52' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='52' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='52' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='53' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='53' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='53' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='54' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='54' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='54' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='55' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='55' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='55' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='56' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='56' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='56' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='57' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='57' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='57' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='58' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='58' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='58' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='59' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='59' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='59' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='00' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='00' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='00' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++UNKNOWN focusable label='Seconds' actions='{DEFAULT}' ++++++++++++++++++++++UNKNOWN focusable label='01' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='01' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='01' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable selected label='02' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='02' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='02' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='03' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='03' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='03' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='04' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='04' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='04' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='05' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='05' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='05' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='06' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='06' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='06' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='07' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='07' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='07' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='08' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='08' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='08' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='09' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='09' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='09' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='10' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='10' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='10' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='11' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='11' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='11' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='12' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='12' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='12' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='13' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='13' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='13' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='14' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='14' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='14' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='15' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='15' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='15' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='16' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='16' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='16' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='17' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='17' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='17' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='18' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='18' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='18' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='19' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='19' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='19' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='20' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='20' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='20' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='21' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='21' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='21' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='22' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='22' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='22' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='23' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='23' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='23' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='24' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='24' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='24' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='25' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='25' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='25' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='26' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='26' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='26' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='27' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='27' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='27' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='28' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='28' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='28' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='29' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='29' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='29' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='30' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='30' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='30' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='31' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='31' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='31' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='32' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='32' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='32' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='33' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='33' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='33' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='34' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='34' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='34' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='35' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='35' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='35' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='36' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='36' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='36' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='37' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='37' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='37' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='38' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='38' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='38' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='39' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='39' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='39' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='40' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='40' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='40' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='41' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='41' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='41' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='42' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='42' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='42' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='43' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='43' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='43' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='44' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='44' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='44' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='45' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='45' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='45' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='46' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='46' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='46' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='47' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='47' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='47' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='48' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='48' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='48' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='49' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='49' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='49' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='50' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='50' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='50' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='51' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='51' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='51' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='52' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='52' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='52' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='53' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='53' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='53' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='54' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='54' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='54' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='55' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='55' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='55' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='56' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='56' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='56' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='57' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='57' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='57' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='58' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='58' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='58' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='59' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='59' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='59' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='00' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='00' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='00' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++UNKNOWN focusable label='Milliseconds' actions='{DEFAULT}' ++++++++++++++++++++++UNKNOWN focusable label='100' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='100' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='100' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='200' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='200' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='200' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='300' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='300' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='300' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='400' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='400' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='400' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='500' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='500' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='500' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='600' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='600' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='600' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='700' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='700' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='700' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='800' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='800' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='800' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable selected label='922' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='922' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='922' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='000' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='000' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='000' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++UNKNOWN focusable label='AM/PM' actions='{DEFAULT}' ++++++++++++++++++++++UNKNOWN focusable selected label='PM' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='PM' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='PM' +++++++++++++++++++++++++++UNKNOWN ++++++++++++++++++++++UNKNOWN focusable label='AM' actions='{DEFAULT}' ++++++++++++++++++++++++STATIC_TEXT label='AM' actions='{DEFAULT}' -++++++++++++++++++++++++++UNKNOWN label='AM' +++++++++++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-types-expected-blink.txt b/content/test/data/accessibility/html/input-types-expected-blink.txt index 2df35c1..9b20d1d 100644 --- a/content/test/data/accessibility/html/input-types-expected-blink.txt +++ b/content/test/data/accessibility/html/input-types-expected-blink.txt
@@ -3,30 +3,30 @@ ++++genericContainer ++++++labelText ++++++++staticText name='Default: ' -++++++++++inlineTextBox name='Default: ' +++++++++++inlineTextBox ++++++++textField editable name='Default:' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Button: ' -++++++++++inlineTextBox name='Button: ' +++++++++++inlineTextBox ++++++++button name='Button:' ++++++labelText ignored ++++++++staticText ignored name='Checkbox: ' ++++++++checkBox name='Checkbox:' checkedState=false ++++++labelText ++++++++staticText name='Color: ' -++++++++++inlineTextBox name='Color: ' +++++++++++inlineTextBox ++++++++colorWell name='Color:' value='#000000' ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++labelText ++++++++staticText name='Email: ' -++++++++++inlineTextBox name='Email: ' +++++++++++inlineTextBox ++++++++textField editable name='Email:' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='File: ' -++++++++++inlineTextBox name='File: ' +++++++++++inlineTextBox ++++++++button name='File:: No file chosen' value='No file chosen' ++++++++++button invisible name='Choose File' ++++++++++++staticText ignored invisible name='Choose File' @@ -34,21 +34,21 @@ ++++++++++++staticText ignored invisible name='No file chosen' ++++++labelText ++++++++staticText name='Image: ' -++++++++++inlineTextBox name='Image: ' +++++++++++inlineTextBox ++++++++button name='Image:' ++++++++++image ++++++++++staticText name='Submit' -++++++++++++inlineTextBox name='Submit' +++++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++labelText ++++++++staticText name='Number: ' -++++++++++inlineTextBox name='Number: ' +++++++++++inlineTextBox ++++++++spinButton editable name='Number:' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Password: ' -++++++++++inlineTextBox name='Password: ' +++++++++++inlineTextBox ++++++++textField editable protected name='Password:' ++++++++++genericContainer editable ++++++labelText ignored @@ -56,37 +56,37 @@ ++++++++radioButton name='Radio:' checkedState=false ++++++labelText ++++++++staticText name='Range: ' -++++++++++inlineTextBox name='Range: ' +++++++++++inlineTextBox ++++++++slider horizontal name='Range:' valueForRange=50.00 minValueForRange=0.00 maxValueForRange=100.00 ++++++labelText ++++++++staticText name='Reset: ' -++++++++++inlineTextBox name='Reset: ' +++++++++++inlineTextBox ++++++++button name='Reset:' ++++++++++staticText name='Reset' -++++++++++++inlineTextBox name='Reset' +++++++++++++inlineTextBox ++++++labelText ++++++++staticText name='Search: ' -++++++++++inlineTextBox name='Search: ' +++++++++++inlineTextBox ++++++++searchBox editable name='Search:' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Submit: ' -++++++++++inlineTextBox name='Submit: ' +++++++++++inlineTextBox ++++++++button name='Submit:' ++++++++++staticText name='Submit' -++++++++++++inlineTextBox name='Submit' +++++++++++++inlineTextBox ++++++labelText ++++++++staticText name='Tel: ' -++++++++++inlineTextBox name='Tel: ' +++++++++++inlineTextBox ++++++++textField editable name='Tel:' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Text: ' -++++++++++inlineTextBox name='Text: ' +++++++++++inlineTextBox ++++++++textField editable name='Text:' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Url: ' -++++++++++inlineTextBox name='Url: ' +++++++++++inlineTextBox ++++++++textField editable name='Url:' ++++++++++genericContainer editable
diff --git a/content/test/data/accessibility/html/input-types-expected-fuchsia.txt b/content/test/data/accessibility/html/input-types-expected-fuchsia.txt index 5ae954f20..85fc7da7 100644 --- a/content/test/data/accessibility/html/input-types-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-types-expected-fuchsia.txt
@@ -3,30 +3,30 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Default: ' -++++++++++UNKNOWN label='Default: ' +++++++++++UNKNOWN ++++++++TEXT_FIELD focusable label='Default:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Button: ' -++++++++++UNKNOWN label='Button: ' +++++++++++UNKNOWN ++++++++BUTTON focusable label='Button:' actions='{DEFAULT}' ++++++UNKNOWN hidden ++++++++STATIC_TEXT hidden label='Checkbox: ' ++++++++CHECK_BOX focusable label='Checkbox:' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++UNKNOWN ++++++++STATIC_TEXT label='Color: ' -++++++++++UNKNOWN label='Color: ' +++++++++++UNKNOWN ++++++++UNKNOWN focusable label='Color:' actions='{DEFAULT, SET_VALUE}' value='#000000' ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Email: ' -++++++++++UNKNOWN label='Email: ' +++++++++++UNKNOWN ++++++++TEXT_FIELD focusable label='Email:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='File: ' -++++++++++UNKNOWN label='File: ' +++++++++++UNKNOWN ++++++++BUTTON focusable label='File:: No file chosen' actions='{DEFAULT}' value='No file chosen' ++++++++++BUTTON hidden focusable label='Choose File' actions='{DEFAULT}' ++++++++++++STATIC_TEXT hidden label='Choose File' @@ -34,21 +34,21 @@ ++++++++++++STATIC_TEXT hidden label='No file chosen' ++++++UNKNOWN ++++++++STATIC_TEXT label='Image: ' -++++++++++UNKNOWN label='Image: ' +++++++++++UNKNOWN ++++++++BUTTON focusable label='Image:' actions='{DEFAULT}' ++++++++++IMAGE ++++++++++STATIC_TEXT label='Submit' -++++++++++++UNKNOWN label='Submit' +++++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Number: ' -++++++++++UNKNOWN label='Number: ' +++++++++++UNKNOWN ++++++++UNKNOWN focusable label='Number:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Password: ' -++++++++++UNKNOWN label='Password: ' +++++++++++UNKNOWN ++++++++TEXT_FIELD focusable label='Password:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN hidden @@ -56,37 +56,37 @@ ++++++++RADIO_BUTTON focusable label='Radio:' actions='{DEFAULT}' checked_state='UNCHECKED' ++++++UNKNOWN ++++++++STATIC_TEXT label='Range: ' -++++++++++UNKNOWN label='Range: ' +++++++++++UNKNOWN ++++++++SLIDER focusable label='Range:' actions='{SET_VALUE}' ++++++UNKNOWN ++++++++STATIC_TEXT label='Reset: ' -++++++++++UNKNOWN label='Reset: ' +++++++++++UNKNOWN ++++++++BUTTON focusable label='Reset:' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Reset' -++++++++++++UNKNOWN label='Reset' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Search: ' -++++++++++UNKNOWN label='Search: ' +++++++++++UNKNOWN ++++++++SEARCH_BOX focusable label='Search:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Submit: ' -++++++++++UNKNOWN label='Submit: ' +++++++++++UNKNOWN ++++++++BUTTON focusable label='Submit:' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Submit' -++++++++++++UNKNOWN label='Submit' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Tel: ' -++++++++++UNKNOWN label='Tel: ' +++++++++++UNKNOWN ++++++++TEXT_FIELD focusable label='Tel:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Text: ' -++++++++++UNKNOWN label='Text: ' +++++++++++UNKNOWN ++++++++TEXT_FIELD focusable label='Text:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Url: ' -++++++++++UNKNOWN label='Url: ' +++++++++++UNKNOWN ++++++++TEXT_FIELD focusable label='Url:' actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-types-with-placeholder-expected-blink.txt b/content/test/data/accessibility/html/input-types-with-placeholder-expected-blink.txt index 2ef1299..935c70b4 100644 --- a/content/test/data/accessibility/html/input-types-with-placeholder-expected-blink.txt +++ b/content/test/data/accessibility/html/input-types-with-placeholder-expected-blink.txt
@@ -3,41 +3,41 @@ ++++genericContainer ++++++labelText ++++++++staticText name='Email: ' -++++++++++inlineTextBox name='Email: ' +++++++++++inlineTextBox ++++++++textField editable name='Email:' placeholder='email@example.com' ++++++++++genericContainer ignored ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Number: ' -++++++++++inlineTextBox name='Number: ' +++++++++++inlineTextBox ++++++++spinButton editable name='Number:' placeholder='3' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Password: ' -++++++++++inlineTextBox name='Password: ' +++++++++++inlineTextBox ++++++++textField editable protected name='Password:' placeholder='pwd' ++++++++++genericContainer ignored ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Search: ' -++++++++++inlineTextBox name='Search: ' +++++++++++inlineTextBox ++++++++searchBox editable name='Search:' placeholder='search' ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Tel: ' -++++++++++inlineTextBox name='Tel: ' +++++++++++inlineTextBox ++++++++textField editable name='Tel:' placeholder='555-1212' ++++++++++genericContainer ignored ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Text: ' -++++++++++inlineTextBox name='Text: ' +++++++++++inlineTextBox ++++++++textField editable name='Text:' placeholder='just text' ++++++++++genericContainer ignored ++++++++++genericContainer editable ++++++labelText ++++++++staticText name='Url: ' -++++++++++inlineTextBox name='Url: ' +++++++++++inlineTextBox ++++++++textField editable name='Url:' placeholder='https://www.example.com' ++++++++++genericContainer ignored ++++++++++genericContainer editable
diff --git a/content/test/data/accessibility/html/input-types-with-value-and-placeholder-expected-blink.txt b/content/test/data/accessibility/html/input-types-with-value-and-placeholder-expected-blink.txt index c33aac9..637eddae 100644 --- a/content/test/data/accessibility/html/input-types-with-value-and-placeholder-expected-blink.txt +++ b/content/test/data/accessibility/html/input-types-with-value-and-placeholder-expected-blink.txt
@@ -3,55 +3,55 @@ ++++genericContainer ++++++labelText ++++++++staticText name='Email: ' -++++++++++inlineTextBox name='Email: ' +++++++++++inlineTextBox ++++++++textField editable name='Email:' placeholder='placeholder' value='email@example.com' ++++++++++genericContainer ignored invisible ++++++++++genericContainer editable ++++++++++++staticText editable name='email@example.com' -++++++++++++++inlineTextBox editable name='email@example.com' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Number: ' -++++++++++inlineTextBox name='Number: ' +++++++++++inlineTextBox ++++++++spinButton editable name='Number:' placeholder='placeholder' value='3' valueForRange=3.00 ++++++++++genericContainer editable ++++++++++++staticText editable name='3' -++++++++++++++inlineTextBox editable name='3' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Password: ' -++++++++++inlineTextBox name='Password: ' +++++++++++inlineTextBox ++++++++textField editable protected name='Password:' placeholder='placeholder' value='%E2%80%A2%E2%80%A2%E2%80%A2' ++++++++++genericContainer ignored invisible ++++++++++genericContainer editable ++++++++++++staticText editable name='%E2%80%A2%E2%80%A2%E2%80%A2' -++++++++++++++inlineTextBox editable name='%E2%80%A2%E2%80%A2%E2%80%A2' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Search: ' -++++++++++inlineTextBox name='Search: ' +++++++++++inlineTextBox ++++++++searchBox editable name='Search:' placeholder='placeholder' value='search' ++++++++++genericContainer editable ++++++++++++staticText editable name='search' -++++++++++++++inlineTextBox editable name='search' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Tel: ' -++++++++++inlineTextBox name='Tel: ' +++++++++++inlineTextBox ++++++++textField editable name='Tel:' placeholder='placeholder' value='555-1212' ++++++++++genericContainer ignored invisible ++++++++++genericContainer editable ++++++++++++staticText editable name='555-1212' -++++++++++++++inlineTextBox editable name='555-1212' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Text: ' -++++++++++inlineTextBox name='Text: ' +++++++++++inlineTextBox ++++++++textField editable name='Text:' placeholder='placeholder' value='just text' ++++++++++genericContainer ignored invisible ++++++++++genericContainer editable ++++++++++++staticText editable name='just text' -++++++++++++++inlineTextBox editable name='just text' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Url: ' -++++++++++inlineTextBox name='Url: ' +++++++++++inlineTextBox ++++++++textField editable name='Url:' placeholder='placeholder' ++++++++++genericContainer ignored invisible ++++++++++genericContainer editable ++++++++++++staticText editable name='https://www.example.com' -++++++++++++++inlineTextBox editable name='https://www.example.com' +++++++++++++++inlineTextBox editable
diff --git a/content/test/data/accessibility/html/input-types-with-value-expected-blink.txt b/content/test/data/accessibility/html/input-types-with-value-expected-blink.txt index 115a019..49db8b0f5 100644 --- a/content/test/data/accessibility/html/input-types-with-value-expected-blink.txt +++ b/content/test/data/accessibility/html/input-types-with-value-expected-blink.txt
@@ -3,69 +3,69 @@ ++++genericContainer ignored ++++++labelText ++++++++staticText name='Email: ' -++++++++++inlineTextBox name='Email: ' +++++++++++inlineTextBox ++++++++textField editable name='Email:' value='email@example.com' ++++++++++genericContainer editable ++++++++++++staticText editable name='email@example.com' -++++++++++++++inlineTextBox editable name='email@example.com' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Number: ' -++++++++++inlineTextBox name='Number: ' +++++++++++inlineTextBox ++++++++spinButton editable name='Number:' value='3' valueForRange=3.00 ++++++++++genericContainer editable ++++++++++++staticText editable name='3' -++++++++++++++inlineTextBox editable name='3' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Password: ' -++++++++++inlineTextBox name='Password: ' +++++++++++inlineTextBox ++++++++textField editable protected name='Password:' value='%E2%80%A2%E2%80%A2%E2%80%A2' ++++++++++genericContainer editable ++++++++++++staticText editable name='%E2%80%A2%E2%80%A2%E2%80%A2' -++++++++++++++inlineTextBox editable name='%E2%80%A2%E2%80%A2%E2%80%A2' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Search: ' -++++++++++inlineTextBox name='Search: ' +++++++++++inlineTextBox ++++++++searchBox editable name='Search:' value='search' ++++++++++genericContainer editable ++++++++++++staticText editable name='search' -++++++++++++++inlineTextBox editable name='search' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Tel: ' -++++++++++inlineTextBox name='Tel: ' +++++++++++inlineTextBox ++++++++textField editable name='Tel:' value='555-1212' ++++++++++genericContainer editable ++++++++++++staticText editable name='555-1212' -++++++++++++++inlineTextBox editable name='555-1212' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Text: ' -++++++++++inlineTextBox name='Text: ' +++++++++++inlineTextBox ++++++++textField editable name='Text:' value='just text' ++++++++++genericContainer editable ++++++++++++staticText editable name='just text' -++++++++++++++inlineTextBox editable name='just text' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Url: ' -++++++++++inlineTextBox name='Url: ' +++++++++++inlineTextBox ++++++++textField editable name='Url:' ++++++++++genericContainer editable ++++++++++++staticText editable name='https://www.example.com' -++++++++++++++inlineTextBox editable name='https://www.example.com' +++++++++++++++inlineTextBox editable ++++++labelText ++++++++staticText name='Textarea: ' -++++++++++inlineTextBox name='Textarea: ' +++++++++++inlineTextBox ++++++++textField editable multiline name='Textarea:' value='Sometext' ++++++++++genericContainer editable ++++++++++++staticText editable name='Sometext' -++++++++++++++inlineTextBox editable name='Sometext' +++++++++++++++inlineTextBox editable ++++++genericContainer editable multiline value='Plain contenteditable' nonAtomicTextFieldRoot=true ++++++++staticText editable name='Plain contenteditable' -++++++++++inlineTextBox editable name='Plain contenteditable' +++++++++++inlineTextBox editable ++++++genericContainer editable multiline richlyEditable value='Rich contenteditable' nonAtomicTextFieldRoot=true ++++++++staticText editable richlyEditable name='Rich contenteditable' -++++++++++inlineTextBox editable richlyEditable name='Rich contenteditable' +++++++++++inlineTextBox editable richlyEditable ++++++textField editable multiline value='Plain contenteditable' nonAtomicTextFieldRoot=true ++++++++staticText editable name='Plain contenteditable' -++++++++++inlineTextBox editable name='Plain contenteditable' +++++++++++inlineTextBox editable ++++++textField editable multiline richlyEditable value='Rich contenteditable' nonAtomicTextFieldRoot=true ++++++++staticText editable richlyEditable name='Rich contenteditable' -++++++++++inlineTextBox editable richlyEditable name='Rich contenteditable' +++++++++++inlineTextBox editable richlyEditable
diff --git a/content/test/data/accessibility/html/input-url-expected-fuchsia.txt b/content/test/data/accessibility/html/input-url-expected-fuchsia.txt index 37d09a9..24dfefad 100644 --- a/content/test/data/accessibility/html/input-url-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-url-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='example.com' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='example.com' -++++++++++++UNKNOWN label='example.com' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/input-week-expected-blink.txt b/content/test/data/accessibility/html/input-week-expected-blink.txt index 70df92f..6b6306eb 100644 --- a/content/test/data/accessibility/html/input-week-expected-blink.txt +++ b/content/test/data/accessibility/html/input-week-expected-blink.txt
@@ -6,13 +6,13 @@ ++++++++++genericContainer ++++++++++++genericContainer ++++++++++++++staticText name='Week ' -++++++++++++++++inlineTextBox name='Week ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Week' placeholder='--' valueForRange=0.00 minValueForRange=1.00 maxValueForRange=53.00 ++++++++++++++++staticText name='--' -++++++++++++++++++inlineTextBox name='--' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=', ' -++++++++++++++++inlineTextBox name=', ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Year' placeholder='----' valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++++++staticText name='----' -++++++++++++++++++inlineTextBox name='----' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show week picker' name='Show week picker' descriptionFrom=title haspopup=menu
diff --git a/content/test/data/accessibility/html/input-week-expected-fuchsia.txt b/content/test/data/accessibility/html/input-week-expected-fuchsia.txt index 2818feb..ab444c3 100644 --- a/content/test/data/accessibility/html/input-week-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/input-week-expected-fuchsia.txt
@@ -6,13 +6,13 @@ ++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='Week ' -++++++++++++++++UNKNOWN label='Week ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Week' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='--' -++++++++++++++++++UNKNOWN label='--' +++++++++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label=', ' -++++++++++++++++UNKNOWN label=', ' +++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN focusable label='Year' actions='{SET_VALUE}' ++++++++++++++++STATIC_TEXT label='----' -++++++++++++++++++UNKNOWN label='----' +++++++++++++++++++UNKNOWN ++++++++++UNKNOWN focusable label='Show week picker' actions='{DEFAULT}' secondary_label='Show week picker'
diff --git a/content/test/data/accessibility/html/ins-expected-blink.txt b/content/test/data/accessibility/html/ins-expected-blink.txt index 73fe8bd3..44b6b56 100644 --- a/content/test/data/accessibility/html/ins-expected-blink.txt +++ b/content/test/data/accessibility/html/ins-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='My favorite browser is ' -++++++++++inlineTextBox name='My favorite browser is ' +++++++++++inlineTextBox ++++++++contentDeletion ++++++++++staticText name='ABC' -++++++++++++inlineTextBox name='ABC' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++contentInsertion ++++++++++staticText name='Chrome' -++++++++++++inlineTextBox name='Chrome' +++++++++++++inlineTextBox ++++++++staticText name='!' -++++++++++inlineTextBox name='!' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ins-expected-fuchsia.txt b/content/test/data/accessibility/html/ins-expected-fuchsia.txt index bae85d4..609c9378 100644 --- a/content/test/data/accessibility/html/ins-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ins-expected-fuchsia.txt
@@ -3,14 +3,14 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='My favorite browser is ' -++++++++++UNKNOWN label='My favorite browser is ' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='ABC' -++++++++++++UNKNOWN label='ABC' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Chrome' -++++++++++++UNKNOWN label='Chrome' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label='!' -++++++++++UNKNOWN label='!' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/insert-before-expected-blink.txt b/content/test/data/accessibility/html/insert-before-expected-blink.txt index 20b1230..79fd596 100644 --- a/content/test/data/accessibility/html/insert-before-expected-blink.txt +++ b/content/test/data/accessibility/html/insert-before-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ++++++image name='a1' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='a2' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++group ++++++++image name='a0' === Start Continuation === @@ -16,7 +16,7 @@ ++++++image name='a0' ++++++image name='a1' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='a2' ++++++staticText name=' ' ++++++group
diff --git a/content/test/data/accessibility/html/insert-before-with-whitespace-expected-blink.txt b/content/test/data/accessibility/html/insert-before-with-whitespace-expected-blink.txt index 0c2262e..72191600 100644 --- a/content/test/data/accessibility/html/insert-before-with-whitespace-expected-blink.txt +++ b/content/test/data/accessibility/html/insert-before-with-whitespace-expected-blink.txt
@@ -3,49 +3,49 @@ ++++genericContainer ignored ++++++list ++++++++listItem -++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox:"this is the first item" +++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox ++++++++++++staticText ignored name='1. ' ++++++++++staticText name='this is the first item' previousOnLineId=staticText:"1. " -++++++++++++inlineTextBox name='this is the first item' previousOnLineId=staticText:"1. " +++++++++++++inlineTextBox previousOnLineId=staticText:"1. " ++++++++listItem -++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox:"this is the second item (for now)" +++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox ++++++++++++staticText ignored name='2. ' ++++++++++staticText name='this is the second item (for now)' previousOnLineId=staticText:"2. " -++++++++++++inlineTextBox name='this is the second item (for now)' previousOnLineId=staticText:"2. " +++++++++++++inlineTextBox previousOnLineId=staticText:"2. " ++++++++listItem -++++++++++listMarker name='3. ' nextOnLineId=inlineTextBox:"Hello" +++++++++++listMarker name='3. ' nextOnLineId=inlineTextBox ++++++++++++staticText ignored name='3. ' ++++++++++staticText name='Hello' previousOnLineId=staticText:"3. " -++++++++++++inlineTextBox name='Hello' previousOnLineId=staticText:"3. " -++++++++++staticText name=' ' previousOnLineId=inlineTextBox:"Hello" +++++++++++++inlineTextBox previousOnLineId=staticText:"3. " +++++++++++staticText name=' ' previousOnLineId=inlineTextBox ++++++++++staticText name='world this' -++++++++++++inlineTextBox name='world this' -++++++++++staticText name=' ' previousOnLineId=inlineTextBox:"world this" +++++++++++++inlineTextBox +++++++++++staticText name=' ' previousOnLineId=inlineTextBox ++++++++++staticText name='is just like docs, and your kitchen sink' -++++++++++++inlineTextBox name='is just like docs, and your kitchen sink' +++++++++++++inlineTextBox === Start Continuation === rootWebArea name='done' ++genericContainer ignored ++++genericContainer ignored ++++++list ++++++++listItem -++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox:"this is the first item" +++++++++++listMarker name='1. ' nextOnLineId=inlineTextBox ++++++++++++staticText ignored name='1. ' ++++++++++staticText name='this is the first item' previousOnLineId=staticText:"1. " -++++++++++++inlineTextBox name='this is the first item' previousOnLineId=staticText:"1. " +++++++++++++inlineTextBox previousOnLineId=staticText:"1. " ++++++++listItem -++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox:"Hello" +++++++++++listMarker name='2. ' nextOnLineId=inlineTextBox ++++++++++++staticText ignored name='2. ' ++++++++++staticText name='Hello' previousOnLineId=staticText:"2. " -++++++++++++inlineTextBox name='Hello' previousOnLineId=staticText:"2. " -++++++++++staticText name=' ' previousOnLineId=inlineTextBox:"Hello" +++++++++++++inlineTextBox previousOnLineId=staticText:"2. " +++++++++++staticText name=' ' previousOnLineId=inlineTextBox ++++++++++staticText name='world this' -++++++++++++inlineTextBox name='world this' -++++++++++staticText name=' ' previousOnLineId=inlineTextBox:"world this" +++++++++++++inlineTextBox +++++++++++staticText name=' ' previousOnLineId=inlineTextBox ++++++++++staticText name='is just like docs, and your kitchen sink' -++++++++++++inlineTextBox name='is just like docs, and your kitchen sink' +++++++++++++inlineTextBox ++++++++listItem -++++++++++listMarker name='3. ' nextOnLineId=inlineTextBox:"this is the second item (for now)" +++++++++++listMarker name='3. ' nextOnLineId=inlineTextBox ++++++++++++staticText ignored name='3. ' ++++++++++staticText name='this is the second item (for now)' previousOnLineId=staticText:"3. " -++++++++++++inlineTextBox name='this is the second item (for now)' previousOnLineId=staticText:"3. " +++++++++++++inlineTextBox previousOnLineId=staticText:"3. "
diff --git a/content/test/data/accessibility/html/interactive-controls-with-labels-expected-blink.txt b/content/test/data/accessibility/html/interactive-controls-with-labels-expected-blink.txt index ce2135f..562a336 100644 --- a/content/test/data/accessibility/html/interactive-controls-with-labels-expected-blink.txt +++ b/content/test/data/accessibility/html/interactive-controls-with-labels-expected-blink.txt
@@ -3,104 +3,104 @@ ++++genericContainer ignored ++++++labelText ++++++++staticText name='Test label' -++++++++++inlineTextBox name='Test label' +++++++++++inlineTextBox ++++++genericContainer name='aria label' ++++++++staticText name='Generic container' -++++++++++inlineTextBox name='Generic container' +++++++++++inlineTextBox ++++++genericContainer name='Test label' ++++++++staticText name='Generic container with aria-labelledby' -++++++++++inlineTextBox name='Generic container with aria-labelledby' +++++++++++inlineTextBox ++++++textField name='aria label' value='Textbox' ++++++++staticText name='Textbox' -++++++++++inlineTextBox name='Textbox' +++++++++++inlineTextBox ++++++textField name='Test label' value='Textbox with aria-labelledby' ++++++++staticText name='Textbox with aria-labelledby' -++++++++++inlineTextBox name='Textbox with aria-labelledby' +++++++++++inlineTextBox ++++++button name='aria label' ++++++++staticText name='Button' -++++++++++inlineTextBox name='Button' +++++++++++inlineTextBox ++++++button name='Test label' ++++++++staticText name='Button with aria-labelledby' -++++++++++inlineTextBox name='Button with aria-labelledby' +++++++++++inlineTextBox ++++++textFieldWithComboBox name='aria label' activedescendantId=listBoxOption controlsIds=listBox ++++++++genericContainer ++++++listBox ++++++++listBoxOption name='Option 1' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 1' -++++++++++++inlineTextBox name='Option 1' +++++++++++++inlineTextBox ++++++++listBoxOption name='Option 2' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 2' -++++++++++++inlineTextBox name='Option 2' +++++++++++++inlineTextBox ++++++textFieldWithComboBox name='Test label' activedescendantId=listBoxOption controlsIds=listBox ++++++++genericContainer ++++++listBox ++++++++listBoxOption name='Option 3' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 3' -++++++++++++inlineTextBox name='Option 3' +++++++++++++inlineTextBox ++++++++listBoxOption name='Option 4' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 4' -++++++++++++inlineTextBox name='Option 4' +++++++++++++inlineTextBox ++++++comboBoxMenuButton name='aria label' value='Combobox' controlsIds=listBox ++++++++staticText name='Combobox' -++++++++++inlineTextBox name='Combobox' +++++++++++inlineTextBox ++++++listBox ++++++++listBoxOption name='Option 5' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 5' -++++++++++++inlineTextBox name='Option 5' +++++++++++++inlineTextBox ++++++++listBoxOption name='Option 6' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 6' -++++++++++++inlineTextBox name='Option 6' +++++++++++++inlineTextBox ++++++comboBoxMenuButton name='Test label' value='Combobox with aria-labelledby' controlsIds=listBox ++++++++staticText name='Combobox with aria-labelledby' -++++++++++inlineTextBox name='Combobox with aria-labelledby' +++++++++++inlineTextBox ++++++listBox ++++++++listBoxOption name='Option 7' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 7' -++++++++++++inlineTextBox name='Option 7' +++++++++++++inlineTextBox ++++++++listBoxOption name='Option 8' selected=false ++++++++++none ignored ++++++++++++staticText name='%E2%80%A2 ' -++++++++++++++inlineTextBox name='%E2%80%A2 ' +++++++++++++++inlineTextBox ++++++++++staticText name='Option 8' -++++++++++++inlineTextBox name='Option 8' +++++++++++++inlineTextBox ++++++inputTime name='aria label' value='12:05' ++++++++genericContainer ignored ++++++++++genericContainer ++++++++++++genericContainer ++++++++++++++spinButton name='Hours aria label' placeholder='--' value='12' valueForRange=12.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='12' -++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Minutes aria label' placeholder='--' value='05' valueForRange=5.00 minValueForRange=0.00 maxValueForRange=59.00 ++++++++++++++++staticText name='05' -++++++++++++++++++inlineTextBox name='05' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=' ' -++++++++++++++++inlineTextBox name=' ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='AM/PM aria label' placeholder='--' value='PM' valueForRange=2.00 minValueForRange=1.00 maxValueForRange=2.00 ++++++++++++++++staticText name='PM' -++++++++++++++++++inlineTextBox name='PM' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show time picker' name='Show time picker' descriptionFrom=title ++++++inputTime name='Test label' value='12:05' ++++++++genericContainer ignored @@ -108,17 +108,17 @@ ++++++++++++genericContainer ++++++++++++++spinButton name='Hours Test label' placeholder='--' value='12' valueForRange=12.00 minValueForRange=1.00 maxValueForRange=12.00 ++++++++++++++++staticText name='12' -++++++++++++++++++inlineTextBox name='12' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=':' -++++++++++++++++inlineTextBox name=':' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='Minutes Test label' placeholder='--' value='05' valueForRange=5.00 minValueForRange=0.00 maxValueForRange=59.00 ++++++++++++++++staticText name='05' -++++++++++++++++++inlineTextBox name='05' +++++++++++++++++++inlineTextBox ++++++++++++++staticText name=' ' -++++++++++++++++inlineTextBox name=' ' +++++++++++++++++inlineTextBox ++++++++++++++spinButton name='AM/PM Test label' placeholder='--' value='PM' valueForRange=2.00 minValueForRange=1.00 maxValueForRange=2.00 ++++++++++++++++staticText name='PM' -++++++++++++++++++inlineTextBox name='PM' +++++++++++++++++++inlineTextBox ++++++++++popUpButton description='Show time picker' name='Show time picker' descriptionFrom=title ++++++colorWell name='aria label' value='#e4e4e4' ++++++++genericContainer ignored
diff --git a/content/test/data/accessibility/html/isInteresting-expected-fuchsia.txt b/content/test/data/accessibility/html/isInteresting-expected-fuchsia.txt index 4f4b4ae..0f8f6ce 100644 --- a/content/test/data/accessibility/html/isInteresting-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/isInteresting-expected-fuchsia.txt
@@ -7,8 +7,8 @@ ++++++++++UNKNOWN label='interesting on Android' ++++++UNKNOWN actions='{DEFAULT}' ++++++++STATIC_TEXT label='Div with click handler' actions='{DEFAULT}' -++++++++++UNKNOWN label='Div with click handler' +++++++++++UNKNOWN ++++++BUTTON label='I am interesting' actions='{DEFAULT}' ++++++++PARAGRAPH actions='{DEFAULT}' ++++++++++STATIC_TEXT label='I should not be interesting' actions='{DEFAULT}' -++++++++++++UNKNOWN label='I should not be interesting' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/label-expected-blink.txt b/content/test/data/accessibility/html/label-expected-blink.txt index a4a42f5..b9875f8 100644 --- a/content/test/data/accessibility/html/label-expected-blink.txt +++ b/content/test/data/accessibility/html/label-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++labelText ++++++++staticText name='Label' -++++++++++inlineTextBox name='Label' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/label-expected-fuchsia.txt b/content/test/data/accessibility/html/label-expected-fuchsia.txt index 8755afd3..a0d5ae2 100644 --- a/content/test/data/accessibility/html/label-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/label-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Label' -++++++++++UNKNOWN label='Label' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/label-for-hidden-input-expected-blink.txt b/content/test/data/accessibility/html/label-for-hidden-input-expected-blink.txt index 6d89eeba..f121713 100644 --- a/content/test/data/accessibility/html/label-for-hidden-input-expected-blink.txt +++ b/content/test/data/accessibility/html/label-for-hidden-input-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++labelText ++++++++staticText name='This label should be visible' -++++++++++inlineTextBox name='This label should be visible' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/label-with-presentational-child-expected-blink.txt b/content/test/data/accessibility/html/label-with-presentational-child-expected-blink.txt index f45e537..2338e306 100644 --- a/content/test/data/accessibility/html/label-with-presentational-child-expected-blink.txt +++ b/content/test/data/accessibility/html/label-with-presentational-child-expected-blink.txt
@@ -7,12 +7,12 @@ ++++++++genericContainer name='foo' ++++++++++genericContainer name='bar' ++++++++++++staticText name='baz' -++++++++++++++inlineTextBox name='baz' +++++++++++++++inlineTextBox ++++++lineBreak name='<newline>' -++++++++inlineTextBox name='<newline>' +++++++++inlineTextBox ++++++textField name='bar' ++++++++genericContainer ++++++labelText ++++++++genericContainer name='bar' ++++++++++staticText name='baz' -++++++++++++inlineTextBox name='baz' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/label-with-selected-option-expected-blink.txt b/content/test/data/accessibility/html/label-with-selected-option-expected-blink.txt index 79d8213..6fb508f 100644 --- a/content/test/data/accessibility/html/label-with-selected-option-expected-blink.txt +++ b/content/test/data/accessibility/html/label-with-selected-option-expected-blink.txt
@@ -5,59 +5,59 @@ ++++++++checkBox name='Test 1: Flash the screen 2 times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 1: Flash the screen ' -++++++++++++inlineTextBox name='Test 1: Flash the screen ' +++++++++++++inlineTextBox ++++++++++comboBoxSelect collapsed value='2' ++++++++++++menuListPopup invisible ++++++++++++++menuListOption invisible name='1' selected=false ++++++++++++++menuListOption name='2' selected=true ++++++++++++++menuListOption invisible name='3' selected=false ++++++++++staticText name=' times.' -++++++++++++inlineTextBox name=' times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 2: Flash the screen 2 times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 2: Flash the screen ' -++++++++++++inlineTextBox name='Test 2: Flash the screen ' +++++++++++++inlineTextBox ++++++++++listBox activedescendantId=listBoxOption ++++++++++++genericContainer ignored ++++++++++++++listBoxOption name='1' selected=false ++++++++++++++listBoxOption name='2' selected=true ++++++++++++++listBoxOption name='3' selected=false ++++++++++staticText name=' times.' -++++++++++++inlineTextBox name=' times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 3: Flash the screen two times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 3: Flash the screen ' -++++++++++++inlineTextBox name='Test 3: Flash the screen ' +++++++++++++inlineTextBox ++++++++++comboBoxSelect collapsed value='two' ++++++++++++menuListPopup invisible ++++++++++++++menuListOption invisible name='1' selected=false ++++++++++++++menuListOption name='two' selected=true ++++++++++++++menuListOption invisible name='3' selected=false ++++++++++staticText name=' times.' -++++++++++++inlineTextBox name=' times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 4: Flash the screen two times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 4: Flash the screen ' -++++++++++++inlineTextBox name='Test 4: Flash the screen ' +++++++++++++inlineTextBox ++++++++++listBox activedescendantId=listBoxOption ++++++++++++genericContainer ignored ++++++++++++++listBoxOption name='1' selected=false ++++++++++++++listBoxOption name='two' selected=true ++++++++++++++listBoxOption name='3' selected=false ++++++++++staticText name=' times.' -++++++++++++inlineTextBox name=' times.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++checkBox name='Test 5: Flash the screen two 3 times.' checkedState=false ++++++++labelText ++++++++++staticText name='Test 5: Flash the screen ' -++++++++++++inlineTextBox name='Test 5: Flash the screen ' +++++++++++++inlineTextBox ++++++++++listBox multiselectable activedescendantId=listBoxOption ++++++++++++genericContainer ignored ++++++++++++++listBoxOption name='1' selected=false ++++++++++++++listBoxOption name='two' selected=true ++++++++++++++listBoxOption name='3' selected=true ++++++++++staticText name=' times.' -++++++++++++inlineTextBox name=' times.' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/landmark-expected-blink.txt b/content/test/data/accessibility/html/landmark-expected-blink.txt index 68cd4df..83149bc 100644 --- a/content/test/data/accessibility/html/landmark-expected-blink.txt +++ b/content/test/data/accessibility/html/landmark-expected-blink.txt
@@ -3,201 +3,201 @@ ++++genericContainer ignored ++++++header ++++++++staticText name='This is a header element.' -++++++++++inlineTextBox name='This is a header element.' +++++++++++inlineTextBox ++++++complementary ++++++++staticText name='This is an aside element.' -++++++++++inlineTextBox name='This is an aside element.' +++++++++++inlineTextBox ++++++group ++++++++staticText name='This is an address element.' -++++++++++inlineTextBox name='This is an address element.' +++++++++++inlineTextBox ++++++footer ++++++++staticText name='This is a footer element.' -++++++++++inlineTextBox name='This is a footer element.' +++++++++++inlineTextBox ++++++section ++++++++staticText name='This is a form element.' -++++++++++inlineTextBox name='This is a form element.' +++++++++++inlineTextBox ++++++main ++++++++staticText name='This is a main element.' -++++++++++inlineTextBox name='This is a main element.' +++++++++++inlineTextBox ++++++navigation ++++++++staticText name='This is a nav element.' -++++++++++inlineTextBox name='This is a nav element.' +++++++++++inlineTextBox ++++++application ++++++++staticText name='This is an ARIA application landmark.' -++++++++++inlineTextBox name='This is an ARIA application landmark.' +++++++++++inlineTextBox ++++++banner ++++++++staticText name='This is an ARIA banner landmark.' -++++++++++inlineTextBox name='This is an ARIA banner landmark.' +++++++++++inlineTextBox ++++++complementary ++++++++staticText name='This is an ARIA complementary landmark.' -++++++++++inlineTextBox name='This is an ARIA complementary landmark.' +++++++++++inlineTextBox ++++++contentInfo ++++++++staticText name='This is an ARIA contentinfo landmark.' -++++++++++inlineTextBox name='This is an ARIA contentinfo landmark.' +++++++++++inlineTextBox ++++++form name='Named form' ++++++++staticText name='This is an ARIA form landmark.' -++++++++++inlineTextBox name='This is an ARIA form landmark.' +++++++++++inlineTextBox ++++++main ++++++++staticText name='This is an ARIA main landmark.' -++++++++++inlineTextBox name='This is an ARIA main landmark.' +++++++++++inlineTextBox ++++++navigation ++++++++staticText name='This is an ARIA navigation landmark.' -++++++++++inlineTextBox name='This is an ARIA navigation landmark.' +++++++++++inlineTextBox ++++++search ++++++++staticText name='This is an ARIA search landmark.' -++++++++++inlineTextBox name='This is an ARIA search landmark.' +++++++++++inlineTextBox ++++++article ++++++++headerAsNonLandmark ++++++++++staticText name='This should NOT banner role.' -++++++++++++inlineTextBox name='This should NOT banner role.' +++++++++++++inlineTextBox ++++++complementary ++++++++headerAsNonLandmark ++++++++++staticText name='This should NOT have banner role.' -++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++inlineTextBox ++++++navigation ++++++++headerAsNonLandmark ++++++++++staticText name='This should NOT have banner role.' -++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++inlineTextBox ++++++section ++++++++headerAsNonLandmark ++++++++++staticText name='This should NOT have banner role.' -++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++inlineTextBox ++++++main ++++++++headerAsNonLandmark ++++++++++staticText name='This should NOT have banner role.' -++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++inlineTextBox ++++++article ++++++++genericContainer ignored ++++++++++headerAsNonLandmark ++++++++++++staticText name='This should NOT banner role.' -++++++++++++++inlineTextBox name='This should NOT banner role.' +++++++++++++++inlineTextBox ++++++complementary ++++++++genericContainer ignored ++++++++++headerAsNonLandmark ++++++++++++staticText name='This should NOT have banner role.' -++++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++++inlineTextBox ++++++navigation ++++++++genericContainer ignored ++++++++++headerAsNonLandmark ++++++++++++staticText name='This should NOT have banner role.' -++++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++++inlineTextBox ++++++section ++++++++genericContainer ignored ++++++++++headerAsNonLandmark ++++++++++++staticText name='This should NOT have banner role.' -++++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++++inlineTextBox ++++++main ++++++++genericContainer ignored ++++++++++headerAsNonLandmark ++++++++++++staticText name='This should NOT have banner role.' -++++++++++++++inlineTextBox name='This should NOT have banner role.' +++++++++++++++inlineTextBox ++++++article ++++++++footerAsNonLandmark ++++++++++staticText name='This should NOT footer role.' -++++++++++++inlineTextBox name='This should NOT footer role.' +++++++++++++inlineTextBox ++++++complementary ++++++++footerAsNonLandmark ++++++++++staticText name='This should NOT have footer role.' -++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++inlineTextBox ++++++navigation ++++++++footerAsNonLandmark ++++++++++staticText name='This should NOT have footer role.' -++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++inlineTextBox ++++++section ++++++++footerAsNonLandmark ++++++++++staticText name='This should NOT have footer role.' -++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++inlineTextBox ++++++main ++++++++footerAsNonLandmark ++++++++++staticText name='This should NOT have footer role.' -++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++inlineTextBox ++++++article ++++++++genericContainer ignored ++++++++++footerAsNonLandmark ++++++++++++staticText name='This should NOT footer role.' -++++++++++++++inlineTextBox name='This should NOT footer role.' +++++++++++++++inlineTextBox ++++++complementary ++++++++genericContainer ignored ++++++++++footerAsNonLandmark ++++++++++++staticText name='This should NOT have footer role.' -++++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++++inlineTextBox ++++++navigation ++++++++genericContainer ignored ++++++++++footerAsNonLandmark ++++++++++++staticText name='This should NOT have footer role.' -++++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++++inlineTextBox ++++++section ++++++++genericContainer ignored ++++++++++footerAsNonLandmark ++++++++++++staticText name='This should NOT have footer role.' -++++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++++inlineTextBox ++++++main ++++++++genericContainer ignored ++++++++++footerAsNonLandmark ++++++++++++staticText name='This should NOT have footer role.' -++++++++++++++inlineTextBox name='This should NOT have footer role.' +++++++++++++++inlineTextBox ++++++article ++++++++genericContainer ++++++++++staticText name='This should NOT complementary role.' -++++++++++++inlineTextBox name='This should NOT complementary role.' +++++++++++++inlineTextBox ++++++complementary ++++++++genericContainer ++++++++++staticText name='This should NOT have complementary role.' -++++++++++++inlineTextBox name='This should NOT have complementary role.' +++++++++++++inlineTextBox ++++++navigation ++++++++genericContainer ++++++++++staticText name='This should NOT have complementary role.' -++++++++++++inlineTextBox name='This should NOT have complementary role.' +++++++++++++inlineTextBox ++++++section ++++++++genericContainer ++++++++++staticText name='This should NOT have complementary role.' -++++++++++++inlineTextBox name='This should NOT have complementary role.' +++++++++++++inlineTextBox ++++++main ++++++++complementary ++++++++++staticText name='This should have complementary role.' -++++++++++++inlineTextBox name='This should have complementary role.' +++++++++++++inlineTextBox ++++++article ++++++++genericContainer ignored ++++++++++genericContainer ++++++++++++staticText name='This should NOT complementary role.' -++++++++++++++inlineTextBox name='This should NOT complementary role.' +++++++++++++++inlineTextBox ++++++complementary ++++++++genericContainer ignored ++++++++++genericContainer ++++++++++++staticText name='This should NOT have complementary role.' -++++++++++++++inlineTextBox name='This should NOT have complementary role.' +++++++++++++++inlineTextBox ++++++navigation ++++++++genericContainer ignored ++++++++++genericContainer ++++++++++++staticText name='This should NOT have complementary role.' -++++++++++++++inlineTextBox name='This should NOT have complementary role.' +++++++++++++++inlineTextBox ++++++section ++++++++genericContainer ignored ++++++++++genericContainer ++++++++++++staticText name='This should NOT have complementary role.' -++++++++++++++inlineTextBox name='This should NOT have complementary role.' +++++++++++++++inlineTextBox ++++++main ++++++++genericContainer ignored ++++++++++complementary ++++++++++++staticText name='This should have complementary role.' -++++++++++++++inlineTextBox name='This should have complementary role.' +++++++++++++++inlineTextBox ++++++article ++++++++genericContainer ignored ++++++++++complementary ++++++++++++staticText name='This should have complementary role.' -++++++++++++++inlineTextBox name='This should have complementary role.' +++++++++++++++inlineTextBox ++++++complementary ++++++++genericContainer ignored ++++++++++complementary ++++++++++++staticText name='This should have complementary role.' -++++++++++++++inlineTextBox name='This should have complementary role.' +++++++++++++++inlineTextBox ++++++navigation ++++++++genericContainer ignored ++++++++++complementary ++++++++++++staticText name='This should have complementary role.' -++++++++++++++inlineTextBox name='This should have complementary role.' +++++++++++++++inlineTextBox ++++++section ++++++++genericContainer ignored ++++++++++complementary ++++++++++++staticText name='This should have complementary role.' -++++++++++++++inlineTextBox name='This should have complementary role.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/landmark-expected-fuchsia.txt b/content/test/data/accessibility/html/landmark-expected-fuchsia.txt index d25949eb..07d7646 100644 --- a/content/test/data/accessibility/html/landmark-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/landmark-expected-fuchsia.txt
@@ -3,201 +3,201 @@ ++++UNKNOWN hidden ++++++HEADER ++++++++STATIC_TEXT label='This is a header element.' -++++++++++UNKNOWN label='This is a header element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an aside element.' -++++++++++UNKNOWN label='This is an aside element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an address element.' -++++++++++UNKNOWN label='This is an address element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is a footer element.' -++++++++++UNKNOWN label='This is a footer element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is a form element.' -++++++++++UNKNOWN label='This is a form element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is a main element.' -++++++++++UNKNOWN label='This is a main element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is a nav element.' -++++++++++UNKNOWN label='This is a nav element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA application landmark.' -++++++++++UNKNOWN label='This is an ARIA application landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA banner landmark.' -++++++++++UNKNOWN label='This is an ARIA banner landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA complementary landmark.' -++++++++++UNKNOWN label='This is an ARIA complementary landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA contentinfo landmark.' -++++++++++UNKNOWN label='This is an ARIA contentinfo landmark.' +++++++++++UNKNOWN ++++++UNKNOWN label='Named form' ++++++++STATIC_TEXT label='This is an ARIA form landmark.' -++++++++++UNKNOWN label='This is an ARIA form landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA main landmark.' -++++++++++UNKNOWN label='This is an ARIA main landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA navigation landmark.' -++++++++++UNKNOWN label='This is an ARIA navigation landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA search landmark.' -++++++++++UNKNOWN label='This is an ARIA search landmark.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT banner role.' -++++++++++++UNKNOWN label='This should NOT banner role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT banner role.' -++++++++++++++UNKNOWN label='This should NOT banner role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have banner role.' -++++++++++++++UNKNOWN label='This should NOT have banner role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT footer role.' -++++++++++++UNKNOWN label='This should NOT footer role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT footer role.' -++++++++++++++UNKNOWN label='This should NOT footer role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have footer role.' -++++++++++++++UNKNOWN label='This should NOT have footer role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT complementary role.' -++++++++++++UNKNOWN label='This should NOT complementary role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have complementary role.' -++++++++++++UNKNOWN label='This should NOT have complementary role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have complementary role.' -++++++++++++UNKNOWN label='This should NOT have complementary role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should NOT have complementary role.' -++++++++++++UNKNOWN label='This should NOT have complementary role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='This should have complementary role.' -++++++++++++UNKNOWN label='This should have complementary role.' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT complementary role.' -++++++++++++++UNKNOWN label='This should NOT complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have complementary role.' -++++++++++++++UNKNOWN label='This should NOT have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have complementary role.' -++++++++++++++UNKNOWN label='This should NOT have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should NOT have complementary role.' -++++++++++++++UNKNOWN label='This should NOT have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should have complementary role.' -++++++++++++++UNKNOWN label='This should have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should have complementary role.' -++++++++++++++UNKNOWN label='This should have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should have complementary role.' -++++++++++++++UNKNOWN label='This should have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should have complementary role.' -++++++++++++++UNKNOWN label='This should have complementary role.' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='This should have complementary role.' -++++++++++++++UNKNOWN label='This should have complementary role.' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/layout-table-in-button-expected-blink.txt b/content/test/data/accessibility/html/layout-table-in-button-expected-blink.txt index a9c2a1a..1082068 100644 --- a/content/test/data/accessibility/html/layout-table-in-button-expected-blink.txt +++ b/content/test/data/accessibility/html/layout-table-in-button-expected-blink.txt
@@ -7,4 +7,4 @@ ++++++++++++layoutTableCell name='Conversation with Foo. 0 unread messages.' ++++++++++++++genericContainer name='Conversation with Foo. 0 unread messages.' ++++++++++++++++staticText name='Foo' -++++++++++++++++++inlineTextBox name='Foo' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/layout-table-in-button-expected-fuchsia.txt b/content/test/data/accessibility/html/layout-table-in-button-expected-fuchsia.txt index 358f40f..610739e0b 100644 --- a/content/test/data/accessibility/html/layout-table-in-button-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/layout-table-in-button-expected-fuchsia.txt
@@ -7,4 +7,4 @@ ++++++++++++UNKNOWN label='Conversation with Foo. 0 unread messages.' ++++++++++++++UNKNOWN label='Conversation with Foo. 0 unread messages.' ++++++++++++++++STATIC_TEXT label='Foo' -++++++++++++++++++UNKNOWN label='Foo' +++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/legend-expected-blink.txt b/content/test/data/accessibility/html/legend-expected-blink.txt index 0bd53a5ba..27759d2 100644 --- a/content/test/data/accessibility/html/legend-expected-blink.txt +++ b/content/test/data/accessibility/html/legend-expected-blink.txt
@@ -5,12 +5,12 @@ ++++++++group name='Browser Engines:' ++++++++++legend ++++++++++++staticText name='Browser Engines:' -++++++++++++++inlineTextBox name='Browser Engines:' +++++++++++++++inlineTextBox ++++++++++staticText name='Browser: ' -++++++++++++inlineTextBox name='Browser: ' +++++++++++++inlineTextBox ++++++++++textField ++++++++++++genericContainer ++++++++++staticText name=' Rendering Engine: ' -++++++++++++inlineTextBox name=' Rendering Engine: ' +++++++++++++inlineTextBox ++++++++++textField ++++++++++++genericContainer
diff --git a/content/test/data/accessibility/html/legend-expected-fuchsia.txt b/content/test/data/accessibility/html/legend-expected-fuchsia.txt index bdf4505b..fb58d6b 100644 --- a/content/test/data/accessibility/html/legend-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/legend-expected-fuchsia.txt
@@ -5,12 +5,12 @@ ++++++++UNKNOWN label='Browser Engines:' ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='Browser Engines:' -++++++++++++++UNKNOWN label='Browser Engines:' +++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='Browser: ' -++++++++++++UNKNOWN label='Browser: ' +++++++++++++UNKNOWN ++++++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' ++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' Rendering Engine: ' -++++++++++++UNKNOWN label=' Rendering Engine: ' +++++++++++++UNKNOWN ++++++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' ++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/li-expected-blink.txt b/content/test/data/accessibility/html/li-expected-blink.txt index 4f3b47be..10a2461 100644 --- a/content/test/data/accessibility/html/li-expected-blink.txt +++ b/content/test/data/accessibility/html/li-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++listMarker display='inline-block' name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listItem display='list-item' hierarchicalLevel=1 setSize=3 posInSet=2 ++++++++++listMarker display='inline-block' name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listItem display='list-item' hierarchicalLevel=1 setSize=3 posInSet=3 ++++++++++listMarker display='inline-block' name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/li-expected-fuchsia.txt b/content/test/data/accessibility/html/li-expected-fuchsia.txt index 382edd20..bd6d0b60 100644 --- a/content/test/data/accessibility/html/li-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/li-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Item 1' -++++++++++++UNKNOWN label='Item 1' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Item 2' -++++++++++++UNKNOWN label='Item 2' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Item 3' -++++++++++++UNKNOWN label='Item 3' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt b/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt index 98cd38d..7ed9287 100644 --- a/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt +++ b/content/test/data/accessibility/html/link-inside-heading-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++heading name='Link In Heading' hierarchicalLevel=1 ++++++++link name='Link In Heading' ++++++++++staticText name='Link In Heading' -++++++++++++inlineTextBox name='Link In Heading' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/link-inside-heading-expected-fuchsia.txt b/content/test/data/accessibility/html/link-inside-heading-expected-fuchsia.txt index d29ef3b..058247a 100644 --- a/content/test/data/accessibility/html/link-inside-heading-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/link-inside-heading-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++UNKNOWN label='Link In Heading' ++++++++LINK focusable label='Link In Heading' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Link In Heading' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Link In Heading' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/link-target-expected-blink.txt b/content/test/data/accessibility/html/link-target-expected-blink.txt index 35907c47..c91e05d 100644 --- a/content/test/data/accessibility/html/link-target-expected-blink.txt +++ b/content/test/data/accessibility/html/link-target-expected-blink.txt
@@ -3,27 +3,27 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Top context.' -++++++++++inlineTextBox name='Top context.' +++++++++++inlineTextBox ++++++iframe ++++++++rootWebArea ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++paragraph ++++++++++++++++staticText name='First context.' -++++++++++++++++++inlineTextBox name='First context.' +++++++++++++++++++inlineTextBox ++++++++++++++link name='Self target. Opens in this iframe. ' ++++++++++++++++staticText name='Self target. Opens in this iframe. ' -++++++++++++++++++inlineTextBox name='Self target. Opens in this iframe. ' +++++++++++++++++++inlineTextBox ++++++++++++++link name='Parent target. Opens in the body of the whole page.' linkTarget='_parent' ++++++++++++++++staticText name='Parent target. Opens in the body of the whole page.' ++++++++++++++++++inlineTextBox name='Parent ' ++++++++++++++++++inlineTextBox name='target. Opens in the body of the whole page.' ++++++link name='Base target. Open in blank. ' linkTarget='_top' ++++++++staticText name='Base target. Open in blank. ' -++++++++++inlineTextBox name='Base target. Open in blank. ' +++++++++++inlineTextBox ++++++link name='Top target. Opens in current context. ' linkTarget='_top' ++++++++staticText name='Top target. Opens in current context. ' -++++++++++inlineTextBox name='Top target. Opens in current context. ' +++++++++++inlineTextBox ++++++link name='Opens in iframe.' linkTarget='iframeContext' ++++++++staticText name='Opens in iframe.' ++++++++++inlineTextBox name='Opens in '
diff --git a/content/test/data/accessibility/html/list-expected-blink.txt b/content/test/data/accessibility/html/list-expected-blink.txt index 38f9a97..af74911 100644 --- a/content/test/data/accessibility/html/list-expected-blink.txt +++ b/content/test/data/accessibility/html/list-expected-blink.txt
@@ -6,28 +6,28 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='tic' -++++++++++++inlineTextBox name='tic' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='tac' -++++++++++++inlineTextBox name='tac' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='toe' -++++++++++++inlineTextBox name='toe' +++++++++++++inlineTextBox ++++++list ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='tic' -++++++++++++inlineTextBox name='tic' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='tac' -++++++++++++inlineTextBox name='tac' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='toe' -++++++++++++inlineTextBox name='toe' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-expected-fuchsia.txt b/content/test/data/accessibility/html/list-expected-fuchsia.txt index fdc1814..9d89714 100644 --- a/content/test/data/accessibility/html/list-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/list-expected-fuchsia.txt
@@ -6,28 +6,28 @@ ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='tic' -++++++++++++UNKNOWN label='tic' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='tac' -++++++++++++UNKNOWN label='tac' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='toe' -++++++++++++UNKNOWN label='toe' +++++++++++++UNKNOWN ++++++LIST list_size=3 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++STATIC_TEXT label='tic' -++++++++++++UNKNOWN label='tic' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++STATIC_TEXT label='tac' -++++++++++++UNKNOWN label='tac' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++STATIC_TEXT label='toe' -++++++++++++UNKNOWN label='toe' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-blink.txt b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-blink.txt index b4c39e6..5e73a43 100644 --- a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-blink.txt +++ b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-blink.txt
@@ -4,20 +4,20 @@ ++++++list setSize=8 ++++++++listItem hierarchicalLevel=1 setSize=-1 posInSet=5 ++++++++++staticText name='Level 1, item 5 of set size unknown' -++++++++++++inlineTextBox name='Level 1, item 5 of set size unknown' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 setSize=-1 posInSet=6 ++++++++++staticText name='Level 1, item 6 of set size unknown' -++++++++++++inlineTextBox name='Level 1, item 6 of set size unknown' +++++++++++++inlineTextBox ++++++++++list setSize=7 ++++++++++++listItem hierarchicalLevel=2 setSize=-1 posInSet=6 ++++++++++++++staticText name='Level 2, item 6 of set size unknown' -++++++++++++++++inlineTextBox name='Level 2, item 6 of set size unknown' +++++++++++++++++inlineTextBox ++++++++++++listItem hierarchicalLevel=2 setSize=-1 posInSet=7 ++++++++++++++staticText name='Level 2, item 7 of set size unknown' -++++++++++++++++inlineTextBox name='Level 2, item 7 of set size unknown' +++++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 setSize=2 posInSet=7 ++++++++++staticText name='Level 1, item 7 of set size 2' -++++++++++++inlineTextBox name='Level 1, item 7 of set size 2' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 setSize=3 posInSet=8 ++++++++++staticText name='Level 1, item 8 of set size 3' -++++++++++++inlineTextBox name='Level 1, item 8 of set size 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-fuchsia.txt b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-fuchsia.txt index 86bd50ad..5246847 100644 --- a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-expected-fuchsia.txt
@@ -4,20 +4,20 @@ ++++++LIST list_size=8 ++++++++LIST_ELEMENT list_element_index=5 ++++++++++STATIC_TEXT label='Level 1, item 5 of set size unknown' -++++++++++++UNKNOWN label='Level 1, item 5 of set size unknown' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=6 ++++++++++STATIC_TEXT label='Level 1, item 6 of set size unknown' -++++++++++++UNKNOWN label='Level 1, item 6 of set size unknown' +++++++++++++UNKNOWN ++++++++++LIST list_size=7 ++++++++++++LIST_ELEMENT list_element_index=6 ++++++++++++++STATIC_TEXT label='Level 2, item 6 of set size unknown' -++++++++++++++++UNKNOWN label='Level 2, item 6 of set size unknown' +++++++++++++++++UNKNOWN ++++++++++++LIST_ELEMENT list_element_index=7 ++++++++++++++STATIC_TEXT label='Level 2, item 7 of set size unknown' -++++++++++++++++UNKNOWN label='Level 2, item 7 of set size unknown' +++++++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=7 ++++++++++STATIC_TEXT label='Level 1, item 7 of set size 2' -++++++++++++UNKNOWN label='Level 1, item 7 of set size 2' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=8 ++++++++++STATIC_TEXT label='Level 1, item 8 of set size 3' -++++++++++++UNKNOWN label='Level 1, item 8 of set size 3' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-blink.txt b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-blink.txt index eb7ac91..4f56bc9 100644 --- a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-blink.txt +++ b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-blink.txt
@@ -4,41 +4,41 @@ ++++++list setSize=1 ++++++++listItem hierarchicalLevel=1 setSize=-1 posInSet=1 ++++++++++staticText name='Level 1, item 1 of set size unknown' -++++++++++++inlineTextBox name='Level 1, item 1 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=1 ++++++++listItem hierarchicalLevel=2 setSize=-1 posInSet=1 ++++++++++staticText name='++Level 2, item 1 of set size unknown' -++++++++++++inlineTextBox name='++Level 2, item 1 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=2 ++++++++listItem hierarchicalLevel=2 setSize=-1 posInSet=2 ++++++++++staticText name='++Level 2, item 2 of set size unknown' -++++++++++++inlineTextBox name='++Level 2, item 2 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=3 ++++++++listItem hierarchicalLevel=2 setSize=-1 posInSet=3 ++++++++++staticText name='++Level 2, item 3 of set size unknown' -++++++++++++inlineTextBox name='++Level 2, item 3 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=1 ++++++++listItem hierarchicalLevel=3 setSize=-1 posInSet=1 ++++++++++staticText name='++++Level 3, item 1 of set size unknown' -++++++++++++inlineTextBox name='++++Level 3, item 1 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=2 ++++++++listItem hierarchicalLevel=3 setSize=-1 posInSet=2 ++++++++++staticText name='++++Level 3, item 2 of set size unknown' -++++++++++++inlineTextBox name='++++Level 3, item 2 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=2 ++++++++listItem hierarchicalLevel=1 setSize=-1 posInSet=2 ++++++++++staticText name='Level 1, item 2 of set size unknown' -++++++++++++inlineTextBox name='Level 1, item 2 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=3 ++++++++listItem hierarchicalLevel=1 setSize=-1 posInSet=3 ++++++++++staticText name='Level 1, item 3 of set size unknown' -++++++++++++inlineTextBox name='Level 1, item 3 of set size unknown' +++++++++++++inlineTextBox ++++++list setSize=0 ++++++++list setSize=4 ++++++++++listItem hierarchicalLevel=2 setSize=4 posInSet=4 ++++++++++++staticText name='Level Unspecified, aria-setsize attribute does not exist, item 4 of set size 4' -++++++++++++++inlineTextBox name='Level Unspecified, aria-setsize attribute does not exist, item 4 of set size 4' +++++++++++++++inlineTextBox ++++++++list setSize=5 ++++++++++listItem hierarchicalLevel=2 setSize=5 posInSet=5 ++++++++++++staticText name='Level Unspecified, aria-setsize attribute does not exist, item 5 of set size 5' -++++++++++++++inlineTextBox name='Level Unspecified, aria-setsize attribute does not exist, item 5 of set size 5' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-fuchsia.txt b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-fuchsia.txt index eabface..42a48cd 100644 --- a/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/list-item-aria-setsize-unknown-flattened-expected-fuchsia.txt
@@ -4,41 +4,41 @@ ++++++LIST list_size=1 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++STATIC_TEXT label='Level 1, item 1 of set size unknown' -++++++++++++UNKNOWN label='Level 1, item 1 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=1 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++STATIC_TEXT label='++Level 2, item 1 of set size unknown' -++++++++++++UNKNOWN label='++Level 2, item 1 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=2 ++++++++LIST_ELEMENT list_element_index=2 ++++++++++STATIC_TEXT label='++Level 2, item 2 of set size unknown' -++++++++++++UNKNOWN label='++Level 2, item 2 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=3 ++++++++LIST_ELEMENT list_element_index=3 ++++++++++STATIC_TEXT label='++Level 2, item 3 of set size unknown' -++++++++++++UNKNOWN label='++Level 2, item 3 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=1 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++STATIC_TEXT label='++++Level 3, item 1 of set size unknown' -++++++++++++UNKNOWN label='++++Level 3, item 1 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=2 ++++++++LIST_ELEMENT list_element_index=2 ++++++++++STATIC_TEXT label='++++Level 3, item 2 of set size unknown' -++++++++++++UNKNOWN label='++++Level 3, item 2 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=2 ++++++++LIST_ELEMENT list_element_index=2 ++++++++++STATIC_TEXT label='Level 1, item 2 of set size unknown' -++++++++++++UNKNOWN label='Level 1, item 2 of set size unknown' +++++++++++++UNKNOWN ++++++LIST list_size=3 ++++++++LIST_ELEMENT list_element_index=3 ++++++++++STATIC_TEXT label='Level 1, item 3 of set size unknown' -++++++++++++UNKNOWN label='Level 1, item 3 of set size unknown' +++++++++++++UNKNOWN ++++++LIST ++++++++LIST list_size=4 ++++++++++LIST_ELEMENT list_element_index=4 ++++++++++++STATIC_TEXT label='Level Unspecified, aria-setsize attribute does not exist, item 4 of set size 4' -++++++++++++++UNKNOWN label='Level Unspecified, aria-setsize attribute does not exist, item 4 of set size 4' +++++++++++++++UNKNOWN ++++++++LIST list_size=5 ++++++++++LIST_ELEMENT list_element_index=5 ++++++++++++STATIC_TEXT label='Level Unspecified, aria-setsize attribute does not exist, item 5 of set size 5' -++++++++++++++UNKNOWN label='Level Unspecified, aria-setsize attribute does not exist, item 5 of set size 5' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/list-item-level-expected-blink.txt b/content/test/data/accessibility/html/list-item-level-expected-blink.txt index 34cd7cd..d195d4d 100644 --- a/content/test/data/accessibility/html/list-item-level-expected-blink.txt +++ b/content/test/data/accessibility/html/list-item-level-expected-blink.txt
@@ -4,47 +4,47 @@ ++++++list ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='Level 1, Item 1' -++++++++++++inlineTextBox name='Level 1, Item 1' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='Level 1, Item 2' -++++++++++++inlineTextBox name='Level 1, Item 2' +++++++++++++inlineTextBox ++++++++list ++++++++++listItem hierarchicalLevel=2 ++++++++++++staticText name='Level 2a, Item 1' -++++++++++++++inlineTextBox name='Level 2a, Item 1' +++++++++++++++inlineTextBox ++++++++++listItem hierarchicalLevel=2 ++++++++++++staticText name='Level 2a, Item 2' -++++++++++++++inlineTextBox name='Level 2a, Item 2' +++++++++++++++inlineTextBox ++++++++++list ++++++++++++listItem hierarchicalLevel=3 ++++++++++++++staticText name='Level 3, Item 1' -++++++++++++++++inlineTextBox name='Level 3, Item 1' +++++++++++++++++inlineTextBox ++++++++++++listItem hierarchicalLevel=3 ++++++++++++++staticText name='Level 3, Item 2' -++++++++++++++++inlineTextBox name='Level 3, Item 2' +++++++++++++++++inlineTextBox ++++++++++++++list ++++++++++++++++listItem hierarchicalLevel=4 ++++++++++++++++++staticText name='Level 4, Item 1' -++++++++++++++++++++inlineTextBox name='Level 4, Item 1' +++++++++++++++++++++inlineTextBox ++++++++++++++++listItem hierarchicalLevel=4 ++++++++++++++++++staticText name='Level 4, Item 2' -++++++++++++++++++++inlineTextBox name='Level 4, Item 2' +++++++++++++++++++++inlineTextBox ++++++++++++++++listItem hierarchicalLevel=4 ++++++++++++++++++staticText name='Level 4, Item 3' -++++++++++++++++++++inlineTextBox name='Level 4, Item 3' +++++++++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='Level 1, Item 3' -++++++++++++inlineTextBox name='Level 1, Item 3' +++++++++++++inlineTextBox ++++++++++list ++++++++++++listItem hierarchicalLevel=2 ++++++++++++++staticText name='Level 2b, Item 1' -++++++++++++++++inlineTextBox name='Level 2b, Item 1' +++++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='Level 1, Item 4' -++++++++++++inlineTextBox name='Level 1, Item 4' +++++++++++++inlineTextBox ++++++listItem hierarchicalLevel=1 ++++++++staticText name='Level 1, Not within list group, Item 1' -++++++++++inlineTextBox name='Level 1, Not within list group, Item 1' +++++++++++inlineTextBox ++++++listItem hierarchicalLevel=1 ++++++++staticText name='Level 1, Not within list group, Item 2' -++++++++++inlineTextBox name='Level 1, Not within list group, Item 2' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-item-nested-div-expected-blink.txt b/content/test/data/accessibility/html/list-item-nested-div-expected-blink.txt index 917758f..9809611 100644 --- a/content/test/data/accessibility/html/list-item-nested-div-expected-blink.txt +++ b/content/test/data/accessibility/html/list-item-nested-div-expected-blink.txt
@@ -7,49 +7,49 @@ ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++genericContainer ++++++++++++staticText name='tic' -++++++++++++++inlineTextBox name='tic' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++button name='a button' ++++++++++++staticText name='a button' -++++++++++++++inlineTextBox name='a button' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++genericContainer ++++++++++++staticText name='tac' -++++++++++++++inlineTextBox name='tac' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++genericContainer ++++++++++++staticText name='toe' -++++++++++++++inlineTextBox name='toe' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++link name='a link' ++++++++++++staticText name='a link' -++++++++++++++inlineTextBox name='a link' +++++++++++++++inlineTextBox ++++++list ++++++++listItem hierarchicalLevel=1 ++++++++++genericContainer ++++++++++++staticText name='tic' -++++++++++++++inlineTextBox name='tic' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++button name='a button' ++++++++++++staticText name='a button' -++++++++++++++inlineTextBox name='a button' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++genericContainer ++++++++++++staticText name='tac' -++++++++++++++inlineTextBox name='tac' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++genericContainer ++++++++++++staticText name='toe' -++++++++++++++inlineTextBox name='toe' +++++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++link name='a link' ++++++++++++staticText name='a link' -++++++++++++++inlineTextBox name='a link' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-marker-styles-expected-blink.txt b/content/test/data/accessibility/html/list-marker-styles-expected-blink.txt index c23cde40..5bea63d 100644 --- a/content/test/data/accessibility/html/list-marker-styles-expected-blink.txt +++ b/content/test/data/accessibility/html/list-marker-styles-expected-blink.txt
@@ -4,89 +4,89 @@ ++++++list ++++++++listItem ++++++++++staticText name='none' -++++++++++++inlineTextBox name='none' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=circle ++++++++++listMarker name='%E2%97%A6 ' ++++++++++++staticText ignored name='%E2%97%A6 ' ++++++++++staticText name='circle' -++++++++++++inlineTextBox name='circle' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=disc ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='disc' -++++++++++++inlineTextBox name='disc' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=image ++++++++++listMarker name=' ' ++++++++++++image ++++++++++staticText name='image' -++++++++++++inlineTextBox name='image' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=square ++++++++++listMarker name='%E2%96%A0 ' ++++++++++++staticText ignored name='%E2%96%A0 ' ++++++++++staticText name='square' -++++++++++++inlineTextBox name='square' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=numeric ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='1. ' ++++++++++staticText name='decimal' -++++++++++++inlineTextBox name='decimal' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker name='I. ' ++++++++++++staticText ignored name='I. ' ++++++++++staticText name='upper-roman' -++++++++++++inlineTextBox name='upper-roman' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker name='%D4%B1. ' ++++++++++++staticText ignored name='%D4%B1. ' ++++++++++staticText name='armenian' -++++++++++++inlineTextBox name='armenian' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker name='a. ' ++++++++++++staticText ignored name='a. ' ++++++++++staticText name='lower-alpha' -++++++++++++inlineTextBox name='lower-alpha' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker name='foo' ++++++++++++staticText ignored name='foo' ++++++++++staticText name=''foo'' -++++++++++++inlineTextBox name=''foo'' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=circle ++++++++++staticText name='content: none' -++++++++++++inlineTextBox name='content: none' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker ++++++++++++staticText ignored name='bar' ++++++++++staticText name='content: 'bar'' -++++++++++++inlineTextBox name='content: 'bar'' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=image ++++++++++listMarker ++++++++++++staticText ignored name='baz' ++++++++++staticText name='content: 'baz'' -++++++++++++inlineTextBox name='content: 'baz'' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=numeric ++++++++++listMarker ++++++++++++image ++++++++++staticText name='content: url('bullet.png')' -++++++++++++inlineTextBox name='content: url('bullet.png')' +++++++++++++inlineTextBox ++++++list ++++++++listItem listStyle=other ++++++++++listMarker ++++++++++++staticText ignored name='0' ++++++++++staticText name='content: counter(c)' -++++++++++++inlineTextBox name='content: counter(c)' +++++++++++++inlineTextBox ++++++list ++++++++listItem ++++++++++listMarker @@ -94,4 +94,4 @@ ++++++++++++image ++++++++++++staticText ignored name='0' ++++++++++staticText name='content: 'foo' url('bullet.png') counter(c)' -++++++++++++inlineTextBox name='content: 'foo' url('bullet.png') counter(c)' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-markers-expected-blink.txt b/content/test/data/accessibility/html/list-markers-expected-blink.txt index 2fce811c..6c44ed8 100644 --- a/content/test/data/accessibility/html/list-markers-expected-blink.txt +++ b/content/test/data/accessibility/html/list-markers-expected-blink.txt
@@ -6,27 +6,27 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='First item properly groups itself despite ' -++++++++++++inlineTextBox name='First item properly groups itself despite ' +++++++++++++inlineTextBox ++++++++++staticText name='bolded' -++++++++++++inlineTextBox name='bolded' +++++++++++++inlineTextBox ++++++++++staticText name=' text.' -++++++++++++inlineTextBox name=' text.' +++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='This should also be ' -++++++++++++inlineTextBox name='This should also be ' +++++++++++++inlineTextBox ++++++++++staticText name='seen' -++++++++++++inlineTextBox name='seen' +++++++++++++inlineTextBox ++++++++++staticText name=' as a group.' -++++++++++++inlineTextBox name=' as a group.' +++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Some ' -++++++++++++inlineTextBox name='Some ' +++++++++++++inlineTextBox ++++++++++strong ++++++++++++staticText name='more' -++++++++++++++inlineTextBox name='more' +++++++++++++++inlineTextBox ++++++++++staticText name=' text.' -++++++++++++inlineTextBox name=' text.' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-markers-expected-fuchsia.txt b/content/test/data/accessibility/html/list-markers-expected-fuchsia.txt index b666db5..c031336 100644 --- a/content/test/data/accessibility/html/list-markers-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/list-markers-expected-fuchsia.txt
@@ -6,27 +6,27 @@ ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='First item properly groups itself despite ' -++++++++++++UNKNOWN label='First item properly groups itself despite ' +++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='bolded' -++++++++++++UNKNOWN label='bolded' +++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' text.' -++++++++++++UNKNOWN label=' text.' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='This should also be ' -++++++++++++UNKNOWN label='This should also be ' +++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='seen' -++++++++++++UNKNOWN label='seen' +++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' as a group.' -++++++++++++UNKNOWN label=' as a group.' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Some ' -++++++++++++UNKNOWN label='Some ' +++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='more' -++++++++++++++UNKNOWN label='more' +++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' text.' -++++++++++++UNKNOWN label=' text.' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/list-text-addition-expected-blink.txt b/content/test/data/accessibility/html/list-text-addition-expected-blink.txt index d42d8c88..9a0b452 100644 --- a/content/test/data/accessibility/html/list-text-addition-expected-blink.txt +++ b/content/test/data/accessibility/html/list-text-addition-expected-blink.txt
@@ -2,24 +2,24 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='$' -++++++++inlineTextBox name='$' +++++++++inlineTextBox ++++++list name='inline list' ++++++++staticText name='$' -++++++++++inlineTextBox name='$' +++++++++++inlineTextBox ++++++++listItem ++++++++++staticText name='item' -++++++++++++inlineTextBox name='item' +++++++++++++inlineTextBox ++++++++staticText name='$' -++++++++++inlineTextBox name='$' +++++++++++inlineTextBox ++++++staticText name='$' -++++++++inlineTextBox name='$' +++++++++inlineTextBox ++++++list name='block list' ++++++++staticText name='$' -++++++++++inlineTextBox name='$' +++++++++++inlineTextBox ++++++++listItem ++++++++++staticText name='item' -++++++++++++inlineTextBox name='item' +++++++++++++inlineTextBox ++++++++staticText name='$' -++++++++++inlineTextBox name='$' +++++++++++inlineTextBox ++++++staticText name='$' -++++++++inlineTextBox name='$' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-text-expected-blink.txt b/content/test/data/accessibility/html/list-text-expected-blink.txt index d46e926..28c8783 100644 --- a/content/test/data/accessibility/html/list-text-expected-blink.txt +++ b/content/test/data/accessibility/html/list-text-expected-blink.txt
@@ -6,36 +6,36 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='1. ' ++++++++++staticText name='tic' -++++++++++++inlineTextBox name='tic' +++++++++++++inlineTextBox ++++++++staticText name='^' -++++++++++inlineTextBox name='^' +++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='2. ' ++++++++++staticText name='tac' -++++++++++++inlineTextBox name='tac' +++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='3. ' ++++++++++++staticText ignored name='3. ' ++++++++++staticText name='toe' -++++++++++++inlineTextBox name='toe' +++++++++++++inlineTextBox ++++++++staticText name='|' -++++++++++inlineTextBox name='|' +++++++++++inlineTextBox ++++++staticText name='^' -++++++++inlineTextBox name='^' +++++++++inlineTextBox ++++++list ++++++++listItem ++++++++++staticText name='tic' -++++++++++++inlineTextBox name='tic' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++listItem ++++++++++staticText name='tac' -++++++++++++inlineTextBox name='tac' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++listItem ++++++++++staticText name='toe' -++++++++++++inlineTextBox name='toe' +++++++++++++inlineTextBox ++++++staticText name='|' -++++++++inlineTextBox name='|' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/list-text-removal-expected-blink.txt b/content/test/data/accessibility/html/list-text-removal-expected-blink.txt index ff968967..4d476d9 100644 --- a/content/test/data/accessibility/html/list-text-removal-expected-blink.txt +++ b/content/test/data/accessibility/html/list-text-removal-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++list ++++++++listItem hierarchicalLevel=1 ++++++++++staticText name='item' -++++++++++++inlineTextBox name='item' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/main-expected-blink.txt b/content/test/data/accessibility/html/main-expected-blink.txt index 8e2b107..17ebbbb 100644 --- a/content/test/data/accessibility/html/main-expected-blink.txt +++ b/content/test/data/accessibility/html/main-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++main ++++++++staticText name='This is main element.' -++++++++++inlineTextBox name='This is main element.' +++++++++++inlineTextBox ++++++main ++++++++staticText name='This is an ARIA role main.' -++++++++++inlineTextBox name='This is an ARIA role main.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/main-expected-fuchsia.txt b/content/test/data/accessibility/html/main-expected-fuchsia.txt index a743ec6..f46daa9 100644 --- a/content/test/data/accessibility/html/main-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/main-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='This is main element.' -++++++++++UNKNOWN label='This is main element.' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='This is an ARIA role main.' -++++++++++UNKNOWN label='This is an ARIA role main.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/map-any-contents-expected-blink.txt b/content/test/data/accessibility/html/map-any-contents-expected-blink.txt index 62dc040..d969b4a2 100644 --- a/content/test/data/accessibility/html/map-any-contents-expected-blink.txt +++ b/content/test/data/accessibility/html/map-any-contents-expected-blink.txt
@@ -4,17 +4,17 @@ ++++++image name='pipe' ++++++++heading name='Headings are allowed in a map' ++++++++++staticText name='Headings are allowed in a map' -++++++++++++inlineTextBox name='Headings are allowed in a map' +++++++++++++inlineTextBox ++++++++link name='pipe1' ++++++++paragraph ++++++++++staticText name='So are ' -++++++++++++inlineTextBox name='So are ' +++++++++++++inlineTextBox ++++++++++mark ++++++++++++staticText name='other elements' -++++++++++++++inlineTextBox name='other elements' +++++++++++++++inlineTextBox ++++++++++staticText name='!' -++++++++++++inlineTextBox name='!' +++++++++++++inlineTextBox ++++++++staticText ignored name='pipe2' ++++++++button name='Even a button' ++++++++++staticText name='Even a button' -++++++++++++inlineTextBox name='Even a button' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/mark-expected-blink.txt b/content/test/data/accessibility/html/mark-expected-blink.txt index 521a4fa..af272ead6 100644 --- a/content/test/data/accessibility/html/mark-expected-blink.txt +++ b/content/test/data/accessibility/html/mark-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This test is to check ' -++++++++++inlineTextBox name='This test is to check ' +++++++++++inlineTextBox ++++++++mark ++++++++++staticText name='mark tag' -++++++++++++inlineTextBox name='mark tag' +++++++++++++inlineTextBox ++++++++staticText name='.' -++++++++++inlineTextBox name='.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/mark-expected-fuchsia.txt b/content/test/data/accessibility/html/mark-expected-fuchsia.txt index 224424d0..38ec6f15 100644 --- a/content/test/data/accessibility/html/mark-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/mark-expected-fuchsia.txt
@@ -3,9 +3,9 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This test is to check ' -++++++++++UNKNOWN label='This test is to check ' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='mark tag' -++++++++++++UNKNOWN label='mark tag' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label='.' -++++++++++UNKNOWN label='.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/math-expected-fuchsia.txt b/content/test/data/accessibility/html/math-expected-fuchsia.txt index 68d0a99..6a96a66 100644 --- a/content/test/data/accessibility/html/math-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/math-expected-fuchsia.txt
@@ -6,17 +6,17 @@ ++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='%F0%9D%90%B4' -++++++++++++++++UNKNOWN label='%F0%9D%90%B4' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='2' -++++++++++++++++UNKNOWN label='2' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='+' -++++++++++++++UNKNOWN label='+' +++++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='%F0%9D%90%B5' -++++++++++++++++UNKNOWN label='%F0%9D%90%B5' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='2' -++++++++++++++++UNKNOWN label='2' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt b/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt index cbdc3329..fb9438a 100644 --- a/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt +++ b/content/test/data/accessibility/html/math-name-from-contents-expected-blink.txt
@@ -3,26 +3,26 @@ ++++genericContainer ignored ++++++radioButton name='Both%C2%A0 %C2%A0and%C2%A0' checkedState=false ++++++++staticText name='Both%C2%A0' -++++++++++inlineTextBox name='Both%C2%A0' +++++++++++inlineTextBox ++++++++math ++++++++++mathMLNumber ++++++++++++staticText name='1' -++++++++++++++inlineTextBox name='1' +++++++++++++++inlineTextBox ++++++++++mathMLOperator ++++++++++++staticText name='+' -++++++++++++++inlineTextBox name='+' +++++++++++++++inlineTextBox ++++++++++mathMLNumber ++++++++++++staticText name='4' -++++++++++++++inlineTextBox name='4' +++++++++++++++inlineTextBox ++++++++staticText name='%C2%A0and%C2%A0' -++++++++++inlineTextBox name='%C2%A0and%C2%A0' +++++++++++inlineTextBox ++++++++mathMLMath ++++++++++mathMLNumber ++++++++++++staticText name='2' -++++++++++++++inlineTextBox name='2' +++++++++++++++inlineTextBox ++++++++++mathMLOperator ++++++++++++staticText name='+' -++++++++++++++inlineTextBox name='+' +++++++++++++++inlineTextBox ++++++++++mathMLNumber ++++++++++++staticText name='3' -++++++++++++++inlineTextBox name='3' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/menu-expected-blink.txt b/content/test/data/accessibility/html/menu-expected-blink.txt index d5ce185a..9efc6eb 100644 --- a/content/test/data/accessibility/html/menu-expected-blink.txt +++ b/content/test/data/accessibility/html/menu-expected-blink.txt
@@ -3,11 +3,11 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Menu is deprecated, but it may still be used semantically with list item children. For more history, see crbug.com/87553.' -++++++++++inlineTextBox name='Menu is deprecated, but it may still be used semantically with list item children. For more history, see crbug.com/87553.' +++++++++++inlineTextBox ++++++list ++++++++listItem ++++++++++staticText name='Cats' -++++++++++++inlineTextBox name='Cats' +++++++++++++inlineTextBox ++++++++listItem ++++++++++staticText name='Dogs' -++++++++++++inlineTextBox name='Dogs' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/menu-expected-fuchsia.txt b/content/test/data/accessibility/html/menu-expected-fuchsia.txt index 6edeaf8..9d6db9aa 100644 --- a/content/test/data/accessibility/html/menu-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/menu-expected-fuchsia.txt
@@ -8,7 +8,7 @@ ++++++LIST list_size=2 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++STATIC_TEXT label='Cats' -++++++++++++UNKNOWN label='Cats' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++STATIC_TEXT label='Dogs' -++++++++++++UNKNOWN label='Dogs' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/micro-clearfix-hack-expected-blink.txt b/content/test/data/accessibility/html/micro-clearfix-hack-expected-blink.txt index 34a08a6c..f6f908e 100644 --- a/content/test/data/accessibility/html/micro-clearfix-hack-expected-blink.txt +++ b/content/test/data/accessibility/html/micro-clearfix-hack-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++heading name='Micro clearfix demo' ++++++++staticText name='Micro clearfix demo' -++++++++++inlineTextBox name='Micro clearfix demo' +++++++++++inlineTextBox ++++++genericContainer ignored ++++++++genericContainer ++++++++++staticText name='Float#1' -++++++++++++inlineTextBox name='Float#1' +++++++++++++inlineTextBox ++++++++genericContainer ++++++++++staticText name='Float#2' -++++++++++++inlineTextBox name='Float#2' +++++++++++++inlineTextBox ++++++heading name='End of demo' ++++++++staticText name='End of demo' -++++++++++inlineTextBox name='End of demo' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/modal-dialog-and-iframes-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-and-iframes-expected-blink.txt index cffb18d..6de984c 100644 --- a/content/test/data/accessibility/html/modal-dialog-and-iframes-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-and-iframes-expected-blink.txt
@@ -3,18 +3,18 @@ ++++dialog ++++++paragraph ++++++++staticText name='Text in the dialog.' -++++++++++inlineTextBox name='Text in the dialog.' +++++++++++inlineTextBox ++++++iframe ++++++++rootWebArea ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++paragraph ++++++++++++++++staticText name='Text in normal iframe' -++++++++++++++++++inlineTextBox name='Text in normal iframe' +++++++++++++++++++inlineTextBox ++++++++++++++iframe ++++++++++++++++rootWebArea ++++++++++++++++++genericContainer ignored ++++++++++++++++++++genericContainer ignored ++++++++++++++++++++++paragraph ++++++++++++++++++++++++staticText name='Text in nested normal iframe' -++++++++++++++++++++++++++inlineTextBox name='Text in nested normal iframe' +++++++++++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt index 0332bea7..2cf681d3 100644 --- a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt
@@ -2,7 +2,7 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='Test that elements respawn in the accessibility tree after a modal dialog closes.' -++++++++inlineTextBox name='Test that elements respawn in the accessibility tree after a modal dialog closes.' +++++++++inlineTextBox ++++++section ++++++++comboBoxSelect collapsed value='This should be in the tree.' haspopup=menu ++++++++++menuListPopup invisible
diff --git a/content/test/data/accessibility/html/modal-dialog-closed-expected-fuchsia.txt b/content/test/data/accessibility/html/modal-dialog-closed-expected-fuchsia.txt index 7226fe7..3681f6b 100644 --- a/content/test/data/accessibility/html/modal-dialog-closed-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/modal-dialog-closed-expected-fuchsia.txt
@@ -2,7 +2,7 @@ ++UNKNOWN hidden ++++UNKNOWN hidden ++++++STATIC_TEXT label='Test that elements respawn in the accessibility tree after a modal dialog closes.' -++++++++UNKNOWN label='Test that elements respawn in the accessibility tree after a modal dialog closes.' +++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN focusable actions='{DEFAULT}' value='This should be in the tree.' ++++++++++UNKNOWN hidden
diff --git a/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt index a5ba34b..72c0436 100644 --- a/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-in-iframe-opened-expected-blink.txt
@@ -2,10 +2,10 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Test for modal dialog opened in an iframe. ' -++++++++inlineTextBox name='Test for modal dialog opened in an iframe. ' +++++++++inlineTextBox ++++++iframe ++++++++rootWebArea ++++++++++genericContainer ignored invisible ++++++++++++dialog ++++++++++++++staticText name='Text in the dialog.' -++++++++++++++++inlineTextBox name='Text in the dialog.' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt index d135d2ce..7995088 100644 --- a/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-opened-expected-blink.txt
@@ -2,10 +2,10 @@ ++genericContainer ignored invisible ++++dialog ++++++staticText name='The dialog subtree should be the only text content in the accessibility tree. ' -++++++++inlineTextBox name='The dialog subtree should be the only text content in the accessibility tree. ' +++++++++inlineTextBox ++++++link name='Link inside the dialog.' ++++++++staticText name='Link inside the dialog.' -++++++++++inlineTextBox name='Link inside the dialog.' +++++++++++inlineTextBox ++++comboBoxSelect ignored invisible ++++++menuListPopup ignored invisible -++++++++menuListOption ignored \ No newline at end of file +++++++++menuListOption ignored
diff --git a/content/test/data/accessibility/html/modal-dialog-opened-expected-fuchsia.txt b/content/test/data/accessibility/html/modal-dialog-opened-expected-fuchsia.txt index a9af5b9..fe0cdaa 100644 --- a/content/test/data/accessibility/html/modal-dialog-opened-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/modal-dialog-opened-expected-fuchsia.txt
@@ -2,10 +2,10 @@ ++UNKNOWN hidden ++++UNKNOWN focusable ++++++STATIC_TEXT label='The dialog subtree should be the only text content in the accessibility tree. ' -++++++++UNKNOWN label='The dialog subtree should be the only text content in the accessibility tree. ' +++++++++UNKNOWN ++++++LINK focusable has_input_focus label='Link inside the dialog.' actions='{DEFAULT}' ++++++++STATIC_TEXT label='Link inside the dialog.' actions='{DEFAULT}' -++++++++++UNKNOWN label='Link inside the dialog.' +++++++++++UNKNOWN ++++UNKNOWN hidden ++++++UNKNOWN hidden -++++++++UNKNOWN hidden \ No newline at end of file +++++++++UNKNOWN hidden
diff --git a/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt index cd6f2f8..08246c70 100644 --- a/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-stack-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++menuListOption ignored ++++dialog ++++++staticText name='This is the now active dialog. Of course it should be in the tree. ' -++++++++inlineTextBox name='This is the now active dialog. Of course it should be in the tree. ' +++++++++inlineTextBox ++++++button name='This is in the active dialog and should be in the tree.' ++++++++staticText name='This is in the active dialog and should be in the tree.' -++++++++++inlineTextBox name='This is in the active dialog and should be in the tree.' \ No newline at end of file +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/modal-dialog-stack-expected-fuchsia.txt b/content/test/data/accessibility/html/modal-dialog-stack-expected-fuchsia.txt index 93c75d71..6486916 100644 --- a/content/test/data/accessibility/html/modal-dialog-stack-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/modal-dialog-stack-expected-fuchsia.txt
@@ -5,7 +5,7 @@ ++++++++UNKNOWN hidden ++++UNKNOWN focusable ++++++STATIC_TEXT label='This is the now active dialog. Of course it should be in the tree. ' -++++++++UNKNOWN label='This is the now active dialog. Of course it should be in the tree. ' +++++++++UNKNOWN ++++++BUTTON focusable label='This is in the active dialog and should be in the tree.' actions='{DEFAULT}' ++++++++STATIC_TEXT label='This is in the active dialog and should be in the tree.' actions='{DEFAULT}' -++++++++++UNKNOWN label='This is in the active dialog and should be in the tree.' \ No newline at end of file +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/navigation-expected-blink.txt b/content/test/data/accessibility/html/navigation-expected-blink.txt index e8ca9fd..a04063e 100644 --- a/content/test/data/accessibility/html/navigation-expected-blink.txt +++ b/content/test/data/accessibility/html/navigation-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++navigation ++++++++link name='Don't click on me' ++++++++++staticText name='Don't click on me' -++++++++++++inlineTextBox name='Don't click on me' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/navigation-expected-fuchsia.txt b/content/test/data/accessibility/html/navigation-expected-fuchsia.txt index 0bdadc6..0b2b7f8 100644 --- a/content/test/data/accessibility/html/navigation-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/navigation-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++UNKNOWN ++++++++LINK focusable label='Don't click on me' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Don't click on me' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Don't click on me' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/nestedlist-expected-fuchsia.txt b/content/test/data/accessibility/html/nestedlist-expected-fuchsia.txt index 873e26e..1d909b0a 100644 --- a/content/test/data/accessibility/html/nestedlist-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/nestedlist-expected-fuchsia.txt
@@ -3,48 +3,48 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This is a multi-leveled list' -++++++++++UNKNOWN label='This is a multi-leveled list' +++++++++++UNKNOWN ++++++LIST list_size=3 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++LIST_ELEMENT_MARKER label='1. ' ++++++++++++STATIC_TEXT hidden label='1. ' ++++++++++STATIC_TEXT label='Sports' -++++++++++++UNKNOWN label='Sports' +++++++++++++UNKNOWN ++++++++++LIST list_size=2 ++++++++++++LIST_ELEMENT list_element_index=1 ++++++++++++++LIST_ELEMENT_MARKER label='1. ' ++++++++++++++++STATIC_TEXT hidden label='1. ' ++++++++++++++STATIC_TEXT label='Tennis' -++++++++++++++++UNKNOWN label='Tennis' +++++++++++++++++UNKNOWN ++++++++++++LIST_ELEMENT list_element_index=2 ++++++++++++++LIST_ELEMENT_MARKER label='2. ' ++++++++++++++++STATIC_TEXT hidden label='2. ' ++++++++++++++STATIC_TEXT label='basketball' -++++++++++++++++UNKNOWN label='basketball' +++++++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='2. ' ++++++++++++STATIC_TEXT hidden label='2. ' ++++++++++STATIC_TEXT label='Books' -++++++++++++UNKNOWN label='Books' +++++++++++++UNKNOWN ++++++++++LIST list_size=3 ++++++++++++LIST_ELEMENT list_element_index=1 ++++++++++++++LIST_ELEMENT_MARKER label='1. ' ++++++++++++++++STATIC_TEXT hidden label='1. ' ++++++++++++++STATIC_TEXT label='Oliver Twist' -++++++++++++++++UNKNOWN label='Oliver Twist' +++++++++++++++++UNKNOWN ++++++++++++LIST_ELEMENT list_element_index=2 ++++++++++++++LIST_ELEMENT_MARKER label='2. ' ++++++++++++++++STATIC_TEXT hidden label='2. ' ++++++++++++++STATIC_TEXT label='Kindred' -++++++++++++++++UNKNOWN label='Kindred' +++++++++++++++++UNKNOWN ++++++++++++LIST_ELEMENT list_element_index=3 ++++++++++++++LIST_ELEMENT_MARKER label='3. ' ++++++++++++++++STATIC_TEXT hidden label='3. ' ++++++++++++++STATIC_TEXT label='The Promise of Sleep' -++++++++++++++++UNKNOWN label='The Promise of Sleep' +++++++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='3. ' ++++++++++++STATIC_TEXT hidden label='3. ' ++++++++++STATIC_TEXT label='Recipes' -++++++++++++UNKNOWN label='Recipes' +++++++++++++UNKNOWN ++++++++LIST
diff --git a/content/test/data/accessibility/html/object-image-error-expected-blink.txt b/content/test/data/accessibility/html/object-image-error-expected-blink.txt index 3cfdee879..9171f88 100644 --- a/content/test/data/accessibility/html/object-image-error-expected-blink.txt +++ b/content/test/data/accessibility/html/object-image-error-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++pluginObject ++++++++++genericContainer ignored htmlTag='slot' ++++++++++++staticText name='Fallback' -++++++++++++++inlineTextBox name='Fallback' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/object-image-expected-blink.txt b/content/test/data/accessibility/html/object-image-expected-blink.txt index d6919f6..1d85406f 100644 --- a/content/test/data/accessibility/html/object-image-expected-blink.txt +++ b/content/test/data/accessibility/html/object-image-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++pluginObject restriction=disabled ++++++genericContainer ++++++++staticText name='complete' -++++++++++inlineTextBox name='complete' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/offscreen-expected-blink.txt b/content/test/data/accessibility/html/offscreen-expected-blink.txt index a2421e6..425e6257 100644 --- a/content/test/data/accessibility/html/offscreen-expected-blink.txt +++ b/content/test/data/accessibility/html/offscreen-expected-blink.txt
@@ -3,8 +3,8 @@ ++++genericContainer ignored ++++++button name='Onscreen' ++++++++staticText name='Onscreen' -++++++++++inlineTextBox name='Onscreen' +++++++++++inlineTextBox ++++++genericContainer ignored ++++++button offscreen name='Offscreen' ++++++++staticText offscreen name='Offscreen' -++++++++++inlineTextBox offscreen name='Offscreen' +++++++++++inlineTextBox offscreen
diff --git a/content/test/data/accessibility/html/offscreen-scroll-expected-blink.txt b/content/test/data/accessibility/html/offscreen-scroll-expected-blink.txt index 8a8dac5..74d1f80 100644 --- a/content/test/data/accessibility/html/offscreen-scroll-expected-blink.txt +++ b/content/test/data/accessibility/html/offscreen-scroll-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++button offscreen name='Onscreen before scroll' ++++++++staticText offscreen name='Onscreen before scroll' -++++++++++inlineTextBox offscreen name='Onscreen before scroll' +++++++++++inlineTextBox offscreen ++++++genericContainer ignored ++++++button name='Scrolled Button' ++++++++staticText name='Offscreen before scroll' -++++++++++inlineTextBox name='Offscreen before scroll' +++++++++++inlineTextBox ++++++genericContainer ignored
diff --git a/content/test/data/accessibility/html/ol-expected-blink.txt b/content/test/data/accessibility/html/ol-expected-blink.txt index 540665c9..ace8337 100644 --- a/content/test/data/accessibility/html/ol-expected-blink.txt +++ b/content/test/data/accessibility/html/ol-expected-blink.txt
@@ -6,30 +6,30 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='1. ' ++++++++++staticText name='Chrome' -++++++++++++inlineTextBox name='Chrome' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='2. ' ++++++++++staticText name='Safari' -++++++++++++inlineTextBox name='Safari' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='3. ' ++++++++++++staticText ignored name='3. ' ++++++++++staticText name='IE' -++++++++++++inlineTextBox name='IE' +++++++++++++inlineTextBox ++++++list ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='10. ' ++++++++++++staticText ignored name='10. ' ++++++++++staticText name='Android' -++++++++++++inlineTextBox name='Android' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='11. ' ++++++++++++staticText ignored name='11. ' ++++++++++staticText name='Mac' -++++++++++++inlineTextBox name='Mac' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='12. ' ++++++++++++staticText ignored name='12. ' ++++++++++staticText name='Windows' -++++++++++++inlineTextBox name='Windows' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ol-expected-fuchsia.txt b/content/test/data/accessibility/html/ol-expected-fuchsia.txt index 9eda288..80a5a5f4 100644 --- a/content/test/data/accessibility/html/ol-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ol-expected-fuchsia.txt
@@ -6,30 +6,30 @@ ++++++++++LIST_ELEMENT_MARKER label='1. ' ++++++++++++STATIC_TEXT hidden label='1. ' ++++++++++STATIC_TEXT label='Chrome' -++++++++++++UNKNOWN label='Chrome' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='2. ' ++++++++++++STATIC_TEXT hidden label='2. ' ++++++++++STATIC_TEXT label='Safari' -++++++++++++UNKNOWN label='Safari' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='3. ' ++++++++++++STATIC_TEXT hidden label='3. ' ++++++++++STATIC_TEXT label='IE' -++++++++++++UNKNOWN label='IE' +++++++++++++UNKNOWN ++++++LIST list_size=3 ++++++++LIST_ELEMENT list_element_index=1 ++++++++++LIST_ELEMENT_MARKER label='10. ' ++++++++++++STATIC_TEXT hidden label='10. ' ++++++++++STATIC_TEXT label='Android' -++++++++++++UNKNOWN label='Android' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='11. ' ++++++++++++STATIC_TEXT hidden label='11. ' ++++++++++STATIC_TEXT label='Mac' -++++++++++++UNKNOWN label='Mac' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='12. ' ++++++++++++STATIC_TEXT hidden label='12. ' ++++++++++STATIC_TEXT label='Windows' -++++++++++++UNKNOWN label='Windows' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/open-modal-expected-blink.txt b/content/test/data/accessibility/html/open-modal-expected-blink.txt index 006d5fe..da2b21b 100644 --- a/content/test/data/accessibility/html/open-modal-expected-blink.txt +++ b/content/test/data/accessibility/html/open-modal-expected-blink.txt
@@ -2,7 +2,7 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='some text' -++++++++inlineTextBox name='some text' +++++++++inlineTextBox ++++++genericContainer ignored === Start Continuation === rootWebArea @@ -10,11 +10,11 @@ ++++dialog ++++++genericContainer name='Some Text' ++++++++staticText name='Some Text' -++++++++++inlineTextBox name='Some Text' +++++++++++inlineTextBox === Start Continuation === rootWebArea ++genericContainer ignored invisible ++++dialog ++++++genericContainer name='Done' ++++++++staticText name='Done' -++++++++++inlineTextBox name='Done' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/optgroup-expected-blink.txt b/content/test/data/accessibility/html/optgroup-expected-blink.txt index 9aa4d62..86493021 100644 --- a/content/test/data/accessibility/html/optgroup-expected-blink.txt +++ b/content/test/data/accessibility/html/optgroup-expected-blink.txt
@@ -6,7 +6,7 @@ ++++++++++genericContainer ignored ++++++++++++group name='Enabled' setSize=0 ++++++++++++++staticText name='Enabled' -++++++++++++++++inlineTextBox name='Enabled' +++++++++++++++++inlineTextBox ++++++++++++genericContainer ignored ++++++++++++++listBoxOption name='One' setSize=8 posInSet=1 selected=false ++++++++++++++listBoxOption name='Two' setSize=8 posInSet=2 selected=false @@ -15,7 +15,7 @@ ++++++++++genericContainer ignored ++++++++++++group name='Disabled' setSize=0 ++++++++++++++staticText name='Disabled' -++++++++++++++++inlineTextBox name='Disabled' +++++++++++++++++inlineTextBox ++++++++++++genericContainer ignored ++++++++++++++listBoxOption name='One' restriction=disabled setSize=8 posInSet=5 ++++++++++++++listBoxOption name='Two' restriction=disabled setSize=8 posInSet=6
diff --git a/content/test/data/accessibility/html/optgroup-expected-fuchsia.txt b/content/test/data/accessibility/html/optgroup-expected-fuchsia.txt index c2179c4..1678a02 100644 --- a/content/test/data/accessibility/html/optgroup-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/optgroup-expected-fuchsia.txt
@@ -6,7 +6,7 @@ ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN label='Enabled' ++++++++++++++STATIC_TEXT label='Enabled' -++++++++++++++++UNKNOWN label='Enabled' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN hidden ++++++++++++++UNKNOWN focusable label='One' actions='{DEFAULT}' ++++++++++++++UNKNOWN focusable label='Two' actions='{DEFAULT}' @@ -15,7 +15,7 @@ ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN label='Disabled' ++++++++++++++STATIC_TEXT label='Disabled' -++++++++++++++++UNKNOWN label='Disabled' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN hidden ++++++++++++++UNKNOWN label='One' actions='{DEFAULT}' ++++++++++++++UNKNOWN label='Two' actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/output-expected-fuchsia.txt b/content/test/data/accessibility/html/output-expected-fuchsia.txt index 4ebcd308..73b30b0f 100644 --- a/content/test/data/accessibility/html/output-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/output-expected-fuchsia.txt
@@ -5,9 +5,9 @@ ++++++++UNKNOWN focusable actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++++STATIC_TEXT label=' + ' -++++++++++UNKNOWN label=' + ' +++++++++++UNKNOWN ++++++++UNKNOWN focusable actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN ++++++++STATIC_TEXT label=' =' -++++++++++UNKNOWN label=' =' +++++++++++UNKNOWN ++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/overflow-actions-expected-fuchsia.txt b/content/test/data/accessibility/html/overflow-actions-expected-fuchsia.txt index f62dc93..1771b86 100644 --- a/content/test/data/accessibility/html/overflow-actions-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/overflow-actions-expected-fuchsia.txt
@@ -4,14 +4,14 @@ ++++++UNKNOWN focusable label='Example Paragraph 1 Example Paragraph 2' ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='Example Paragraph 1' -++++++++++++UNKNOWN label='Example Paragraph 1' +++++++++++++UNKNOWN ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='Example Paragraph 2' -++++++++++++UNKNOWN label='Example Paragraph 2' +++++++++++++UNKNOWN ++++++UNKNOWN ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='Example Paragraph 1' -++++++++++++UNKNOWN label='Example Paragraph 1' +++++++++++++UNKNOWN ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='Example Paragraph 2' -++++++++++++UNKNOWN label='Example Paragraph 2' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/overflow-scroller-expected-blink.txt b/content/test/data/accessibility/html/overflow-scroller-expected-blink.txt index 4f7fffc..909fa7e7 100644 --- a/content/test/data/accessibility/html/overflow-scroller-expected-blink.txt +++ b/content/test/data/accessibility/html/overflow-scroller-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++genericContainer description='1234' name='Example Paragraph 1 Example Paragraph 2' descriptionFrom=title ++++++++paragraph ++++++++++staticText name='Example Paragraph 1' -++++++++++++inlineTextBox name='Example Paragraph 1' +++++++++++++inlineTextBox ++++++++paragraph ++++++++++staticText name='Example Paragraph 2' -++++++++++++inlineTextBox name='Example Paragraph 2' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/p-expected-blink.txt b/content/test/data/accessibility/html/p-expected-blink.txt index 0a22052..9861c1ad2 100644 --- a/content/test/data/accessibility/html/p-expected-blink.txt +++ b/content/test/data/accessibility/html/p-expected-blink.txt
@@ -2,9 +2,9 @@ ++genericContainer ignored wordStarts=0 wordEnds=20 ++++genericContainer ignored wordStarts=0 wordEnds=20 ++++++staticText name='Before' wordStarts=0 wordEnds=6 -++++++++inlineTextBox name='Before' wordStarts=0 wordEnds=6 +++++++++inlineTextBox wordStarts=0 wordEnds=6 ++++++paragraph wordStarts=0 wordEnds=9 ++++++++staticText name='Paragraph' wordStarts=0 wordEnds=9 -++++++++++inlineTextBox name='Paragraph' wordStarts=0 wordEnds=9 +++++++++++inlineTextBox wordStarts=0 wordEnds=9 ++++++staticText name='After' wordStarts=0 wordEnds=5 -++++++++inlineTextBox name='After' wordStarts=0 wordEnds=5 +++++++++inlineTextBox wordStarts=0 wordEnds=5
diff --git a/content/test/data/accessibility/html/p-expected-fuchsia.txt b/content/test/data/accessibility/html/p-expected-fuchsia.txt index 5dcbad2..520ecad 100644 --- a/content/test/data/accessibility/html/p-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/p-expected-fuchsia.txt
@@ -2,9 +2,9 @@ ++UNKNOWN hidden ++++UNKNOWN hidden ++++++STATIC_TEXT label='Before' -++++++++UNKNOWN label='Before' +++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='Paragraph' -++++++++++UNKNOWN label='Paragraph' +++++++++++UNKNOWN ++++++STATIC_TEXT label='After' -++++++++UNKNOWN label='After' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/popover-api-expected-blink.txt b/content/test/data/accessibility/html/popover-api-expected-blink.txt index c3ac7327..301d2d96 100644 --- a/content/test/data/accessibility/html/popover-api-expected-blink.txt +++ b/content/test/data/accessibility/html/popover-api-expected-blink.txt
@@ -5,70 +5,70 @@ ++++++++disclosureTriangle ignored invisible ++++++button collapsed name='Button pointing to hidden popover' ++++++++staticText name='Button pointing to hidden popover' -++++++++++inlineTextBox name='Button pointing to hidden popover' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Text input pointing to hidden popover ' -++++++++inlineTextBox name='Text input pointing to hidden popover ' +++++++++inlineTextBox ++++++button name='Hide button pointing to hidden manual' ++++++++staticText name='Hide button pointing to hidden manual' -++++++++++inlineTextBox name='Hide button pointing to hidden manual' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Email input pointing to hidden manual ' -++++++++inlineTextBox name='Email input pointing to hidden manual ' +++++++++inlineTextBox ++++++button name='Button pointing to hint popover' ++++++++staticText name='Button pointing to hint popover' -++++++++++inlineTextBox name='Button pointing to hint popover' +++++++++++inlineTextBox ++++++button name='Button pointing to "rich" hint popover' ++++++++staticText name='Button pointing to "rich" hint popover' -++++++++++inlineTextBox name='Button pointing to "rich" hint popover' +++++++++++inlineTextBox ++++++button name='Button pointing to non-popover' ++++++++staticText name='Button pointing to non-popover' -++++++++++inlineTextBox name='Button pointing to non-popover' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Text input pointing to non-popover' -++++++++inlineTextBox name='Text input pointing to non-popover' +++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='No popover attribute' -++++++++++inlineTextBox name='No popover attribute' +++++++++++inlineTextBox ++++++button name='Button pointing to invalid popover value' ++++++++staticText name='Button pointing to invalid popover value' -++++++++++inlineTextBox name='Button pointing to invalid popover value' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Text input pointing to invalid popover value' -++++++++inlineTextBox name='Text input pointing to invalid popover value' +++++++++inlineTextBox ++++++paragraph ++++++++staticText name='Showing/visible popovers below' -++++++++++inlineTextBox name='Showing/visible popovers below' +++++++++++inlineTextBox ++++++button expanded name='Button pointing to showing popover' detailsIds=group ++++++++staticText name='Button pointing to showing popover' -++++++++++inlineTextBox name='Button pointing to showing popover' +++++++++++inlineTextBox ++++++button expanded name='w/o details' ++++++++staticText name='w/o details' -++++++++++inlineTextBox name='w/o details' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Tel input pointing to showing popover ' -++++++++inlineTextBox name='Tel input pointing to showing popover ' +++++++++inlineTextBox ++++++button expanded name='Show button pointing to nested popover' detailsIds=group ++++++++staticText name='Show button pointing to nested popover' -++++++++++inlineTextBox name='Show button pointing to nested popover' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Url input pointing to nested popover ' -++++++++inlineTextBox name='Url input pointing to nested popover ' +++++++++inlineTextBox ++++++group ispopup=auto ++++++++staticText name='Popover (showing)' -++++++++++inlineTextBox name='Popover (showing)' +++++++++++inlineTextBox ++++++++group ispopup=auto ++++++++++staticText name='Nested popover (showing)' -++++++++++++inlineTextBox name='Nested popover (showing)' +++++++++++++inlineTextBox ++++++button name='Hide button pointing to showing manual (should add aria-details)' detailsIds=group ++++++++staticText name='Hide button pointing to showing manual (should add aria-details)' -++++++++++inlineTextBox name='Hide button pointing to showing manual (should add aria-details)' +++++++++++inlineTextBox ++++++textField ++++++++genericContainer ++++++staticText name='Url input pointing to showing manual ' @@ -76,13 +76,13 @@ ++++++++inlineTextBox name='manual ' ++++++button name='Hide button pointing to showing manual (should NOT add aria-details)' ++++++++staticText name='Hide button pointing to showing manual (should NOT add aria-details)' -++++++++++inlineTextBox name='Hide button pointing to showing manual (should NOT add aria-details)' +++++++++++inlineTextBox ++++++group ispopup=manual ++++++++staticText name='Manual (showing)' -++++++++++inlineTextBox name='Manual (showing)' +++++++++++inlineTextBox ++++++group ispopup=manual ++++++++staticText name='Popover=hint (showing) ' -++++++++++inlineTextBox name='Popover=hint (showing) ' +++++++++++inlineTextBox ++++++++link name='Link' ++++++++++staticText name='Link' -++++++++++++inlineTextBox name='Link' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/popover-collapsed-expected-blink.txt b/content/test/data/accessibility/html/popover-collapsed-expected-blink.txt index c872c6e5..4a6f840 100644 --- a/content/test/data/accessibility/html/popover-collapsed-expected-blink.txt +++ b/content/test/data/accessibility/html/popover-collapsed-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++button collapsed name='Will collapse' ++++++++staticText name='Will collapse' -++++++++++inlineTextBox name='Will collapse' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/popover-expanded-expected-blink.txt b/content/test/data/accessibility/html/popover-expanded-expected-blink.txt index 877d829..3b581c5 100644 --- a/content/test/data/accessibility/html/popover-expanded-expected-blink.txt +++ b/content/test/data/accessibility/html/popover-expanded-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ++++++button expanded name='Will expand' ++++++++staticText name='Will expand' -++++++++++inlineTextBox name='Will expand' +++++++++++inlineTextBox ++++++group ispopup=auto ++++++++staticText name='PopoverIsExpanded' -++++++++++inlineTextBox name='PopoverIsExpanded' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/pre-expected-blink.txt b/content/test/data/accessibility/html/pre-expected-blink.txt index af05877b..574c9c1 100644 --- a/content/test/data/accessibility/html/pre-expected-blink.txt +++ b/content/test/data/accessibility/html/pre-expected-blink.txt
@@ -18,4 +18,4 @@ ++++++++++inlineTextBox name='formatting.' ++++++genericContainer ++++++++staticText name='This test is to check pre formatting.' -++++++++++inlineTextBox name='This test is to check pre formatting.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/pre-expected-fuchsia.txt b/content/test/data/accessibility/html/pre-expected-fuchsia.txt index eab2083..e170b04 100644 --- a/content/test/data/accessibility/html/pre-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/pre-expected-fuchsia.txt
@@ -18,4 +18,4 @@ ++++++++++UNKNOWN label='formatting.' ++++++UNKNOWN ++++++++STATIC_TEXT label='This test is to check pre formatting.' -++++++++++UNKNOWN label='This test is to check pre formatting.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/q-expected-blink.txt b/content/test/data/accessibility/html/q-expected-blink.txt index c8cdc091..892218f 100644 --- a/content/test/data/accessibility/html/q-expected-blink.txt +++ b/content/test/data/accessibility/html/q-expected-blink.txt
@@ -3,17 +3,17 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This is ' -++++++++++inlineTextBox name='This is ' +++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++staticText name='%E2%80%9C' -++++++++++++++++inlineTextBox name='%E2%80%9C' +++++++++++++++++inlineTextBox ++++++++++staticText name='Chromium Blink' -++++++++++++inlineTextBox name='Chromium Blink' +++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++genericContainer ignored ++++++++++++++staticText name='%E2%80%9D' -++++++++++++++++inlineTextBox name='%E2%80%9D' +++++++++++++++++inlineTextBox ++++++++staticText name=' based browser.' -++++++++++inlineTextBox name=' based browser.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/q-expected-fuchsia.txt b/content/test/data/accessibility/html/q-expected-fuchsia.txt index 6b006fb..57b36b7 100644 --- a/content/test/data/accessibility/html/q-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/q-expected-fuchsia.txt
@@ -3,17 +3,17 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This is ' -++++++++++UNKNOWN label='This is ' +++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN hidden ++++++++++++++STATIC_TEXT label='%E2%80%9C' -++++++++++++++++UNKNOWN label='%E2%80%9C' +++++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='Chromium Blink' -++++++++++++UNKNOWN label='Chromium Blink' +++++++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN hidden ++++++++++++++STATIC_TEXT label='%E2%80%9D' -++++++++++++++++UNKNOWN label='%E2%80%9D' +++++++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' based browser.' -++++++++++UNKNOWN label=' based browser.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/relevant-space-expected-blink.txt b/content/test/data/accessibility/html/relevant-space-expected-blink.txt index 8535331..2f28151 100644 --- a/content/test/data/accessibility/html/relevant-space-expected-blink.txt +++ b/content/test/data/accessibility/html/relevant-space-expected-blink.txt
@@ -3,21 +3,21 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='A(' -++++++++++inlineTextBox name='A(' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name=')B' -++++++++++inlineTextBox name=')B' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='C(' -++++++++++inlineTextBox name='C(' +++++++++++inlineTextBox ++++++++lineBreak name='<newline>' -++++++++++inlineTextBox name='<newline>' +++++++++++inlineTextBox ++++++++staticText name=')D' -++++++++++inlineTextBox name=')D' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='E(' -++++++++++inlineTextBox name='E(' +++++++++++inlineTextBox ++++++++staticText name=' ' ++++++++staticText name=')F' -++++++++++inlineTextBox name=')F' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/reparent-crash-expected-blink.txt b/content/test/data/accessibility/html/reparent-crash-expected-blink.txt index cd424930..f3156de 100644 --- a/content/test/data/accessibility/html/reparent-crash-expected-blink.txt +++ b/content/test/data/accessibility/html/reparent-crash-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++listItem description='@NO_CHILDREN_DUMP' descriptionFrom=ariaDescription ++++++genericContainer ++++++++staticText name='Done' -++++++++++inlineTextBox name='Done' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/replace-data-expected-blink.txt b/content/test/data/accessibility/html/replace-data-expected-blink.txt index 5f96789..f8c3abd9 100644 --- a/content/test/data/accessibility/html/replace-data-expected-blink.txt +++ b/content/test/data/accessibility/html/replace-data-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='apples' -++++++++++inlineTextBox name='apples' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='bananas' -++++++++++inlineTextBox name='bananas' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ruby-expected-blink.txt b/content/test/data/accessibility/html/ruby-expected-blink.txt index 5c68dd1..7c83b94 100644 --- a/content/test/data/accessibility/html/ruby-expected-blink.txt +++ b/content/test/data/accessibility/html/ruby-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored ++++++ruby description='ruby text' descriptionFrom=rubyAnnotation ++++++++staticText name='ruby base' -++++++++++inlineTextBox name='ruby base' +++++++++++inlineTextBox ++++++++rubyAnnotation ignored ++++++++++staticText ignored name='ruby text' ++++++paragraph ++++++++ruby description='ruby text' descriptionFrom=rubyAnnotation ++++++++++staticText name='ruby base' -++++++++++++inlineTextBox name='ruby base' +++++++++++++inlineTextBox ++++++++++rubyAnnotation ignored ++++++++++++staticText ignored name='ruby text' ++++++paragraph ++++++++staticText name='Hi! ' -++++++++++inlineTextBox name='Hi! ' +++++++++++inlineTextBox ++++++++ruby description='ruby text' descriptionFrom=rubyAnnotation ++++++++++staticText name='ruby base' -++++++++++++inlineTextBox name='ruby base' +++++++++++++inlineTextBox ++++++++++rubyAnnotation ignored ++++++++++++staticText ignored name='ruby text'
diff --git a/content/test/data/accessibility/html/s-expected-blink.txt b/content/test/data/accessibility/html/s-expected-blink.txt index 30f16d0..480f158 100644 --- a/content/test/data/accessibility/html/s-expected-blink.txt +++ b/content/test/data/accessibility/html/s-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++contentDeletion ++++++++staticText name='My car is blue.' -++++++++++inlineTextBox name='My car is blue.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/s-expected-fuchsia.txt b/content/test/data/accessibility/html/s-expected-fuchsia.txt index b45826e..d0d13ca9 100644 --- a/content/test/data/accessibility/html/s-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/s-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='My car is blue.' -++++++++++UNKNOWN label='My car is blue.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/samp-expected-blink.txt b/content/test/data/accessibility/html/samp-expected-blink.txt index d46050e..631e4392 100644 --- a/content/test/data/accessibility/html/samp-expected-blink.txt +++ b/content/test/data/accessibility/html/samp-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Sample output from a computer program' -++++++++inlineTextBox name='Sample output from a computer program' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/samp-expected-fuchsia.txt b/content/test/data/accessibility/html/samp-expected-fuchsia.txt index c8c05aa9..061ad7f2 100644 --- a/content/test/data/accessibility/html/samp-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/samp-expected-fuchsia.txt
@@ -2,4 +2,4 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label='Sample output from a computer program' -++++++++UNKNOWN label='Sample output from a computer program' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/scrollable-expected-fuchsia.txt b/content/test/data/accessibility/html/scrollable-expected-fuchsia.txt index f5e15a7..e4d7c51 100644 --- a/content/test/data/accessibility/html/scrollable-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/scrollable-expected-fuchsia.txt
@@ -3,7 +3,7 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='not scrollable' -++++++++++UNKNOWN label='not scrollable' +++++++++++UNKNOWN ++++++UNKNOWN focusable ++++++++UNKNOWN hidden ++++++UNKNOWN focusable
diff --git a/content/test/data/accessibility/html/scrollable-overflow-expected-blink.txt b/content/test/data/accessibility/html/scrollable-overflow-expected-blink.txt index 0f71ec5..746741c 100644 --- a/content/test/data/accessibility/html/scrollable-overflow-expected-blink.txt +++ b/content/test/data/accessibility/html/scrollable-overflow-expected-blink.txt
@@ -4,11 +4,11 @@ ++++++genericContainer ignored className='no-overflow not-scrollable' ++++++++paragraph ++++++++++staticText name='no overflow' -++++++++++++inlineTextBox name='no overflow' +++++++++++++inlineTextBox ++++++genericContainer ignored className='clipped-not scrollable' ++++++++paragraph ++++++++++staticText name='clipped large lots of text more text' -++++++++++++inlineTextBox name='clipped large lots of text more text' +++++++++++++inlineTextBox ++++++textField multiline className='textarea scrollable' value='ab cd' scrollXMin=0 scrollable=true ++++++++genericContainer ++++++++++staticText name='ab cd' @@ -19,46 +19,46 @@ ++++++++genericContainer ignored ++++++++++paragraph ++++++++++++staticText name='tiny' -++++++++++++++inlineTextBox name='tiny' +++++++++++++++inlineTextBox ++++++group className='x-overflow-group' ++++++++genericContainer className='x-hidden-small not-scrollable' scrollXMin=0 ++++++++++paragraph ++++++++++++staticText name='x=hidden' -++++++++++++++inlineTextBox name='x=hidden' +++++++++++++++inlineTextBox ++++++++genericContainer className='x-hidden-large scrollable' name='x=hidden' scrollXMin=0 scrollable=true ++++++++++paragraph ++++++++++++staticText name='x=hidden' -++++++++++++++inlineTextBox name='x=hidden' +++++++++++++++inlineTextBox ++++++++genericContainer className='x-auto scrollable' name='x=auto' scrollXMin=0 scrollable=true ++++++++++paragraph ++++++++++++staticText name='x=auto' -++++++++++++++inlineTextBox name='x=auto' +++++++++++++++inlineTextBox ++++++++genericContainer className='x-scroll scrollable' name='x=scroll' scrollXMin=0 scrollable=true ++++++++++paragraph ++++++++++++staticText name='x=scroll' -++++++++++++++inlineTextBox name='x=scroll' +++++++++++++++inlineTextBox ++++++++genericContainer ignored className='x-visible not-scrollable' ++++++++++paragraph ++++++++++++staticText name='x=visible' -++++++++++++++inlineTextBox name='x=visible' +++++++++++++++inlineTextBox ++++++group className='y-overflow-group' ++++++++genericContainer className='y-hidden-small not-scrollable' scrollXMin=0 ++++++++++paragraph ++++++++++++staticText name='y=hidden' -++++++++++++++inlineTextBox name='y=hidden' +++++++++++++++inlineTextBox ++++++++genericContainer className='y-hidden-large scrollable' name='y=hidden' scrollXMin=0 scrollable=true ++++++++++paragraph ++++++++++++staticText name='y=hidden' -++++++++++++++inlineTextBox name='y=hidden' +++++++++++++++inlineTextBox ++++++++genericContainer className='y-auto scrollable' name='y=auto' scrollXMin=0 scrollable=true ++++++++++paragraph ++++++++++++staticText name='y=auto' -++++++++++++++inlineTextBox name='y=auto' +++++++++++++++inlineTextBox ++++++++genericContainer className='y-scroll scrollable' name='y=scroll' scrollXMin=0 scrollable=true ++++++++++paragraph ++++++++++++staticText name='y=scroll' -++++++++++++++inlineTextBox name='y=scroll' +++++++++++++++inlineTextBox ++++++++genericContainer ignored className='y-visible not-scrollable' ++++++++++paragraph ++++++++++++staticText name='y=visible' -++++++++++++++inlineTextBox name='y=visible' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/scrollable-overflow-expected-fuchsia.txt b/content/test/data/accessibility/html/scrollable-overflow-expected-fuchsia.txt index ca4ca0eb..d4575fc 100644 --- a/content/test/data/accessibility/html/scrollable-overflow-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/scrollable-overflow-expected-fuchsia.txt
@@ -4,11 +4,11 @@ ++++++UNKNOWN hidden ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='no overflow' -++++++++++++UNKNOWN label='no overflow' +++++++++++++UNKNOWN ++++++UNKNOWN hidden ++++++++PARAGRAPH ++++++++++STATIC_TEXT label='clipped large lots of text more text' -++++++++++++UNKNOWN label='clipped large lots of text more text' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='ab cd' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='ab cd' @@ -19,46 +19,46 @@ ++++++++UNKNOWN hidden ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='tiny' -++++++++++++++UNKNOWN label='tiny' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='x=hidden' -++++++++++++++UNKNOWN label='x=hidden' +++++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='x=hidden' ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='x=hidden' -++++++++++++++UNKNOWN label='x=hidden' +++++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='x=auto' ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='x=auto' -++++++++++++++UNKNOWN label='x=auto' +++++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='x=scroll' ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='x=scroll' -++++++++++++++UNKNOWN label='x=scroll' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='x=visible' -++++++++++++++UNKNOWN label='x=visible' +++++++++++++++UNKNOWN ++++++UNKNOWN ++++++++UNKNOWN ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='y=hidden' -++++++++++++++UNKNOWN label='y=hidden' +++++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='y=hidden' ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='y=hidden' -++++++++++++++UNKNOWN label='y=hidden' +++++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='y=auto' ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='y=auto' -++++++++++++++UNKNOWN label='y=auto' +++++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='y=scroll' ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='y=scroll' -++++++++++++++UNKNOWN label='y=scroll' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++PARAGRAPH ++++++++++++STATIC_TEXT label='y=visible' -++++++++++++++UNKNOWN label='y=visible' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/scrollable-textarea-expected-blink.txt b/content/test/data/accessibility/html/scrollable-textarea-expected-blink.txt index 0d29424..8637d67 100644 --- a/content/test/data/accessibility/html/scrollable-textarea-expected-blink.txt +++ b/content/test/data/accessibility/html/scrollable-textarea-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++textField multiline value='little' ++++++++genericContainer ++++++++++staticText name='little' -++++++++++++inlineTextBox name='little' +++++++++++++inlineTextBox ++++++textField multiline value='lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text' scrollXMin=0 ++++++++genericContainer ++++++++++staticText name='lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text'
diff --git a/content/test/data/accessibility/html/scrollable-textarea-expected-fuchsia.txt b/content/test/data/accessibility/html/scrollable-textarea-expected-fuchsia.txt index 9a830243..5427641 100644 --- a/content/test/data/accessibility/html/scrollable-textarea-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/scrollable-textarea-expected-fuchsia.txt
@@ -4,7 +4,7 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='little' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='little' -++++++++++++UNKNOWN label='little' +++++++++++++UNKNOWN ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text+ lots+of+text'
diff --git a/content/test/data/accessibility/html/search-expected-blink.txt b/content/test/data/accessibility/html/search-expected-blink.txt index 4d98b09a..a667a7b 100644 --- a/content/test/data/accessibility/html/search-expected-blink.txt +++ b/content/test/data/accessibility/html/search-expected-blink.txt
@@ -4,6 +4,6 @@ ++++++search ++++++++labelText ++++++++++staticText name='Search element.' -++++++++++++inlineTextBox name='Search element.' +++++++++++++inlineTextBox ++++++++searchBox ++++++++++genericContainer
diff --git a/content/test/data/accessibility/html/search-expected-fuchsia.txt b/content/test/data/accessibility/html/search-expected-fuchsia.txt index caa61cb..b6db7c6 100644 --- a/content/test/data/accessibility/html/search-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/search-expected-fuchsia.txt
@@ -4,6 +4,6 @@ ++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Search element.' -++++++++++++UNKNOWN label='Search element.' +++++++++++++UNKNOWN ++++++++SEARCH_BOX focusable actions='{DEFAULT, SET_VALUE}' ++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/section-expected-blink.txt b/content/test/data/accessibility/html/section-expected-blink.txt index 4b7cea6..80adbad 100644 --- a/content/test/data/accessibility/html/section-expected-blink.txt +++ b/content/test/data/accessibility/html/section-expected-blink.txt
@@ -3,14 +3,14 @@ ++++genericContainer ignored ++++++section ++++++++staticText name='An unnamed section element gets the section role.' -++++++++++inlineTextBox name='An unnamed section element gets the section role.' +++++++++++inlineTextBox ++++++region name='name' ++++++++staticText name='Named section element #1 gets the region role' -++++++++++inlineTextBox name='Named section element #1 gets the region role' +++++++++++inlineTextBox ++++++region name='Named section element #2 gets the region role' ++++++++genericContainer ++++++++++staticText name='Named section element #2 gets the region role' -++++++++++++inlineTextBox name='Named section element #2 gets the region role' +++++++++++++inlineTextBox ++++++region name='name' ++++++++staticText name='Named section element #3 gets the region role' -++++++++++inlineTextBox name='Named section element #3 gets the region role' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/section-expected-fuchsia.txt b/content/test/data/accessibility/html/section-expected-fuchsia.txt index 280de23..ae8b263b7 100644 --- a/content/test/data/accessibility/html/section-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/section-expected-fuchsia.txt
@@ -3,14 +3,14 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='An unnamed section element gets the section role.' -++++++++++UNKNOWN label='An unnamed section element gets the section role.' +++++++++++UNKNOWN ++++++UNKNOWN label='name' ++++++++STATIC_TEXT label='Named section element #1 gets the region role' -++++++++++UNKNOWN label='Named section element #1 gets the region role' +++++++++++UNKNOWN ++++++UNKNOWN label='Named section element #2 gets the region role' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Named section element #2 gets the region role' -++++++++++++UNKNOWN label='Named section element #2 gets the region role' +++++++++++++UNKNOWN ++++++UNKNOWN label='name' ++++++++STATIC_TEXT label='Named section element #3 gets the region role' -++++++++++UNKNOWN label='Named section element #3 gets the region role' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-blink.txt b/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-blink.txt index 1c228999..e8f080e 100644 --- a/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-blink.txt +++ b/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++tabList horizontal ++++++++tab name='tab1' selected=false selectedFromFocus=false ++++++++++staticText name='tab1' -++++++++++++inlineTextBox name='tab1' +++++++++++++inlineTextBox ++++++++tab name='tab2' selected=false selectedFromFocus=false ++++++++++staticText name='tab2' -++++++++++++inlineTextBox name='tab2' +++++++++++++inlineTextBox ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-fuchsia.txt b/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-fuchsia.txt index 9fe0be05..7269b94 100644 --- a/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/select-follows-focus-aria-selected-false-expected-fuchsia.txt
@@ -4,9 +4,9 @@ ++++++UNKNOWN ++++++++UNKNOWN focusable has_input_focus label='tab1' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab1' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab1' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='tab2' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab2' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab2' +++++++++++++UNKNOWN ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/select-follows-focus-expected-blink.txt b/content/test/data/accessibility/html/select-follows-focus-expected-blink.txt index 2c13f7a..5a189a8 100644 --- a/content/test/data/accessibility/html/select-follows-focus-expected-blink.txt +++ b/content/test/data/accessibility/html/select-follows-focus-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++tabList horizontal ++++++++tab name='tab1' selected=true selectedFromFocus=true ++++++++++staticText name='tab1' -++++++++++++inlineTextBox name='tab1' +++++++++++++inlineTextBox ++++++++tab name='tab2' selected=true selectedFromFocus=false ++++++++++staticText name='tab2' -++++++++++++inlineTextBox name='tab2' +++++++++++++inlineTextBox ++++++++tab name='tab3' selected=false selectedFromFocus=false ++++++++++staticText name='tab3' -++++++++++++inlineTextBox name='tab3' +++++++++++++inlineTextBox ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/select-follows-focus-expected-fuchsia.txt b/content/test/data/accessibility/html/select-follows-focus-expected-fuchsia.txt index 53d4418..af5c983 100644 --- a/content/test/data/accessibility/html/select-follows-focus-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/select-follows-focus-expected-fuchsia.txt
@@ -4,12 +4,12 @@ ++++++UNKNOWN ++++++++UNKNOWN focusable has_input_focus selected label='tab1' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab1' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab1' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable selected label='tab2' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab2' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab2' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='tab3' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab3' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab3' +++++++++++++UNKNOWN ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-blink.txt b/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-blink.txt index e5045a20..bc1c19a 100644 --- a/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-blink.txt +++ b/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-blink.txt
@@ -4,12 +4,12 @@ ++++++tabList horizontal multiselectable ++++++++tab name='tab1' selected=false selectedFromFocus=false ++++++++++staticText name='tab1' -++++++++++++inlineTextBox name='tab1' +++++++++++++inlineTextBox ++++++++tab name='tab2' selected=true selectedFromFocus=false ++++++++++staticText name='tab2' -++++++++++++inlineTextBox name='tab2' +++++++++++++inlineTextBox ++++++++tab name='tab3' selected=false selectedFromFocus=false ++++++++++staticText name='tab3' -++++++++++++inlineTextBox name='tab3' +++++++++++++inlineTextBox ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-fuchsia.txt b/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-fuchsia.txt index 558f2634..8d24d80 100644 --- a/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/select-follows-focus-multiselect-expected-fuchsia.txt
@@ -4,12 +4,12 @@ ++++++UNKNOWN ++++++++UNKNOWN focusable has_input_focus label='tab1' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab1' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab1' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable selected label='tab2' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab2' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab2' +++++++++++++UNKNOWN ++++++++UNKNOWN focusable label='tab3' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='tab3' actions='{DEFAULT}' -++++++++++++UNKNOWN label='tab3' +++++++++++++UNKNOWN ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/selection-container-expected-fuchsia.txt b/content/test/data/accessibility/html/selection-container-expected-fuchsia.txt index 255dcb3..738a147 100644 --- a/content/test/data/accessibility/html/selection-container-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/selection-container-expected-fuchsia.txt
@@ -6,7 +6,7 @@ ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN label='Enabled' ++++++++++++++STATIC_TEXT label='Enabled' -++++++++++++++++UNKNOWN label='Enabled' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN hidden ++++++++++++++UNKNOWN focusable label='One' actions='{DEFAULT}' ++++++++++++++UNKNOWN focusable label='Two' actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/selectlist-expected-blink.txt b/content/test/data/accessibility/html/selectlist-expected-blink.txt index f98c1816..3bc6b26 100644 --- a/content/test/data/accessibility/html/selectlist-expected-blink.txt +++ b/content/test/data/accessibility/html/selectlist-expected-blink.txt
@@ -7,7 +7,7 @@ ++++++++++++genericContainer ignored ++++++++++++++genericContainer ++++++++++++++++staticText name='Option 1' -++++++++++++++++++inlineTextBox name='Option 1' +++++++++++++++++++inlineTextBox ++++++++++++genericContainer ignored ++++++++++++++genericContainer ignored ++++++++genericContainer ignored @@ -20,6 +20,6 @@ ++++++++genericContainer ignored ++++++++++comboBoxMenuButton collapsed focusable value='Option 1' haspopup=listbox ++++++++++++staticText name='Custom selectlist button' -++++++++++++++inlineTextBox name='Custom selectlist button' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++listBox ignored invisible
diff --git a/content/test/data/accessibility/html/selectlist-open-expected-blink.txt b/content/test/data/accessibility/html/selectlist-open-expected-blink.txt index b2808646..d7990194 100644 --- a/content/test/data/accessibility/html/selectlist-open-expected-blink.txt +++ b/content/test/data/accessibility/html/selectlist-open-expected-blink.txt
@@ -5,7 +5,7 @@ ++++++++genericContainer ignored ++++++++++comboBoxMenuButton focusable value='Option 1' haspopup=listbox ++++++++++++staticText name='Custom selectlist button' -++++++++++++++inlineTextBox name='Custom selectlist button' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++listBox setSize=3 ispopup=auto ++++++++++++listBoxOption focusable name='Option 1' setSize=3 posInSet=1 selected=true
diff --git a/content/test/data/accessibility/html/selectlist-open-expected-fuchsia.txt b/content/test/data/accessibility/html/selectlist-open-expected-fuchsia.txt index 160bfdf..81eaa6d 100644 --- a/content/test/data/accessibility/html/selectlist-open-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/selectlist-open-expected-fuchsia.txt
@@ -5,7 +5,7 @@ ++++++++UNKNOWN hidden ++++++++++UNKNOWN focusable actions='{DEFAULT}' value='Option 1' ++++++++++++STATIC_TEXT label='Custom selectlist button' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Custom selectlist button' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++UNKNOWN actions='{DEFAULT}' ++++++++++++UNKNOWN focusable has_input_focus selected label='Option 1' actions='{DEFAULT}'
diff --git a/content/test/data/accessibility/html/slot-display-contents-expected-blink.txt b/content/test/data/accessibility/html/slot-display-contents-expected-blink.txt index 15817c5..4a611e1 100644 --- a/content/test/data/accessibility/html/slot-display-contents-expected-blink.txt +++ b/content/test/data/accessibility/html/slot-display-contents-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++genericContainer ignored htmlTag='slot' ++++++++++button htmlTag='button' name='Test' ++++++++++++staticText name='Test' -++++++++++++++inlineTextBox name='Test' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/small-expected-blink.txt b/content/test/data/accessibility/html/small-expected-blink.txt index 1d2216d..c26c065 100644 --- a/content/test/data/accessibility/html/small-expected-blink.txt +++ b/content/test/data/accessibility/html/small-expected-blink.txt
@@ -3,6 +3,6 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='Chromium' -++++++++++inlineTextBox name='Chromium' +++++++++++inlineTextBox ++++++++staticText name='open source project' -++++++++++inlineTextBox name='open source project' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/small-expected-fuchsia.txt b/content/test/data/accessibility/html/small-expected-fuchsia.txt index d2d0bde7..6e93e7a8 100644 --- a/content/test/data/accessibility/html/small-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/small-expected-fuchsia.txt
@@ -3,6 +3,6 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='Chromium' -++++++++++UNKNOWN label='Chromium' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='open source project' -++++++++++UNKNOWN label='open source project' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/span-expected-blink.txt b/content/test/data/accessibility/html/span-expected-blink.txt index e613b149..8809539ae 100644 --- a/content/test/data/accessibility/html/span-expected-blink.txt +++ b/content/test/data/accessibility/html/span-expected-blink.txt
@@ -3,118 +3,118 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This' -++++++++++inlineTextBox name='This' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='paragraph has ' -++++++++++inlineTextBox name='paragraph has ' +++++++++++inlineTextBox ++++++++staticText name='text' -++++++++++inlineTextBox name='text' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='in' -++++++++++inlineTextBox name='in' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='spans' -++++++++++inlineTextBox name='spans' +++++++++++inlineTextBox ++++++++staticText name='.' -++++++++++inlineTextBox name='.' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='E1. Eat' -++++++++++inlineTextBox name='E1. Eat' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++link name='space' ++++++++++staticText name='space' -++++++++++++inlineTextBox name='space' +++++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='E2. Eat' -++++++++++inlineTextBox name='E2. Eat' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++link name='space' ++++++++++staticText name='space' -++++++++++++inlineTextBox name='space' +++++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='E3. Eat' -++++++++++inlineTextBox name='E3. Eat' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++link name='space' ++++++++++staticText name='space' -++++++++++++inlineTextBox name='space' +++++++++++++inlineTextBox ++++++paragraph ++++++++link name='E4. Eat' ++++++++++staticText name='E4. Eat' -++++++++++++inlineTextBox name='E4. Eat' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++link name='E5. Eat' ++++++++++staticText name='E5. Eat' -++++++++++++inlineTextBox name='E5. Eat' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++link name='E6. Eat' ++++++++++staticText name='E6. Eat' -++++++++++++inlineTextBox name='E6. Eat' +++++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K1. Keep' -++++++++++inlineTextBox name='K1. Keep' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K2. Keep' -++++++++++inlineTextBox name='K2. Keep' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K3. Keep' -++++++++++inlineTextBox name='K3. Keep' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K4. Keep ' -++++++++++inlineTextBox name='K4. Keep ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K5. Keep' -++++++++++inlineTextBox name='K5. Keep' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K6. Keep ' -++++++++++inlineTextBox name='K6. Keep ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K7. Keep' -++++++++++inlineTextBox name='K7. Keep' +++++++++++inlineTextBox ++++++++staticText name=' space' -++++++++++inlineTextBox name=' space' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='K8. Keep' -++++++++++inlineTextBox name='K8. Keep' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='space' -++++++++++inlineTextBox name='space' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/span-expected-fuchsia.txt b/content/test/data/accessibility/html/span-expected-fuchsia.txt index e0ae7ff..ae24423 100644 --- a/content/test/data/accessibility/html/span-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/span-expected-fuchsia.txt
@@ -3,118 +3,118 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This' -++++++++++UNKNOWN label='This' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='paragraph has ' -++++++++++UNKNOWN label='paragraph has ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='text' -++++++++++UNKNOWN label='text' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='in' -++++++++++UNKNOWN label='in' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='spans' -++++++++++UNKNOWN label='spans' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='.' -++++++++++UNKNOWN label='.' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='E1. Eat' -++++++++++UNKNOWN label='E1. Eat' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++LINK focusable label='space' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='space' actions='{DEFAULT}' -++++++++++++UNKNOWN label='space' +++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='E2. Eat' -++++++++++UNKNOWN label='E2. Eat' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++LINK focusable label='space' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='space' actions='{DEFAULT}' -++++++++++++UNKNOWN label='space' +++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='E3. Eat' -++++++++++UNKNOWN label='E3. Eat' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++LINK focusable label='space' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='space' actions='{DEFAULT}' -++++++++++++UNKNOWN label='space' +++++++++++++UNKNOWN ++++++PARAGRAPH ++++++++LINK focusable label='E4. Eat' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='E4. Eat' actions='{DEFAULT}' -++++++++++++UNKNOWN label='E4. Eat' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++LINK focusable label='E5. Eat' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='E5. Eat' actions='{DEFAULT}' -++++++++++++UNKNOWN label='E5. Eat' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++LINK focusable label='E6. Eat' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='E6. Eat' actions='{DEFAULT}' -++++++++++++UNKNOWN label='E6. Eat' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K1. Keep' -++++++++++UNKNOWN label='K1. Keep' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K2. Keep' -++++++++++UNKNOWN label='K2. Keep' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K3. Keep' -++++++++++UNKNOWN label='K3. Keep' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K4. Keep ' -++++++++++UNKNOWN label='K4. Keep ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K5. Keep' -++++++++++UNKNOWN label='K5. Keep' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K6. Keep ' -++++++++++UNKNOWN label='K6. Keep ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K7. Keep' -++++++++++UNKNOWN label='K7. Keep' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' space' -++++++++++UNKNOWN label=' space' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='K8. Keep' -++++++++++UNKNOWN label='K8. Keep' +++++++++++UNKNOWN ++++++++STATIC_TEXT label=' ' -++++++++++UNKNOWN label=' ' +++++++++++UNKNOWN ++++++++STATIC_TEXT label='space' -++++++++++UNKNOWN label='space' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/span-line-break-expected-blink.txt b/content/test/data/accessibility/html/span-line-break-expected-blink.txt index 94531bd..27273814c 100644 --- a/content/test/data/accessibility/html/span-line-break-expected-blink.txt +++ b/content/test/data/accessibility/html/span-line-break-expected-blink.txt
@@ -3,61 +3,61 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='100(a)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='100(a)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='100(b)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='100(b)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='100(c)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='100(c)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='500(a)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='500(a)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='500(b)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='500(b)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='500(c)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='500(c)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='900(a)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='900(a)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='900(b)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='900(b)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='900(c)#abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='900(c)#abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox ++++++++staticText name=' ' -++++++++++inlineTextBox name=' ' +++++++++++inlineTextBox ++++++++staticText name='abcdefghijklmnopqrstuvwxyz' -++++++++++inlineTextBox name='abcdefghijklmnopqrstuvwxyz' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/static-list-expected-blink.txt b/content/test/data/accessibility/html/static-list-expected-blink.txt index 15a7c1d..e1185b7 100644 --- a/content/test/data/accessibility/html/static-list-expected-blink.txt +++ b/content/test/data/accessibility/html/static-list-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++listMarker name='1. ' ++++++++++++staticText ignored name='1. ' ++++++++++staticText name='Kirk' -++++++++++++inlineTextBox name='Kirk' +++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='2. ' ++++++++++++staticText ignored name='2. ' ++++++++++staticText name='Picard' -++++++++++++inlineTextBox name='Picard' +++++++++++++inlineTextBox ++++++++listItem ++++++++++listMarker name='3. ' ++++++++++++staticText ignored name='3. ' ++++++++++staticText name='Janeway' -++++++++++++inlineTextBox name='Janeway' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/strong-expected-blink.txt b/content/test/data/accessibility/html/strong-expected-blink.txt index c54545d..349b283 100644 --- a/content/test/data/accessibility/html/strong-expected-blink.txt +++ b/content/test/data/accessibility/html/strong-expected-blink.txt
@@ -3,4 +3,4 @@ ++++genericContainer ++++++strong ++++++++staticText name='Strong text' -++++++++++inlineTextBox name='Strong text' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/strong-expected-fuchsia.txt b/content/test/data/accessibility/html/strong-expected-fuchsia.txt index 63cbc8f..c31750be 100644 --- a/content/test/data/accessibility/html/strong-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/strong-expected-fuchsia.txt
@@ -3,4 +3,4 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Strong text' -++++++++++UNKNOWN label='Strong text' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/sub-expected-blink.txt b/content/test/data/accessibility/html/sub-expected-blink.txt index 55e5797..088ebf3 100644 --- a/content/test/data/accessibility/html/sub-expected-blink.txt +++ b/content/test/data/accessibility/html/sub-expected-blink.txt
@@ -3,31 +3,31 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This text contains ' -++++++++++inlineTextBox name='This text contains ' +++++++++++inlineTextBox ++++++++subscript textPosition=subscript ++++++++++staticText name='subscript' textPosition=subscript -++++++++++++inlineTextBox name='subscript' +++++++++++++inlineTextBox ++++++++staticText name=' text.' -++++++++++inlineTextBox name=' text.' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='H' -++++++++++inlineTextBox name='H' +++++++++++inlineTextBox ++++++++subscript textPosition=subscript ++++++++++staticText name=' ' textPosition=subscript -++++++++++++inlineTextBox name=' ' +++++++++++++inlineTextBox ++++++++++contentDeletion textPosition=subscript textStyle=16 ++++++++++++genericContainer name='3' textPosition=subscript textStyle=16 ++++++++++++++genericContainer name='oops' textPosition=subscript textStyle=16 ++++++++++++++++staticText name='3' textPosition=subscript textStyle=16 -++++++++++++++++++inlineTextBox name='3' +++++++++++++++++++inlineTextBox ++++++++++staticText name=' ' textPosition=subscript -++++++++++++inlineTextBox name=' ' +++++++++++++inlineTextBox ++++++++++contentInsertion textPosition=subscript textStyle=8 ++++++++++++link name='2' textPosition=subscript textStyle=8 ++++++++++++++genericContainer name='better' textPosition=subscript textStyle=8 ++++++++++++++++staticText name='2' textPosition=subscript textStyle=8 -++++++++++++++++++inlineTextBox name='2' +++++++++++++++++++inlineTextBox ++++++++++staticText name=' ' textPosition=subscript -++++++++++++inlineTextBox name=' ' +++++++++++++inlineTextBox ++++++++staticText name='O' -++++++++++inlineTextBox name='O' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/sub-expected-fuchsia.txt b/content/test/data/accessibility/html/sub-expected-fuchsia.txt index 304f4de..7d7a2fd 100644 --- a/content/test/data/accessibility/html/sub-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/sub-expected-fuchsia.txt
@@ -3,31 +3,31 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This text contains ' -++++++++++UNKNOWN label='This text contains ' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='subscript' -++++++++++++UNKNOWN label='subscript' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label=' text.' -++++++++++UNKNOWN label=' text.' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='H' -++++++++++UNKNOWN label='H' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label=' ' -++++++++++++UNKNOWN label=' ' +++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++UNKNOWN focusable label='3' ++++++++++++++UNKNOWN label='oops' ++++++++++++++++STATIC_TEXT label='3' -++++++++++++++++++UNKNOWN label='3' +++++++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' ' -++++++++++++UNKNOWN label=' ' +++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++LINK focusable label='2' actions='{DEFAULT}' ++++++++++++++UNKNOWN label='better' actions='{DEFAULT}' ++++++++++++++++STATIC_TEXT label='2' actions='{DEFAULT}' -++++++++++++++++++UNKNOWN label='2' +++++++++++++++++++UNKNOWN ++++++++++STATIC_TEXT label=' ' -++++++++++++UNKNOWN label=' ' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label='O' -++++++++++UNKNOWN label='O' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/summary-expected-blink.txt b/content/test/data/accessibility/html/summary-expected-blink.txt index 46c9434..0db2960 100644 --- a/content/test/data/accessibility/html/summary-expected-blink.txt +++ b/content/test/data/accessibility/html/summary-expected-blink.txt
@@ -7,7 +7,7 @@ ++++++++++++listMarker ignored htmlTag='::marker' ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='details tag' -++++++++++++++inlineTextBox name='details tag' +++++++++++++++inlineTextBox ++++++++genericContainer ignored htmlTag='slot' ++++++++++staticText ignored invisible name='<newline> ' ++++++++++staticText ignored invisible name='<newline> ' @@ -19,7 +19,7 @@ ++++++++++++listMarker ignored htmlTag='::marker' ++++++++++++++staticText ignored name='%E2%96%B8 ' ++++++++++++staticText name='details #2' -++++++++++++++inlineTextBox name='details #2' +++++++++++++++inlineTextBox ++++++++genericContainer ignored htmlTag='slot' ++++++++++staticText ignored invisible name='<newline> ' ++++++++++staticText ignored invisible name='<newline> '
diff --git a/content/test/data/accessibility/html/summary-expected-fuchsia.txt b/content/test/data/accessibility/html/summary-expected-fuchsia.txt index 758643d..319da55 100644 --- a/content/test/data/accessibility/html/summary-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/summary-expected-fuchsia.txt
@@ -7,7 +7,7 @@ ++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++STATIC_TEXT label='details tag' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='details tag' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT hidden label='<newline> ' ++++++++++STATIC_TEXT hidden label='<newline> ' @@ -19,7 +19,7 @@ ++++++++++++LIST_ELEMENT_MARKER hidden ++++++++++++++STATIC_TEXT hidden label='%E2%96%B8 ' ++++++++++++STATIC_TEXT label='details #2' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='details #2' +++++++++++++++UNKNOWN ++++++++UNKNOWN hidden ++++++++++STATIC_TEXT hidden label='<newline> ' ++++++++++STATIC_TEXT hidden label='<newline> '
diff --git a/content/test/data/accessibility/html/sup-expected-blink.txt b/content/test/data/accessibility/html/sup-expected-blink.txt index 350a3fd..20586afe 100644 --- a/content/test/data/accessibility/html/sup-expected-blink.txt +++ b/content/test/data/accessibility/html/sup-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This text contains' -++++++++++inlineTextBox name='This text contains' +++++++++++inlineTextBox ++++++++superscript textPosition=superscript ++++++++++staticText name='superscript' textPosition=superscript -++++++++++++inlineTextBox name='superscript' +++++++++++++inlineTextBox ++++++++staticText name='text.' -++++++++++inlineTextBox name='text.' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/sup-expected-fuchsia.txt b/content/test/data/accessibility/html/sup-expected-fuchsia.txt index 7a2d8db..26a7469 100644 --- a/content/test/data/accessibility/html/sup-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/sup-expected-fuchsia.txt
@@ -3,9 +3,9 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='This text contains' -++++++++++UNKNOWN label='This text contains' +++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='superscript' -++++++++++++UNKNOWN label='superscript' +++++++++++++UNKNOWN ++++++++STATIC_TEXT label='text.' -++++++++++UNKNOWN label='text.' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-and-math-elements-expected-blink.txt b/content/test/data/accessibility/html/svg-and-math-elements-expected-blink.txt index 3d1492e..bec7636 100644 --- a/content/test/data/accessibility/html/svg-and-math-elements-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-and-math-elements-expected-blink.txt
@@ -10,4 +10,4 @@ ++++++++genericContainer className='html-namespace' htmlTag='math' name='created' ++++++++genericContainer className='custom-namespace' htmlTag='math' name='created' ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-and-math-elements-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-and-math-elements-expected-fuchsia.txt index f2c0f99..29d1bee4 100644 --- a/content/test/data/accessibility/html/svg-and-math-elements-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-and-math-elements-expected-fuchsia.txt
@@ -10,4 +10,4 @@ ++++++++UNKNOWN label='created' ++++++++UNKNOWN label='created' ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-desc-in-group-expected-blink.txt b/content/test/data/accessibility/html/svg-desc-in-group-expected-blink.txt index eec0e2b..b958b41 100644 --- a/content/test/data/accessibility/html/svg-desc-in-group-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-desc-in-group-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++group description='Group with circle and text' htmlTag='g' descriptionFrom=svgDescElement ++++++++++genericContainer htmlTag='text' ++++++++++++staticText name='hello world' -++++++++++++++inlineTextBox name='hello world' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-desc-in-group-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-desc-in-group-expected-fuchsia.txt index ef4bac6..21167b7 100644 --- a/content/test/data/accessibility/html/svg-desc-in-group-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-desc-in-group-expected-fuchsia.txt
@@ -5,4 +5,4 @@ ++++++++UNKNOWN secondary_label='Group with circle and text' ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='hello world' -++++++++++++++UNKNOWN label='hello world' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink-cros.txt b/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink-cros.txt index a2e4c33..e2d9ce5 100644 --- a/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink-cros.txt +++ b/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink-cros.txt
@@ -28,7 +28,7 @@ ++++++svgRoot htmlTag='svg' name='switch should not be exposed' ++++++++genericContainer htmlTag='text' ++++++++++staticText name='Hey!' -++++++++++++inlineTextBox name='Hey!' +++++++++++++inlineTextBox ++++++image htmlTag='svg' name='view should not be exposed' ++++++image description='abc' htmlTag='svg' name='desc should not be exposed as accessible object' descriptionFrom=svgDescElement ++++++image description='abc' htmlTag='svg' name='title should not be exposed as accessible object' descriptionFrom=title @@ -61,8 +61,8 @@ ++++++svgRoot htmlTag='svg' name='tspan which lacks criteria for inclusion should not be exposed' ++++++++genericContainer htmlTag='text' ++++++++++staticText name='Hello ' -++++++++++++inlineTextBox name='Hello ' +++++++++++++inlineTextBox ++++++++++staticText name='world' -++++++++++++inlineTextBox name='world' +++++++++++++inlineTextBox ++++++++++staticText name='!' -++++++++++++inlineTextBox name='!' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink.txt b/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink.txt index 40069755..741fd2d 100644 --- a/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-elements-not-mapped-expected-blink.txt
@@ -28,7 +28,7 @@ ++++++svgRoot htmlTag='svg' name='switch should not be exposed' ++++++++genericContainer htmlTag='text' ++++++++++staticText name='Hey!' -++++++++++++inlineTextBox name='Hey!' +++++++++++++inlineTextBox ++++++image htmlTag='svg' name='view should not be exposed' ++++++image description='abc' htmlTag='svg' name='desc should not be exposed as accessible object' descriptionFrom=svgDescElement ++++++image description='abc' htmlTag='svg' name='title should not be exposed as accessible object' descriptionFrom=title @@ -61,8 +61,8 @@ ++++++svgRoot htmlTag='svg' name='tspan which lacks criteria for inclusion should not be exposed' ++++++++genericContainer htmlTag='text' ++++++++++staticText name='Hello ' -++++++++++++inlineTextBox name='Hello ' +++++++++++++inlineTextBox ++++++++++staticText name='world' -++++++++++++inlineTextBox name='world' +++++++++++++inlineTextBox ++++++++++staticText name='!' -++++++++++++inlineTextBox name='!' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-elements-not-mapped-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-elements-not-mapped-expected-fuchsia.txt index c8afc08..72135bfb 100644 --- a/content/test/data/accessibility/html/svg-elements-not-mapped-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-elements-not-mapped-expected-fuchsia.txt
@@ -28,7 +28,7 @@ ++++++UNKNOWN label='switch should not be exposed' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Hey!' -++++++++++++UNKNOWN label='Hey!' +++++++++++++UNKNOWN ++++++IMAGE label='view should not be exposed' ++++++IMAGE label='desc should not be exposed as accessible object' secondary_label='abc' ++++++IMAGE label='title should not be exposed as accessible object' secondary_label='abc' @@ -61,8 +61,8 @@ ++++++UNKNOWN label='tspan which lacks criteria for inclusion should not be exposed' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Hello ' -++++++++++++UNKNOWN label='Hello ' +++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='world' -++++++++++++UNKNOWN label='world' +++++++++++++UNKNOWN ++++++++++STATIC_TEXT label='!' -++++++++++++UNKNOWN label='!' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-expected-blink.txt b/content/test/data/accessibility/html/svg-expected-blink.txt index 02dad28c..fd08185b 100644 --- a/content/test/data/accessibility/html/svg-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++svgRoot description='SVG Title Tag' name='svg' tooltip='SVG Title Tag' descriptionFrom=title ++++++++genericContainer ++++++++++staticText name='Test' -++++++++++++inlineTextBox name='Test' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-expected-fuchsia.txt index dd0b8fe..e052282 100644 --- a/content/test/data/accessibility/html/svg-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++UNKNOWN label='svg' secondary_label='SVG Title Tag' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Test' -++++++++++++UNKNOWN label='Test' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-g-expected-blink-cros.txt b/content/test/data/accessibility/html/svg-g-expected-blink-cros.txt index 1a35fbe..73b854c 100644 --- a/content/test/data/accessibility/html/svg-g-expected-blink-cros.txt +++ b/content/test/data/accessibility/html/svg-g-expected-blink-cros.txt
@@ -5,11 +5,11 @@ ++++++++group htmlTag='g' ++++++++++genericContainer ++++++++++++staticText name='Group 1 Text 1' -++++++++++++++inlineTextBox name='Group 1 Text 1' +++++++++++++++inlineTextBox ++++++++++genericContainer ++++++++++++staticText name='Group 1 Text 2' -++++++++++++++inlineTextBox name='Group 1 Text 2' +++++++++++++++inlineTextBox ++++++++group htmlTag='g' ++++++++++genericContainer ++++++++++++staticText name='Group 2 Text 1' -++++++++++++++inlineTextBox name='Group 2 Text 1' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-g-expected-blink.txt b/content/test/data/accessibility/html/svg-g-expected-blink.txt index ae599f5..7de370b 100644 --- a/content/test/data/accessibility/html/svg-g-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-g-expected-blink.txt
@@ -5,11 +5,11 @@ ++++++++group ignored htmlTag='g' ++++++++++genericContainer ++++++++++++staticText name='Group 1 Text 1' -++++++++++++++inlineTextBox name='Group 1 Text 1' +++++++++++++++inlineTextBox ++++++++++genericContainer ++++++++++++staticText name='Group 1 Text 2' -++++++++++++++inlineTextBox name='Group 1 Text 2' +++++++++++++++inlineTextBox ++++++++group ignored htmlTag='g' ++++++++++genericContainer ++++++++++++staticText name='Group 2 Text 1' -++++++++++++++inlineTextBox name='Group 2 Text 1' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-style-element-expected-blink.txt b/content/test/data/accessibility/html/svg-style-element-expected-blink.txt index 626df939..49c45cb1 100644 --- a/content/test/data/accessibility/html/svg-style-element-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-style-element-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++genericContainer ++++++++button name='Kettle' ++++++++++staticText name='Kettle' -++++++++++++inlineTextBox name='Kettle' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-style-element-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-style-element-expected-fuchsia.txt index 47438af..e0400e0 100644 --- a/content/test/data/accessibility/html/svg-style-element-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-style-element-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++UNKNOWN ++++++++BUTTON focusable label='Kettle' actions='{DEFAULT}' ++++++++++STATIC_TEXT label='Kettle' actions='{DEFAULT}' -++++++++++++UNKNOWN label='Kettle' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-title-in-group-expected-blink.txt b/content/test/data/accessibility/html/svg-title-in-group-expected-blink.txt index 9a4f57c..ec0f542 100644 --- a/content/test/data/accessibility/html/svg-title-in-group-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-title-in-group-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++image name='abcde' tooltip='abcde' nameFrom=relatedElement ++++++++++genericContainer ++++++++++++staticText name='NL' nameFrom=contents -++++++++++++++inlineTextBox name='NL' nameFrom=contents +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/svg-title-in-group-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-title-in-group-expected-fuchsia.txt index 25a919c..2327a7d 100644 --- a/content/test/data/accessibility/html/svg-title-in-group-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-title-in-group-expected-fuchsia.txt
@@ -5,4 +5,4 @@ ++++++++IMAGE label='abcde' ++++++++++UNKNOWN ++++++++++++STATIC_TEXT label='NL' -++++++++++++++UNKNOWN label='NL' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-blink.txt b/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-blink.txt index f27dbbd..6682576 100644 --- a/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-blink.txt +++ b/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-blink.txt
@@ -5,10 +5,10 @@ ++++++++genericContainer htmlTag='text' ++++++++++genericContainer htmlTag='a' name='focusable' ++++++++++++staticText name='focusable' -++++++++++++++inlineTextBox name='focusable' +++++++++++++++inlineTextBox ++++++++genericContainer htmlTag='text' ++++++++++staticText name='not focusable' -++++++++++++inlineTextBox name='not focusable' +++++++++++++inlineTextBox ++++++svgRoot htmlTag='svg' name='Not text descendants' ++++++++group htmlTag='a' ++++++++group ignored htmlTag='a'
diff --git a/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-fuchsia.txt b/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-fuchsia.txt index df07658..fd790a3 100644 --- a/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/svg-with-non-link-anchors-expected-fuchsia.txt
@@ -5,10 +5,10 @@ ++++++++UNKNOWN ++++++++++UNKNOWN focusable label='focusable' ++++++++++++STATIC_TEXT label='focusable' -++++++++++++++UNKNOWN label='focusable' +++++++++++++++UNKNOWN ++++++++UNKNOWN ++++++++++STATIC_TEXT label='not focusable' -++++++++++++UNKNOWN label='not focusable' +++++++++++++UNKNOWN ++++++UNKNOWN label='Not text descendants' ++++++++UNKNOWN focusable ++++++++UNKNOWN hidden
diff --git a/content/test/data/accessibility/html/tabindex-expose-children-expected-blink.txt b/content/test/data/accessibility/html/tabindex-expose-children-expected-blink.txt index 7f30100..6f457d7 100644 --- a/content/test/data/accessibility/html/tabindex-expose-children-expected-blink.txt +++ b/content/test/data/accessibility/html/tabindex-expose-children-expected-blink.txt
@@ -7,17 +7,17 @@ ++++++++++++layoutTableRow ++++++++++++++layoutTableCell name='1.' ++++++++++++++++staticText name='1.' -++++++++++++++++++inlineTextBox name='1.' +++++++++++++++++++inlineTextBox ++++++++++++++layoutTableCell name='2.' ++++++++++++++++staticText name='2.' -++++++++++++++++++inlineTextBox name='2.' +++++++++++++++++++inlineTextBox ++++++genericContainer name='3. 4.' ++++++++layoutTable ++++++++++genericContainer ignored ++++++++++++layoutTableRow ++++++++++++++layoutTableCell name='3.' ++++++++++++++++staticText name='3.' -++++++++++++++++++inlineTextBox name='3.' +++++++++++++++++++inlineTextBox ++++++++++++++layoutTableCell name='4.' ++++++++++++++++staticText name='4.' -++++++++++++++++++inlineTextBox name='4.' +++++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/tabindex-expose-children-expected-fuchsia.txt b/content/test/data/accessibility/html/tabindex-expose-children-expected-fuchsia.txt index f004aa4..6f97c88 100644 --- a/content/test/data/accessibility/html/tabindex-expose-children-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/tabindex-expose-children-expected-fuchsia.txt
@@ -7,17 +7,17 @@ ++++++++++++UNKNOWN ++++++++++++++UNKNOWN label='1.' ++++++++++++++++STATIC_TEXT label='1.' -++++++++++++++++++UNKNOWN label='1.' +++++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN label='2.' ++++++++++++++++STATIC_TEXT label='2.' -++++++++++++++++++UNKNOWN label='2.' +++++++++++++++++++UNKNOWN ++++++UNKNOWN focusable label='3. 4.' ++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN ++++++++++++++UNKNOWN label='3.' ++++++++++++++++STATIC_TEXT label='3.' -++++++++++++++++++UNKNOWN label='3.' +++++++++++++++++++UNKNOWN ++++++++++++++UNKNOWN label='4.' ++++++++++++++++STATIC_TEXT label='4.' -++++++++++++++++++UNKNOWN label='4.' +++++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-canvas-fallback-expected-blink.txt b/content/test/data/accessibility/html/table-canvas-fallback-expected-blink.txt index bd1161d..1431932 100644 --- a/content/test/data/accessibility/html/table-canvas-fallback-expected-blink.txt +++ b/content/test/data/accessibility/html/table-canvas-fallback-expected-blink.txt
@@ -30,14 +30,14 @@ ++++++++++layoutTableRow ++++++++++++layoutTableCell name='Watermelon' ++++++++++++++staticText name='Watermelon' -++++++++++++++++inlineTextBox name='Watermelon' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='Fish food' ++++++++++++++staticText name='Fish food' -++++++++++++++++inlineTextBox name='Fish food' +++++++++++++++++inlineTextBox ++++++++++layoutTableRow ++++++++++++layoutTableCell name='Tunafish' ++++++++++++++staticText name='Tunafish' -++++++++++++++++inlineTextBox name='Tunafish' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='Beef' ++++++++++++++staticText name='Beef' -++++++++++++++++inlineTextBox name='Beef' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-column-remove-expected-blink.txt b/content/test/data/accessibility/html/table-column-remove-expected-blink.txt index 316bec7..2d8df953 100644 --- a/content/test/data/accessibility/html/table-column-remove-expected-blink.txt +++ b/content/test/data/accessibility/html/table-column-remove-expected-blink.txt
@@ -7,9 +7,9 @@ ++++++++++++cell ignored invisible ++++++++++++cell name='B' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell ignored invisible ++++++++++++cell name='D' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='D' -++++++++++++++++inlineTextBox name='D' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-column-remove-expected-fuchsia.txt b/content/test/data/accessibility/html/table-column-remove-expected-fuchsia.txt index 6ddc04a..ce820e8 100644 --- a/content/test/data/accessibility/html/table-column-remove-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-column-remove-expected-fuchsia.txt
@@ -7,9 +7,9 @@ ++++++++++++CELL hidden cell_row_span=1 cell_column_span=1 ++++++++++++CELL label='B' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='B' -++++++++++++++++UNKNOWN label='B' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL hidden cell_row_span=1 cell_column_span=1 ++++++++++++CELL label='D' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='D' -++++++++++++++++UNKNOWN label='D' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-focusable-sections-expected-blink.txt b/content/test/data/accessibility/html/table-focusable-sections-expected-blink.txt index ea63a64..90cbcc7 100644 --- a/content/test/data/accessibility/html/table-focusable-sections-expected-blink.txt +++ b/content/test/data/accessibility/html/table-focusable-sections-expected-blink.txt
@@ -6,30 +6,30 @@ ++++++++++row ++++++++++++columnHeader name='Sum' ++++++++++++++staticText name='Sum' -++++++++++++++++inlineTextBox name='Sum' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Subtraction' ++++++++++++++staticText name='Subtraction' -++++++++++++++++inlineTextBox name='Subtraction' +++++++++++++++++inlineTextBox ++++++++rowGroup ++++++++++row ++++++++++++cell name='10' ++++++++++++++staticText name='10' -++++++++++++++++inlineTextBox name='10' +++++++++++++++++inlineTextBox ++++++++++++cell name='7' ++++++++++++++staticText name='7' -++++++++++++++++inlineTextBox name='7' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='2' ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++cell name='4' ++++++++++++++staticText name='4' -++++++++++++++++inlineTextBox name='4' +++++++++++++++++inlineTextBox ++++++++rowGroup ++++++++++row ++++++++++++cell name='12' ++++++++++++++staticText name='12' -++++++++++++++++inlineTextBox name='12' +++++++++++++++++inlineTextBox ++++++++++++cell name='3' ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-focusable-sections-expected-fuchsia.txt b/content/test/data/accessibility/html/table-focusable-sections-expected-fuchsia.txt index fccbb02a..329c751 100644 --- a/content/test/data/accessibility/html/table-focusable-sections-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-focusable-sections-expected-fuchsia.txt
@@ -6,30 +6,30 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Sum' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Sum' -++++++++++++++++UNKNOWN label='Sum' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Subtraction' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Subtraction' -++++++++++++++++UNKNOWN label='Subtraction' +++++++++++++++++UNKNOWN ++++++++ROW_GROUP focusable ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='10' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='10' -++++++++++++++++UNKNOWN label='10' +++++++++++++++++UNKNOWN ++++++++++++CELL label='7' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='7' -++++++++++++++++UNKNOWN label='7' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=2 ++++++++++++CELL label='2' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='2' -++++++++++++++++UNKNOWN label='2' +++++++++++++++++UNKNOWN ++++++++++++CELL label='4' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='4' -++++++++++++++++UNKNOWN label='4' +++++++++++++++++UNKNOWN ++++++++ROW_GROUP focusable ++++++++++TABLE_ROW row_index=3 ++++++++++++CELL label='12' cell_row_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='12' -++++++++++++++++UNKNOWN label='12' +++++++++++++++++UNKNOWN ++++++++++++CELL label='3' cell_row_index=3 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='3' -++++++++++++++++UNKNOWN label='3' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-blink.txt b/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-blink.txt index 622b031..abf84f7 100644 --- a/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-blink.txt +++ b/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-blink.txt
@@ -4,98 +4,98 @@ ++++++table name='Delivery slots:' ++++++++caption ++++++++++staticText name='Delivery slots:' -++++++++++++inlineTextBox name='Delivery slots:' +++++++++++++inlineTextBox ++++++++rowGroup ignored ++++++++++row ++++++++++++cell ++++++++++++columnHeader name='Monday' ++++++++++++++staticText name='Monday' -++++++++++++++++inlineTextBox name='Monday' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Tuesday' ++++++++++++++staticText name='Tuesday' -++++++++++++++++inlineTextBox name='Tuesday' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Wednesday' ++++++++++++++staticText name='Wednesday' -++++++++++++++++inlineTextBox name='Wednesday' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Thursday' ++++++++++++++staticText name='Thursday' -++++++++++++++++inlineTextBox name='Thursday' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Friday' ++++++++++++++staticText name='Friday' -++++++++++++++++inlineTextBox name='Friday' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='09:00 - 11:00' ++++++++++++++staticText name='09:00 - 11:00' -++++++++++++++++inlineTextBox name='09:00 - 11:00' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='11:00 - 13:00' ++++++++++++++staticText name='11:00 - 13:00' -++++++++++++++++inlineTextBox name='11:00 - 13:00' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='13:00 - 15:00' ++++++++++++++staticText name='13:00 - 15:00' -++++++++++++++++inlineTextBox name='13:00 - 15:00' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='15:00 - 17:00' ++++++++++++++staticText name='15:00 - 17:00' -++++++++++++++++inlineTextBox name='15:00 - 17:00' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Closed' ++++++++++++++staticText name='Closed' -++++++++++++++++inlineTextBox name='Closed' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox ++++++++++++cell name='Open' ++++++++++++++staticText name='Open' -++++++++++++++++inlineTextBox name='Open' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-fuchsia.txt b/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-fuchsia.txt index 7a2c5e35..b84ba182 100644 --- a/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-headers-empty-first-cell-expected-fuchsia.txt
@@ -4,98 +4,98 @@ ++++++TABLE label='Delivery slots:' number_of_rows=5 number_of_columns=6 ++++++++UNKNOWN ++++++++++STATIC_TEXT label='Delivery slots:' -++++++++++++UNKNOWN label='Delivery slots:' +++++++++++++UNKNOWN ++++++++ROW_GROUP hidden ++++++++++TABLE_ROW ++++++++++++CELL cell_row_span=1 cell_column_span=1 ++++++++++++COLUMN_HEADER label='Monday' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Monday' -++++++++++++++++UNKNOWN label='Monday' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Tuesday' cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Tuesday' -++++++++++++++++UNKNOWN label='Tuesday' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Wednesday' cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Wednesday' -++++++++++++++++UNKNOWN label='Wednesday' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Thursday' cell_column_index=4 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Thursday' -++++++++++++++++UNKNOWN label='Thursday' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Friday' cell_column_index=5 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Friday' -++++++++++++++++UNKNOWN label='Friday' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++UNKNOWN label='09:00 - 11:00' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='09:00 - 11:00' -++++++++++++++++UNKNOWN label='09:00 - 11:00' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=1 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=1 cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=1 cell_column_index=4 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=1 cell_column_index=5 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=2 ++++++++++++UNKNOWN label='11:00 - 13:00' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='11:00 - 13:00' -++++++++++++++++UNKNOWN label='11:00 - 13:00' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=2 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=2 cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=2 cell_column_index=4 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=2 cell_column_index=5 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=3 ++++++++++++UNKNOWN label='13:00 - 15:00' cell_row_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='13:00 - 15:00' -++++++++++++++++UNKNOWN label='13:00 - 15:00' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=3 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=3 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=3 cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=3 cell_column_index=4 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=3 cell_column_index=5 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=4 ++++++++++++UNKNOWN label='15:00 - 17:00' cell_row_index=4 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='15:00 - 17:00' -++++++++++++++++UNKNOWN label='15:00 - 17:00' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=4 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=4 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Closed' cell_row_index=4 cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Closed' -++++++++++++++++UNKNOWN label='Closed' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=4 cell_column_index=4 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Open' cell_row_index=4 cell_column_index=5 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Open' -++++++++++++++++UNKNOWN label='Open' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-headers-on-all-sides-expected-blink.txt b/content/test/data/accessibility/html/table-headers-on-all-sides-expected-blink.txt index a599226..b9433c1 100644 --- a/content/test/data/accessibility/html/table-headers-on-all-sides-expected-blink.txt +++ b/content/test/data/accessibility/html/table-headers-on-all-sides-expected-blink.txt
@@ -7,43 +7,43 @@ ++++++++++++cell ++++++++++++columnHeader name='Red' ++++++++++++++staticText name='Red' -++++++++++++++++inlineTextBox name='Red' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Green' ++++++++++++++staticText name='Green' -++++++++++++++++inlineTextBox name='Green' +++++++++++++++++inlineTextBox ++++++++++++cell ++++++++++row ++++++++++++rowHeader name='Fruit' ++++++++++++++staticText name='Fruit' -++++++++++++++++inlineTextBox name='Fruit' +++++++++++++++++inlineTextBox ++++++++++++cell name='strawberry' ++++++++++++++staticText name='strawberry' -++++++++++++++++inlineTextBox name='strawberry' +++++++++++++++++inlineTextBox ++++++++++++cell name='lime' ++++++++++++++staticText name='lime' -++++++++++++++++inlineTextBox name='lime' +++++++++++++++++inlineTextBox ++++++++++++rowHeader name='Fruit' ++++++++++++++staticText name='Fruit' -++++++++++++++++inlineTextBox name='Fruit' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='Veggies' ++++++++++++++staticText name='Veggies' -++++++++++++++++inlineTextBox name='Veggies' +++++++++++++++++inlineTextBox ++++++++++++cell name='radish' ++++++++++++++staticText name='radish' -++++++++++++++++inlineTextBox name='radish' +++++++++++++++++inlineTextBox ++++++++++++cell name='spinach' ++++++++++++++staticText name='spinach' -++++++++++++++++inlineTextBox name='spinach' +++++++++++++++++inlineTextBox ++++++++++++rowHeader name='Veggies' ++++++++++++++staticText name='Veggies' -++++++++++++++++inlineTextBox name='Veggies' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell ++++++++++++columnHeader name='Red' ++++++++++++++staticText name='Red' -++++++++++++++++inlineTextBox name='Red' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Green' ++++++++++++++staticText name='Green' -++++++++++++++++inlineTextBox name='Green' +++++++++++++++++inlineTextBox ++++++++++++cell
diff --git a/content/test/data/accessibility/html/table-headers-on-all-sides-expected-fuchsia.txt b/content/test/data/accessibility/html/table-headers-on-all-sides-expected-fuchsia.txt index c7d9ec1..412510fd 100644 --- a/content/test/data/accessibility/html/table-headers-on-all-sides-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-headers-on-all-sides-expected-fuchsia.txt
@@ -7,43 +7,43 @@ ++++++++++++CELL cell_row_span=1 cell_column_span=1 ++++++++++++COLUMN_HEADER label='Red' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Red' -++++++++++++++++UNKNOWN label='Red' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Green' cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Green' -++++++++++++++++UNKNOWN label='Green' +++++++++++++++++UNKNOWN ++++++++++++CELL cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++TABLE_ROW row_index=1 ++++++++++++UNKNOWN label='Fruit' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Fruit' -++++++++++++++++UNKNOWN label='Fruit' +++++++++++++++++UNKNOWN ++++++++++++CELL label='strawberry' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='strawberry' -++++++++++++++++UNKNOWN label='strawberry' +++++++++++++++++UNKNOWN ++++++++++++CELL label='lime' cell_row_index=1 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='lime' -++++++++++++++++UNKNOWN label='lime' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='Fruit' cell_row_index=1 cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Fruit' -++++++++++++++++UNKNOWN label='Fruit' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=2 ++++++++++++UNKNOWN label='Veggies' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Veggies' -++++++++++++++++UNKNOWN label='Veggies' +++++++++++++++++UNKNOWN ++++++++++++CELL label='radish' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='radish' -++++++++++++++++UNKNOWN label='radish' +++++++++++++++++UNKNOWN ++++++++++++CELL label='spinach' cell_row_index=2 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='spinach' -++++++++++++++++UNKNOWN label='spinach' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='Veggies' cell_row_index=2 cell_column_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Veggies' -++++++++++++++++UNKNOWN label='Veggies' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=3 ++++++++++++CELL cell_row_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++COLUMN_HEADER label='Red' cell_row_index=3 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Red' -++++++++++++++++UNKNOWN label='Red' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Green' cell_row_index=3 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Green' -++++++++++++++++UNKNOWN label='Green' +++++++++++++++++UNKNOWN ++++++++++++CELL cell_row_index=3 cell_column_index=3 cell_row_span=1 cell_column_span=1
diff --git a/content/test/data/accessibility/html/table-headers-row-role-dynamic-expected-blink.txt b/content/test/data/accessibility/html/table-headers-row-role-dynamic-expected-blink.txt index 2818b263..c040be4 100644 --- a/content/test/data/accessibility/html/table-headers-row-role-dynamic-expected-blink.txt +++ b/content/test/data/accessibility/html/table-headers-row-role-dynamic-expected-blink.txt
@@ -7,18 +7,18 @@ ++++++++++row ++++++++++++columnHeader name='Text' ++++++++++++++staticText name='Text' -++++++++++++++++inlineTextBox name='Text' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='Should be a row header' ++++++++++++++staticText name='Should be a row header' -++++++++++++++++inlineTextBox name='Should be a row header' +++++++++++++++++inlineTextBox ++++++++++++cell name='text' ++++++++++++++staticText name='text' -++++++++++++++++inlineTextBox name='text' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='Should also be a row header' ++++++++++++++staticText name='Should also be a row header' -++++++++++++++++inlineTextBox name='Should also be a row header' +++++++++++++++++inlineTextBox ++++++++++++cell name='text2' ++++++++++++++staticText name='text2' -++++++++++++++++inlineTextBox name='text2' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-layout-expected-blink.txt b/content/test/data/accessibility/html/table-layout-expected-blink.txt index bd0bece..6363ddb 100644 --- a/content/test/data/accessibility/html/table-layout-expected-blink.txt +++ b/content/test/data/accessibility/html/table-layout-expected-blink.txt
@@ -6,30 +6,30 @@ ++++++++++layoutTableRow ++++++++++++layoutTableCell name='1' ++++++++++++++staticText name='1' -++++++++++++++++inlineTextBox name='1' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='2' ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='3' ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox ++++++++++layoutTableRow ++++++++++++layoutTableCell name='4' ++++++++++++++staticText name='4' -++++++++++++++++inlineTextBox name='4' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='5' ++++++++++++++staticText name='5' -++++++++++++++++inlineTextBox name='5' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='6' ++++++++++++++staticText name='6' -++++++++++++++++inlineTextBox name='6' +++++++++++++++++inlineTextBox ++++++++++layoutTableRow ++++++++++++layoutTableCell name='7' ++++++++++++++staticText name='7' -++++++++++++++++inlineTextBox name='7' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='8' ++++++++++++++staticText name='8' -++++++++++++++++inlineTextBox name='8' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='9' ++++++++++++++staticText name='9' -++++++++++++++++inlineTextBox name='9' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-layout-expected-fuchsia.txt b/content/test/data/accessibility/html/table-layout-expected-fuchsia.txt index c1ed2dd..3b3314db 100644 --- a/content/test/data/accessibility/html/table-layout-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-layout-expected-fuchsia.txt
@@ -6,30 +6,30 @@ ++++++++++UNKNOWN ++++++++++++UNKNOWN label='1' ++++++++++++++STATIC_TEXT label='1' -++++++++++++++++UNKNOWN label='1' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='2' ++++++++++++++STATIC_TEXT label='2' -++++++++++++++++UNKNOWN label='2' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='3' ++++++++++++++STATIC_TEXT label='3' -++++++++++++++++UNKNOWN label='3' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++UNKNOWN label='4' ++++++++++++++STATIC_TEXT label='4' -++++++++++++++++UNKNOWN label='4' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='5' ++++++++++++++STATIC_TEXT label='5' -++++++++++++++++UNKNOWN label='5' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='6' ++++++++++++++STATIC_TEXT label='6' -++++++++++++++++UNKNOWN label='6' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN ++++++++++++UNKNOWN label='7' ++++++++++++++STATIC_TEXT label='7' -++++++++++++++++UNKNOWN label='7' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='8' ++++++++++++++STATIC_TEXT label='8' -++++++++++++++++UNKNOWN label='8' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN label='9' ++++++++++++++STATIC_TEXT label='9' -++++++++++++++++UNKNOWN label='9' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-multiple-row-and-column-headers-expected-blink.txt b/content/test/data/accessibility/html/table-multiple-row-and-column-headers-expected-blink.txt index ab7a173..ddb79efc 100644 --- a/content/test/data/accessibility/html/table-multiple-row-and-column-headers-expected-blink.txt +++ b/content/test/data/accessibility/html/table-multiple-row-and-column-headers-expected-blink.txt
@@ -7,90 +7,90 @@ ++++++++++++cell ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++columnHeader name='Mars' ariaCellColumnIndex=3 tableCellColumnIndex=2 ++++++++++++++staticText name='Mars' -++++++++++++++++inlineTextBox name='Mars' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Venus' ariaCellColumnIndex=5 tableCellColumnIndex=4 ++++++++++++++staticText name='Venus' -++++++++++++++++inlineTextBox name='Venus' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++columnHeader name='Produced' ariaCellColumnIndex=1 tableCellColumnIndex=2 ++++++++++++++staticText name='Produced' -++++++++++++++++inlineTextBox name='Produced' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Sold' ariaCellColumnIndex=2 tableCellColumnIndex=3 ++++++++++++++staticText name='Sold' -++++++++++++++++inlineTextBox name='Sold' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Produced' ariaCellColumnIndex=3 tableCellColumnIndex=4 ++++++++++++++staticText name='Produced' -++++++++++++++++inlineTextBox name='Produced' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Sold' ariaCellColumnIndex=4 tableCellColumnIndex=5 ++++++++++++++staticText name='Sold' -++++++++++++++++inlineTextBox name='Sold' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='For Toddlers' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='For Toddlers' -++++++++++++++++inlineTextBox name='For Toddlers' +++++++++++++++++inlineTextBox ++++++++++++rowHeader name='Teddy Bears' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Teddy Bears' -++++++++++++++++inlineTextBox name='Teddy Bears' +++++++++++++++++inlineTextBox ++++++++++++cell name='50,000' ariaCellColumnIndex=3 tableCellColumnIndex=2 ++++++++++++++staticText name='50,000' -++++++++++++++++inlineTextBox name='50,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='30,000' ariaCellColumnIndex=4 tableCellColumnIndex=3 ++++++++++++++staticText name='30,000' -++++++++++++++++inlineTextBox name='30,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='100,000' ariaCellColumnIndex=5 tableCellColumnIndex=4 ++++++++++++++staticText name='100,000' -++++++++++++++++inlineTextBox name='100,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='80,000' ariaCellColumnIndex=6 tableCellColumnIndex=5 ++++++++++++++staticText name='80,000' -++++++++++++++++inlineTextBox name='80,000' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='Action Figures' ariaCellColumnIndex=1 tableCellColumnIndex=1 ++++++++++++++staticText name='Action Figures' -++++++++++++++++inlineTextBox name='Action Figures' +++++++++++++++++inlineTextBox ++++++++++++cell name='25,000' ariaCellColumnIndex=2 tableCellColumnIndex=2 ++++++++++++++staticText name='25,000' -++++++++++++++++inlineTextBox name='25,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='15,000' ariaCellColumnIndex=3 tableCellColumnIndex=3 ++++++++++++++staticText name='15,000' -++++++++++++++++inlineTextBox name='15,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='50,000' ariaCellColumnIndex=4 tableCellColumnIndex=4 ++++++++++++++staticText name='50,000' -++++++++++++++++inlineTextBox name='50,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='40,000' ariaCellColumnIndex=5 tableCellColumnIndex=5 ++++++++++++++staticText name='40,000' -++++++++++++++++inlineTextBox name='40,000' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='For Teens' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='For Teens' -++++++++++++++++inlineTextBox name='For Teens' +++++++++++++++++inlineTextBox ++++++++++++rowHeader name='Board Games' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Board Games' -++++++++++++++++inlineTextBox name='Board Games' +++++++++++++++++inlineTextBox ++++++++++++cell name='5,000' ariaCellColumnIndex=3 tableCellColumnIndex=2 ++++++++++++++staticText name='5,000' -++++++++++++++++inlineTextBox name='5,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='2,000' ariaCellColumnIndex=4 tableCellColumnIndex=3 ++++++++++++++staticText name='2,000' -++++++++++++++++inlineTextBox name='2,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='6,000' ariaCellColumnIndex=5 tableCellColumnIndex=4 ++++++++++++++staticText name='6,000' -++++++++++++++++inlineTextBox name='6,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='4,000' ariaCellColumnIndex=6 tableCellColumnIndex=5 ++++++++++++++staticText name='4,000' -++++++++++++++++inlineTextBox name='4,000' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='Video Games' ariaCellColumnIndex=1 tableCellColumnIndex=1 ++++++++++++++staticText name='Video Games' -++++++++++++++++inlineTextBox name='Video Games' +++++++++++++++++inlineTextBox ++++++++++++cell name='10,000' ariaCellColumnIndex=2 tableCellColumnIndex=2 ++++++++++++++staticText name='10,000' -++++++++++++++++inlineTextBox name='10,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='5,000' ariaCellColumnIndex=3 tableCellColumnIndex=3 ++++++++++++++staticText name='5,000' -++++++++++++++++inlineTextBox name='5,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='12,000' ariaCellColumnIndex=4 tableCellColumnIndex=4 ++++++++++++++staticText name='12,000' -++++++++++++++++inlineTextBox name='12,000' +++++++++++++++++inlineTextBox ++++++++++++cell name='9,000' ariaCellColumnIndex=5 tableCellColumnIndex=5 ++++++++++++++staticText name='9,000' -++++++++++++++++inlineTextBox name='9,000' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-presentation-expected-blink.txt b/content/test/data/accessibility/html/table-presentation-expected-blink.txt index 898b208b..dacb999 100644 --- a/content/test/data/accessibility/html/table-presentation-expected-blink.txt +++ b/content/test/data/accessibility/html/table-presentation-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++genericContainer ignored ++++++++++++genericContainer ++++++++++++++staticText name='1' -++++++++++++++++inlineTextBox name='1' +++++++++++++++++inlineTextBox ++++++++++++genericContainer ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++genericContainer ++++++++++++++staticText name='4' -++++++++++++++++inlineTextBox name='4' +++++++++++++++++inlineTextBox ++++++++++++genericContainer ++++++++++++++staticText name='5' -++++++++++++++++inlineTextBox name='5' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-presentation-expected-fuchsia.txt b/content/test/data/accessibility/html/table-presentation-expected-fuchsia.txt index 7c78eed..9e1bd59 100644 --- a/content/test/data/accessibility/html/table-presentation-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-presentation-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='1' -++++++++++++++++UNKNOWN label='1' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='2' -++++++++++++++++UNKNOWN label='2' +++++++++++++++++UNKNOWN ++++++++++UNKNOWN hidden ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='4' -++++++++++++++++UNKNOWN label='4' +++++++++++++++++UNKNOWN ++++++++++++UNKNOWN ++++++++++++++STATIC_TEXT label='5' -++++++++++++++++UNKNOWN label='5' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-row-add-expected-blink.txt b/content/test/data/accessibility/html/table-row-add-expected-blink.txt index df6da23a..ae463c4 100644 --- a/content/test/data/accessibility/html/table-row-add-expected-blink.txt +++ b/content/test/data/accessibility/html/table-row-add-expected-blink.txt
@@ -5,28 +5,28 @@ ++++++++row ++++++++++cell name='Row1' ++++++++++++staticText name='Row1' -++++++++++++++inlineTextBox name='Row1' +++++++++++++++inlineTextBox ++++++++++cell name='Foo1' ++++++++++++staticText name='Foo1' -++++++++++++++inlineTextBox name='Foo1' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Row2' ++++++++++++staticText name='Row2' -++++++++++++++inlineTextBox name='Row2' +++++++++++++++inlineTextBox ++++++++++cell name='Foo2' ++++++++++++staticText name='Foo2' -++++++++++++++inlineTextBox name='Foo2' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Row3' ++++++++++++staticText name='Row3' -++++++++++++++inlineTextBox name='Row3' +++++++++++++++inlineTextBox ++++++++++cell name='Foo3' ++++++++++++staticText name='Foo3' -++++++++++++++inlineTextBox name='Foo3' +++++++++++++++inlineTextBox ++++++++row ++++++++++cell name='Row4' ++++++++++++staticText name='Row4' -++++++++++++++inlineTextBox name='Row4' +++++++++++++++inlineTextBox ++++++++++cell name='Foo4' ++++++++++++staticText name='Foo4' -++++++++++++++inlineTextBox name='Foo4' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-row-add-expected-fuchsia.txt b/content/test/data/accessibility/html/table-row-add-expected-fuchsia.txt index a0a998a..379c986 100644 --- a/content/test/data/accessibility/html/table-row-add-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-row-add-expected-fuchsia.txt
@@ -5,28 +5,28 @@ ++++++++TABLE_ROW ++++++++++CELL label='Row1' cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Row1' -++++++++++++++UNKNOWN label='Row1' +++++++++++++++UNKNOWN ++++++++++CELL label='Foo1' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Foo1' -++++++++++++++UNKNOWN label='Foo1' +++++++++++++++UNKNOWN ++++++++TABLE_ROW row_index=1 ++++++++++CELL label='Row2' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Row2' -++++++++++++++UNKNOWN label='Row2' +++++++++++++++UNKNOWN ++++++++++CELL label='Foo2' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Foo2' -++++++++++++++UNKNOWN label='Foo2' +++++++++++++++UNKNOWN ++++++++TABLE_ROW row_index=2 ++++++++++CELL label='Row3' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Row3' -++++++++++++++UNKNOWN label='Row3' +++++++++++++++UNKNOWN ++++++++++CELL label='Foo3' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Foo3' -++++++++++++++UNKNOWN label='Foo3' +++++++++++++++UNKNOWN ++++++++TABLE_ROW row_index=3 ++++++++++CELL label='Row4' cell_row_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Row4' -++++++++++++++UNKNOWN label='Row4' +++++++++++++++UNKNOWN ++++++++++CELL label='Foo4' cell_row_index=3 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++STATIC_TEXT label='Foo4' -++++++++++++++UNKNOWN label='Foo4' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-simple-expected-blink.txt b/content/test/data/accessibility/html/table-simple-expected-blink.txt index 6f67135..48dbe17 100644 --- a/content/test/data/accessibility/html/table-simple-expected-blink.txt +++ b/content/test/data/accessibility/html/table-simple-expected-blink.txt
@@ -6,21 +6,21 @@ ++++++++++row ++++++++++++columnHeader name='Pair' ++++++++++++++staticText name='Pair' -++++++++++++++++inlineTextBox name='Pair' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Single' ++++++++++++++staticText name='Single' -++++++++++++++++inlineTextBox name='Single' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='AB' ++++++++++++++staticText name='AB' -++++++++++++++++inlineTextBox name='AB' +++++++++++++++++inlineTextBox ++++++++++++cell name='B' ++++++++++++++staticText name='B' -++++++++++++++++inlineTextBox name='B' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='CD' ++++++++++++++staticText name='CD' -++++++++++++++++inlineTextBox name='CD' +++++++++++++++++inlineTextBox ++++++++++++cell name='D' ++++++++++++++staticText name='D' -++++++++++++++++inlineTextBox name='D' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-simple-expected-fuchsia.txt b/content/test/data/accessibility/html/table-simple-expected-fuchsia.txt index b239064f..28f7688 100644 --- a/content/test/data/accessibility/html/table-simple-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-simple-expected-fuchsia.txt
@@ -6,21 +6,21 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Pair' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Pair' -++++++++++++++++UNKNOWN label='Pair' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Single' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Single' -++++++++++++++++UNKNOWN label='Single' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='AB' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='AB' -++++++++++++++++UNKNOWN label='AB' +++++++++++++++++UNKNOWN ++++++++++++CELL label='B' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='B' -++++++++++++++++UNKNOWN label='B' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=2 ++++++++++++CELL label='CD' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='CD' -++++++++++++++++UNKNOWN label='CD' +++++++++++++++++UNKNOWN ++++++++++++CELL label='D' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='D' -++++++++++++++++UNKNOWN label='D' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-spans-expected-blink.txt b/content/test/data/accessibility/html/table-spans-expected-blink.txt index 556add8..69d9bc1 100644 --- a/content/test/data/accessibility/html/table-spans-expected-blink.txt +++ b/content/test/data/accessibility/html/table-spans-expected-blink.txt
@@ -6,27 +6,27 @@ ++++++++++row ++++++++++++cell name='AD' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='AD' -++++++++++++++++inlineTextBox name='AD' +++++++++++++++++inlineTextBox ++++++++++++cell name='BC' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='BC' -++++++++++++++++inlineTextBox name='BC' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='EF' ariaCellColumnIndex=1 tableCellColumnIndex=1 ++++++++++++++staticText name='EF' -++++++++++++++++inlineTextBox name='EF' +++++++++++++++++inlineTextBox ++++++table ariaColumnCount=3 tableColumnCount=3 ++++++++rowGroup ignored ++++++++++row ++++++++++++cell name='AD' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='AD' -++++++++++++++++inlineTextBox name='AD' +++++++++++++++++inlineTextBox ++++++++++++cell name='BC' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='BC' -++++++++++++++++inlineTextBox name='BC' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='EF' ariaCellColumnIndex=1 tableCellColumnIndex=1 ++++++++++++++staticText name='EF' -++++++++++++++++inlineTextBox name='EF' +++++++++++++++++inlineTextBox ++++++++++++cell name='GH' ariaCellColumnIndex=2 tableCellColumnIndex=2 ++++++++++++++staticText name='GH' -++++++++++++++++inlineTextBox name='GH' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-spans-expected-fuchsia.txt b/content/test/data/accessibility/html/table-spans-expected-fuchsia.txt index b3ff966f..8e78762 100644 --- a/content/test/data/accessibility/html/table-spans-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-spans-expected-fuchsia.txt
@@ -6,27 +6,27 @@ ++++++++++TABLE_ROW ++++++++++++CELL label='AD' cell_row_span=2 cell_column_span=1 ++++++++++++++STATIC_TEXT label='AD' -++++++++++++++++UNKNOWN label='AD' +++++++++++++++++UNKNOWN ++++++++++++CELL label='BC' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='BC' -++++++++++++++++UNKNOWN label='BC' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='EF' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='EF' -++++++++++++++++UNKNOWN label='EF' +++++++++++++++++UNKNOWN ++++++TABLE number_of_rows=2 number_of_columns=3 ++++++++ROW_GROUP hidden ++++++++++TABLE_ROW ++++++++++++CELL label='AD' cell_row_span=2 cell_column_span=1 ++++++++++++++STATIC_TEXT label='AD' -++++++++++++++++UNKNOWN label='AD' +++++++++++++++++UNKNOWN ++++++++++++CELL label='BC' cell_column_index=1 cell_row_span=1 cell_column_span=2 ++++++++++++++STATIC_TEXT label='BC' -++++++++++++++++UNKNOWN label='BC' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='EF' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='EF' -++++++++++++++++UNKNOWN label='EF' +++++++++++++++++UNKNOWN ++++++++++++CELL label='GH' cell_row_index=1 cell_column_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='GH' -++++++++++++++++UNKNOWN label='GH' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-th-colheader-expected-blink.txt b/content/test/data/accessibility/html/table-th-colheader-expected-blink.txt index 824e1319..3f39b5f0 100644 --- a/content/test/data/accessibility/html/table-th-colheader-expected-blink.txt +++ b/content/test/data/accessibility/html/table-th-colheader-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++row ++++++++++++columnHeader name='Firstname' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='Firstname' -++++++++++++++++inlineTextBox name='Firstname' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Lastname' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Lastname' -++++++++++++++++inlineTextBox name='Lastname' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='Jill' ariaCellColumnIndex=1 tableCellColumnIndex=0 ++++++++++++++staticText name='Jill' -++++++++++++++++inlineTextBox name='Jill' +++++++++++++++++inlineTextBox ++++++++++++cell name='Smith' ariaCellColumnIndex=2 tableCellColumnIndex=1 ++++++++++++++staticText name='Smith' -++++++++++++++++inlineTextBox name='Smith' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-th-colheader-expected-fuchsia.txt b/content/test/data/accessibility/html/table-th-colheader-expected-fuchsia.txt index b4ab5815..ec47393e99 100644 --- a/content/test/data/accessibility/html/table-th-colheader-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-th-colheader-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Firstname' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Firstname' -++++++++++++++++UNKNOWN label='Firstname' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Lastname' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Lastname' -++++++++++++++++UNKNOWN label='Lastname' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='Jill' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Jill' -++++++++++++++++UNKNOWN label='Jill' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Smith' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Smith' -++++++++++++++++UNKNOWN label='Smith' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt b/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt index fb1e6b8..cb329ba 100644 --- a/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt +++ b/content/test/data/accessibility/html/table-th-rowheader-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++row ++++++++++++rowHeader name='Firstname' ++++++++++++++staticText name='Firstname' -++++++++++++++++inlineTextBox name='Firstname' +++++++++++++++++inlineTextBox ++++++++++++cell name='Jill' ++++++++++++++staticText name='Jill' -++++++++++++++++inlineTextBox name='Jill' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++rowHeader name='Lastname' ++++++++++++++staticText name='Lastname' -++++++++++++++++inlineTextBox name='Lastname' +++++++++++++++++inlineTextBox ++++++++++++cell name='Smith' ++++++++++++++staticText name='Smith' -++++++++++++++++inlineTextBox name='Smith' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-th-rowheader-expected-fuchsia.txt b/content/test/data/accessibility/html/table-th-rowheader-expected-fuchsia.txt index 6484858..943ff14a 100644 --- a/content/test/data/accessibility/html/table-th-rowheader-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-th-rowheader-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++TABLE_ROW ++++++++++++UNKNOWN label='Firstname' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Firstname' -++++++++++++++++UNKNOWN label='Firstname' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Jill' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Jill' -++++++++++++++++UNKNOWN label='Jill' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=1 ++++++++++++UNKNOWN label='Lastname' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Lastname' -++++++++++++++++UNKNOWN label='Lastname' +++++++++++++++++UNKNOWN ++++++++++++CELL label='Smith' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Smith' -++++++++++++++++UNKNOWN label='Smith' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt b/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt index 8966dba..c9dc453 100644 --- a/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt +++ b/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-blink.txt
@@ -6,30 +6,30 @@ ++++++++++row ++++++++++++columnHeader name='Sum' ++++++++++++++staticText name='Sum' -++++++++++++++++inlineTextBox name='Sum' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Subtraction' ++++++++++++++staticText name='Subtraction' -++++++++++++++++inlineTextBox name='Subtraction' +++++++++++++++++inlineTextBox ++++++++rowGroup ignored ++++++++++row ++++++++++++cell name='10' ++++++++++++++staticText name='10' -++++++++++++++++inlineTextBox name='10' +++++++++++++++++inlineTextBox ++++++++++++cell name='7' ++++++++++++++staticText name='7' -++++++++++++++++inlineTextBox name='7' +++++++++++++++++inlineTextBox ++++++++++row ++++++++++++cell name='2' ++++++++++++++staticText name='2' -++++++++++++++++inlineTextBox name='2' +++++++++++++++++inlineTextBox ++++++++++++cell name='4' ++++++++++++++staticText name='4' -++++++++++++++++inlineTextBox name='4' +++++++++++++++++inlineTextBox ++++++++rowGroup ignored ++++++++++row ++++++++++++cell name='12' ++++++++++++++staticText name='12' -++++++++++++++++inlineTextBox name='12' +++++++++++++++++inlineTextBox ++++++++++++cell name='3' ++++++++++++++staticText name='3' -++++++++++++++++inlineTextBox name='3' +++++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-fuchsia.txt b/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-fuchsia.txt index 586de49..2ffd2cb 100644 --- a/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/table-thead-tbody-tfoot-expected-fuchsia.txt
@@ -6,30 +6,30 @@ ++++++++++TABLE_ROW ++++++++++++COLUMN_HEADER label='Sum' cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Sum' -++++++++++++++++UNKNOWN label='Sum' +++++++++++++++++UNKNOWN ++++++++++++COLUMN_HEADER label='Subtraction' cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='Subtraction' -++++++++++++++++UNKNOWN label='Subtraction' +++++++++++++++++UNKNOWN ++++++++ROW_GROUP hidden ++++++++++TABLE_ROW row_index=1 ++++++++++++CELL label='10' cell_row_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='10' -++++++++++++++++UNKNOWN label='10' +++++++++++++++++UNKNOWN ++++++++++++CELL label='7' cell_row_index=1 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='7' -++++++++++++++++UNKNOWN label='7' +++++++++++++++++UNKNOWN ++++++++++TABLE_ROW row_index=2 ++++++++++++CELL label='2' cell_row_index=2 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='2' -++++++++++++++++UNKNOWN label='2' +++++++++++++++++UNKNOWN ++++++++++++CELL label='4' cell_row_index=2 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='4' -++++++++++++++++UNKNOWN label='4' +++++++++++++++++UNKNOWN ++++++++ROW_GROUP hidden ++++++++++TABLE_ROW row_index=3 ++++++++++++CELL label='12' cell_row_index=3 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='12' -++++++++++++++++UNKNOWN label='12' +++++++++++++++++UNKNOWN ++++++++++++CELL label='3' cell_row_index=3 cell_column_index=1 cell_row_span=1 cell_column_span=1 ++++++++++++++STATIC_TEXT label='3' -++++++++++++++++UNKNOWN label='3' +++++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/table-with-pseudo-elements-expected-blink.txt b/content/test/data/accessibility/html/table-with-pseudo-elements-expected-blink.txt index 1b1dac0..fee924e 100644 --- a/content/test/data/accessibility/html/table-with-pseudo-elements-expected-blink.txt +++ b/content/test/data/accessibility/html/table-with-pseudo-elements-expected-blink.txt
@@ -2,54 +2,54 @@ ++genericContainer ignored ++++genericContainer ignored ++++++staticText name='before' -++++++++inlineTextBox name='before' +++++++++inlineTextBox ++++genericContainer ignored ++++++genericContainer ignored ++++++++staticText name='before' -++++++++++inlineTextBox name='before' +++++++++++inlineTextBox ++++++layoutTable ++++++++genericContainer ignored ++++++++++staticText name='before' -++++++++++++inlineTextBox name='before' +++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='before' -++++++++++++++inlineTextBox name='before' +++++++++++++++inlineTextBox ++++++++++layoutTableRow ++++++++++++genericContainer ignored ++++++++++++++staticText name='before' -++++++++++++++++inlineTextBox name='before' +++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='before after' ++++++++++++++genericContainer ignored ++++++++++++++++staticText name='before' -++++++++++++++++++inlineTextBox name='before' +++++++++++++++++++inlineTextBox ++++++++++++++textField ++++++++++++++++genericContainer ++++++++++++++genericContainer ignored ++++++++++++++++staticText name='after' -++++++++++++++++++inlineTextBox name='after' +++++++++++++++++++inlineTextBox ++++++++++++layoutTableCell name='before Submit after' ++++++++++++++genericContainer ignored ++++++++++++++++staticText name='before' -++++++++++++++++++inlineTextBox name='before' +++++++++++++++++++inlineTextBox ++++++++++++++button name='Submit' ++++++++++++++++staticText name='Submit' -++++++++++++++++++inlineTextBox name='Submit' +++++++++++++++++++inlineTextBox ++++++++++++++genericContainer ignored ++++++++++++++++staticText name='after' -++++++++++++++++++inlineTextBox name='after' +++++++++++++++++++inlineTextBox ++++++++++++genericContainer ignored ++++++++++++++staticText name='after' -++++++++++++++++inlineTextBox name='after' +++++++++++++++++inlineTextBox ++++++++++genericContainer ignored ++++++++++++staticText name='after' -++++++++++++++inlineTextBox name='after' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++staticText name='after' -++++++++++++inlineTextBox name='after' +++++++++++++inlineTextBox ++++++genericContainer ignored ++++++++staticText name='after' -++++++++++inlineTextBox name='after' +++++++++++inlineTextBox ++++genericContainer ignored ++++++staticText name='after' -++++++++inlineTextBox name='after' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/text-align-expected-blink.txt b/content/test/data/accessibility/html/text-align-expected-blink.txt index 7965809..69307e7 100644 --- a/content/test/data/accessibility/html/text-align-expected-blink.txt +++ b/content/test/data/accessibility/html/text-align-expected-blink.txt
@@ -3,34 +3,34 @@ ++++genericContainer ignored ++++++genericContainer text-align=left ++++++++staticText name='Left-aligned text' -++++++++++inlineTextBox name='Left-aligned text' +++++++++++inlineTextBox ++++++genericContainer text-align=right ++++++++staticText name='Right-aligned text' -++++++++++inlineTextBox name='Right-aligned text' +++++++++++inlineTextBox ++++++genericContainer text-align=center ++++++++staticText name='Centered text' -++++++++++inlineTextBox name='Centered text' +++++++++++inlineTextBox ++++++genericContainer text-align=justify ++++++++staticText name='Justified text' -++++++++++inlineTextBox name='Justified text' +++++++++++inlineTextBox ++++++genericContainer text-align=left ++++++++staticText name='Webkit left-aligned text' -++++++++++inlineTextBox name='Webkit left-aligned text' +++++++++++inlineTextBox ++++++genericContainer text-align=right ++++++++staticText name='Webkit right-aligned text' -++++++++++inlineTextBox name='Webkit right-aligned text' +++++++++++inlineTextBox ++++++genericContainer text-align=center ++++++++staticText name='Webkit centered text' -++++++++++inlineTextBox name='Webkit centered text' +++++++++++inlineTextBox ++++++genericContainer text-align=left ++++++++staticText name='Start-aligned text' -++++++++++inlineTextBox name='Start-aligned text' +++++++++++inlineTextBox ++++++genericContainer text-align=right ++++++++staticText name='End-aligned text' -++++++++++inlineTextBox name='End-aligned text' +++++++++++inlineTextBox ++++++genericContainer text-align=left ++++++++staticText name='No text alignment specified' -++++++++++inlineTextBox name='No text alignment specified' +++++++++++inlineTextBox ++++++genericContainer text-align=left ++++++++staticText name='Invalid text alignment' -++++++++++inlineTextBox name='Invalid text alignment' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/text-align-expected-fuchsia.txt b/content/test/data/accessibility/html/text-align-expected-fuchsia.txt index c2dc680a..1d8f0657 100644 --- a/content/test/data/accessibility/html/text-align-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/text-align-expected-fuchsia.txt
@@ -3,34 +3,34 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Left-aligned text' -++++++++++UNKNOWN label='Left-aligned text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Right-aligned text' -++++++++++UNKNOWN label='Right-aligned text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Centered text' -++++++++++UNKNOWN label='Centered text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Justified text' -++++++++++UNKNOWN label='Justified text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Webkit left-aligned text' -++++++++++UNKNOWN label='Webkit left-aligned text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Webkit right-aligned text' -++++++++++UNKNOWN label='Webkit right-aligned text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Webkit centered text' -++++++++++UNKNOWN label='Webkit centered text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Start-aligned text' -++++++++++UNKNOWN label='Start-aligned text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='End-aligned text' -++++++++++UNKNOWN label='End-aligned text' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='No text alignment specified' -++++++++++UNKNOWN label='No text alignment specified' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Invalid text alignment' -++++++++++UNKNOWN label='Invalid text alignment' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/text-colors-and-styles-expected-blink.txt b/content/test/data/accessibility/html/text-colors-and-styles-expected-blink.txt index a28a8dd7c..6ffb25b 100644 --- a/content/test/data/accessibility/html/text-colors-and-styles-expected-blink.txt +++ b/content/test/data/accessibility/html/text-colors-and-styles-expected-blink.txt
@@ -3,20 +3,20 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='color' -++++++++++inlineTextBox name='color' +++++++++++inlineTextBox ++++++heading name='text size' ++++++++staticText name='text size' -++++++++++inlineTextBox name='text size' +++++++++++inlineTextBox ++++++heading name='text style' ++++++++staticText name='text style' -++++++++++inlineTextBox name='text style' +++++++++++inlineTextBox ++++++paragraph ++++++++strong ++++++++++staticText name='strong' -++++++++++++inlineTextBox name='strong' +++++++++++++inlineTextBox ++++++staticText name='italic' -++++++++inlineTextBox name='italic' +++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++staticText name='bold' -++++++++inlineTextBox name='bold' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/text-decoration-styles-expected-blink.txt b/content/test/data/accessibility/html/text-decoration-styles-expected-blink.txt index 0ff1af2..8f1b4238 100644 --- a/content/test/data/accessibility/html/text-decoration-styles-expected-blink.txt +++ b/content/test/data/accessibility/html/text-decoration-styles-expected-blink.txt
@@ -3,55 +3,55 @@ ++++genericContainer ignored ++++++paragraph textOverlineStyle=solid ++++++++staticText name='overline style: none' textOverlineStyle=solid -++++++++++inlineTextBox name='overline style: none' +++++++++++inlineTextBox ++++++paragraph textOverlineStyle=dotted ++++++++staticText name='overline style: dotted' textOverlineStyle=dotted -++++++++++inlineTextBox name='overline style: dotted' +++++++++++inlineTextBox ++++++paragraph textOverlineStyle=dashed ++++++++staticText name='overline style: dashed' textOverlineStyle=dashed -++++++++++inlineTextBox name='overline style: dashed' +++++++++++inlineTextBox ++++++paragraph textOverlineStyle=solid ++++++++staticText name='overline style: solid' textOverlineStyle=solid -++++++++++inlineTextBox name='overline style: solid' +++++++++++inlineTextBox ++++++paragraph textOverlineStyle=double ++++++++staticText name='overline style: double' textOverlineStyle=double -++++++++++inlineTextBox name='overline style: double' +++++++++++inlineTextBox ++++++paragraph textOverlineStyle=wavy ++++++++staticText name='overline style: wavy' textOverlineStyle=wavy -++++++++++inlineTextBox name='overline style: wavy' +++++++++++inlineTextBox ++++++paragraph textUnderlineStyle=solid ++++++++staticText name='underline style: none' textUnderlineStyle=solid -++++++++++inlineTextBox name='underline style: none' +++++++++++inlineTextBox ++++++paragraph textUnderlineStyle=dotted ++++++++staticText name='underline style: dotted' textUnderlineStyle=dotted -++++++++++inlineTextBox name='underline style: dotted' +++++++++++inlineTextBox ++++++paragraph textUnderlineStyle=dashed ++++++++staticText name='underline style: dashed' textUnderlineStyle=dashed -++++++++++inlineTextBox name='underline style: dashed' +++++++++++inlineTextBox ++++++paragraph textUnderlineStyle=solid ++++++++staticText name='underline style: solid' textUnderlineStyle=solid -++++++++++inlineTextBox name='underline style: solid' +++++++++++inlineTextBox ++++++paragraph textUnderlineStyle=double ++++++++staticText name='underline style: double' textUnderlineStyle=double -++++++++++inlineTextBox name='underline style: double' +++++++++++inlineTextBox ++++++paragraph textUnderlineStyle=wavy ++++++++staticText name='underline style: wavy' textUnderlineStyle=wavy -++++++++++inlineTextBox name='underline style: wavy' +++++++++++inlineTextBox ++++++paragraph textStrikethroughStyle=solid ++++++++staticText name='line-through style: none' textStrikethroughStyle=solid -++++++++++inlineTextBox name='line-through style: none' +++++++++++inlineTextBox ++++++paragraph textStrikethroughStyle=dotted ++++++++staticText name='line-through style: dotted' textStrikethroughStyle=dotted -++++++++++inlineTextBox name='line-through style: dotted' +++++++++++inlineTextBox ++++++paragraph textStrikethroughStyle=dashed ++++++++staticText name='line-through style: dashed' textStrikethroughStyle=dashed -++++++++++inlineTextBox name='line-through style: dashed' +++++++++++inlineTextBox ++++++paragraph textStrikethroughStyle=solid ++++++++staticText name='line-through style: solid' textStrikethroughStyle=solid -++++++++++inlineTextBox name='line-through style: solid' +++++++++++inlineTextBox ++++++paragraph textStrikethroughStyle=double ++++++++staticText name='line-through style: double' textStrikethroughStyle=double -++++++++++inlineTextBox name='line-through style: double' +++++++++++inlineTextBox ++++++paragraph textStrikethroughStyle=wavy ++++++++staticText name='line-through style: wavy' textStrikethroughStyle=wavy -++++++++++inlineTextBox name='line-through style: wavy' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/text-decoration-styles-expected-fuchsia.txt b/content/test/data/accessibility/html/text-decoration-styles-expected-fuchsia.txt index 06402537..55e3519e 100644 --- a/content/test/data/accessibility/html/text-decoration-styles-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/text-decoration-styles-expected-fuchsia.txt
@@ -3,55 +3,55 @@ ++++UNKNOWN hidden ++++++PARAGRAPH ++++++++STATIC_TEXT label='overline style: none' -++++++++++UNKNOWN label='overline style: none' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='overline style: dotted' -++++++++++UNKNOWN label='overline style: dotted' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='overline style: dashed' -++++++++++UNKNOWN label='overline style: dashed' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='overline style: solid' -++++++++++UNKNOWN label='overline style: solid' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='overline style: double' -++++++++++UNKNOWN label='overline style: double' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='overline style: wavy' -++++++++++UNKNOWN label='overline style: wavy' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='underline style: none' -++++++++++UNKNOWN label='underline style: none' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='underline style: dotted' -++++++++++UNKNOWN label='underline style: dotted' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='underline style: dashed' -++++++++++UNKNOWN label='underline style: dashed' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='underline style: solid' -++++++++++UNKNOWN label='underline style: solid' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='underline style: double' -++++++++++UNKNOWN label='underline style: double' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='underline style: wavy' -++++++++++UNKNOWN label='underline style: wavy' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='line-through style: none' -++++++++++UNKNOWN label='line-through style: none' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='line-through style: dotted' -++++++++++UNKNOWN label='line-through style: dotted' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='line-through style: dashed' -++++++++++UNKNOWN label='line-through style: dashed' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='line-through style: solid' -++++++++++UNKNOWN label='line-through style: solid' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='line-through style: double' -++++++++++UNKNOWN label='line-through style: double' +++++++++++UNKNOWN ++++++PARAGRAPH ++++++++STATIC_TEXT label='line-through style: wavy' -++++++++++UNKNOWN label='line-through style: wavy' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/text-indent-expected-blink.txt b/content/test/data/accessibility/html/text-indent-expected-blink.txt index aea14708..0f9b014 100644 --- a/content/test/data/accessibility/html/text-indent-expected-blink.txt +++ b/content/test/data/accessibility/html/text-indent-expected-blink.txt
@@ -3,22 +3,22 @@ ++++genericContainer ignored ++++++genericContainer textIndent=13.23 ++++++++staticText name='Text indent 50px' -++++++++++inlineTextBox name='Text indent 50px' +++++++++++inlineTextBox ++++++genericContainer textIndent=-13.23 ++++++++staticText name='Text indent -50px' -++++++++++inlineTextBox name='Text indent -50px' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Text indent 0px' -++++++++++inlineTextBox name='Text indent 0px' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Text indent initial' -++++++++++inlineTextBox name='Text indent initial' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Text indent inherit' -++++++++++inlineTextBox name='Text indent inherit' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='No text indent specified' -++++++++++inlineTextBox name='No text indent specified' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Invalid text indent' -++++++++++inlineTextBox name='Invalid text indent' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/text-indent-expected-fuchsia.txt b/content/test/data/accessibility/html/text-indent-expected-fuchsia.txt index 5623907..045aa6d 100644 --- a/content/test/data/accessibility/html/text-indent-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/text-indent-expected-fuchsia.txt
@@ -3,22 +3,22 @@ ++++UNKNOWN hidden ++++++UNKNOWN ++++++++STATIC_TEXT label='Text indent 50px' -++++++++++UNKNOWN label='Text indent 50px' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Text indent -50px' -++++++++++UNKNOWN label='Text indent -50px' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Text indent 0px' -++++++++++UNKNOWN label='Text indent 0px' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Text indent initial' -++++++++++UNKNOWN label='Text indent initial' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Text indent inherit' -++++++++++UNKNOWN label='Text indent inherit' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='No text indent specified' -++++++++++UNKNOWN label='No text indent specified' +++++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Invalid text indent' -++++++++++UNKNOWN label='Invalid text indent' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/textarea-changes-expected-blink.txt b/content/test/data/accessibility/html/textarea-changes-expected-blink.txt index ef9cf85..f088f44 100644 --- a/content/test/data/accessibility/html/textarea-changes-expected-blink.txt +++ b/content/test/data/accessibility/html/textarea-changes-expected-blink.txt
@@ -4,4 +4,4 @@ ++++++textField multiline value='xyz' ++++++++genericContainer ++++++++++staticText name='xyz' -++++++++++++inlineTextBox name='xyz' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/textarea-changes-expected-fuchsia.txt b/content/test/data/accessibility/html/textarea-changes-expected-fuchsia.txt index dac992bd..f7d88ff 100644 --- a/content/test/data/accessibility/html/textarea-changes-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/textarea-changes-expected-fuchsia.txt
@@ -4,4 +4,4 @@ ++++++TEXT_FIELD focusable actions='{DEFAULT, SET_VALUE}' value='xyz' ++++++++UNKNOWN ++++++++++STATIC_TEXT label='xyz' -++++++++++++UNKNOWN label='xyz' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/textarea-expected-blink.txt b/content/test/data/accessibility/html/textarea-expected-blink.txt index da5acae..267f1727 100644 --- a/content/test/data/accessibility/html/textarea-expected-blink.txt +++ b/content/test/data/accessibility/html/textarea-expected-blink.txt
@@ -11,4 +11,4 @@ ++++++++++++inlineTextBox name='control.' ++++++++++++inlineTextBox name='<newline>' ++++++++++lineBreak name='<newline>' -++++++++++++inlineTextBox name='<newline>' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/textarea-expected-fuchsia.txt b/content/test/data/accessibility/html/textarea-expected-fuchsia.txt index c8890bced..2adeac3 100644 --- a/content/test/data/accessibility/html/textarea-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/textarea-expected-fuchsia.txt
@@ -11,4 +11,4 @@ ++++++++++++UNKNOWN label='control.' ++++++++++++UNKNOWN label='<newline>' ++++++++++UNKNOWN label='<newline>' -++++++++++++UNKNOWN label='<newline>' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/textarea-read-only-expected-blink.txt b/content/test/data/accessibility/html/textarea-read-only-expected-blink.txt index 978e17c..04a7291 100644 --- a/content/test/data/accessibility/html/textarea-read-only-expected-blink.txt +++ b/content/test/data/accessibility/html/textarea-read-only-expected-blink.txt
@@ -9,4 +9,4 @@ ++++++++++++inlineTextBox name='control.' ++++++++++++inlineTextBox name='<newline>' ++++++++++lineBreak name='<newline>' -++++++++++++inlineTextBox name='<newline>' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/textarea-read-only-expected-fuchsia.txt b/content/test/data/accessibility/html/textarea-read-only-expected-fuchsia.txt index 6f1555d..539fa3f 100644 --- a/content/test/data/accessibility/html/textarea-read-only-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/textarea-read-only-expected-fuchsia.txt
@@ -9,4 +9,4 @@ ++++++++++++UNKNOWN label='control.' ++++++++++++UNKNOWN label='<newline>' ++++++++++UNKNOWN label='<newline>' -++++++++++++UNKNOWN label='<newline>' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/textarea-with-selection-expected-blink.txt b/content/test/data/accessibility/html/textarea-with-selection-expected-blink.txt index 098a5a0..f72dcc9 100644 --- a/content/test/data/accessibility/html/textarea-with-selection-expected-blink.txt +++ b/content/test/data/accessibility/html/textarea-with-selection-expected-blink.txt
@@ -9,4 +9,4 @@ ++++++++++++inlineTextBox name='control.' ++++++++++++inlineTextBox name='<newline>' ++++++++++lineBreak name='<newline>' -++++++++++++inlineTextBox name='<newline>' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/textarea-with-selection-expected-fuchsia.txt b/content/test/data/accessibility/html/textarea-with-selection-expected-fuchsia.txt index 6ccebec..19ebbf2 100644 --- a/content/test/data/accessibility/html/textarea-with-selection-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/textarea-with-selection-expected-fuchsia.txt
@@ -9,4 +9,4 @@ ++++++++++++UNKNOWN label='control.' ++++++++++++UNKNOWN label='<newline>' ++++++++++UNKNOWN label='<newline>' -++++++++++++UNKNOWN label='<newline>' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/time-expected-blink.txt b/content/test/data/accessibility/html/time-expected-blink.txt index cda9ef3..65a509cf 100644 --- a/content/test/data/accessibility/html/time-expected-blink.txt +++ b/content/test/data/accessibility/html/time-expected-blink.txt
@@ -3,9 +3,9 @@ ++++genericContainer ++++++time ++++++++staticText name='10:00' -++++++++++inlineTextBox name='10:00' +++++++++++inlineTextBox ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++time ++++++++staticText name='Valentines day' -++++++++++inlineTextBox name='Valentines day' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/time-expected-fuchsia.txt b/content/test/data/accessibility/html/time-expected-fuchsia.txt index c4784c9..fb71229a4 100644 --- a/content/test/data/accessibility/html/time-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/time-expected-fuchsia.txt
@@ -3,9 +3,9 @@ ++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='10:00' -++++++++++UNKNOWN label='10:00' +++++++++++UNKNOWN ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++UNKNOWN ++++++++STATIC_TEXT label='Valentines day' -++++++++++UNKNOWN label='Valentines day' +++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/transition-expected-blink.txt b/content/test/data/accessibility/html/transition-expected-blink.txt index c77af37..1078e2e5 100644 --- a/content/test/data/accessibility/html/transition-expected-blink.txt +++ b/content/test/data/accessibility/html/transition-expected-blink.txt
@@ -3,6 +3,6 @@ ++++genericContainer ++++++button name='GrowButton' ++++++++staticText name='GrowButton' -++++++++++inlineTextBox name='GrowButton' +++++++++++inlineTextBox ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/transition-expected-fuchsia.txt b/content/test/data/accessibility/html/transition-expected-fuchsia.txt index 9c685f0..3645bfb 100644 --- a/content/test/data/accessibility/html/transition-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/transition-expected-fuchsia.txt
@@ -3,6 +3,6 @@ ++++UNKNOWN ++++++BUTTON focusable has_input_focus label='GrowButton' actions='{DEFAULT}' ++++++++STATIC_TEXT label='GrowButton' actions='{DEFAULT}' -++++++++++UNKNOWN label='GrowButton' +++++++++++UNKNOWN ++++++STATIC_TEXT label='Done' -++++++++UNKNOWN label='Done' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/ul-contenteditable-expected-blink.txt b/content/test/data/accessibility/html/ul-contenteditable-expected-blink.txt index b2c1114..736111ac 100644 --- a/content/test/data/accessibility/html/ul-contenteditable-expected-blink.txt +++ b/content/test/data/accessibility/html/ul-contenteditable-expected-blink.txt
@@ -7,9 +7,9 @@ ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='Hello' -++++++++++++++inlineTextBox name='Hello' +++++++++++++++inlineTextBox ++++++++++listItem ++++++++++++listMarker name='%E2%80%A2 ' ++++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++++staticText name='Bye' -++++++++++++++inlineTextBox name='Bye' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ul-contenteditable-expected-fuchsia.txt b/content/test/data/accessibility/html/ul-contenteditable-expected-fuchsia.txt index 3899bea..5e85771 100644 --- a/content/test/data/accessibility/html/ul-contenteditable-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ul-contenteditable-expected-fuchsia.txt
@@ -7,9 +7,9 @@ ++++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' actions='{DEFAULT}' ++++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++++STATIC_TEXT label='Hello' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Hello' +++++++++++++++UNKNOWN ++++++++++LIST_ELEMENT actions='{DEFAULT}' list_element_index=2 ++++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' actions='{DEFAULT}' ++++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++++STATIC_TEXT label='Bye' actions='{DEFAULT}' -++++++++++++++UNKNOWN label='Bye' +++++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/ul-expected-blink.txt b/content/test/data/accessibility/html/ul-expected-blink.txt index e89cfd26..e0debff 100644 --- a/content/test/data/accessibility/html/ul-expected-blink.txt +++ b/content/test/data/accessibility/html/ul-expected-blink.txt
@@ -6,14 +6,14 @@ ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Item 1' -++++++++++++inlineTextBox name='Item 1' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Item 2' -++++++++++++inlineTextBox name='Item 2' +++++++++++++inlineTextBox ++++++++listItem hierarchicalLevel=1 ++++++++++listMarker name='%E2%80%A2 ' ++++++++++++staticText ignored name='%E2%80%A2 ' ++++++++++staticText name='Item 3' -++++++++++++inlineTextBox name='Item 3' +++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/ul-expected-fuchsia.txt b/content/test/data/accessibility/html/ul-expected-fuchsia.txt index eb3f0315..328def2 100644 --- a/content/test/data/accessibility/html/ul-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/ul-expected-fuchsia.txt
@@ -6,14 +6,14 @@ ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Item 1' -++++++++++++UNKNOWN label='Item 1' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=2 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Item 2' -++++++++++++UNKNOWN label='Item 2' +++++++++++++UNKNOWN ++++++++LIST_ELEMENT list_element_index=3 ++++++++++LIST_ELEMENT_MARKER label='%E2%80%A2 ' ++++++++++++STATIC_TEXT hidden label='%E2%80%A2 ' ++++++++++STATIC_TEXT label='Item 3' -++++++++++++UNKNOWN label='Item 3' +++++++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/var-expected-blink.txt b/content/test/data/accessibility/html/var-expected-blink.txt index 0abe8a72..8de06d6d 100644 --- a/content/test/data/accessibility/html/var-expected-blink.txt +++ b/content/test/data/accessibility/html/var-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Variable' -++++++++inlineTextBox name='Variable' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/var-expected-fuchsia.txt b/content/test/data/accessibility/html/var-expected-fuchsia.txt index 227651a0..e39351b 100644 --- a/content/test/data/accessibility/html/var-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/var-expected-fuchsia.txt
@@ -2,4 +2,4 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label='Variable' -++++++++UNKNOWN label='Variable' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/video-text-only-expected-fuchsia.txt b/content/test/data/accessibility/html/video-text-only-expected-fuchsia.txt index e747452..fdaf5c2 100644 --- a/content/test/data/accessibility/html/video-text-only-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/video-text-only-expected-fuchsia.txt
@@ -67,7 +67,7 @@ ++++++++++++++++UNKNOWN hidden ++++++++++++++++++STATIC_TEXT hidden label='Picture in picture' ++++++STATIC_TEXT label=' ' -++++++++UNKNOWN label=' ' +++++++++UNKNOWN ++++++UNKNOWN label='Unable to play media.' ++++++++UNKNOWN hidden ++++++++++UNKNOWN hidden
diff --git a/content/test/data/accessibility/html/wbr-expected-blink.txt b/content/test/data/accessibility/html/wbr-expected-blink.txt index 3fc0cb2..0d44feb9 100644 --- a/content/test/data/accessibility/html/wbr-expected-blink.txt +++ b/content/test/data/accessibility/html/wbr-expected-blink.txt
@@ -2,8 +2,8 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Supercali' -++++++++inlineTextBox name='Supercali' +++++++++inlineTextBox ++++++staticText name='fragilistic' -++++++++inlineTextBox name='fragilistic' +++++++++inlineTextBox ++++++staticText name='expialidocious' -++++++++inlineTextBox name='expialidocious' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/html/wbr-expected-fuchsia.txt b/content/test/data/accessibility/html/wbr-expected-fuchsia.txt index 24d568b..55cc7af 100644 --- a/content/test/data/accessibility/html/wbr-expected-fuchsia.txt +++ b/content/test/data/accessibility/html/wbr-expected-fuchsia.txt
@@ -2,8 +2,8 @@ ++UNKNOWN hidden ++++UNKNOWN ++++++STATIC_TEXT label='Supercali' -++++++++UNKNOWN label='Supercali' +++++++++UNKNOWN ++++++STATIC_TEXT label='fragilistic' -++++++++UNKNOWN label='fragilistic' +++++++++UNKNOWN ++++++STATIC_TEXT label='expialidocious' -++++++++UNKNOWN label='expialidocious' +++++++++UNKNOWN
diff --git a/content/test/data/accessibility/html/window-crops-items-expected-blink.txt b/content/test/data/accessibility/html/window-crops-items-expected-blink.txt index e8a98c4..e1943f6 100644 --- a/content/test/data/accessibility/html/window-crops-items-expected-blink.txt +++ b/content/test/data/accessibility/html/window-crops-items-expected-blink.txt
@@ -3,22 +3,22 @@ ++++genericContainer ++++++button size=(300, 150) name='Button fits' ++++++++staticText name='Button fits' -++++++++++inlineTextBox name='Button fits' +++++++++++inlineTextBox ++++++button offscreen size=(300, 150) pageSize=(1, 150) name='Button offscreen X' ++++++++staticText offscreen name='Button offscreen X' -++++++++++inlineTextBox offscreen name='Button offscreen X' +++++++++++inlineTextBox offscreen ++++++button offscreen size=(300, 150) pageSize=(300, 1) name='Button offscreen Y' ++++++++staticText offscreen name='Button offscreen Y' -++++++++++inlineTextBox offscreen name='Button offscreen Y' +++++++++++inlineTextBox offscreen ++++++button size=(300, 150) name='Button partially on screen' ++++++++staticText name='Button partially on screen' -++++++++++inlineTextBox name='Button partially on screen' +++++++++++inlineTextBox ++++++button offscreen size=(300, 150) pageSize=(1, 1) name='Button offscreen' ++++++++staticText offscreen pageSize=(1, 1) name='Button offscreen' -++++++++++inlineTextBox offscreen pageSize=(1, 1) name='Button offscreen' +++++++++++inlineTextBox offscreen pageSize=(1, 1) ++++++button offscreen size=(300, 150) pageSize=(1, 1) name='Button offscreen top' ++++++++staticText offscreen pageSize=(1, 1) name='Button offscreen top' -++++++++++inlineTextBox offscreen pageSize=(1, 1) name='Button offscreen top' +++++++++++inlineTextBox offscreen pageSize=(1, 1) ++++++button size=(300, 150) pageSize=(208, 58) name='Button partially on screen' ++++++++staticText offscreen name='Button partially on screen' -++++++++++inlineTextBox offscreen name='Button partially on screen' +++++++++++inlineTextBox offscreen
diff --git a/content/test/data/accessibility/language-detection/lang-attribute-expected-blink.txt b/content/test/data/accessibility/language-detection/lang-attribute-expected-blink.txt index c04ac94..486663d 100644 --- a/content/test/data/accessibility/language-detection/lang-attribute-expected-blink.txt +++ b/content/test/data/accessibility/language-detection/lang-attribute-expected-blink.txt
@@ -2,10 +2,10 @@ ++genericContainer ignored language='es-ES' ++++genericContainer language='es-ES' ++++++staticText language='es-ES' name='Este documento es excelente. ' -++++++++inlineTextBox language='es-ES' name='Este documento es excelente. ' +++++++++inlineTextBox language='es-ES' ++++++genericContainer ignored language='fr' ++++++++staticText language='fr' name='Ce document est excellent. ' -++++++++++inlineTextBox language='fr' name='Ce document est excellent. ' +++++++++++inlineTextBox language='fr' ++++++genericContainer ignored language='en' ++++++++staticText language='en' name='This document is excellent.' -++++++++++inlineTextBox language='en' name='This document is excellent.' +++++++++++inlineTextBox language='en'
diff --git a/content/test/data/accessibility/language-detection/lang-attribute-nested-expected-blink.txt b/content/test/data/accessibility/language-detection/lang-attribute-nested-expected-blink.txt index b37486e..d3715d2 100644 --- a/content/test/data/accessibility/language-detection/lang-attribute-nested-expected-blink.txt +++ b/content/test/data/accessibility/language-detection/lang-attribute-nested-expected-blink.txt
@@ -4,11 +4,11 @@ ++++++genericContainer ignored language='es-ES' ++++++++genericContainer language='en' ++++++++++staticText language='en' name='This document is excellent.' -++++++++++++inlineTextBox language='en' name='This document is excellent.' +++++++++++++inlineTextBox language='en' ++++++++staticText language='es-ES' name='Este documento es excelente.' -++++++++++inlineTextBox language='es-ES' name='Este documento es excelente.' +++++++++++inlineTextBox language='es-ES' ++++++genericContainer language='fr' ++++++++staticText language='fr' name='Ce document est excellent.' -++++++++++inlineTextBox language='fr' name='Ce document est excellent.' +++++++++++inlineTextBox language='fr' ++++++staticText language='en' name='This document is excellent.' -++++++++inlineTextBox language='en' name='This document is excellent.' +++++++++inlineTextBox language='en'
diff --git a/content/test/data/accessibility/language-detection/lang-attribute-switching-expected-blink.txt b/content/test/data/accessibility/language-detection/lang-attribute-switching-expected-blink.txt index 51ddd09..8967962b 100644 --- a/content/test/data/accessibility/language-detection/lang-attribute-switching-expected-blink.txt +++ b/content/test/data/accessibility/language-detection/lang-attribute-switching-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ignored language='en' ++++++paragraph language='en' ++++++++staticText language='en' name='In the morning, I sometimes eat breakfast.' -++++++++++inlineTextBox language='en' name='In the morning, I sometimes eat breakfast.' +++++++++++inlineTextBox language='en' ++++++paragraph language='fr' ++++++++staticText language='fr' name='Dans l'apres-midi, je dejeune.' -++++++++++inlineTextBox language='fr' name='Dans l'apres-midi, je dejeune.' +++++++++++inlineTextBox language='fr' ++++++paragraph language='en' ++++++++staticText language='en' name='Hello it's a pleasure to meet you. ' -++++++++++inlineTextBox language='en' name='Hello it's a pleasure to meet you. ' +++++++++++inlineTextBox language='en' ++++++++genericContainer ignored language='fr' ++++++++++staticText language='fr' name='Comment ca va?' -++++++++++++inlineTextBox language='fr' name='Comment ca va?' +++++++++++++inlineTextBox language='fr'
diff --git a/content/test/data/accessibility/mathml/mspace-expected-blink.txt b/content/test/data/accessibility/mathml/mspace-expected-blink.txt index 63725b3..18fc861 100644 --- a/content/test/data/accessibility/mathml/mspace-expected-blink.txt +++ b/content/test/data/accessibility/mathml/mspace-expected-blink.txt
@@ -3,6 +3,6 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This test passes if the 'math' node in the accessibility tree contains a single child, which is ignored:' -++++++++++inlineTextBox name='This test passes if the 'math' node in the accessibility tree contains a single child, which is ignored:' +++++++++++inlineTextBox ++++++mathMLMath ++++++++genericContainer ignored
diff --git a/content/test/data/accessibility/mathml/unknown-expected-blink.txt b/content/test/data/accessibility/mathml/unknown-expected-blink.txt index 63725b3..18fc861 100644 --- a/content/test/data/accessibility/mathml/unknown-expected-blink.txt +++ b/content/test/data/accessibility/mathml/unknown-expected-blink.txt
@@ -3,6 +3,6 @@ ++++genericContainer ignored ++++++paragraph ++++++++staticText name='This test passes if the 'math' node in the accessibility tree contains a single child, which is ignored:' -++++++++++inlineTextBox name='This test passes if the 'math' node in the accessibility tree contains a single child, which is ignored:' +++++++++++inlineTextBox ++++++mathMLMath ++++++++genericContainer ignored
diff --git a/content/test/data/accessibility/regression/aria-pressed-changes-button-role-expected-blink.txt b/content/test/data/accessibility/regression/aria-pressed-changes-button-role-expected-blink.txt index 0458fa2..b075108 100644 --- a/content/test/data/accessibility/regression/aria-pressed-changes-button-role-expected-blink.txt +++ b/content/test/data/accessibility/regression/aria-pressed-changes-button-role-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ignored ++++++button name='Test' ++++++++staticText name='Test' -++++++++++inlineTextBox name='Test' +++++++++++inlineTextBox ++++++genericContainer === Start Continuation === rootWebArea @@ -11,17 +11,17 @@ ++++genericContainer ignored ++++++toggleButton name='Test' checkedState=true ++++++++staticText name='Test' -++++++++++inlineTextBox name='Test' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Test 1' -++++++++++inlineTextBox name='Test 1' +++++++++++inlineTextBox === Start Continuation === rootWebArea ++genericContainer ignored ++++genericContainer ignored ++++++button name='Test' ++++++++staticText name='Test' -++++++++++inlineTextBox name='Test' +++++++++++inlineTextBox ++++++genericContainer ++++++++staticText name='Test 2' -++++++++++inlineTextBox name='Test 2' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/footer-inside-section-role-generic-expected-blink.txt b/content/test/data/accessibility/regression/footer-inside-section-role-generic-expected-blink.txt index 6b19b47..7e8e7c7 100644 --- a/content/test/data/accessibility/regression/footer-inside-section-role-generic-expected-blink.txt +++ b/content/test/data/accessibility/regression/footer-inside-section-role-generic-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++footer ++++++++paragraph ++++++++++staticText name='footer inside section with role presentational.' -++++++++++++inlineTextBox name='footer inside section with role presentational.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++footer ++++++++++paragraph ++++++++++++staticText name='footer inside section with role generic.' -++++++++++++++inlineTextBox name='footer inside section with role generic.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/header-inside-section-role-generic-expected-blink.txt b/content/test/data/accessibility/regression/header-inside-section-role-generic-expected-blink.txt index 2459ad6..55a5951 100644 --- a/content/test/data/accessibility/regression/header-inside-section-role-generic-expected-blink.txt +++ b/content/test/data/accessibility/regression/header-inside-section-role-generic-expected-blink.txt
@@ -4,9 +4,9 @@ ++++++header ++++++++paragraph ++++++++++staticText name='header inside section with role presentational.' -++++++++++++inlineTextBox name='header inside section with role presentational.' +++++++++++++inlineTextBox ++++++genericContainer ++++++++header ++++++++++paragraph ++++++++++++staticText name='header inside section with role generic.' -++++++++++++++inlineTextBox name='header inside section with role generic.' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/hidden-table-expected-blink.txt b/content/test/data/accessibility/regression/hidden-table-expected-blink.txt index 8430c774..71857676 100644 --- a/content/test/data/accessibility/regression/hidden-table-expected-blink.txt +++ b/content/test/data/accessibility/regression/hidden-table-expected-blink.txt
@@ -6,12 +6,12 @@ ++++++++++row ++++++++++++columnHeader name='Header 1' ++++++++++++++staticText name='Header 1' -++++++++++++++++inlineTextBox name='Header 1' +++++++++++++++++inlineTextBox ++++++++++++columnHeader name='Header 2' ++++++++++++++staticText name='Header 2' -++++++++++++++++inlineTextBox name='Header 2' +++++++++++++++++inlineTextBox ++++++++rowGroup ignored invisible ++++++++rowGroup ignored ++++++genericContainer ++++++++staticText name='Done' -++++++++++inlineTextBox name='Done' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/option-accessible-name-is-select-expected-blink.txt b/content/test/data/accessibility/regression/option-accessible-name-is-select-expected-blink.txt index b0c1ea87..31a07f8 100644 --- a/content/test/data/accessibility/regression/option-accessible-name-is-select-expected-blink.txt +++ b/content/test/data/accessibility/regression/option-accessible-name-is-select-expected-blink.txt
@@ -3,7 +3,7 @@ ++++genericContainer ++++++labelText ++++++++staticText name='How often?' -++++++++++inlineTextBox name='How often?' +++++++++++inlineTextBox ++++++comboBoxSelect collapsed required name='How often?' invalidState=true ++++++++menuListPopup invisible ++++++++++menuListOption selected=true
diff --git a/content/test/data/accessibility/regression/reload-selection-crash-expected-blink.txt b/content/test/data/accessibility/regression/reload-selection-crash-expected-blink.txt index e646991..663f9fd7 100644 --- a/content/test/data/accessibility/regression/reload-selection-crash-expected-blink.txt +++ b/content/test/data/accessibility/regression/reload-selection-crash-expected-blink.txt
@@ -2,4 +2,4 @@ ++genericContainer ignored ++++genericContainer ++++++staticText name='Done' -++++++++inlineTextBox name='Done' +++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/remove-aria-owner-expected-blink.txt b/content/test/data/accessibility/regression/remove-aria-owner-expected-blink.txt index 7f54c28..fbb98fc 100644 --- a/content/test/data/accessibility/regression/remove-aria-owner-expected-blink.txt +++ b/content/test/data/accessibility/regression/remove-aria-owner-expected-blink.txt
@@ -6,13 +6,13 @@ ++++++++genericContainer ++++++++++button name='1' ++++++++++++staticText name='1' -++++++++++++++inlineTextBox name='1' +++++++++++++++inlineTextBox ++++++genericContainer ignored ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='%E2%80%9C' -++++++++++++++inlineTextBox name='%E2%80%9C' +++++++++++++++inlineTextBox ++++++++genericContainer ignored ++++++++++genericContainer ignored ++++++++++++staticText name='%E2%80%9D' -++++++++++++++inlineTextBox name='%E2%80%9D' +++++++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/reused-map-change-map-name-expected-blink.txt b/content/test/data/accessibility/regression/reused-map-change-map-name-expected-blink.txt index 142c849..45e7299 100644 --- a/content/test/data/accessibility/regression/reused-map-change-map-name-expected-blink.txt +++ b/content/test/data/accessibility/regression/reused-map-change-map-name-expected-blink.txt
@@ -3,10 +3,10 @@ ++++genericContainer ignored ++++++heading name='Image Maps' ++++++++staticText name='Image Maps' -++++++++++inlineTextBox name='Image Maps' +++++++++++inlineTextBox ++++++paragraph ++++++++staticText name='After map1 is renamed map2, the third picture should have only the coffee mapped' -++++++++++inlineTextBox name='After map1 is renamed map2, the third picture should have only the coffee mapped' +++++++++++inlineTextBox ++++++image name='Workplace pic 1' ++++++staticText name=' ' ++++++image name='Workplace pic 2'
diff --git a/content/test/data/accessibility/regression/reused-map-change-usemap-expected-blink.txt b/content/test/data/accessibility/regression/reused-map-change-usemap-expected-blink.txt index 63e08ede..7c321710 100644 --- a/content/test/data/accessibility/regression/reused-map-change-usemap-expected-blink.txt +++ b/content/test/data/accessibility/regression/reused-map-change-usemap-expected-blink.txt
@@ -3,13 +3,13 @@ ++++genericContainer ++++++image name='star1' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='star2' ++++++++link focusable name='Area' ++++++staticText name=' ' ++++++image name='star3' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='star4' ++++++++link focusable name='Area' ++++++++link focusable name='Area2'
diff --git a/content/test/data/accessibility/regression/reused-map-expected-blink.txt b/content/test/data/accessibility/regression/reused-map-expected-blink.txt index 039a0e2..0cc8a77 100644 --- a/content/test/data/accessibility/regression/reused-map-expected-blink.txt +++ b/content/test/data/accessibility/regression/reused-map-expected-blink.txt
@@ -4,5 +4,5 @@ ++++++image name='star1' ++++++++link focusable name='Area2' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='star2'
diff --git a/content/test/data/accessibility/regression/reused-map-move-image-expected-blink.txt b/content/test/data/accessibility/regression/reused-map-move-image-expected-blink.txt index 708a542..ef33efa4 100644 --- a/content/test/data/accessibility/regression/reused-map-move-image-expected-blink.txt +++ b/content/test/data/accessibility/regression/reused-map-move-image-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++image name='star0' ++++++++link focusable name='Area' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='star1' ++++++++link focusable name='Area' ++++++++link focusable name='Area2' @@ -18,8 +18,8 @@ ++++++image name='star0' ++++++++link focusable name='Area' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='star2' ++++++genericContainer ++++++++staticText name='done' -++++++++++inlineTextBox name='done' +++++++++++inlineTextBox
diff --git a/content/test/data/accessibility/regression/reused-map-move-image-to-top-expected-blink.txt b/content/test/data/accessibility/regression/reused-map-move-image-to-top-expected-blink.txt index 690ebf1..980966b 100644 --- a/content/test/data/accessibility/regression/reused-map-move-image-to-top-expected-blink.txt +++ b/content/test/data/accessibility/regression/reused-map-move-image-to-top-expected-blink.txt
@@ -4,7 +4,7 @@ ++++++image name='star0' ++++++++link focusable name='Area' ++++++staticText name=' ' -++++++++inlineTextBox name=' ' +++++++++inlineTextBox ++++++image name='star1' ++++++++link focusable name='Area' ++++++++link focusable name='Area2'
diff --git a/content/test/data/accessibility/regression/slot-creation-crash-expected-blink.txt b/content/test/data/accessibility/regression/slot-creation-crash-expected-blink.txt index c2bcf55..8bbdf24 100644 --- a/content/test/data/accessibility/regression/slot-creation-crash-expected-blink.txt +++ b/content/test/data/accessibility/regression/slot-creation-crash-expected-blink.txt
@@ -5,4 +5,4 @@ ++++++++genericContainer ignored invisible htmlTag='slot' ++++++++paragraph htmlTag='p' ++++++++++staticText name='paragraph' -++++++++++++inlineTextBox name='paragraph' +++++++++++++inlineTextBox
diff --git a/content/test/data/gpu/favicon.ico b/content/test/data/gpu/favicon.ico new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/content/test/data/gpu/favicon.ico
diff --git a/content/test/data/gpu/filter_effects.html b/content/test/data/gpu/filter_effects.html index 5f733ab2..d1897a9 100644 --- a/content/test/data/gpu/filter_effects.html +++ b/content/test/data/gpu/filter_effects.html
@@ -84,7 +84,7 @@ } </style> -<body onload="main()"> +<body> <div id="container"> <canvas class="gradient" style="-webkit-animation: blur-anim 150000s;"></canvas> <canvas class="gradient" style="-webkit-animation: grayscale-anim 150000s;"></canvas>
diff --git a/content/test/data/gpu/pixel_precision_rounded_corner.html b/content/test/data/gpu/pixel_precision_rounded_corner.html index 2995af3..1fb1a8b 100644 --- a/content/test/data/gpu/pixel_precision_rounded_corner.html +++ b/content/test/data/gpu/pixel_precision_rounded_corner.html
@@ -27,10 +27,10 @@ window.requestAnimationFrame(finish); </script> </head> - <body onload="main()"> + <body> <div id="circle"> <div id="rotate"> </div> </div> </body> -</html> \ No newline at end of file +</html>
diff --git a/content/test/data/gpu/pixel_test_page.html b/content/test/data/gpu/pixel_test_page.html index 1795586..1919790 100644 --- a/content/test/data/gpu/pixel_test_page.html +++ b/content/test/data/gpu/pixel_test_page.html
@@ -5,6 +5,7 @@ that our asynchronous test setup is complete before the test starts. --> <head> + <link rel="icon" href="data:;base64,="><!-- prevent request for favicon --> <meta id="viewport" name="viewport"/> </head> <body style="margin:0; padding:0;"> @@ -28,4 +29,4 @@ testIframe.src = url; } </script> -</body> \ No newline at end of file +</body>
diff --git a/content/test/data/gpu/webgl_test_page.html b/content/test/data/gpu/webgl_test_page.html index cc75cfd..5e7fd56 100644 --- a/content/test/data/gpu/webgl_test_page.html +++ b/content/test/data/gpu/webgl_test_page.html
@@ -4,6 +4,7 @@ Actual test pages are loaded into the iframe. This is so that we can guarantee that our asynchronous test setup is complete before the test starts. --> +<link rel="icon" href="data:;base64,="><!-- prevent request for favicon --> <div id="current_test">No test running.</div> <iframe id="test_iframe" style="width: 1024px; height: 768px; border: 0;"></iframe> <script> @@ -18,4 +19,4 @@ testIframe.onload = (_) => { testIframeLoaded = true; }; testIframe.src = url; } -</script> \ No newline at end of file +</script>
diff --git a/content/test/fake_network.cc b/content/test/fake_network.cc index f49c75b..729b3c3c 100644 --- a/content/test/fake_network.cc +++ b/content/test/fake_network.cc
@@ -105,7 +105,7 @@ network::PopulateParsedHeaders(info.headers.get(), url_request.url); mojo::Remote<network::mojom::URLLoaderClient>& client = params->client; - uint32_t bytes_written = response_info.body.size(); + size_t bytes_written = response_info.body.size(); mojo::ScopedDataPipeProducerHandle producer_handle; mojo::ScopedDataPipeConsumerHandle consumer_handle; CHECK_EQ(MOJO_RESULT_OK,
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 967e49b..8be496cd 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc
@@ -36,14 +36,7 @@ namespace { -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) - -// Fake certificate authority database used for testing. -static const base::FilePath::CharType kReadOnlyCertDB[] = - FILE_PATH_LITERAL("/etc/fake_root_ca/nssdb"); - -#else - +#if !(BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)) base::FilePath GetDefaultConfigDirectory() { base::FilePath dir; base::PathService::Get(base::DIR_HOME, &dir); @@ -59,20 +52,14 @@ DVLOG(2) << "DefaultConfigDirectory: " << dir.value(); return dir; } - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) -// On non-Chrome OS platforms, return the default config directory. On Chrome OS -// test images, return a read-only directory with fake root CA certs (which are -// used by the local Google Accounts server mock we use when testing our login -// code). On Chrome OS non-test images (where the read-only directory doesn't -// exist), return an empty path. +// On non-Chrome OS platforms, return the default config directory. On Chrome +// OS return a empty path which will result in NSS being initialized without a +// persistent database. base::FilePath GetInitialConfigDirectory() { #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) - base::FilePath database_dir = base::FilePath(kReadOnlyCertDB); - if (!base::PathExists(database_dir)) - database_dir.clear(); - return database_dir; + return base::FilePath(); #else return GetDefaultConfigDirectory(); #endif // BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/device/bluetooth/adapter.cc b/device/bluetooth/adapter.cc index cee4ac40..7034d9cd 100644 --- a/device/bluetooth/adapter.cc +++ b/device/bluetooth/adapter.cc
@@ -311,6 +311,17 @@ /*gatt_service=*/std::move(pending_gatt_service_remote)); } +void Adapter::IsLeScatternetDualRoleSupported( + IsLeScatternetDualRoleSupportedCallback callback) { +#if BUILDFLAG(IS_CHROMEOS) + std::move(callback).Run(base::Contains( + adapter_->GetSupportedRoles(), + device::BluetoothAdapter::BluetoothRole::kCentralPeripheral)); +#else + std::move(callback).Run(/*is_supported=*/false); +#endif // BUILDFLAG(IS_CHROMEOS) +} + void Adapter::AdapterPresentChanged(device::BluetoothAdapter* adapter, bool present) { for (auto& observer : observers_)
diff --git a/device/bluetooth/adapter.h b/device/bluetooth/adapter.h index d90b736..030f9b67 100644 --- a/device/bluetooth/adapter.h +++ b/device/bluetooth/adapter.h
@@ -68,6 +68,8 @@ const device::BluetoothUUID& service_id, mojo::PendingRemote<mojom::GattServiceObserver> observer, CreateLocalGattServiceCallback callback) override; + void IsLeScatternetDualRoleSupported( + IsLeScatternetDualRoleSupportedCallback callback) override; // device::BluetoothAdapter::Observer overrides: void AdapterPresentChanged(device::BluetoothAdapter* adapter,
diff --git a/device/bluetooth/adapter_unittest.cc b/device/bluetooth/adapter_unittest.cc index f661cf9..471d3a1 100644 --- a/device/bluetooth/adapter_unittest.cc +++ b/device/bluetooth/adapter_unittest.cc
@@ -611,6 +611,29 @@ } #if BUILDFLAG(IS_CHROMEOS) +TEST_F(AdapterTest, TestIsLeScatternetDualRoleSupported_Suppported) { + std::vector<device::BluetoothAdapter::BluetoothRole> roles{ + device::BluetoothAdapter::BluetoothRole::kCentralPeripheral}; + ON_CALL(*mock_bluetooth_adapter_, GetSupportedRoles()) + .WillByDefault(Return(roles)); + + base::test::TestFuture<bool> future; + adapter_->IsLeScatternetDualRoleSupported(future.GetCallback()); + EXPECT_TRUE(future.Get()); +} + +TEST_F(AdapterTest, TestIsLeScatternetDualRoleSupported_NotSupported) { + std::vector<device::BluetoothAdapter::BluetoothRole> roles{ + device::BluetoothAdapter::BluetoothRole::kCentral, + device::BluetoothAdapter::BluetoothRole::kPeripheral}; + ON_CALL(*mock_bluetooth_adapter_, GetSupportedRoles()) + .WillByDefault(Return(roles)); + + base::test::TestFuture<bool> future; + adapter_->IsLeScatternetDualRoleSupported(future.GetCallback()); + EXPECT_FALSE(future.Get()); +} + TEST_F(AdapterTest, TestMetricsOnShutdown_NoPendingConnects) { base::HistogramTester histogram_tester; adapter_.reset();
diff --git a/device/bluetooth/public/mojom/adapter.mojom b/device/bluetooth/public/mojom/adapter.mojom index 9792c3a..906b8c83 100644 --- a/device/bluetooth/public/mojom/adapter.mojom +++ b/device/bluetooth/public/mojom/adapter.mojom
@@ -271,10 +271,21 @@ // Creates a local GATT service corresponding to |service_id|, and // communicates events to the |observer|. This call is only expected to be // used to create a local GATT service that does not exist at |service_id|. + // Callers should first consult |IsLeScatternetDualRoleSupported()| before + // calling this method to determine if a GATT service can be safely started on + // the local device. [Sync] CreateLocalGattService(UUID service_id, pending_remote<GattServiceObserver> observer) => (pending_remote<GattService> gatt_service); + + // Retrieves the status of whether or not the LE Scatternet Dual Role + // (simultaneous use of the LE peripheral and central roles) is supported on + // the Adapter. If |is_supported| is true, then callers can call + // |CreateLocalGattService()| without being concerned about performance or + // stability issues. + [Sync] + IsLeScatternetDualRoleSupported() => (bool is_supported); }; // Listener on Bluetooth events. Register as an observer via AddObserver().
diff --git a/docs/website b/docs/website index 446e54b..71e75ac 160000 --- a/docs/website +++ b/docs/website
@@ -1 +1 @@ -Subproject commit 446e54b44987857f3ef2f164d524e7d79dba64cc +Subproject commit 71e75ac16593d3ba8f5427958b9f5feda559c04f
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc index 4ef88379..0a445ec 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc
@@ -13,7 +13,7 @@ #include "base/functional/bind.h" #include "base/location.h" #include "base/memory/nonscannable_memory.h" -#include "base/memory/raw_ptr.h" +#include "base/memory/stack_allocated.h" #include "base/no_destructor.h" #include "base/system/sys_info.h" #include "base/task/post_job.h" @@ -138,6 +138,8 @@ } class JobDelegateImpl : public v8::JobDelegate { + STACK_ALLOCATED(); + public: explicit JobDelegateImpl(base::JobDelegate* delegate) : delegate_(delegate) {} JobDelegateImpl() = default; @@ -154,7 +156,7 @@ bool IsJoiningThread() const override { return delegate_->IsJoiningThread(); } private: - raw_ptr<base::JobDelegate> delegate_; + base::JobDelegate* delegate_ = nullptr; }; class JobHandleImpl : public v8::JobHandle {
diff --git a/gpu/command_buffer/client/raster_implementation.cc b/gpu/command_buffer/client/raster_implementation.cc index a8decf0..02539ab 100644 --- a/gpu/command_buffer/client/raster_implementation.cc +++ b/gpu/command_buffer/client/raster_implementation.cc
@@ -389,16 +389,16 @@ bool valid() const { return !!buffer_; } private: - RasterImplementation* const ri_; - char* buffer_; - cc::DecodeStashingImageProvider* const stashing_image_provider_; - TransferCacheSerializeHelperImpl* const transfer_cache_helper_; - ClientFontManager* font_manager_; + RasterImplementation* const ri_ = nullptr; + char* buffer_ = nullptr; + cc::DecodeStashingImageProvider* const stashing_image_provider_ = nullptr; + TransferCacheSerializeHelperImpl* const transfer_cache_helper_ = nullptr; + ClientFontManager* font_manager_ = nullptr; uint32_t written_bytes_ = 0; uint32_t free_bytes_ = 0; - size_t* max_op_size_hint_; + size_t* max_op_size_hint_ = nullptr; }; RasterImplementation::SingleThreadChecker::SingleThreadChecker(
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index ec4ca9d..9807f33 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -967,12 +967,6 @@ // Return 0 if no stencil attachment. GLenum GetBoundFramebufferStencilFormat(GLenum target); - gfx::Vector2d GetBoundFramebufferDrawOffset() const { - if (GetBoundDrawFramebuffer() || offscreen_target_frame_buffer_.get()) - return gfx::Vector2d(); - return surface_->GetDrawOffset(); - } - void MarkDrawBufferAsCleared(GLenum buffer, GLint drawbuffer_i); // Wrapper for CompressedTexImage{2|3}D commands. @@ -3918,8 +3912,8 @@ return false; } } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); - api()->glGenBuffersARBFn(n, service_ids.get()); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); + api()->glGenBuffersARBFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateBuffer(client_ids[ii], service_ids[ii]); } @@ -3933,8 +3927,8 @@ return false; } } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); - api()->glGenFramebuffersEXTFn(n, service_ids.get()); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); + api()->glGenFramebuffersEXTFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateFramebuffer(client_ids[ii], service_ids[ii]); } @@ -3948,8 +3942,8 @@ return false; } } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); - api()->glGenRenderbuffersEXTFn(n, service_ids.get()); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); + api()->glGenRenderbuffersEXTFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateRenderbuffer(client_ids[ii], service_ids[ii]); } @@ -3962,8 +3956,8 @@ return false; } } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); - api()->glGenTexturesFn(n, service_ids.get()); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); + api()->glGenTexturesFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateTexture(client_ids[ii], service_ids[ii]); } @@ -3976,8 +3970,8 @@ return false; } } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); - api()->glGenSamplersFn(n, service_ids.get()); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); + api()->glGenSamplersFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateSampler(client_ids[ii], service_ids[ii]); } @@ -3991,8 +3985,8 @@ return false; } } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); - api()->glGenTransformFeedbacksFn(n, service_ids.get()); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); + api()->glGenTransformFeedbacksFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateTransformFeedback(client_ids[ii], service_ids[ii]); } @@ -5913,7 +5907,7 @@ framebuffer->HasDepthStencilFormatAttachment(); bool invalidate_depth = false; bool invalidate_stencil = false; - std::unique_ptr<GLenum[]> validated_attachments(new GLenum[count+1]); + auto validated_attachments = base::HeapArray<GLenum>::Uninit(count + 1); GLsizei validated_count = 0; // Validates the attachments. If one of them fails, the whole command fails. @@ -5965,7 +5959,8 @@ // If the default framebuffer is bound but we are still rendering to an // FBO, translate attachment names that refer to default framebuffer // channels to corresponding framebuffer attachments. - std::unique_ptr<GLenum[]> translated_attachments(new GLenum[validated_count]); + auto translated_attachments = + base::HeapArray<GLenum>::Uninit(validated_count); for (GLsizei i = 0; i < validated_count; ++i) { GLenum attachment = validated_attachments[i]; if (!framebuffer && GetBackbufferServiceId()) { @@ -5992,10 +5987,10 @@ case kFramebufferDiscard: if (gl_version_info().is_es3) { api()->glInvalidateFramebufferFn(target, validated_count, - translated_attachments.get()); + translated_attachments.data()); } else { api()->glDiscardFramebufferEXTFn(target, validated_count, - translated_attachments.get()); + translated_attachments.data()); } dirty = true; break; @@ -6004,7 +5999,7 @@ // no-op since the function isn't supported. } else { api()->glInvalidateFramebufferFn(target, validated_count, - translated_attachments.get()); + translated_attachments.data()); dirty = true; } break; @@ -6808,9 +6803,8 @@ GLboolean* params, GLsizei params_size) { DCHECK(params); - std::unique_ptr<GLint[]> values(new GLint[params_size]); - memset(values.get(), 0, params_size * sizeof(GLint)); - DoGetIntegerv(pname, values.get(), params_size); + auto values = base::HeapArray<GLint>::WithSize(params_size); + DoGetIntegerv(pname, values.data(), params_size); for (GLsizei ii = 0; ii < params_size; ++ii) { params[ii] = static_cast<GLboolean>(values[ii]); } @@ -6836,9 +6830,8 @@ return; } - std::unique_ptr<GLint[]> values(new GLint[params_size]); - memset(values.get(), 0, params_size * sizeof(GLint)); - DoGetIntegerv(pname, values.get(), params_size); + auto values = base::HeapArray<GLint>::WithSize(params_size); + DoGetIntegerv(pname, values.data(), params_size); for (GLsizei ii = 0; ii < params_size; ++ii) { params[ii] = static_cast<GLfloat>(values[ii]); } @@ -6867,9 +6860,8 @@ } } - std::unique_ptr<GLint[]> values(new GLint[params_size]); - memset(values.get(), 0, params_size * sizeof(GLint)); - DoGetIntegerv(pname, values.get(), params_size); + auto values = base::HeapArray<GLint>::WithSize(params_size); + DoGetIntegerv(pname, values.data(), params_size); for (GLsizei ii = 0; ii < params_size; ++ii) { params[ii] = static_cast<GLint64>(values[ii]); } @@ -7647,10 +7639,8 @@ state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, state_.enable_flags.scissor_test); RestoreDeviceWindowRectangles(); - gfx::Vector2d scissor_offset = GetBoundFramebufferDrawOffset(); - api()->glScissorFn(state_.scissor_x + scissor_offset.x(), - state_.scissor_y + scissor_offset.y(), - state_.scissor_width, state_.scissor_height); + api()->glScissorFn(state_.scissor_x, state_.scissor_y, state_.scissor_width, + state_.scissor_height); } GLenum GLES2DecoderImpl::DoCheckFramebufferStatus(GLenum target) { @@ -9156,11 +9146,11 @@ return; } if (type == GL_BOOL) { - std::unique_ptr<GLint[]> temp(new GLint[count]); + auto temp = base::HeapArray<GLint>::Uninit(count); for (GLsizei ii = 0; ii < count; ++ii) { temp[ii] = static_cast<GLint>(value[ii] != 0.0f); } - api()->glUniform1ivFn(real_location, count, temp.get()); + api()->glUniform1ivFn(real_location, count, temp.data()); } else { api()->glUniform1fvFn(real_location, count, const_cast<const GLfloat*>(value)); @@ -9179,11 +9169,11 @@ } if (type == GL_BOOL_VEC2) { GLsizei num_values = count * 2; - std::unique_ptr<GLint[]> temp(new GLint[num_values]); + auto temp = base::HeapArray<GLint>::Uninit(num_values); for (GLsizei ii = 0; ii < num_values; ++ii) { temp[ii] = static_cast<GLint>(value[ii] != 0.0f); } - api()->glUniform2ivFn(real_location, count, temp.get()); + api()->glUniform2ivFn(real_location, count, temp.data()); } else { api()->glUniform2fvFn(real_location, count, const_cast<const GLfloat*>(value)); @@ -9202,11 +9192,11 @@ } if (type == GL_BOOL_VEC3) { GLsizei num_values = count * 3; - std::unique_ptr<GLint[]> temp(new GLint[num_values]); + auto temp = base::HeapArray<GLint>::Uninit(num_values); for (GLsizei ii = 0; ii < num_values; ++ii) { temp[ii] = static_cast<GLint>(value[ii] != 0.0f); } - api()->glUniform3ivFn(real_location, count, temp.get()); + api()->glUniform3ivFn(real_location, count, temp.data()); } else { api()->glUniform3fvFn(real_location, count, const_cast<const GLfloat*>(value)); @@ -9225,11 +9215,11 @@ } if (type == GL_BOOL_VEC4) { GLsizei num_values = count * 4; - std::unique_ptr<GLint[]> temp(new GLint[num_values]); + auto temp = base::HeapArray<GLint>::Uninit(num_values); for (GLsizei ii = 0; ii < num_values; ++ii) { temp[ii] = static_cast<GLint>(value[ii] != 0.0f); } - api()->glUniform4ivFn(real_location, count, temp.get()); + api()->glUniform4ivFn(real_location, count, temp.data()); } else { api()->glUniform4fvFn(real_location, count, const_cast<const GLfloat*>(value)); @@ -9978,15 +9968,15 @@ int num_elements = attrib->size() * num_vertices; const int src_size = num_elements * sizeof(int32_t); const int dst_size = num_elements * sizeof(float); - std::unique_ptr<float[]> data(new float[num_elements]); + auto data = base::HeapArray<float>::Uninit(num_elements); const int32_t* src = reinterpret_cast<const int32_t*>( attrib->buffer()->GetRange(attrib->offset(), src_size)); const int32_t* end = src + num_elements; - float* dst = data.get(); + float* dst = data.data(); while (src != end) { *dst++ = static_cast<float>(*src++) / 65536.0f; } - api()->glBufferSubDataFn(GL_ARRAY_BUFFER, offset, dst_size, data.get()); + api()->glBufferSubDataFn(GL_ARRAY_BUFFER, offset, dst_size, data.data()); api()->glVertexAttribPointerFn(attrib->index(), attrib->size(), GL_FLOAT, false, 0, reinterpret_cast<GLvoid*>(offset)); @@ -11879,17 +11869,14 @@ state_.viewport_y = y; state_.viewport_width = std::min(width, viewport_max_width_); state_.viewport_height = std::min(height, viewport_max_height_); - gfx::Vector2d viewport_offset = GetBoundFramebufferDrawOffset(); - api()->glViewportFn(x + viewport_offset.x(), y + viewport_offset.y(), width, - height); + api()->glViewportFn(x, y, width, height); } void GLES2DecoderImpl::DoScissor(GLint x, GLint y, GLsizei width, GLsizei height) { - gfx::Vector2d draw_offset = GetBoundFramebufferDrawOffset(); - api()->glScissorFn(x + draw_offset.x(), y + draw_offset.y(), width, height); + api()->glScissorFn(x, y, width, height); } error::Error GLES2DecoderImpl::HandleVertexAttribDivisorANGLE( @@ -12981,9 +12968,7 @@ api()->glClearDepthFn(1.0f); state_.SetDeviceDepthMask(GL_TRUE); state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, true); - gfx::Vector2d scissor_offset = GetBoundFramebufferDrawOffset(); - api()->glScissorFn(xoffset + scissor_offset.x(), - yoffset + scissor_offset.y(), width, height); + api()->glScissorFn(xoffset, yoffset, width, height); ClearDeviceWindowRectangles(); api()->glClearFn((have_color ? GL_COLOR_BUFFER_BIT : 0) | @@ -13313,19 +13298,18 @@ return num_blocks_high * GetCompressedFormatRowPitch(info, width); } -std::unique_ptr<uint8_t[]> DecompressTextureData( - const ContextState& state, - const CompressedFormatInfo& info, - uint32_t width, - uint32_t height, - uint32_t depth, - GLsizei image_size, - const void* data) { +base::HeapArray<uint8_t> DecompressTextureData(const ContextState& state, + const CompressedFormatInfo& info, + uint32_t width, + uint32_t height, + uint32_t depth, + GLsizei image_size, + const void* data) { auto* api = state.api(); uint32_t output_pixel_size = GLES2Util::ComputeImageGroupSize( info.decompressed_format, info.decompressed_type); - std::unique_ptr<uint8_t[]> decompressed_data( - new uint8_t[output_pixel_size * width * height]); + auto decompressed_data = + base::HeapArray<uint8_t>::Uninit(output_pixel_size * width * height); // If a PBO is bound, map it to decompress the data. const void* input_data = data; @@ -13335,7 +13319,7 @@ image_size, GL_MAP_READ_BIT); if (input_data == nullptr) { LOG(ERROR) << "Failed to map pixel unpack buffer."; - return nullptr; + return base::HeapArray<uint8_t>(); } } @@ -13344,13 +13328,13 @@ width, height, depth, static_cast<const uint8_t*>(input_data), GetCompressedFormatRowPitch(info, width), GetCompressedFormatDepthPitch(info, width, height), - decompressed_data.get(), output_pixel_size * width, + decompressed_data.data(), output_pixel_size * width, output_pixel_size * width * height); if (state.bound_pixel_unpack_buffer) { if (api->glUnmapBufferFn(GL_PIXEL_UNPACK_BUFFER) != GL_TRUE) { LOG(ERROR) << "glUnmapBuffer unexpectedly returned GL_FALSE"; - return nullptr; + return base::HeapArray<uint8_t>(); } } @@ -13684,9 +13668,9 @@ const CompressedFormatInfo* format_info = GetCompressedFormatInfo(internal_format); if (format_info != nullptr && !format_info->support_check(*feature_info_)) { - std::unique_ptr<uint8_t[]> decompressed_data = DecompressTextureData( + auto decompressed_data = DecompressTextureData( state_, *format_info, width, height, depth, image_size, data); - if (!decompressed_data) { + if (decompressed_data.empty()) { MarkContextLost(error::kGuilty); group_->LoseContexts(error::kInnocent); return error::kLostContext; @@ -13696,12 +13680,12 @@ api()->glTexImage2DFn( target, level, format_info->decompressed_internal_format, width, height, border, format_info->decompressed_format, - format_info->decompressed_type, decompressed_data.get()); + format_info->decompressed_type, decompressed_data.data()); } else { api()->glTexImage3DFn( target, level, format_info->decompressed_internal_format, width, height, depth, border, format_info->decompressed_format, - format_info->decompressed_type, decompressed_data.get()); + format_info->decompressed_type, decompressed_data.data()); } } else { if (dimension == ContextState::k2D) { @@ -14074,9 +14058,9 @@ const CompressedFormatInfo* format_info = GetCompressedFormatInfo(internal_format); if (format_info != nullptr && !format_info->support_check(*feature_info_)) { - std::unique_ptr<uint8_t[]> decompressed_data = DecompressTextureData( + auto decompressed_data = DecompressTextureData( state_, *format_info, width, height, depth, image_size, data); - if (!decompressed_data) { + if (decompressed_data.empty()) { MarkContextLost(error::kGuilty); group_->LoseContexts(error::kInnocent); return error::kLostContext; @@ -14086,12 +14070,12 @@ api()->glTexSubImage2DFn(target, level, xoffset, yoffset, width, height, format_info->decompressed_format, format_info->decompressed_type, - decompressed_data.get()); + decompressed_data.data()); } else { api()->glTexSubImage3DFn(target, level, xoffset, yoffset, zoffset, width, height, depth, format_info->decompressed_format, format_info->decompressed_type, - decompressed_data.get()); + decompressed_data.data()); } } else { if (dimension == ContextState::k2D) { @@ -14970,8 +14954,8 @@ if (result_type == GL_BOOL || result_type == GL_BOOL_VEC2 || result_type == GL_BOOL_VEC3 || result_type == GL_BOOL_VEC4) { GLsizei num_values = result_size / sizeof(GLfloat); - std::unique_ptr<GLint[]> temp(new GLint[num_values]); - api()->glGetUniformivFn(service_id, real_location, temp.get()); + auto temp = base::HeapArray<GLint>::Uninit(num_values); + api()->glGetUniformivFn(service_id, real_location, temp.data()); GLfloat* dst = result->GetData(); for (GLsizei ii = 0; ii < num_values; ++ii) { dst[ii] = (temp[ii] != 0); @@ -15355,7 +15339,7 @@ if (shaders == nullptr || binary == nullptr) { return error::kOutOfBounds; } - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); for (GLsizei ii = 0; ii < n; ++ii) { Shader* shader = GetShader(shaders[ii]); if (!shader) { @@ -16262,9 +16246,9 @@ CreateVertexAttribManager(client_ids[ii], 0, true); } } else { - std::unique_ptr<GLuint[]> service_ids(new GLuint[n]); + auto service_ids = base::HeapArray<GLuint>::Uninit(n); - api()->glGenVertexArraysOESFn(n, service_ids.get()); + api()->glGenVertexArraysOESFn(n, service_ids.data()); for (GLsizei ii = 0; ii < n; ++ii) { CreateVertexAttribManager(client_ids[ii], service_ids[ii], true); }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc index 92c0e93..44ba8a0 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -1054,12 +1054,6 @@ api()->glViewportFn(0, 0, initial_size.width(), initial_size.height()); } - // Initialize the tracked scissor and viewport state and then apply the - // surface offsets if needed. - api()->glGetIntegervFn(GL_VIEWPORT, viewport_); - api()->glGetIntegervFn(GL_SCISSOR_BOX, scissor_); - ApplySurfaceDrawOffset(); - #if BUILDFLAG(IS_MAC) // On mac we need the ANGLE_texture_rectangle extension to support IOSurface // backbuffers, but we don't want it exposed to WebGL user shaders. This @@ -1875,24 +1869,6 @@ } break; - case GL_VIEWPORT: - // The applied viewport and scissor could be offset by the current - // surface, return the tracked values instead - if (length < 4) { - return error::kInvalidArguments; - } - base::ranges::copy(viewport_, params); - break; - - case GL_SCISSOR_BOX: - // The applied viewport and scissor could be offset by the current - // surface, return the tracked values instead - if (length < 4) { - return error::kInvalidArguments; - } - base::ranges::copy(scissor_, params); - break; - case GL_MAX_PIXEL_LOCAL_STORAGE_PLANES_ANGLE: // Impose an upper bound on the number ANGLE_shader_pixel_local_storage // planes so we can stack-allocate load/store ops. @@ -2807,27 +2783,6 @@ } } -gfx::Vector2d GLES2DecoderPassthroughImpl::GetSurfaceDrawOffset() const { - if (bound_draw_framebuffer_ != 0 || offscreen_) { - return gfx::Vector2d(); - } - return surface_->GetDrawOffset(); -} - -void GLES2DecoderPassthroughImpl::ApplySurfaceDrawOffset() { - if (offscreen_ || !surface_->SupportsDCLayers()) { - return; - } - - gfx::Vector2d framebuffer_offset = GetSurfaceDrawOffset(); - api()->glViewportFn(viewport_[0] + framebuffer_offset.x(), - viewport_[1] + framebuffer_offset.y(), viewport_[2], - viewport_[3]); - api()->glScissorFn(scissor_[0] + framebuffer_offset.x(), - scissor_[1] + framebuffer_offset.y(), scissor_[2], - scissor_[3]); -} - bool GLES2DecoderPassthroughImpl::CheckErrorCallbackState() { bool had_error_ = had_error_callback_; had_error_callback_ = false;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h index ac367b5a..6f69f59 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
@@ -642,12 +642,6 @@ scoped_refptr<TexturePassthrough> texture; }; - // Tracked viewport and scissor state for surface offset - GLint viewport_[4] = {0, 0, 0, 0}; - GLint scissor_[4] = {0, 0, 0, 0}; - gfx::Vector2d GetSurfaceDrawOffset() const; - void ApplySurfaceDrawOffset(); - // Use a limit that is at least ANGLE's IMPLEMENTATION_MAX_ACTIVE_TEXTURES // constant static constexpr size_t kMaxTextureUnits = 64;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc index d2ebe7d..3a189b05 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -238,17 +238,6 @@ memcpy(data->data() + old_size.ValueOrDie(), str, len); } -void AssignGLRectangle(GLint rectangle[4], - GLint x, - GLint y, - GLint width, - GLint height) { - rectangle[0] = x; - rectangle[1] = y; - rectangle[2] = width; - rectangle[3] = height; -} - // In order to minimize the amount of data copied, the command buffer client // unpack pixels before sending the glTex[Sub]Image[2|3]D calls. The only // parameter it doesn't handle is the alignment. Resetting the unpack state is @@ -477,16 +466,13 @@ } // Update tracking of the bound framebuffer - bool draw_framebuffer_changed = false; switch (target) { case GL_FRAMEBUFFER_EXT: - draw_framebuffer_changed = true; bound_draw_framebuffer_ = framebuffer; bound_read_framebuffer_ = framebuffer; break; case GL_DRAW_FRAMEBUFFER: - draw_framebuffer_changed = true; bound_draw_framebuffer_ = framebuffer; break; @@ -499,13 +485,6 @@ break; } - // Resync the surface offset if the draw framebuffer has changed to or from - // the default framebuffer - if (draw_framebuffer_changed && bound_draw_framebuffer_ != framebuffer && - (bound_draw_framebuffer_ == 0 || framebuffer == 0)) { - ApplySurfaceDrawOffset(); - } - return error::kNoError; } @@ -1042,9 +1021,6 @@ api()->glBindFramebufferEXTFn( GL_DRAW_FRAMEBUFFER, emulated_back_buffer_->framebuffer_service_id); } - - // Update the surface offset if the bound draw framebuffer is deleted - ApplySurfaceDrawOffset(); } if (framebuffer == bound_read_framebuffer_) { bound_read_framebuffer_ = 0; @@ -3005,19 +2981,7 @@ GLint y, GLsizei width, GLsizei height) { - CheckErrorCallbackState(); - - gfx::Vector2d scissor_offset = GetSurfaceDrawOffset(); - api()->glScissorFn(x + scissor_offset.x(), y + scissor_offset.y(), width, - height); - - if (CheckErrorCallbackState()) { - // Skip any state tracking updates if an error was generated - return error::kNoError; - } - - AssignGLRectangle(scissor_, x, y, width, height); - + api()->glScissorFn(x, y, width, height); return error::kNoError; } @@ -3692,20 +3656,7 @@ GLint y, GLsizei width, GLsizei height) { - CheckErrorCallbackState(); - - gfx::Vector2d viewport_offset = GetSurfaceDrawOffset(); - api()->glViewportFn(x + viewport_offset.x(), y + viewport_offset.y(), width, - height); - - if (CheckErrorCallbackState()) { - // Skip any state tracking updates if an error was generated. Viewport may - // have been out of bounds. - return error::kNoError; - } - - AssignGLRectangle(viewport_, x, y, width, height); - + api()->glViewportFn(x, y, width, height); return error::kNoError; }
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc index b07aef2..04c07b5 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc +++ b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc
@@ -49,12 +49,14 @@ const GpuPreferences& gpu_preferences, const GpuDriverBugWorkarounds& workarounds, const gles2::FeatureInfo* feature_info, - gl::ProgressReporter* progress_reporter) + gl::ProgressReporter* progress_reporter, + bool supports_cpu_upload) : GLCommonImageBackingFactory(kSupportedUsage, gpu_preferences, workarounds, feature_info, progress_reporter), + supports_cpu_upload_(supports_cpu_upload), support_all_metal_usages_(false) {} GLTextureImageBackingFactory::~GLTextureImageBackingFactory() = default; @@ -149,7 +151,8 @@ } if (usage & SHARED_IMAGE_USAGE_CPU_UPLOAD) { - if (!GLTextureImageBacking::SupportsPixelUploadWithFormat(format)) { + if (!supports_cpu_upload_ || + !GLTextureImageBacking::SupportsPixelUploadWithFormat(format)) { return false; }
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h index ce7770a6..89435a7 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h +++ b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h
@@ -29,12 +29,13 @@ class GPU_GLES2_EXPORT GLTextureImageBackingFactory : public GLCommonImageBackingFactory { public: - // The `for_cpu_upload_usage` parameter controls if this factory accepts + // The `supports_cpu_upload` parameter controls if this factory accepts // `SHARED_IMAGE_USAGE_CPU_UPLOAD`. GLTextureImageBackingFactory(const GpuPreferences& gpu_preferences, const GpuDriverBugWorkarounds& workarounds, const gles2::FeatureInfo* feature_info, - gl::ProgressReporter* progress_reporter); + gl::ProgressReporter* progress_reporter, + bool supports_cpu_upload = true); ~GLTextureImageBackingFactory() override; // SharedImageBackingFactory implementation. @@ -106,6 +107,8 @@ std::string debug_label, base::span<const uint8_t> pixel_data); + const bool supports_cpu_upload_; + // Many shared image usages are disabled on Metal so that they fall back to an // IOSurface backing. IOSurface backings are much better suited for cross-API // or cross-GPU usages.
diff --git a/gpu/command_buffer/service/shared_image/shared_image_factory.cc b/gpu/command_buffer/service/shared_image/shared_image_factory.cc index edfb9f6..cd6ae10 100644 --- a/gpu/command_buffer/service/shared_image/shared_image_factory.cc +++ b/gpu/command_buffer/service/shared_image/shared_image_factory.cc
@@ -272,10 +272,13 @@ bool use_gl = !is_for_display_compositor_ || gr_context_type_ == GrContextType::kGL; if (use_gl) { + // On Windows readback is slower with GLTextureImageBacking than + // D3DImageBacking so prefer D3DImageBacking for software GMBs. + bool supports_cpu_upload = !BUILDFLAG(IS_WIN); auto gl_texture_backing_factory = std::make_unique<GLTextureImageBackingFactory>( gpu_preferences, workarounds, feature_info.get(), - context_state_->progress_reporter()); + context_state_->progress_reporter(), supports_cpu_upload); factories_.push_back(std::move(gl_texture_backing_factory)); } @@ -292,6 +295,14 @@ d3d_backing_factory_ = d3d_factory.get(); factories_.push_back(std::move(d3d_factory)); } + { + auto gl_texture_backing_factory = + std::make_unique<GLTextureImageBackingFactory>( + gpu_preferences, workarounds, feature_info.get(), + context_state_->progress_reporter(), + /*supports_cpu_upload=*/true); + factories_.push_back(std::move(gl_texture_backing_factory)); + } #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(ENABLE_VULKAN)
diff --git a/gpu/ipc/service/image_transport_surface_win.cc b/gpu/ipc/service/image_transport_surface_win.cc index 128e3ac..daad6ad 100644 --- a/gpu/ipc/service/image_transport_surface_win.cc +++ b/gpu/ipc/service/image_transport_surface_win.cc
@@ -34,7 +34,6 @@ workarounds.disable_vp_super_resolution; settings.force_dcomp_triple_buffer_video_swap_chain = workarounds.force_dcomp_triple_buffer_video_swap_chain; - settings.use_angle_texture_offset = true; return settings; } } // namespace
diff --git a/infra/config/generated/testing/mixins.pyl b/infra/config/generated/testing/mixins.pyl index 0598c51..8d4c749d1 100644 --- a/infra/config/generated/testing/mixins.pyl +++ b/infra/config/generated/testing/mixins.pyl
@@ -803,7 +803,7 @@ 'cpu': 'arm64', 'gpu': 'apple:m1', 'mac_model': 'Macmini9,1', - 'os': 'Mac-14.3.1', + 'os': 'Mac-14.4.1', 'pool': 'chromium.tests', 'display_attached': '1', },
diff --git a/infra/config/generated/testing/test_suites.pyl b/infra/config/generated/testing/test_suites.pyl index f7b0405..c1919b41 100644 --- a/infra/config/generated/testing/test_suites.pyl +++ b/infra/config/generated/testing/test_suites.pyl
@@ -4657,9 +4657,7 @@ }, 'minidump_uploader_tests': { - 'minidump_uploader_test': { - 'experiment_percentage': 100, - }, + 'minidump_uploader_test': {}, }, 'model_validation_tests_suite': {
diff --git a/infra/config/generated/testing/variants.pyl b/infra/config/generated/testing/variants.pyl index 1d11ec4..b69f186 100644 --- a/infra/config/generated/testing/variants.pyl +++ b/infra/config/generated/testing/variants.pyl
@@ -267,16 +267,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'identifier': 'Lacros version skew testing ash canary', - 'description': 'Run with ash-chrome version 125.0.6412.0', + 'description': 'Run with ash-chrome version 125.0.6413.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v125.0.6412.0', - 'revision': 'version:125.0.6412.0', + 'location': 'lacros_version_skew_tests_v125.0.6413.0', + 'revision': 'version:125.0.6413.0', }, ], },
diff --git a/infra/config/targets/basic_suites.star b/infra/config/targets/basic_suites.star index 14820f0f..59b89d4 100644 --- a/infra/config/targets/basic_suites.star +++ b/infra/config/targets/basic_suites.star
@@ -4349,9 +4349,7 @@ targets.legacy_basic_suite( name = "minidump_uploader_tests", tests = { - "minidump_uploader_test": targets.legacy_test_config( - experiment_percentage = 100, - ), + "minidump_uploader_test": targets.legacy_test_config(), }, )
diff --git a/infra/config/targets/lacros-version-skew-variants.json b/infra/config/targets/lacros-version-skew-variants.json index 0ce3610..7173bfe 100644 --- a/infra/config/targets/lacros-version-skew-variants.json +++ b/infra/config/targets/lacros-version-skew-variants.json
@@ -1,16 +1,16 @@ { "LACROS_VERSION_SKEW_CANARY": { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "identifier": "Lacros version skew testing ash canary", "swarming": { "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ] }
diff --git a/infra/config/targets/mixins.star b/infra/config/targets/mixins.star index d02be55..727beec 100644 --- a/infra/config/targets/mixins.star +++ b/infra/config/targets/mixins.star
@@ -1043,7 +1043,7 @@ "cpu": "arm64", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests", "display_attached": "1", },
diff --git a/internal b/internal index 86281eb..5ce1497 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit 86281eb09ff42ce162e85fc16de5f421c9fb0326 +Subproject commit 5ce14973929ecd9621346387de88a3a51c35926a
diff --git a/ios/chrome/browser/autofill/model/autofill_controller_unittest.mm b/ios/chrome/browser/autofill/model/autofill_controller_unittest.mm index 647194a5..d5d3266 100644 --- a/ios/chrome/browser/autofill/model/autofill_controller_unittest.mm +++ b/ios/chrome/browser/autofill/model/autofill_controller_unittest.mm
@@ -660,7 +660,7 @@ std::vector<FormFieldData> values; FormFieldData fieldData; fieldData.name = u"greeting"; - fieldData.value = u"Bonjour"; + fieldData.set_value(u"Bonjour"); values.push_back(fieldData); web_data_service->AddFormFields(values);
diff --git a/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.h b/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.h index 6da9ff12..d966ff6d 100644 --- a/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.h +++ b/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.h
@@ -79,6 +79,9 @@ autofill::VirtualCardEnrollUiModel model, autofill::VirtualCardEnrollmentCallbacks callbacks); + // Send a command to show the bottom sheet to edit an address. + void ShowEditAddressBottomSheet(); + // Handler for JavaScript messages. Dispatch to more specific handler. void OnFormMessageReceived(const web::ScriptMessage& message);
diff --git a/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.mm b/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.mm index fc08086..4fd52e6 100644 --- a/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.mm +++ b/ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.mm
@@ -86,6 +86,10 @@ [commands_handler_ showVirtualCardEnrollmentBottomSheet:model]; } +void AutofillBottomSheetTabHelper::ShowEditAddressBottomSheet() { + [commands_handler_ showEditAddressBottomSheet]; +} + void AutofillBottomSheetTabHelper::SetAutofillBottomSheetHandler( id<AutofillCommands> commands_handler) { commands_handler_ = commands_handler;
diff --git a/ios/chrome/browser/autofill/model/form_structure_browsertest.mm b/ios/chrome/browser/autofill/model/form_structure_browsertest.mm index 3a15e0d..30b8d6b 100644 --- a/ios/chrome/browser/autofill/model/form_structure_browsertest.mm +++ b/ios/chrome/browser/autofill/model/form_structure_browsertest.mm
@@ -342,10 +342,10 @@ section_index); } } - form_string += - base::StrCat({field->Type().ToStringView(), " | ", name, " | ", - base::UTF16ToUTF8(field->label), " | ", - base::UTF16ToUTF8(field->value), " | ", section, "\n"}); + form_string += base::StrCat({field->Type().ToStringView(), " | ", name, + " | ", base::UTF16ToUTF8(field->label), + " | ", base::UTF16ToUTF8(field->value()), + " | ", section, "\n"}); } forms_string.push_back(form_string); }
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.h b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.h index ef36bcd..9fa5fd42 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.h +++ b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.h
@@ -5,10 +5,11 @@ #ifndef IOS_CHROME_BROWSER_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_H_ #define IOS_CHROME_BROWSER_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_H_ -#import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h" #import "ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_view_controller.h" #import "ios/chrome/browser/shared/coordinator/chrome_coordinator/chrome_coordinator.h" +@protocol ContextualPanelEntrypointCoordinatorDelegate; + // Coordinator for the Contextual Panel Entrypoint. @interface ContextualPanelEntrypointCoordinator : ChromeCoordinator
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm index f95f738..ce9d8f1 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm +++ b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.mm
@@ -5,6 +5,7 @@ #import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.h" #import "base/check.h" +#import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h" #import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.h" #import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_delegate.h" #import "ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_view_controller.h" @@ -70,4 +71,18 @@ _contextualPanelEntrypointFullscreenUIUpdater = nullptr; } +#pragma mark ContextualPanelEntrypointMediatorDelegate + +- (BOOL)canShowLargeContextualPanelEntrypoint: + (ContextualPanelEntrypointMediator*)mediator { + return [self.delegate canShowLargeContextualPanelEntrypoint:self]; +} + +- (void)setLocationBarLabelCenteredBetweenContent: + (ContextualPanelEntrypointMediator*)mediator + centered:(BOOL)centered { + [self.delegate setLocationBarLabelCenteredBetweenContent:self + centered:centered]; +} + @end
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h index 95537e77..f862bd46 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h +++ b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h
@@ -9,6 +9,19 @@ // Delegate for the ContextualPanelEntrypointCoordinator. @protocol ContextualPanelEntrypointCoordinatorDelegate + +// Whether the location bar is currently in a state where the large Contextual +// Panel entrypoint can be shown. +- (BOOL)canShowLargeContextualPanelEntrypoint: + (ContextualPanelEntrypointCoordinator*)coordinator; + +// Sets the location label of the location bar centered relative to the content +// around it when centered is passed as YES. Otherwise, resets it to the +// "absolute" center. +- (void)setLocationBarLabelCenteredBetweenContent: + (ContextualPanelEntrypointCoordinator*)coordinator + centered:(BOOL)centered; + @end #endif // IOS_CHROME_BROWSER_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_DELEGATE_H_
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm index 87fb743..2656d68 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm +++ b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator.mm
@@ -6,6 +6,7 @@ #import "base/memory/weak_ptr.h" #import "base/strings/sys_string_conversions.h" +#import "base/timer/timer.h" #import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_delegate.h" #import "ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_consumer.h" #import "ios/chrome/browser/contextual_panel/model/contextual_panel_browser_agent.h" @@ -19,6 +20,13 @@ @implementation ContextualPanelEntrypointMediator { // ContextualPanelBrowserAgent to retrieve entrypoint configurations. raw_ptr<ContextualPanelBrowserAgent> _contextualPanelBrowserAgent; + + // Timer keeping track of when to transition to a large entrypoint. + std::unique_ptr<base::OneShotTimer> _transitionToLargeEntrypointTimer; + + // Timer to keep track of when to return to a small entrypoint after having + // transitioned to a large entrypoint. + std::unique_ptr<base::OneShotTimer> _transitionToSmallEntrypointTimer; } - (instancetype)initWithBrowserAgent: @@ -40,6 +48,11 @@ // Do something. } +- (void)setLocationBarLabelCenteredBetweenContent:(BOOL)centered { + [self.delegate setLocationBarLabelCenteredBetweenContent:self + centered:centered]; +} + #pragma mark - ContextualPanelCommands - (void)showContextualPanelEntrypoint { @@ -48,9 +61,36 @@ [self.consumer setEntrypointConfig:config]; [self.consumer showEntrypoint]; + + if (![self.delegate canShowLargeContextualPanelEntrypoint:self]) { + return; + } + + // Start timers if we can show the large entrypoint. + __weak ContextualPanelEntrypointMediator* weakSelf = self; + + // TODO(crbug.com/330702363): Make amount of time Finchable. + _transitionToLargeEntrypointTimer = std::make_unique<base::OneShotTimer>(); + _transitionToLargeEntrypointTimer->Start( + FROM_HERE, base::Seconds(3), base::BindOnce(^{ + if (![weakSelf.delegate + canShowLargeContextualPanelEntrypoint:weakSelf]) { + return; + } + + [weakSelf.consumer transitionToLargeEntrypoint]; + })); + + _transitionToSmallEntrypointTimer = std::make_unique<base::OneShotTimer>(); + _transitionToSmallEntrypointTimer->Start( + FROM_HERE, base::Seconds(8), base::BindOnce(^{ + [weakSelf.consumer transitionToSmallEntrypoint]; + })); } - (void)hideContextualPanelEntrypoint { + _transitionToLargeEntrypointTimer = nullptr; + _transitionToSmallEntrypointTimer = nullptr; [self.consumer hideEntrypoint]; }
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_delegate.h b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_delegate.h index 47004f3..af05dda4 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_delegate.h +++ b/ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_mediator_delegate.h
@@ -9,6 +9,19 @@ // Delegate for the ContextualPanelEntrypointMediator; @protocol ContextualPanelEntrypointMediatorDelegate + +// Whether the location bar is currently in a state where the large Contextual +// Panel entrypoint can be shown. +- (BOOL)canShowLargeContextualPanelEntrypoint: + (ContextualPanelEntrypointMediator*)mediator; + +// Sets the location label of the location bar centered relative to the content +// around it when centered is passed as YES. Otherwise, resets it to the +// "absolute" center. +- (void)setLocationBarLabelCenteredBetweenContent: + (ContextualPanelEntrypointMediator*)mediator + centered:(BOOL)centered; + @end #endif // IOS_CHROME_BROWSER_CONTEXTUAL_PANEL_ENTRYPOINT_COORDINATOR_CONTEXTUAL_PANEL_ENTRYPOINT_MEDIATOR_DELEGATE_H_
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/ui/BUILD.gn b/ios/chrome/browser/contextual_panel/entrypoint/ui/BUILD.gn index f19d572..89533695 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/ui/BUILD.gn +++ b/ios/chrome/browser/contextual_panel/entrypoint/ui/BUILD.gn
@@ -18,5 +18,6 @@ "//ios/chrome/common", "//ios/chrome/common/ui/colors", "//ios/chrome/common/ui/util", + "//ios/chrome/common/ui/util:dynamic_type_util", ] }
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_consumer.h b/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_consumer.h index dd8d9d6..0a125e56 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_consumer.h +++ b/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_consumer.h
@@ -24,6 +24,12 @@ // Notify the consumer to show the entrypoint. - (void)showEntrypoint; +// Notify the consumer to transition to the large entrypoint for a loud moment. +- (void)transitionToLargeEntrypoint; + +// Notify the consumer to transition back to the small entrypoint. +- (void)transitionToSmallEntrypoint; + @end #endif // IOS_CHROME_BROWSER_CONTEXTUAL_PANEL_ENTRYPOINT_UI_CONTEXTUAL_PANEL_ENTRYPOINT_CONSUMER_H_
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_mutator.h b/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_mutator.h index 8a95a8d..b2578a6 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_mutator.h +++ b/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_mutator.h
@@ -11,6 +11,11 @@ // Notify the mutator that the entrypoint was tapped. - (void)entrypointTapped; +// Sets the location label of the location bar centered relative to the content +// around it when centered is passed as YES. Otherwise, resets it to the +// "absolute" center. +- (void)setLocationBarLabelCenteredBetweenContent:(BOOL)centered; + @end #endif // IOS_CHROME_BROWSER_CONTEXTUAL_PANEL_ENTRYPOINT_UI_CONTEXTUAL_PANEL_ENTRYPOINT_MUTATOR_H_
diff --git a/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_view_controller.mm b/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_view_controller.mm index 5e2f0f7..a7157a7 100644 --- a/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_view_controller.mm +++ b/ios/chrome/browser/contextual_panel/entrypoint/ui/contextual_panel_entrypoint_view_controller.mm
@@ -14,6 +14,7 @@ #import "ios/chrome/common/material_timing.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" +#import "ios/chrome/common/ui/util/dynamic_type_util.h" #import "ios/chrome/common/ui/util/pointer_interaction_util.h" namespace { @@ -22,20 +23,37 @@ // bar's height. const CGFloat kEntrypointHeightMultiplier = 0.8; -// Damping ratio of animating a change to the entrypoint's badge button. -const CGFloat kUpdateDisplayedBadgeAnimationDamping = 0.85; +// Amount of time animating the entrypoint into the location bar should take. +const NSTimeInterval kEntrypointDisplayingAnimationTime = 0.8; -// Accessibility identifier for the entrypoint's badge button. -NSString* const kContextualPanelEntrypointBadgeButtonIdentifier = - @"ContextualPanelEntrypointBadgeButtonAXID"; +// Accessibility identifier for the entrypoint's image view. +NSString* const kContextualPanelEntrypointImageViewIdentifier = + @"ContextualPanelEntrypointImageViewAXID"; + +// Accessibility identifier for the entrypoint's label. +NSString* const kContextualPanelEntrypointLabelIdentifier = + @"ContextualPanelEntrypointLabelAXID"; } // namespace @interface ContextualPanelEntrypointViewController () { - // The stack view that encompasses all the entrypoint's views. - UIStackView* _stackView; - // The badge button view for the entrypoint (circular button with image). - UIButton* _badgeButton; + // The UIButton view containing the image and label of the entrypoint. The + // button acts as the container for the separate UIImageView and UILabel below + // to enable proper positioning, animations and button-like behavior of the + // entire entrypoint package. + UIButton* _entrypointContainer; + UIImageView* _imageView; + UILabel* _label; + + // UILayoutGuide to add a trailing space after the label (when it is shown) + // but before the end of the button container. + UILayoutGuide* _labelTrailingSpace; + // Constraints for the two states of the trailing edge of the entrypoint + // container. They are activated/deactivated as needed when the label is + // shown/hidden. + NSLayoutConstraint* _largeTrailingConstraint; + NSLayoutConstraint* _smallTrailingConstraint; + // Whether the entrypoint should currently be shown or not (transcends // fullscreen events). BOOL _entrypointDisplayed; @@ -54,8 +72,27 @@ self.view.hidden = YES; _entrypointDisplayed = NO; - [self createAndConfigureStackView]; - [self createAndConfigureBadgeButton]; + _entrypointContainer = [self configuredEntrypointContainer]; + _imageView = [self configuredImageView]; + _label = [self configuredLabel]; + + [self.view addSubview:_entrypointContainer]; + [_entrypointContainer addSubview:_imageView]; + [_entrypointContainer addSubview:_label]; + + [self activateInitialConstraints]; + + if (@available(iOS 17, *)) { + [self registerForTraitChanges:@[ UITraitPreferredContentSizeCategory.self ] + withAction:@selector(updateLabelFont)]; + } +} + +- (void)viewDidLayoutSubviews { + [super viewDidLayoutSubviews]; + + _entrypointContainer.layer.cornerRadius = + _entrypointContainer.bounds.size.height / 2.0; } - (void)displayEntrypointView:(BOOL)display { @@ -64,73 +101,116 @@ #pragma mark - private -// Creates and configures the entrypoint's stackview. -- (void)createAndConfigureStackView { +// Creates and configures the entrypoint's button container view. +- (UIButton*)configuredEntrypointContainer { + UIButton* button = [[UIButton alloc] init]; + button.translatesAutoresizingMaskIntoConstraints = NO; + button.backgroundColor = [UIColor colorNamed:kBackgroundColor]; + [button addTarget:self + action:@selector(userTappedEntrypoint) + forControlEvents:UIControlEventTouchUpInside]; + + return button; +} + +// Creates and configures the entrypoint's image view. +- (UIImageView*)configuredImageView { + UIImageView* imageView = [[UIImageView alloc] init]; + imageView.translatesAutoresizingMaskIntoConstraints = NO; + imageView.isAccessibilityElement = NO; + imageView.contentMode = UIViewContentModeCenter; + imageView.accessibilityIdentifier = + kContextualPanelEntrypointImageViewIdentifier; + + UIImageSymbolConfiguration* symbolConfig = [UIImageSymbolConfiguration + configurationWithPointSize:kInfobarSymbolPointSize + weight:UIImageSymbolWeightRegular + scale:UIImageSymbolScaleMedium]; + imageView.preferredSymbolConfiguration = symbolConfig; + + return imageView; +} + +// Creates and configures the entrypoint's label for louder moments. Starts off +// as hidden. +- (UILabel*)configuredLabel { + UILabel* label = [[UILabel alloc] init]; + label.translatesAutoresizingMaskIntoConstraints = NO; + label.font = [self entrypointLabelFont]; + label.numberOfLines = 1; + label.accessibilityIdentifier = kContextualPanelEntrypointLabelIdentifier; + label.hidden = YES; + + return label; +} + +- (void)activateInitialConstraints { + // Leading space before the start of the button container view. UILayoutGuide* leadingSpace = [[UILayoutGuide alloc] init]; [self.view addLayoutGuide:leadingSpace]; - _stackView = [[UIStackView alloc] init]; - _stackView.translatesAutoresizingMaskIntoConstraints = NO; - _stackView.axis = UILayoutConstraintAxisHorizontal; - _stackView.alignment = UIStackViewAlignmentCenter; - [self.view addSubview:_stackView]; + _labelTrailingSpace = [[UILayoutGuide alloc] init]; + [_entrypointContainer addLayoutGuide:_labelTrailingSpace]; + + _smallTrailingConstraint = [_entrypointContainer.trailingAnchor + constraintEqualToAnchor:_imageView.trailingAnchor]; + _largeTrailingConstraint = [_entrypointContainer.trailingAnchor + constraintEqualToAnchor:_labelTrailingSpace.trailingAnchor]; [NSLayoutConstraint activateConstraints:@[ - // The badge button doesn't fully fill the height of the location bar, so to + _smallTrailingConstraint, + // The entrypoint doesn't fully fill the height of the location bar, so to // make it exactly follow the curvature of the location bar's corner radius, // it must be placed with the same amount of margin space horizontally that - // exists vertically between the badge button and the location bar itself. + // exists vertically between the entrypoint and the location bar itself. [leadingSpace.widthAnchor constraintEqualToAnchor:self.view.heightAnchor multiplier:((1 - kEntrypointHeightMultiplier) / 2)], [leadingSpace.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor], [leadingSpace.trailingAnchor - constraintEqualToAnchor:_stackView.leadingAnchor], - [_stackView.leadingAnchor + constraintEqualToAnchor:_entrypointContainer.leadingAnchor], + [_entrypointContainer.leadingAnchor constraintEqualToAnchor:leadingSpace.trailingAnchor], - [_stackView.topAnchor constraintEqualToAnchor:self.view.topAnchor], - [_stackView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor], + [_entrypointContainer.heightAnchor + constraintEqualToAnchor:self.view.heightAnchor + multiplier:kEntrypointHeightMultiplier], + [_entrypointContainer.centerYAnchor + constraintEqualToAnchor:self.view.centerYAnchor], [self.view.leadingAnchor constraintEqualToAnchor:leadingSpace.leadingAnchor], [self.view.trailingAnchor - constraintEqualToAnchor:_stackView.trailingAnchor], + constraintEqualToAnchor:_entrypointContainer.trailingAnchor], + [_imageView.heightAnchor + constraintEqualToAnchor:_entrypointContainer.heightAnchor], + [_imageView.widthAnchor constraintEqualToAnchor:_imageView.heightAnchor], + [_imageView.leadingAnchor + constraintEqualToAnchor:_entrypointContainer.leadingAnchor], + [_imageView.centerYAnchor + constraintEqualToAnchor:_entrypointContainer.centerYAnchor], + [_labelTrailingSpace.widthAnchor + constraintEqualToAnchor:self.view.heightAnchor + multiplier:((1 - kEntrypointHeightMultiplier))], + [_labelTrailingSpace.leadingAnchor + constraintEqualToAnchor:_label.trailingAnchor], + [_label.heightAnchor + constraintEqualToAnchor:_entrypointContainer.heightAnchor], + [_label.centerYAnchor + constraintEqualToAnchor:_entrypointContainer.centerYAnchor], + [_label.leadingAnchor constraintEqualToAnchor:_imageView.trailingAnchor], ]]; } -// Creates and configures the entrypoint's badge button. -- (void)createAndConfigureBadgeButton { - _badgeButton = [[UIButton alloc] init]; - _badgeButton.translatesAutoresizingMaskIntoConstraints = NO; - _badgeButton.pointerInteractionEnabled = YES; - _badgeButton.pointerStyleProvider = - CreateDefaultEffectCirclePointerStyleProvider(); +- (void)updateLabelFont { + _label.font = [self entrypointLabelFont]; +} - UIImageSymbolConfiguration* symbolConfig = [UIImageSymbolConfiguration - configurationWithPointSize:kInfobarSymbolPointSize - weight:UIImageSymbolWeightRegular - scale:UIImageSymbolScaleMedium]; - [_badgeButton setPreferredSymbolConfiguration:symbolConfig - forImageInState:UIControlStateNormal]; - - _badgeButton.imageView.contentMode = UIViewContentModeScaleAspectFit; - - [_stackView addArrangedSubview:_badgeButton]; - - [NSLayoutConstraint activateConstraints:@[ - [_badgeButton.heightAnchor - constraintEqualToAnchor:_stackView.heightAnchor - multiplier:kEntrypointHeightMultiplier], - [_badgeButton.widthAnchor constraintEqualToAnchor:_badgeButton.heightAnchor] - ]]; - - _badgeButton.clipsToBounds = YES; - - [_badgeButton addTarget:self - action:@selector(userTappedEntrypoint) - forControlEvents:UIControlEventTouchUpInside]; - _badgeButton.accessibilityIdentifier = - kContextualPanelEntrypointBadgeButtonIdentifier; +// Returns the preferred font and size given the current ContentSizeCategory. +- (UIFont*)entrypointLabelFont { + return PreferredFontForTextStyleWithMaxCategory( + UIFontTextStyleFootnote, + self.traitCollection.preferredContentSizeCategory, + UIContentSizeCategoryAccessibilityLarge); } #pragma mark - ContextualPanelEntrypointConsumer @@ -140,13 +220,17 @@ if (!config) { return; } - _badgeButton.accessibilityLabel = + + _entrypointContainer.accessibilityLabel = base::SysUTF8ToNSString(config->accessibility_label); + _label.text = base::SysUTF8ToNSString(config->entrypoint_message); + UIImage* image = CustomSymbolWithPointSize( base::SysUTF8ToNSString(config->entrypoint_image_name), kInfobarSymbolPointSize); - [_badgeButton setImage:image forState:UIControlStateNormal]; + + _imageView.image = image; } - (void)showEntrypoint { @@ -162,15 +246,15 @@ // Animate the entrypoint appearance. self.view.alpha = 0; - self.view.transform = CGAffineTransformMakeScale(0.1, 0.1); + self.view.transform = CGAffineTransformMakeScale(0.85, 0.85); self.view.hidden = !_entrypointDisplayed; - [UIView animateWithDuration:kMaterialDuration2 + [UIView animateWithDuration:kEntrypointDisplayingAnimationTime delay:0 - usingSpringWithDamping:kUpdateDisplayedBadgeAnimationDamping + usingSpringWithDamping:1 initialSpringVelocity:0 - options:UIViewAnimationOptionBeginFromCurrentState + options:UIViewAnimationOptionCurveEaseOut animations:^{ self.view.alpha = 1; self.view.transform = CGAffineTransformIdentity; @@ -179,8 +263,38 @@ } - (void)hideEntrypoint { + [self transitionToSmallEntrypoint]; + _entrypointDisplayed = NO; self.view.hidden = YES; + + [self.mutator setLocationBarLabelCenteredBetweenContent:NO]; + + [self.view layoutIfNeeded]; +} + +- (void)transitionToLargeEntrypoint { + // TODO(crbug.com/332911172): Animate the following changes. + + _smallTrailingConstraint.active = NO; + _largeTrailingConstraint.active = YES; + _label.hidden = NO; + + [self.mutator setLocationBarLabelCenteredBetweenContent:YES]; + + [self.view layoutIfNeeded]; +} + +- (void)transitionToSmallEntrypoint { + // TODO(crbug.com/332911172): Animate the following changes. + + _largeTrailingConstraint.active = NO; + _smallTrailingConstraint.active = YES; + _label.hidden = YES; + + [self.mutator setLocationBarLabelCenteredBetweenContent:NO]; + + [self.view layoutIfNeeded]; } #pragma mark - ContextualPanelEntrypointMutator @@ -206,4 +320,19 @@ } } +#pragma mark - UIView + +- (void)traitCollectionDidChange:(UITraitCollection*)previousTraitCollection { + [super traitCollectionDidChange:previousTraitCollection]; + + if (@available(iOS 17, *)) { + return; + } + + if (previousTraitCollection.preferredContentSizeCategory != + self.traitCollection.preferredContentSizeCategory) { + [self updateLabelFont]; + } +} + @end
diff --git a/ios/chrome/browser/contextual_panel/model/contextual_panel_browser_agent.mm b/ios/chrome/browser/contextual_panel/model/contextual_panel_browser_agent.mm index 015a686..a85a1a88 100644 --- a/ios/chrome/browser/contextual_panel/model/contextual_panel_browser_agent.mm +++ b/ios/chrome/browser/contextual_panel/model/contextual_panel_browser_agent.mm
@@ -35,6 +35,7 @@ base::SysNSStringToUTF8(kDownTrendSymbol); sample_configuration_.image_type = ContextualPanelItemConfiguration::EntrypointImageType::SFSymbol; + sample_configuration_.entrypoint_message = "See price history"; sample_configuration_.accessibility_label = "Just a test entrypoint."; return sample_configuration_.AsWeakPtr(); }
diff --git a/ios/chrome/browser/safe_browsing/model/BUILD.gn b/ios/chrome/browser/safe_browsing/model/BUILD.gn index 661edcf..f5ce8fc 100644 --- a/ios/chrome/browser/safe_browsing/model/BUILD.gn +++ b/ios/chrome/browser/safe_browsing/model/BUILD.gn
@@ -105,6 +105,18 @@ ] } +source_set("infobar_delegate") { + sources = [ + "enhanced_safe_browsing_infobar_delegate.h", + "enhanced_safe_browsing_infobar_delegate.mm", + ] + + deps = [ + "//components/infobars/core", + "//ios/chrome/browser/shared/public/commands", + ] +} + source_set("eg2_tests") { configs += [ "//build/config/ios:xctest_config" ] testonly = true
diff --git a/ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.h b/ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.h new file mode 100644 index 0000000..d6e19b011 --- /dev/null +++ b/ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.h
@@ -0,0 +1,39 @@ +// Copyright 2024 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_SAFE_BROWSING_MODEL_ENHANCED_SAFE_BROWSING_INFOBAR_DELEGATE_H_ +#define IOS_CHROME_BROWSER_SAFE_BROWSING_MODEL_ENHANCED_SAFE_BROWSING_INFOBAR_DELEGATE_H_ + +#import "components/infobars/core/confirm_infobar_delegate.h" + +@protocol SettingsCommands; +namespace web { +class WebState; +} + +// Delegate for infobar that prompts users to learn more about Enhanced Safe +// Browsing and navgiates them to the Enhanced Safe Browsing settings page. when +// the package(s) are tracked or untracked. +class EnhancedSafeBrowsingInfobarDelegate : public ConfirmInfoBarDelegate { + public: + EnhancedSafeBrowsingInfobarDelegate( + web::WebState* web_state, + id<SettingsCommands> settings_commands_handler); + + ~EnhancedSafeBrowsingInfobarDelegate() override; + + // Navigates the user to the Safe Browsing settings menu page. + void ShowSafeBrowsingSettings(); + + // ConfirmInfoBarDelegate implementation. + InfoBarIdentifier GetIdentifier() const override; + std::u16string GetMessageText() const override; + bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; + + private: + raw_ptr<web::WebState> web_state_ = nullptr; + id<SettingsCommands> settings_commands_handler_; +}; + +#endif // IOS_CHROME_BROWSER_SAFE_BROWSING_MODEL_ENHANCED_SAFE_BROWSING_INFOBAR_DELEGATE_H_
diff --git a/ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.mm b/ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.mm new file mode 100644 index 0000000..52c6e17 --- /dev/null +++ b/ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.mm
@@ -0,0 +1,41 @@ +// Copyright 2024 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/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.h" + +#import <UIKit/UIKit.h> + +#import "components/infobars/core/infobar_delegate.h" +#import "ios/chrome/browser/shared/public/commands/settings_commands.h" + +EnhancedSafeBrowsingInfobarDelegate::EnhancedSafeBrowsingInfobarDelegate( + web::WebState* web_state, + id<SettingsCommands> settings_commands_handler) + : web_state_(web_state), + settings_commands_handler_(settings_commands_handler) {} + +EnhancedSafeBrowsingInfobarDelegate::~EnhancedSafeBrowsingInfobarDelegate() = + default; + +void EnhancedSafeBrowsingInfobarDelegate::ShowSafeBrowsingSettings() { + [settings_commands_handler_ showSafeBrowsingSettings]; +} + +#pragma mark - ConfirmInfoBarDelegate + +infobars::InfoBarDelegate::InfoBarIdentifier +EnhancedSafeBrowsingInfobarDelegate::GetIdentifier() const { + return ENHANCED_SAFE_BROWSING_INFOBAR_DELEGATE; +} + +// Returns an empty message to satisfy implementation requirement for +// ConfirmInfoBarDelegate. +std::u16string EnhancedSafeBrowsingInfobarDelegate::GetMessageText() const { + return std::u16string(); +} + +bool EnhancedSafeBrowsingInfobarDelegate::EqualsDelegate( + infobars::InfoBarDelegate* delegate) const { + return delegate->GetIdentifier() == GetIdentifier(); +}
diff --git a/ios/chrome/browser/shared/public/commands/autofill_commands.h b/ios/chrome/browser/shared/public/commands/autofill_commands.h index 2ee82ff8..ba80405 100644 --- a/ios/chrome/browser/shared/public/commands/autofill_commands.h +++ b/ios/chrome/browser/shared/public/commands/autofill_commands.h
@@ -31,10 +31,13 @@ // Shows the plus address bottom sheet view controller. - (void)showPlusAddressesBottomSheet; -// Shows a command to show the VCN enrollment Bottom Sheet. +// Sends a command to show the VCN enrollment Bottom Sheet. - (void)showVirtualCardEnrollmentBottomSheet: (const autofill::VirtualCardEnrollUiModel&)model; +// Sends a command to show the bottom sheet to edit an address. +- (void)showEditAddressBottomSheet; + // Commands to manage the Autofill error dialog. - (void)showAutofillErrorDialog: (autofill::AutofillErrorDialogContext)errorContext;
diff --git a/ios/chrome/browser/shared/public/commands/help_commands.h b/ios/chrome/browser/shared/public/commands/help_commands.h index c7d6a91..f53b255a 100644 --- a/ios/chrome/browser/shared/public/commands/help_commands.h +++ b/ios/chrome/browser/shared/public/commands/help_commands.h
@@ -49,10 +49,19 @@ // should be shown, then it initializes `backForwardSwipeGestureIPH` and // presents a GestureInProductHelpView, otherwise it sets // `backForwardSwipeGestureIPH` to `nil` and no gestural tip is shown. -// TODO(crbug.com/1467873): Rewrite comment; the displayed IPH might NOT be a -// GestureInProductHelpView. - (void)presentBackForwardSwipeGestureInProductHelp; +// Optionally presents a full screen IPH associated with the swipe to navigate +// back/forward feature. If the feature engagement tracker determines this tip +// should be shown, then it initializes `toolbarSwipeGestureIPH` and +// presents a GestureInProductHelpView, otherwise it sets +// `toolbarSwipeGestureIPH` to `nil` and no gestural tip is shown. +- (void)presentToolbarSwipeGestureInProductHelp; + +// Should be invoked when the user has performed a swipe on the toolbar to +// switch tabs. Remove `toolbarSwipeGestureIPH` if visible. +- (void)handleToolbarSwipeGesture; + @end #endif // IOS_CHROME_BROWSER_SHARED_PUBLIC_COMMANDS_HELP_COMMANDS_H_
diff --git a/ios/chrome/browser/shared/ui/util/dynamic_type_util.h b/ios/chrome/browser/shared/ui/util/dynamic_type_util.h index 1436546..5f42b9b8 100644 --- a/ios/chrome/browser/shared/ui/util/dynamic_type_util.h +++ b/ios/chrome/browser/shared/ui/util/dynamic_type_util.h
@@ -11,6 +11,11 @@ // Specific cases utils // ******************** +// The normal font for the LocationBarSteadyView. UIFont* LocationBarSteadyViewFont(UIContentSizeCategory currentCategory); +// A smaller category font for the LocationBarSteadyView for use when the large +// Contextual Panel entrypoint is being shown in the location bar. +UIFont* SmallLocationBarSteadyViewFont(UIContentSizeCategory currentCategory); + #endif // IOS_CHROME_BROWSER_SHARED_UI_UTIL_DYNAMIC_TYPE_UTIL_H_
diff --git a/ios/chrome/browser/shared/ui/util/dynamic_type_util.mm b/ios/chrome/browser/shared/ui/util/dynamic_type_util.mm index 6a6b3ef..2f079fd2c 100644 --- a/ios/chrome/browser/shared/ui/util/dynamic_type_util.mm +++ b/ios/chrome/browser/shared/ui/util/dynamic_type_util.mm
@@ -12,3 +12,9 @@ UIFontTextStyleBody, currentCategory, UIContentSizeCategoryAccessibilityExtraLarge); } + +UIFont* SmallLocationBarSteadyViewFont(UIContentSizeCategory currentCategory) { + return PreferredFontForTextStyleWithMaxCategory( + UIFontTextStyleFootnote, currentCategory, + UIContentSizeCategoryAccessibilityExtraLarge); +}
diff --git a/ios/chrome/browser/ui/autofill/authentication/BUILD.gn b/ios/chrome/browser/ui/autofill/authentication/BUILD.gn index 193d3483e..06a379a1 100644 --- a/ios/chrome/browser/ui/autofill/authentication/BUILD.gn +++ b/ios/chrome/browser/ui/autofill/authentication/BUILD.gn
@@ -8,6 +8,7 @@ "otp_input_dialog_coordinator.mm", "otp_input_dialog_mediator.h", "otp_input_dialog_mediator.mm", + "otp_input_dialog_mediator_delegate.h", ] deps = [ ":otp_input_dialog_ui",
diff --git a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_coordinator.mm b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_coordinator.mm index 374d8d1..b9aae3d 100644 --- a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_coordinator.mm +++ b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_coordinator.mm
@@ -12,11 +12,17 @@ #import "ios/chrome/browser/autofill/model/autofill_tab_helper.h" #import "ios/chrome/browser/shared/model/browser/browser.h" #import "ios/chrome/browser/shared/model/web_state_list/web_state_list.h" +#import "ios/chrome/browser/shared/public/commands/browser_coordinator_commands.h" +#import "ios/chrome/browser/shared/public/commands/command_dispatcher.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.h" +#import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_delegate.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_view_controller.h" #import "ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h" #import "ios/chrome/browser/ui/autofill/ios_chrome_payments_autofill_client.h" +@interface OtpInputDialogCoordinator () <OtpInputDialogMediatorDelegate> +@end + @implementation OtpInputDialogCoordinator { // A reference to the base view controller with UINavigationController type. __weak UINavigationController* _baseNavigationController; @@ -52,7 +58,7 @@ CHECK(paymentsClient); _modelController = paymentsClient->GetOtpInputDialogModel(); _mediator = std::make_unique<OtpInputDialogMediator>( - _modelController->GetImplWeakPtr()); + _modelController->GetImplWeakPtr(), self); } return self; } @@ -71,4 +77,13 @@ [_baseNavigationController popViewControllerAnimated:YES]; } +#pragma mark - OtpInputDialogMediatorDelegate + +- (void)dismissDialog { + id<BrowserCoordinatorCommands> browserCoordinatorCommandsHandler = + HandlerForProtocol(self.browser->GetCommandDispatcher(), + BrowserCoordinatorCommands); + [browserCoordinatorCommandsHandler dismissCardUnmaskAuthentication]; +} + @end
diff --git a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.h b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.h index 83f64b8a..70f103a 100644 --- a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.h +++ b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.h
@@ -13,6 +13,7 @@ @protocol OtpInputDialogConsumer; @protocol OtpInputDialogMutator; +@protocol OtpInputDialogMediatorDelegate; @class OtpInputDialogMutatorBridge; @@ -25,9 +26,10 @@ class OtpInputDialogMediator : public autofill::CardUnmaskOtpInputDialogView, public OtpInputDialogMutatorBridgeTarget { public: - explicit OtpInputDialogMediator( + OtpInputDialogMediator( base::WeakPtr<autofill::CardUnmaskOtpInputDialogControllerImpl> - model_controller); + model_controller, + id<OtpInputDialogMediatorDelegate> delegate); OtpInputDialogMediator(const OtpInputDialogMediator&) = delete; OtpInputDialogMediator& operator=(const OtpInputDialogMediator&) = delete; ~OtpInputDialogMediator() override; @@ -58,6 +60,8 @@ __weak id<OtpInputDialogConsumer> consumer_; + __weak id<OtpInputDialogMediatorDelegate> delegate_; + OtpInputDialogMutatorBridge* mutator_bridge_; base::WeakPtrFactory<OtpInputDialogMediator> weak_ptr_factory_{this};
diff --git a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.mm b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.mm index 59fdc69..e2ef443 100644 --- a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.mm +++ b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator.mm
@@ -11,14 +11,16 @@ #import "components/autofill/core/browser/ui/payments/card_unmask_otp_input_dialog_controller_impl.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_consumer.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_content.h" +#import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_delegate.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mutator.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mutator_bridge.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mutator_bridge_target.h" OtpInputDialogMediator::OtpInputDialogMediator( base::WeakPtr<autofill::CardUnmaskOtpInputDialogControllerImpl> - model_controller) - : model_controller_(model_controller) { + model_controller, + id<OtpInputDialogMediatorDelegate> delegate) + : model_controller_(model_controller), delegate_(delegate) { base::WeakPtr<OtpInputDialogMutatorBridgeTarget> mutator_bridge_target_weak_ptr(weak_ptr_factory_.GetWeakPtr()); mutator_bridge_ = [[OtpInputDialogMutatorBridge alloc] @@ -51,8 +53,7 @@ show_confirmation_before_closing); model_controller_ = nullptr; } - // TODO(b/324611600): Invoked MediatorDelegate to close the view and terminate - // everything. + [delegate_ dismissDialog]; } base::WeakPtr<autofill::CardUnmaskOtpInputDialogView> @@ -69,8 +70,7 @@ } void OtpInputDialogMediator::DidTapCancelButton() { - // TODO(crbug.com/324611313): Handle this via the view presentation delegate - // to notify the coordinator. + [delegate_ dismissDialog]; } void OtpInputDialogMediator::OnOtpInputChanges(
diff --git a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_delegate.h b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_delegate.h new file mode 100644 index 0000000..6742ccf --- /dev/null +++ b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_delegate.h
@@ -0,0 +1,18 @@ +// Copyright 2024 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_AUTOFILL_AUTHENTICATION_OTP_INPUT_DIALOG_MEDIATOR_DELEGATE_H_ +#define IOS_CHROME_BROWSER_UI_AUTOFILL_AUTHENTICATION_OTP_INPUT_DIALOG_MEDIATOR_DELEGATE_H_ + +#import <Foundation/Foundation.h> + +// The delegate interface that takes calls from the mediator. +@protocol OtpInputDialogMediatorDelegate <NSObject> + +// Close the dialog and terminate all related classes. +- (void)dismissDialog; + +@end + +#endif // IOS_CHROME_BROWSER_UI_AUTOFILL_AUTHENTICATION_OTP_INPUT_DIALOG_MEDIATOR_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_unittest.mm b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_unittest.mm index 4d5f1c4..a517607 100644 --- a/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_unittest.mm +++ b/ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_unittest.mm
@@ -10,6 +10,7 @@ #import "components/autofill/core/browser/ui/payments/card_unmask_otp_input_dialog_controller_impl.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_consumer.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_content.h" +#import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mediator_delegate.h" #import "ios/chrome/browser/ui/autofill/authentication/otp_input_dialog_mutator.h" #import "testing/gmock/include/gmock/gmock.h" #import "testing/platform_test.h" @@ -46,6 +47,7 @@ protected: OtpInputDialogMediatorTest() { consumer_ = OCMProtocolMock(@protocol(OtpInputDialogConsumer)); + delegate_ = OCMProtocolMock(@protocol(OtpInputDialogMediatorDelegate)); CardUnmaskChallengeOption option = CardUnmaskChallengeOption( CardUnmaskChallengeOption::ChallengeOptionId("123"), autofill::CardUnmaskChallengeOptionType::kSmsOtp, @@ -55,10 +57,11 @@ std::make_unique<autofill::CardUnmaskOtpInputDialogControllerImpl>( option, unmask_delegate_.GetWeakPtr()); mediator_ = std::make_unique<OtpInputDialogMediator>( - model_controller_->GetImplWeakPtr()); + model_controller_->GetImplWeakPtr(), delegate_); } id<OtpInputDialogConsumer> consumer_; + id<OtpInputDialogMediatorDelegate> delegate_; testing::NiceMock<MockOtpUnmaskDelegate> unmask_delegate_; std::unique_ptr<autofill::CardUnmaskOtpInputDialogControllerImpl> model_controller_; @@ -97,8 +100,11 @@ } TEST_F(OtpInputDialogMediatorTest, DidTapCancelButton) { - // TODO(crbug.com/324611313): Finish this test when the mediator delegate is - // added. + OCMExpect([delegate_ dismissDialog]); + EXPECT_CALL(unmask_delegate_, + OnUnmaskPromptClosed(/*user_closed_dialog=*/true)); + + [mediator_->AsMutator() didTapCancelButton]; } TEST_F(OtpInputDialogMediatorTest, OnOtpInputChanges) { @@ -110,3 +116,12 @@ [mediator_->AsMutator() onOtpInputChanges:@"123456"]; } + +TEST_F(OtpInputDialogMediatorTest, Dismiss) { + OCMExpect([delegate_ dismissDialog]); + EXPECT_CALL(unmask_delegate_, + OnUnmaskPromptClosed(/*user_closed_dialog=*/true)); + + mediator_->Dismiss(/*show_confirmation_before_closing=*/false, + /*user_closed_dialog=*/true); +}
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/BUILD.gn b/ios/chrome/browser/ui/autofill/bottom_sheet/BUILD.gn index 556c4bd1..262cbb87 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/BUILD.gn +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/BUILD.gn
@@ -130,7 +130,6 @@ "virtual_card_enrollment_bottom_sheet_coordinator.mm", ] deps = [ - ":bottom_sheet_link_coordinator", ":virtual_card_enrollment_bottom_sheet_consumer", ":virtual_card_enrollment_bottom_sheet_delegate", ":virtual_card_enrollment_bottom_sheet_mediator", @@ -138,10 +137,12 @@ "//components/autofill/core/browser", "//ios/chrome/browser/autofill/model/bottom_sheet:bottom_sheet", "//ios/chrome/browser/autofill/model/bottom_sheet:virtual_card_enrollment_callbacks", + "//ios/chrome/browser/net/model:crurl", "//ios/chrome/browser/shared/coordinator/chrome_coordinator:chrome_coordinator", "//ios/chrome/browser/shared/model/browser", "//ios/chrome/browser/shared/model/browser_state:browser_state", "//ios/chrome/browser/shared/model/web_state_list", + "//ios/chrome/browser/shared/public/commands", "//ios/web/public:public", ] frameworks = [ "UIKit.framework" ] @@ -158,13 +159,16 @@ "//components/autofill/core/browser:browser", "//ios/chrome/browser/autofill/model/bottom_sheet", "//ios/chrome/browser/autofill/model/bottom_sheet:virtual_card_enrollment_callbacks", + "//ios/chrome/browser/net/model:crurl", "//ios/chrome/browser/shared/model/browser/test:test_support", "//ios/chrome/browser/shared/model/browser_state:test_support", "//ios/chrome/browser/shared/model/web_state_list", + "//ios/chrome/browser/shared/public/commands", "//ios/chrome/test:test_support", "//ios/web/public", "//ios/web/public/test", "//testing/gtest", + "//third_party/ocmock", ] }
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_coordinator.mm b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_coordinator.mm index 13de1e8..0939d5c 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_coordinator.mm +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_coordinator.mm
@@ -82,7 +82,7 @@ // and other operations which may modify the list of available credit cards // can happen between these two operations. if (!self.mediator.hasCreditCards) { - [self.mediator disableBottomSheet]; + [self.mediator disableBottomSheetAndRefocus:YES]; [self.mediator disconnect]; return; }
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_delegate.h b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_delegate.h index d91a606..307f463 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_delegate.h +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_delegate.h
@@ -14,7 +14,7 @@ // Request to disable the bottom sheet, potentially refocusing the field which // originally triggered the bottom sheet after the bottom sheet has been // disabled. -- (void)disableBottomSheet; +- (void)disableBottomSheetAndRefocus:(BOOL)refocus; @end
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_mediator.mm b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_mediator.mm index 2662555..906d86c 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_mediator.mm +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_mediator.mm
@@ -70,10 +70,6 @@ autofill::PersonalDataManagerObserver>> _scopedPersonalDataManagerObservation; - // Whether the field that triggered the bottom sheet will need to refocus when - // the bottom sheet is dismissed. Default is true. - bool _needsRefocus; - // Information regarding the triggering form for this bottom sheet. autofill::FormActivityParams _params; } @@ -89,7 +85,6 @@ personalDataManager: (autofill::PersonalDataManager*)personalDataManager { if (self = [super init]) { - _needsRefocus = true; _params = params; _hasCreditCards = NO; _webStateList = webStateList; @@ -232,12 +227,11 @@ // Last resort safety exit: On the unlikely event that the provider was set // incorrectly (for example if local predictions and server predictions are // different), simply exit and open the keyboard. - _needsRefocus = true; - [self disableBottomSheet]; + [self disableBottomSheetAndRefocus:YES]; [self logExitReason:kBadProvider]; return; } - _needsRefocus = false; + [self disableBottomSheetAndRefocus:NO]; // Create a form suggestion containing the selected credit card's backend id // so that the suggestion provider can properly fill the form. @@ -263,11 +257,11 @@ [provider didSelectSuggestion:suggestion params:_params]; } -- (void)disableBottomSheet { +- (void)disableBottomSheetAndRefocus:(BOOL)refocus { if (_webStateList) { web::WebState* activeWebState = _webStateList->GetActiveWebState(); AutofillBottomSheetTabHelper::FromWebState(activeWebState) - ->DetachPaymentsListenersForAllFrames(_needsRefocus); + ->DetachPaymentsListenersForAllFrames(refocus); } }
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm index eed5292c..924cc92 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/payments_suggestion_bottom_sheet_view_controller.mm
@@ -134,7 +134,7 @@ - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; if (self.disableBottomSheetOnExit) { - [self.delegate disableBottomSheet]; + [self.delegate disableBottomSheetAndRefocus:YES]; } [self.handler viewDidDisappear]; } @@ -219,6 +219,8 @@ #pragma mark - ConfirmationAlertActionHandler - (void)confirmationAlertPrimaryAction { + self.disableBottomSheetOnExit = NO; + NSInteger index = [self selectedRow]; [self.handler primaryButtonTapped:_creditCardData[index]];
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator.mm b/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator.mm index a8cbfdc..02a6847c 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator.mm +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator.mm
@@ -3,18 +3,20 @@ // found in the LICENSE file. #import "ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator.h" + #import "components/autofill/core/browser/metrics/payments/virtual_card_enrollment_metrics.h" #import "components/autofill/core/browser/payments/virtual_card_enroll_metrics_logger.h" +#import "ios/chrome/browser/net/model/crurl.h" #import "ios/chrome/browser/shared/model/browser_state/chrome_browser_state.h" -#import "ios/chrome/browser/ui/autofill/bottom_sheet/bottom_sheet_link_coordinator.h" -#import "ios/chrome/browser/ui/autofill/bottom_sheet/bottom_sheet_link_coordinator_delegate.h" +#import "ios/chrome/browser/shared/public/commands/application_commands.h" +#import "ios/chrome/browser/shared/public/commands/command_dispatcher.h" +#import "ios/chrome/browser/shared/public/commands/open_new_tab_command.h" #import "ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_delegate.h" #import "ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_mediator.h" #import "ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_view_controller.h" @interface VirtualCardEnrollmentBottomSheetCoordinator () < - VirtualCardEnrollmentBottomSheetDelegate, - BottomSheetLinkCoordinatorDelegate> + VirtualCardEnrollmentBottomSheetDelegate> @property(nonatomic, strong) VirtualCardEnrollmentBottomSheetMediator* mediator; @property(nonatomic, strong) @@ -33,7 +35,10 @@ std::optional<autofill::VirtualCardEnrollmentCallbacks> callbacks_; Browser* browser_; ChromeBrowserState* browser_state_; - BottomSheetLinkCoordinator* bottom_sheet_link_coordinator_; + + // Opening links on the enrollment bottom sheet is delegated to this + // dispatcher. + __weak id<ApplicationCommands> dispatcher_; } @synthesize mediator; @@ -52,6 +57,8 @@ ->GetVirtualCardEnrollmentCallbacks(); self->browser_ = browser; self->browser_state_ = self.browser->GetBrowserState(); + self->dispatcher_ = HandlerForProtocol(self.browser->GetCommandDispatcher(), + ApplicationCommands); } return self; } @@ -109,24 +116,17 @@ } - (void)didTapLinkURL:(CrURL*)url text:(NSString*)text { - bottom_sheet_link_coordinator_ = [[BottomSheetLinkCoordinator alloc] - initWithBaseViewController:self.viewController - browser:self.browser - url:url - title:text]; - bottom_sheet_link_coordinator_.delegate = self; - [bottom_sheet_link_coordinator_ start]; + [dispatcher_ + openURLInNewTab:[OpenNewTabCommand + commandWithURLFromChrome:url.gurl + inIncognito:self.browser + ->GetBrowserState() + ->IsOffTheRecord()]]; } - (void)viewDidDisappear:(BOOL)animated { } -#pragma mark - BottomSheetLinkCoordinatorDelegate - -- (void)dismissBottomSheetLinkCoordinator { - [bottom_sheet_link_coordinator_ stop]; -} - #pragma mark - Private // Logs the result metric attaching additional parameters from the model.
diff --git a/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator_unittest.mm b/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator_unittest.mm index 280eea4..8166776 100644 --- a/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/autofill/bottom_sheet/virtual_card_enrollment_bottom_sheet_coordinator_unittest.mm
@@ -13,14 +13,19 @@ #import "ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_java_script_feature.h" #import "ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.h" #import "ios/chrome/browser/autofill/model/bottom_sheet/virtual_card_enrollment_callbacks.h" +#import "ios/chrome/browser/net/model/crurl.h" #import "ios/chrome/browser/shared/model/browser/test/test_browser.h" #import "ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state.h" #import "ios/chrome/browser/shared/model/web_state_list/web_state_list.h" +#import "ios/chrome/browser/shared/public/commands/application_commands.h" +#import "ios/chrome/browser/shared/public/commands/command_dispatcher.h" +#import "ios/chrome/browser/shared/public/commands/open_new_tab_command.h" #import "ios/chrome/test/ios_chrome_scoped_testing_local_state.h" #import "ios/web/public/test/fakes/fake_web_frames_manager.h" #import "ios/web/public/test/fakes/fake_web_state.h" #import "ios/web/public/test/web_task_environment.h" #import "testing/platform_test.h" +#import "third_party/ocmock/OCMock/OCMock.h" // Tests the SetUpListView and subviews. class VirtualCardEnrollmentBottomSheetCoordinatorTest : public PlatformTest { @@ -69,10 +74,16 @@ model_.enrollment_fields.virtual_card_enrollment_source = autofill::VirtualCardEnrollmentSource::kDownstream; + + application_commands_ = OCMProtocolMock(@protocol(ApplicationCommands)); + [browser_->GetCommandDispatcher() + startDispatchingToTarget:application_commands_ + forProtocol:@protocol(ApplicationCommands)]; + coordinator_ = [[VirtualCardEnrollmentBottomSheetCoordinator alloc] - initWithUIModel:model_ - baseViewController:window_.rootViewController - browser:browser_.get()]; + initWithUIModel:model_ + baseViewController:window_.rootViewController + browser:browser_.get()]; } protected: @@ -86,6 +97,7 @@ IOSChromeScopedTestingLocalState local_state_; std::unique_ptr<TestChromeBrowserState> browser_state_; std::unique_ptr<TestBrowser> browser_; + id<ApplicationCommands> application_commands_; UIWindow* window_; VirtualCardEnrollmentBottomSheetCoordinator* coordinator_; autofill::VirtualCardEnrollUiModel model_; @@ -148,3 +160,19 @@ [coordinator_ stop]; task_environment_.RunUntilIdle(); } + +TEST_F(VirtualCardEnrollmentBottomSheetCoordinatorTest, OpensNewTabForLinks) { + [coordinator_ start]; + CrURL* url = [[CrURL alloc] + initWithNSURL:[NSURL URLWithString:@"https://example.test"]]; + + OCMExpect([application_commands_ + openURLInNewTab:[OCMArg checkWithBlock:^(OpenNewTabCommand* command) { + return command.URL == url.gurl; + }]]); + + [coordinator_ didTapLinkURL:url text:nil]; + + [coordinator_ stop]; + task_environment_.RunUntilIdle(); +}
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm b/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm index 735aaa42..a491d9f 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm +++ b/ios/chrome/browser/ui/autofill/manual_fill/address_view_controller_egtest.mm
@@ -218,26 +218,27 @@ [[EarlGrey selectElementWithMatcher:SettingsProfileMatcher()] assertWithMatcher:grey_not(grey_sufficientlyVisible())]; - // Icons are not present when the Keyboard Accessory Upgrade feature is - // enabled. - if (![AutofillAppInterface isKeyboardAccessoryUpgradeEnabled]) { - // Verify the status of the icons. - [[EarlGrey - selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()] - performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)]; - [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()] - assertWithMatcher:grey_userInteractionEnabled()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] - assertWithMatcher:grey_not(grey_sufficientlyVisible())]; - } - - // Verify the keyboard is not covered by the profiles view. - // TODO(crbug.com/332956674): Remove version check once fixed. + // TODO(crbug.com/332956674): Keyboard and keyboard accessory are not present + // on iOS 17.4+, remove version check once fixed. if (@available(iOS 17.4, *)) { - // Skip verification. + // Skip verifications. } else { + // Icons are not present when the Keyboard Accessory Upgrade feature is + // enabled. + if (![AutofillAppInterface isKeyboardAccessoryUpgradeEnabled]) { + // Verify the status of the icons. + [[EarlGrey + selectElementWithMatcher:ManualFallbackFormSuggestionViewMatcher()] + performAction:grey_scrollToContentEdge(kGREYContentEdgeRight)]; + [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()] + assertWithMatcher:grey_sufficientlyVisible()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackProfilesIconMatcher()] + assertWithMatcher:grey_userInteractionEnabled()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] + assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + } + + // Verify the keyboard is not covered by the profiles view. GREYAssertTrue([EarlGrey isKeyboardShownWithError:nil], @"Keyboard should be shown"); }
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/card_view_controller_egtest.mm b/ios/chrome/browser/ui/autofill/manual_fill/card_view_controller_egtest.mm index 6a47751..2a96e24 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/card_view_controller_egtest.mm +++ b/ios/chrome/browser/ui/autofill/manual_fill/card_view_controller_egtest.mm
@@ -421,19 +421,20 @@ [[EarlGrey selectElementWithMatcher:NavigationBarCancelButton()] performAction:grey_tap()]; - // Verify the status of the icons. - [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] - assertWithMatcher:grey_userInteractionEnabled()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] - assertWithMatcher:grey_not(grey_sufficientlyVisible())]; - - // Verify the keyboard is not covered by the cards view. - // TODO(crbug.com/332956674): Remove version check once fixed. + // TODO(crbug.com/332956674): Keyboard and keyboard accessory are not present + // on iOS 17.4+, remove version check once fixed. if (@available(iOS 17.4, *)) { - // Skip verification. + // Skip verifications. } else { + // Verify the status of the icons. + [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] + assertWithMatcher:grey_sufficientlyVisible()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] + assertWithMatcher:grey_userInteractionEnabled()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] + assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + + // Verify the keyboard is not cover by the cards view. [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardTableViewMatcher()] assertWithMatcher:grey_notVisible()]; @@ -539,19 +540,20 @@ [[EarlGrey selectElementWithMatcher:NavigationBarCancelButton()] performAction:grey_tap()]; - // Verify the status of the icons. - [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] - assertWithMatcher:grey_userInteractionEnabled()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] - assertWithMatcher:grey_not(grey_sufficientlyVisible())]; - - // Verify the keyboard is not cover by the cards view. - // TODO(crbug.com/332956674): Remove version check once fixed. + // TODO(crbug.com/332956674): Keyboard and keyboard accessory are not present + // on iOS 17.4+, remove version check once fixed. if (@available(iOS 17.4, *)) { - // Skip verification. + // Skip verifications. } else { + // Verify the status of the icons. + [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] + assertWithMatcher:grey_sufficientlyVisible()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardIconMatcher()] + assertWithMatcher:grey_userInteractionEnabled()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] + assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + + // Verify the keyboard is not cover by the cards view. [[EarlGrey selectElementWithMatcher:ManualFallbackCreditCardTableViewMatcher()] assertWithMatcher:grey_notVisible()];
diff --git a/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm b/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm index f6073db..73c47214 100644 --- a/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm +++ b/ios/chrome/browser/ui/autofill/manual_fill/password_view_controller_egtest.mm
@@ -459,16 +459,22 @@ [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()] performAction:grey_tap()]; - // Icons are not present when the Keyboard Accessory Upgrade feature is - // enabled. - if (![AutofillAppInterface isKeyboardAccessoryUpgradeEnabled]) { - // Verify the status of the icons. - [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] - assertWithMatcher:grey_userInteractionEnabled()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] - assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + // TODO(crbug.com/332956674): Keyboard and keyboard accessory are not present + // on iOS 17.4+, remove version check once fixed. + if (@available(iOS 17.4, *)) { + // Skip verifications. + } else { + // Icons are not present when the Keyboard Accessory Upgrade feature is + // enabled. + if (![AutofillAppInterface isKeyboardAccessoryUpgradeEnabled]) { + // Verify the status of the icons. + [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] + assertWithMatcher:grey_sufficientlyVisible()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] + assertWithMatcher:grey_userInteractionEnabled()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] + assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + } } // Verify that the keyboard is not covered by the password view. @@ -612,16 +618,22 @@ [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()] performAction:grey_tap()]; - // Icons are not present when the Keyboard Accessory Upgrade feature is - // enabled. - if (![AutofillAppInterface isKeyboardAccessoryUpgradeEnabled]) { - // Verify the status of the icons. - [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] - assertWithMatcher:grey_userInteractionEnabled()]; - [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] - assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + // TODO(crbug.com/332956674): Keyboard and keyboard accessory are not present + // on iOS 17.4+, remove version check once fixed. + if (@available(iOS 17.4, *)) { + // Skip verifications. + } else { + // Icons are not present when the Keyboard Accessory Upgrade feature is + // enabled. + if (![AutofillAppInterface isKeyboardAccessoryUpgradeEnabled]) { + // Verify the status of the icons. + [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] + assertWithMatcher:grey_sufficientlyVisible()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackPasswordIconMatcher()] + assertWithMatcher:grey_userInteractionEnabled()]; + [[EarlGrey selectElementWithMatcher:ManualFallbackKeyboardIconMatcher()] + assertWithMatcher:grey_not(grey_sufficientlyVisible())]; + } } // Verify that the keyboard is not covered by the password view.
diff --git a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm index b5e75a7..c3f34e0d 100644 --- a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm +++ b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm
@@ -1687,6 +1687,10 @@ [self.virtualCardEnrollmentBottomSheetCoordinator start]; } +- (void)showEditAddressBottomSheet { + // TODO(crbug.com/148226): Implement. +} + - (void)showAutofillErrorDialog: (autofill::AutofillErrorDialogContext)errorContext { if (self.autofillErrorDialogCoordinator) { @@ -3199,6 +3203,13 @@ [controller forceAnimatedScrollRefresh]; } +- (void)bubblePresenter:(BubblePresenter*)bubblePresenter + didPerformSwipeToNavigateInDirection: + (UISwipeGestureRecognizerDirection)direction { + [_sideSwipeMediator animateSwipe:SwipeType::CHANGE_PAGE + inDirection:direction]; +} + #pragma mark - OverscrollActionsControllerDelegate methods. - (void)overscrollActionNewTab:(OverscrollActionsController*)controller {
diff --git a/ios/chrome/browser/ui/bubble/bubble_presenter.mm b/ios/chrome/browser/ui/bubble/bubble_presenter.mm index bd3955b..b5aef5d 100644 --- a/ios/chrome/browser/ui/bubble/bubble_presenter.mm +++ b/ios/chrome/browser/ui/bubble/bubble_presenter.mm
@@ -44,6 +44,7 @@ #import "ios/chrome/browser/ui/bubble/bubble_view_controller_presenter.h" #import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.h" #import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view_delegate.h" +#import "ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" #import "ios/chrome/common/ui/util/ui_util.h" #import "ios/chrome/grit/ios_branded_strings.h" @@ -106,6 +107,8 @@ @property(nonatomic, strong) GestureInProductHelpView* pullToRefreshGestureIPH; @property(nonatomic, strong) GestureInProductHelpView* swipeBackForwardGestureIPH; +@property(nonatomic, strong) + ToolbarSwipeGestureInProductHelpView* toolbarSwipeGestureIPH; @property(nonatomic, assign) WebStateList* webStateList; @property(nonatomic, assign) feature_engagement::Tracker* engagementTracker; @property(nonatomic, assign) HostContentSettingsMap* settingsMap; @@ -464,8 +467,7 @@ // Do not present the new tab IPH on NTP. web::WebState* currentWebState = self.webStateList->GetActiveWebState(); - if (!currentWebState || - currentWebState->GetVisibleURL() == kChromeUINewTabURL) { + if (!currentWebState || IsUrlNtp(currentWebState->GetVisibleURL())) { return; } @@ -622,7 +624,7 @@ } web::WebState* currentWebState = self.webStateList->GetActiveWebState(); - if (currentWebState->GetVisibleURL() == kChromeUINewTabURL) { + if (IsUrlNtp(currentWebState->GetVisibleURL())) { return; } @@ -652,6 +654,79 @@ [self.swipeBackForwardGestureIPH startAnimation]; } +- (void)presentToolbarSwipeGestureInProductHelp { + // Inapplicable on iPad. + if (ui::GetDeviceFormFactor() != + ui::DeviceFormFactor::DEVICE_FORM_FACTOR_PHONE || + UIAccessibilityIsVoiceOverRunning() || + (![self canPresentBubbleWithCheckTabScrolledToTop:NO])) { + return; + } + const base::Feature& feature = + feature_engagement::kIPHiOSSwipeToolbarToChangeTabFeature; + BOOL userEligible = IsFirstRunRecent(base::Days(60)) && + self.engagementTracker->WouldTriggerHelpUI(feature); + if (!userEligible) { + return; + } + web::WebState* currentWebState = self.webStateList->GetActiveWebState(); + if (IsUrlNtp(currentWebState->GetVisibleURL())) { + return; + } + // Setup view constraints. + NamedGuide* contentAreaGuide = + [NamedGuide guideWithName:kContentAreaGuide + view:self.rootViewController.view]; + if (!contentAreaGuide) { + return; + } + UILayoutGuide* guide = [[UILayoutGuide alloc] init]; + [self.rootViewController.view addLayoutGuide:guide]; + AddSameConstraintsToSides( + guide, contentAreaGuide, + LayoutSides::kLeading | LayoutSides::kTrailing | LayoutSides::kBottom); + NSLayoutConstraint* topConstraintForBottomEdgeSwipe = [guide.topAnchor + constraintEqualToAnchor:self.rootViewController.view.topAnchor]; + NSLayoutConstraint* topConstraintForTopEdgeSwipe = + [guide.topAnchor constraintEqualToAnchor:contentAreaGuide.topAnchor]; + NSLayoutConstraint* initialTopConstraint = + self.rootViewController.traitCollection.verticalSizeClass == + UIUserInterfaceSizeClassRegular + ? topConstraintForBottomEdgeSwipe + : topConstraintForTopEdgeSwipe; + initialTopConstraint.active = YES; + + // Check index to determine which directions are supported. + int activeIndex = self.webStateList->active_index(); + // Configure IPH view. + ToolbarSwipeGestureInProductHelpView* toolbarSwipeGestureIPH = + [[ToolbarSwipeGestureInProductHelpView alloc] + initWithBubbleBoundingSize:guide.layoutFrame.size + canGoBack:activeIndex > 0 + forward:activeIndex < + self.webStateList->count() - 1]; + [toolbarSwipeGestureIPH setTranslatesAutoresizingMaskIntoConstraints:NO]; + if (!CanGestureInProductHelpViewFitInGuide(toolbarSwipeGestureIPH, guide) || + !self.engagementTracker->ShouldTriggerHelpUI(feature)) { + return; + } + toolbarSwipeGestureIPH.topConstraintForBottomEdgeSwipe = + topConstraintForBottomEdgeSwipe; + toolbarSwipeGestureIPH.topConstraintForTopEdgeSwipe = + topConstraintForTopEdgeSwipe; + [self.rootViewController.view addSubview:toolbarSwipeGestureIPH]; + AddSameConstraints(toolbarSwipeGestureIPH, guide); + + [toolbarSwipeGestureIPH startAnimation]; + self.toolbarSwipeGestureIPH = toolbarSwipeGestureIPH; +} + +- (void)handleToolbarSwipeGesture { + [self.toolbarSwipeGestureIPH + dismissWithReason:IPHDismissalReasonType:: + kSwipedAsInstructedByGestureIPH]; +} + #pragma mark - GestureInProductHelpViewDelegate - (void)gestureInProductHelpView:(GestureInProductHelpView*)view @@ -664,6 +739,10 @@ } else if (view == self.swipeBackForwardGestureIPH) { [self featureDismissed:feature_engagement::kIPHiOSSwipeBackForwardFeature withSnooze:snoozeAction]; + } else if (view == self.toolbarSwipeGestureIPH) { + [self featureDismissed:feature_engagement:: + kIPHiOSSwipeToolbarToChangeTabFeature + withSnooze:snoozeAction]; } else { NOTREACHED(); } @@ -674,7 +753,10 @@ if (view == self.pullToRefreshGestureIPH) { [self.delegate bubblePresenterDidPerformPullToRefreshGesture:self]; } else if (view == self.swipeBackForwardGestureIPH) { - // TODO(crbug.com/40276959): Implement. + [self.delegate bubblePresenter:self + didPerformSwipeToNavigateInDirection:direction]; + } else if (view == self.toolbarSwipeGestureIPH) { + // Do nothing. Swipe happens outside of the view. } else { NOTREACHED(); } @@ -744,6 +826,7 @@ (IPHDismissalReasonType)reason { [self.pullToRefreshGestureIPH dismissWithReason:reason]; [self.swipeBackForwardGestureIPH dismissWithReason:reason]; + [self.toolbarSwipeGestureIPH dismissWithReason:reason]; } #pragma mark - Private Utils
diff --git a/ios/chrome/browser/ui/bubble/bubble_presenter_delegate.h b/ios/chrome/browser/ui/bubble/bubble_presenter_delegate.h index 95acd7e9..70e55402 100644 --- a/ios/chrome/browser/ui/bubble/bubble_presenter_delegate.h +++ b/ios/chrome/browser/ui/bubble/bubble_presenter_delegate.h
@@ -20,10 +20,15 @@ - (BOOL)isNTPScrolledToTopForBubblePresenter:(BubblePresenter*)bubblePresenter; // Notifies the delegate that the user has performed the pull-to-refresh gesture -// as instructed by the in-product help +// as instructed by the in-product help. - (void)bubblePresenterDidPerformPullToRefreshGesture: (BubblePresenter*)bubblePresenter; +// Notifies the delegate that the user has performed the back/forward swipe +// gesture as instructed by the in-product help. +- (void)bubblePresenter:(BubblePresenter*)bubblePresenter + didPerformSwipeToNavigateInDirection: + (UISwipeGestureRecognizerDirection)direction; @end #endif // IOS_CHROME_BROWSER_UI_BUBBLE_BUBBLE_PRESENTER_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/BUILD.gn b/ios/chrome/browser/ui/bubble/gesture_iph/BUILD.gn index 11bfb1d..72df47f0d 100644 --- a/ios/chrome/browser/ui/bubble/gesture_iph/BUILD.gn +++ b/ios/chrome/browser/ui/bubble/gesture_iph/BUILD.gn
@@ -6,9 +6,12 @@ sources = [ "gesture_in_product_help_gesture_recognizer.h", "gesture_in_product_help_gesture_recognizer.mm", + "gesture_in_product_help_view+subclassing.h", "gesture_in_product_help_view.h", "gesture_in_product_help_view.mm", "gesture_in_product_help_view_delegate.h", + "toolbar_swipe_gesture_in_product_help_view.h", + "toolbar_swipe_gesture_in_product_help_view.mm", ] deps = [ ":constants",
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.h b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.h index 2367ff31..ae19290a 100644 --- a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.h +++ b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.h
@@ -23,4 +23,12 @@ // Time for the view to fade in/out from the screen. extern const base::TimeDelta kGestureInProductHelpViewAppearDuration; +// Time after a cycle completes and before the next cycle in the opposite +// direction begins; only used for bidirectional in-product help gesture views. +extern const base::TimeDelta kDurationBetweenBidirectionalCycles; + +// The radius of the gesture indicator when it's animating the user's finger +// movement. +extern const CGFloat kGestureIndicatorRadius; + #endif // IOS_CHROME_BROWSER_UI_BUBBLE_GESTURE_IPH_GESTURE_IN_PRODUCT_HELP_CONSTANTS_H_
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.mm b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.mm index d1881a3..0f10ae1 100644 --- a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.mm +++ b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.mm
@@ -17,3 +17,8 @@ base::TimeDelta const kGestureInProductHelpViewAppearDuration = base::Milliseconds(250); + +base::TimeDelta const kDurationBetweenBidirectionalCycles = + base::Milliseconds(250); + +CGFloat const kGestureIndicatorRadius = 33.0f;
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view+subclassing.h b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view+subclassing.h new file mode 100644 index 0000000..8b0e62e6 --- /dev/null +++ b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view+subclassing.h
@@ -0,0 +1,78 @@ +// Copyright 2024 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_BUBBLE_GESTURE_IPH_GESTURE_IN_PRODUCT_HELP_VIEW_SUBCLASSING_H_ +#define IOS_CHROME_BROWSER_UI_BUBBLE_GESTURE_IPH_GESTURE_IN_PRODUCT_HELP_VIEW_SUBCLASSING_H_ + +#import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.h" + +@class BubbleView; +@class GestureInProductHelpGestureRecognizer; + +@interface GestureInProductHelpView (Subclassing) + +/// Bubble view. +@property(nonatomic, readonly) BubbleView* bubbleView; +/// Ellipsis that instructs the user's finger movement. +@property(nonatomic, readonly) UIView* gestureIndicator; +/// Button at the bottom that dismisses the IPH. +@property(nonatomic, readonly) UIButton* dismissButton; +/// Current animating direction of the view. +@property(nonatomic, readonly) + UISwipeGestureRecognizerDirection animatingDirection; + +#pragma mark - Positioning + +/// Initial bubble setup and positioning. +- (void)setInitialBubbleViewWithDirection:(BubbleArrowDirection)direction + boundingSize:(CGSize)boundingSize; + +/// Initial distance between the bubble and the center of the gesture indicator +/// ellipsis. +- (CGFloat)initialGestureIndicatorToBubbleSpacing; + +/// Animated distance of the gesture indicator. +- (CGFloat)gestureIndicatorAnimatedDistance; + +/// Returns the constraint for the gesture recognizer defining its distance to +/// the bubble. +- (NSLayoutConstraint*)initialGestureIndicatorMarginConstraint; + +/// Returns the constraint for the gesture recognizer defining its centering. +- (NSLayoutConstraint*)initialGestureIndicatorCenterConstraint; + +/// Returns the constraints that position the dismiss button. +- (NSArray<NSLayoutConstraint*>*)dismissButtonConstraints; + +#pragma mark - Animation Keyframe + +/// Animation block that resizes the gesture indicator and update transparency. +/// If `visible`, the gesture indicator will shrink from a large size and ends +/// with the correct size and correct visibility; otherwise, it will enlarge and +/// fade into background. +- (void)animateGestureIndicatorForVisibility:(BOOL)visible; + +/// Animate the "swipe" movement of the gesture indicator in accordance to the +/// direction. +- (void)animateGestureIndicatorSwipe; + +/// If `reverse` is `NO`, animate the "swipe" movement of the bubble view in +/// accordance to the direction; otherwise, swipe it in the reverse direction. +/// Note that swiping in reverse direction hides the bubble arrow. +- (void)animateBubbleSwipeInReverseDrection:(BOOL)reverse; + +#pragma mark - Event Handler + +/// Responds to swipe gestures whose direction of the swipe matches the way +/// shown by the in-product help. +- (void)handleInstructedSwipeGesture: + (GestureInProductHelpGestureRecognizer*)gesture; + +/// Responds to direction changes; triggered for bi-directional in-product help +/// views only. +- (void)handleDirectionChangeToOppositeDirection; + +@end + +#endif // IOS_CHROME_BROWSER_UI_BUBBLE_GESTURE_IPH_GESTURE_IN_PRODUCT_HELP_VIEW_SUBCLASSING_H_
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.mm b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.mm index 3973cf2..b6b9c67 100644 --- a/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.mm +++ b/ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.mm
@@ -14,6 +14,7 @@ #import "ios/chrome/browser/ui/bubble/bubble_view.h" #import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.h" #import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_gesture_recognizer.h" +#import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view+subclassing.h" #import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view_delegate.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" @@ -32,9 +33,6 @@ // The distance that the bubble should move during the animation. const CGFloat kBubbleDistanceAnimated = 40.0f; -// The radius of the gesture indicator when it's animating the user's finger -// movement. -const CGFloat kGestureIndicatorRadius = 33.0f; // The radius of the gesture indicator when the animation starts fading in and // ends fading out. const CGFloat kFadingGestureIndicatorRadius = 46.0f; @@ -68,9 +66,6 @@ // before captureing a snapshot to create a blurred background. const base::TimeDelta kBlurSuperviewWaitTime = base::Milliseconds(400); -// Time taken for the bubble to fade for bidirectional swipes. -const base::TimeDelta kBubbleDisappearDuration = base::Milliseconds(250); - // Whether bubble with arrow direction `direction` is pointing left. BOOL IsArrowPointingLeft(BubbleArrowDirection direction) { return direction == (UseRTLLayout() ? BubbleArrowDirectionTrailing @@ -229,14 +224,13 @@ } // namespace @implementation GestureInProductHelpView { + // Subclass Properties. + BubbleView* _bubbleView; + UIView* _gestureIndicator; + UIButton* _dismissButton; + // Bubble text. NSString* _text; - // Bubble view. - BubbleView* _bubbleView; - // Ellipsis that instructs the user's finger movement. - UIView* _gestureIndicator; - // Button at the bottom that dismisses the IPH. - UIButton* _dismissButton; // Gaussian blurred super view that creates a blur-filter effect. UIView* _blurredSuperview; // Gesture recognizer of the view. @@ -506,7 +500,7 @@ // Total and relative time for each cycle of keyframe animation. base::TimeDelta keyframeAnimationDurationPerCycle = kAnimationDuration; if (self.bidirectional) { - keyframeAnimationDurationPerCycle -= kBubbleDisappearDuration; + keyframeAnimationDurationPerCycle -= kDurationBetweenBidirectionalCycles; } double gestureIndicatorSizeChangeDuration = kGestureIndicatorShrinkOrExpandTime / keyframeAnimationDurationPerCycle; @@ -594,187 +588,12 @@ #pragma mark - Private -// Update the bottom-most subview to be a Gaussian blurred version of the -// superview to make the in-product help act as a blur-filter as well. If the -// superview is already blurred, this method does nothing. -- (void)blurrifySuperview { - if (!self.superview || _blurredSuperview) { - _blurringSuperview = NO; - return; - } - // Using frame based layout so we can compare its frame with the superview's - // frame to detect whether a redraw is needed. - UIView* superview = self.superview; - // Hide view to capture snapshot without IPH view elements. - self.hidden = YES; - UIImage* backgroundImage = CaptureViewWithOption( - superview, 1.0f, CaptureViewOption::kClientSideRendering); - self.hidden = NO; - UIImage* blurredBackgroundImage = - BlurredImageWithImage(backgroundImage, kBlurRadius); - UIImageView* blurredBackgroundImageView = - [[UIImageView alloc] initWithImage:blurredBackgroundImage]; - blurredBackgroundImageView.contentMode = UIViewContentModeScaleAspectFill; - - // Create wrapper view to clip the blurred image to the edge of the superview. - _blurredSuperview = [[UIView alloc] initWithFrame:CGRectZero]; - _blurredSuperview.translatesAutoresizingMaskIntoConstraints = NO; - _blurredSuperview.clipsToBounds = YES; - [_blurredSuperview addSubview:blurredBackgroundImageView]; - blurredBackgroundImageView.frame = - [_blurredSuperview convertRect:superview.bounds fromView:superview]; - - [self insertSubview:_blurredSuperview atIndex:0]; - AddSameConstraints(_blurredSuperview, self); - _blurringSuperview = NO; -} - -// Handles the completion of each round of animation. -- (void)onAnimationCycleComplete { - if (!self.superview) { - return; - } - _currentAnimationRepeatCount++; - if (_currentAnimationRepeatCount == self.animationRepeatCount) { - [self dismissWithReason:IPHDismissalReasonType::kTimedOut]; - return; - } - if (!self.bidirectional) { - [self startAnimation]; - return; - } - // Handle direction change. - _animatingDirection = GetOppositeDirection(_animatingDirection); - [self handleDirectionChangeToOppositeDirection]; -} - // Action handler that executes when voiceover announcement ends. - (void)handleUIAccessibilityAnnouncementDidFinishNotification: (NSNotification*)notification { [self dismissWithReason:IPHDismissalReasonType::kVoiceOverAnnouncementEnded]; } -// Helper of "dismissWithReason:" that comes with an optional completion -// handler. -- (void)dismissWithReason:(IPHDismissalReasonType)reason - completionHandler:(ProceduralBlock)completionHandler { - if (!self.superview || _dismissed) { - return; - } - _dismissed = YES; - GestureInProductHelpView* weakSelf = self; - [UIView - animateWithDuration:kGestureInProductHelpViewAppearDuration.InSecondsF() - animations:^{ - weakSelf.alpha = 0; - } - completion:^(BOOL finished) { - GestureInProductHelpView* strongSelf = weakSelf; - if (!strongSelf) { - return; - } - [strongSelf removeFromSuperview]; - [strongSelf.delegate gestureInProductHelpView:strongSelf - didDismissWithReason:reason]; - if (completionHandler) { - completionHandler(); - } - }]; -} - -// Responds to direction changes; triggered for bi-directional in-product help -// views only. -- (void)handleDirectionChangeToOppositeDirection { - BubbleView* previousBubbleView = _bubbleView; - BubbleArrowDirection bubbleArrowDirection = - GetExpectedBubbleArrowDirectionForSwipeDirection(_animatingDirection); - __weak GestureInProductHelpView* weakSelf = self; - [UIView animateWithDuration:kBubbleDisappearDuration.InSecondsF() - animations:^{ - previousBubbleView.alpha = 0; - } - completion:^(BOOL completed) { - [previousBubbleView removeFromSuperview]; - if (completed) { - [weakSelf setInitialBubbleViewWithDirection:bubbleArrowDirection - boundingSize:weakSelf.frame.size]; - [weakSelf startAnimation]; - } else { - // This will be most likely caused by that the view has been - // dismissed during animation, but in case it's not, dismiss the - // view. If the view has already been dismissed, this call does - // nothing. - [weakSelf dismissWithReason:IPHDismissalReasonType::kUnknown]; - } - }]; -} - -#pragma mark - Gesture handler - -// Responds to swipe gestures whose direction of the swipe matches the way -// shown by the in-product help, so that the owner can trigger an animation -// that resembles a user-initiated swipe on the views beneath the IPH (for one -// directional IPH, the swipe direction should be opposite to the arrow -// direction. Also dismisses the IPH with the reason -// `kSwipedAsInstructedByGestureIPH` -- (void)handleInstructedSwipeGesture: - (GestureInProductHelpGestureRecognizer*)gesture { - __weak GestureInProductHelpView* weakSelf = self; - [self - dismissWithReason:IPHDismissalReasonType::kSwipedAsInstructedByGestureIPH - completionHandler:^{ - [weakSelf.delegate - gestureInProductHelpView:weakSelf - shouldHandleSwipeInDirection:gesture.actualSwipeDirection]; - }]; -} - -#pragma mark - Initial positioning helpers - -// Initial bubble setup and positioning. -- (void)setInitialBubbleViewWithDirection:(BubbleArrowDirection)direction - boundingSize:(CGSize)boundingSize { - _bubbleView = [[BubbleView alloc] initWithText:_text - arrowDirection:direction - alignment:BubbleAlignmentCenter]; - _bubbleView.frame = GetInitialBubbleFrameForView(boundingSize, _bubbleView); - _bubbleView.accessibilityIdentifier = kGestureInProductHelpViewBubbleAXId; - [self addSubview:_bubbleView]; - [_bubbleView setArrowHidden:!_reduceMotion animated:NO]; -} - -// Initial distance between the bubble and the center of the gesture indicator -// ellipsis. -- (CGFloat)initialGestureIndicatorToBubbleSpacing { - BOOL verticalSwipeInCompactHeight = - self.traitCollection.verticalSizeClass == - UIUserInterfaceSizeClassCompact && - (_animatingDirection == UISwipeGestureRecognizerDirectionUp || - _animatingDirection == UISwipeGestureRecognizerDirectionDown); - return verticalSwipeInCompactHeight - ? kInitialGestureIndicatorToBubbleSpacingVerticalSwipeInCompactHeight - : kInitialGestureIndicatorToBubbleSpacingDefault; -} - -// Animated distance of the gesture indicator. -- (CGFloat)gestureIndicatorAnimatedDistance { - BOOL verticalSwipeInCompactHeight = - self.traitCollection.verticalSizeClass == - UIUserInterfaceSizeClassCompact && - (_animatingDirection == UISwipeGestureRecognizerDirectionUp || - _animatingDirection == UISwipeGestureRecognizerDirectionDown); - if (verticalSwipeInCompactHeight) { - CGFloat swipeDistance = - kGestureIndicatorDistanceAnimatedVerticalSwipeInCompactHeight; - if ([self isEdgeSwipe]) { - CGFloat bubbleWidth = CGRectGetWidth(_bubbleView.bounds); - swipeDistance += bubbleWidth / 2 - kSideSwipeGestureIndicatorDistance; - } - return swipeDistance; - } - return kGestureIndicatorDistanceAnimatedDefault; -} - // If the bubble view is fully visible in safe area, do nothing; otherwise, move // it into the safe area. - (void)repositionBubbleViewInSafeArea { @@ -827,13 +646,157 @@ [self.superview layoutIfNeeded]; } -// Returns the desired value of `_gestureIndicatorMarginConstraint`. -// -// NOTE: Despite that the returning object defines the distance between the -// gesture indicator to the bubble, it anchors on the view's nearest edge -// instead of the bubble's, so that the gesture indicator's movement during the -// animation would NOT be influenced by the bubble's movement. +// Update the bottom-most subview to be a Gaussian blurred version of the +// superview to make the in-product help act as a blur-filter as well. If the +// superview is already blurred, this method does nothing. +- (void)blurrifySuperview { + if (!self.superview || _blurredSuperview) { + _blurringSuperview = NO; + return; + } + // Using frame based layout so we can compare its frame with the superview's + // frame to detect whether a redraw is needed. + UIView* superview = self.superview; + // Hide view to capture snapshot without IPH view elements. + self.hidden = YES; + UIImage* backgroundImage = CaptureViewWithOption( + superview, 1.0f, CaptureViewOption::kClientSideRendering); + self.hidden = NO; + UIImage* blurredBackgroundImage = + BlurredImageWithImage(backgroundImage, kBlurRadius); + UIImageView* blurredBackgroundImageView = + [[UIImageView alloc] initWithImage:blurredBackgroundImage]; + blurredBackgroundImageView.contentMode = UIViewContentModeScaleAspectFill; + + // Create wrapper view to clip the blurred image to the edge of the superview. + _blurredSuperview = [[UIView alloc] initWithFrame:CGRectZero]; + _blurredSuperview.translatesAutoresizingMaskIntoConstraints = NO; + _blurredSuperview.clipsToBounds = YES; + [_blurredSuperview addSubview:blurredBackgroundImageView]; + blurredBackgroundImageView.frame = + [_blurredSuperview convertRect:superview.bounds fromView:superview]; + + [self insertSubview:_blurredSuperview atIndex:0]; + AddSameConstraints(_blurredSuperview, self); + _blurringSuperview = NO; +} + +// Handles the completion of each round of animation. +- (void)onAnimationCycleComplete { + if (!self.superview) { + return; + } + _currentAnimationRepeatCount++; + if (_currentAnimationRepeatCount == self.animationRepeatCount) { + [self dismissWithReason:IPHDismissalReasonType::kTimedOut]; + return; + } + if (!self.bidirectional) { + [self startAnimation]; + return; + } + // Handle direction change. + _animatingDirection = GetOppositeDirection(_animatingDirection); + [self handleDirectionChangeToOppositeDirection]; +} + +// Helper of "dismissWithReason:" that comes with an optional completion +// handler. +- (void)dismissWithReason:(IPHDismissalReasonType)reason + completionHandler:(ProceduralBlock)completionHandler { + if (!self.superview || _dismissed) { + return; + } + _dismissed = YES; + GestureInProductHelpView* weakSelf = self; + [UIView + animateWithDuration:kGestureInProductHelpViewAppearDuration.InSecondsF() + animations:^{ + weakSelf.alpha = 0; + } + completion:^(BOOL finished) { + GestureInProductHelpView* strongSelf = weakSelf; + if (!strongSelf) { + return; + } + [strongSelf removeFromSuperview]; + [strongSelf.delegate gestureInProductHelpView:strongSelf + didDismissWithReason:reason]; + if (completionHandler) { + completionHandler(); + } + }]; +} + +@end + +@implementation GestureInProductHelpView (Subclassing) + +#pragma mark - Subclass Properties + +- (BubbleView*)bubbleView { + return _bubbleView; +} + +- (UIView*)gestureIndicator { + return _gestureIndicator; +} + +- (UIButton*)dismissButton { + return _dismissButton; +} + +- (UISwipeGestureRecognizerDirection)animatingDirection { + return _animatingDirection; +} + +#pragma mark - Positioning + +- (void)setInitialBubbleViewWithDirection:(BubbleArrowDirection)direction + boundingSize:(CGSize)boundingSize { + _bubbleView = [[BubbleView alloc] initWithText:_text + arrowDirection:direction + alignment:BubbleAlignmentCenter]; + _bubbleView.frame = GetInitialBubbleFrameForView(boundingSize, _bubbleView); + _bubbleView.accessibilityIdentifier = kGestureInProductHelpViewBubbleAXId; + [self addSubview:_bubbleView]; + [_bubbleView setArrowHidden:!_reduceMotion animated:NO]; +} + +- (CGFloat)initialGestureIndicatorToBubbleSpacing { + BOOL verticalSwipeInCompactHeight = + self.traitCollection.verticalSizeClass == + UIUserInterfaceSizeClassCompact && + (_animatingDirection == UISwipeGestureRecognizerDirectionUp || + _animatingDirection == UISwipeGestureRecognizerDirectionDown); + return verticalSwipeInCompactHeight + ? kInitialGestureIndicatorToBubbleSpacingVerticalSwipeInCompactHeight + : kInitialGestureIndicatorToBubbleSpacingDefault; +} + +- (CGFloat)gestureIndicatorAnimatedDistance { + BOOL verticalSwipeInCompactHeight = + self.traitCollection.verticalSizeClass == + UIUserInterfaceSizeClassCompact && + (_animatingDirection == UISwipeGestureRecognizerDirectionUp || + _animatingDirection == UISwipeGestureRecognizerDirectionDown); + if (verticalSwipeInCompactHeight) { + CGFloat swipeDistance = + kGestureIndicatorDistanceAnimatedVerticalSwipeInCompactHeight; + if ([self isEdgeSwipe]) { + CGFloat bubbleWidth = CGRectGetWidth(_bubbleView.bounds); + swipeDistance += bubbleWidth / 2 - kSideSwipeGestureIndicatorDistance; + } + return swipeDistance; + } + return kGestureIndicatorDistanceAnimatedDefault; +} + - (NSLayoutConstraint*)initialGestureIndicatorMarginConstraint { + // NOTE: Despite that the returning object defines the distance between the + // gesture indicator to the bubble, it anchors on the view's nearest edge + // instead of the bubble's, so that the gesture indicator's movement during + // the animation would NOT be influenced by the bubble's movement. CGSize bubbleSize = _bubbleView.bounds.size; CGFloat gestureIndicatorToBubbleSpacing = [self initialGestureIndicatorToBubbleSpacing]; @@ -889,7 +852,6 @@ } } -// Returns the desired value of `_gestureIndicatorCenterConstraints`. - (NSLayoutConstraint*)initialGestureIndicatorCenterConstraint { NSLayoutConstraint* gestureIndicatorCenterConstraint; switch (_animatingDirection) { @@ -913,7 +875,6 @@ return gestureIndicatorCenterConstraint; } -// Returns the desired value of `_dismissButtonConstraints`. - (NSArray<NSLayoutConstraint*>*)dismissButtonConstraints { NSLayoutConstraint* centerConstraint = [_dismissButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor]; @@ -928,12 +889,8 @@ return @[ centerConstraint, marginConstraint ]; } -#pragma mark - Animation Helpers +#pragma mark - Animation Keyframe -// Animation block that resizes the gesture indicator and update transparency. -// If `visible`, the gesture indicator will shrink from a large size and ends -// with the correct size and correct visiblity; otherwise, it will enlarge and -// fade into background. - (void)animateGestureIndicatorForVisibility:(BOOL)visible { const CGFloat radius = visible ? kGestureIndicatorRadius : kFadingGestureIndicatorRadius; @@ -950,8 +907,6 @@ [self layoutIfNeeded]; } -// Animate the "swipe" movement of the gesture indicator in accordance to the -// direction. - (void)animateGestureIndicatorSwipe { BOOL animatingAwayFromOrigin = _animatingDirection == UISwipeGestureRecognizerDirectionDown || @@ -967,9 +922,6 @@ [self layoutIfNeeded]; } -// If `reverse` is `NO`, animate the "swipe" movement of the bubble view in -// accordance to the direction; otherwise, swipe it in the reverse direction. -// Note that swiping in reverse direction hides the bubble arrow. - (void)animateBubbleSwipeInReverseDrection:(BOOL)reverse { UISwipeGestureRecognizerDirection direction = _animatingDirection; if (reverse) { @@ -995,4 +947,47 @@ [self layoutIfNeeded]; } +#pragma mark - Event handler + +- (void)handleInstructedSwipeGesture: + (GestureInProductHelpGestureRecognizer*)gesture { + __weak GestureInProductHelpView* weakSelf = self; + // Triggers an animation that resembles a user-initiated swipe on the views + // beneath the IPH. For one directional IPH, the swipe direction should be + // opposite to the arrow direction. Also dismisses the IPH with the reason + // `kSwipedAsInstructedByGestureIPH`. + [self + dismissWithReason:IPHDismissalReasonType::kSwipedAsInstructedByGestureIPH + completionHandler:^{ + [weakSelf.delegate + gestureInProductHelpView:weakSelf + shouldHandleSwipeInDirection:gesture.actualSwipeDirection]; + }]; +} + +- (void)handleDirectionChangeToOppositeDirection { + BubbleView* previousBubbleView = _bubbleView; + __weak GestureInProductHelpView* weakSelf = self; + [UIView animateWithDuration:kDurationBetweenBidirectionalCycles.InSecondsF() + animations:^{ + previousBubbleView.alpha = 0; + } + completion:^(BOOL completed) { + [previousBubbleView removeFromSuperview]; + if (completed) { + [weakSelf setInitialBubbleViewWithDirection: + GetExpectedBubbleArrowDirectionForSwipeDirection( + weakSelf.animatingDirection) + boundingSize:weakSelf.frame.size]; + [weakSelf startAnimation]; + } else { + // This will be most likely caused by that the view has been + // dismissed during animation, but in case it's not, dismiss the + // view. If the view has already been dismissed, this call does + // nothing. + [weakSelf dismissWithReason:IPHDismissalReasonType::kUnknown]; + } + }]; +} + @end
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.h b/ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.h new file mode 100644 index 0000000..5c4d4bf --- /dev/null +++ b/ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.h
@@ -0,0 +1,47 @@ +// Copyright 2024 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_BUBBLE_GESTURE_IPH_TOOLBAR_SWIPE_GESTURE_IN_PRODUCT_HELP_VIEW_H_ +#define IOS_CHROME_BROWSER_UI_BUBBLE_GESTURE_IPH_TOOLBAR_SWIPE_GESTURE_IN_PRODUCT_HELP_VIEW_H_ + +#import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view.h" + +/// The in-product help view specifically for the toolbar swipe that results in +/// switching to the adjacent tab. +@interface ToolbarSwipeGestureInProductHelpView : GestureInProductHelpView + +/// Initializer with text in the bubble view and the direction the bubble view +/// arrow points to. `bubbleBoundingSize` is the maximum size that the gestural +/// IPH view could occupy, and is usually the size of the parent view. This must +/// NOT be `CGSizeZero` as it is used to compute the initial bubble size. +/// `back` and `forward` determine whether the IPH should instruct swiping back, +/// forward, or both. Note that either value has to be YES. +- (instancetype)initWithBubbleBoundingSize:(CGSize)bubbleBoundingSize + canGoBack:(BOOL)back + forward:(BOOL)forward + NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithText:(NSString*)text + bubbleBoundingSize:(CGSize)bubbleBoundingSize + swipeDirection:(UISwipeGestureRecognizerDirection)direction + voiceOverAnnouncement:(NSString*)voiceOverAnnouncement NS_UNAVAILABLE; +- (instancetype)initWithText:(NSString*)text + bubbleBoundingSize:(CGSize)bubbleBoundingSize + swipeDirection:(UISwipeGestureRecognizerDirection)direction + NS_UNAVAILABLE; + +/// Top anchor layout constraint when the bubble and gesture indicator are +/// placed at the bottom. The owner should activate this constraint if the view +/// was added to the superview when device is in portrait mode. +@property(nonatomic, strong) + NSLayoutConstraint* topConstraintForBottomEdgeSwipe; + +/// Top anchor layout constraint when the bubble and gesture indicator are +/// placed at the top. The owner should activate this constraint if the view was +/// added to the superview when device is in landscape mode. +@property(nonatomic, strong) NSLayoutConstraint* topConstraintForTopEdgeSwipe; + +@end + +#endif // IOS_CHROME_BROWSER_UI_BUBBLE_GESTURE_IPH_TOOLBAR_SWIPE_GESTURE_IN_PRODUCT_HELP_VIEW_H_
diff --git a/ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.mm b/ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.mm new file mode 100644 index 0000000..6c2a081c --- /dev/null +++ b/ios/chrome/browser/ui/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.mm
@@ -0,0 +1,158 @@ +// Copyright 2024 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/bubble/gesture_iph/toolbar_swipe_gesture_in_product_help_view.h" + +#import "base/time/time.h" +#import "ios/chrome/browser/shared/ui/util/rtl_geometry.h" +#import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" +#import "ios/chrome/browser/ui/bubble/bubble_constants.h" +#import "ios/chrome/browser/ui/bubble/bubble_view.h" +#import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_constants.h" +#import "ios/chrome/browser/ui/bubble/gesture_iph/gesture_in_product_help_view+subclassing.h" +#import "ios/chrome/grit/ios_strings.h" +#import "ui/base/l10n/l10n_util.h" + +namespace { + +// Initial distance between the gesture indicator and the edge of the screen. +const CGFloat kInitialGestureIndicatorToEdgeSpacing = 16.0f; +// The distance that the gesture indicator should move during the animation. +const CGFloat kGestureIndicatorDistanceAnimated = 100.0f; +// The distance between the dismiss button and the bubble. +const CGFloat kDismissButtonDistanceToBubble = 80.0f; +// Number of animation cycles if the view is bidirectional. +const int kBidirectionalAnimationRepeatCount = 4; + +} // namespace + +@implementation ToolbarSwipeGestureInProductHelpView { + // Constraints to position dismiss button. + NSArray<NSLayoutConstraint*>* _dismissButtonConstraints; +} + +@synthesize bidirectional = _bidirectional; +@synthesize animationRepeatCount = _animationRepeatCount; + +- (instancetype)initWithBubbleBoundingSize:(CGSize)bubbleBoundingSize + canGoBack:(BOOL)back + forward:(BOOL)forward { + CHECK(back || forward); + self = [super initWithText:l10n_util::GetNSString(IDS_IOS_TAB_STRIP_SWIPE_IPH) + bubbleBoundingSize:bubbleBoundingSize + swipeDirection:(back ^ UseRTLLayout()) + ? UISwipeGestureRecognizerDirectionRight + : UISwipeGestureRecognizerDirectionLeft + voiceOverAnnouncement:nil]; + if (self) { + _dismissButtonConstraints = [self dismissButtonConstraints]; + if (back && forward) { + _bidirectional = YES; + _animationRepeatCount = kBidirectionalAnimationRepeatCount; + } else { + _bidirectional = NO; + _animationRepeatCount = [super animationRepeatCount]; + } + } + return self; +} + +- (void)traitCollectionDidChange:(UITraitCollection*)previousTraitCollection { + if (self.traitCollection.verticalSizeClass != + previousTraitCollection.verticalSizeClass) { + [self.bubbleView removeFromSuperview]; + [self setInitialBubbleViewWithDirection: + (BubbleArrowDirection)0 /* this value is not used */ + boundingSize:self.bounds.size]; + [NSLayoutConstraint deactivateConstraints:_dismissButtonConstraints]; + _dismissButtonConstraints = [self dismissButtonConstraints]; + [NSLayoutConstraint activateConstraints:_dismissButtonConstraints]; + self.topConstraintForBottomEdgeSwipe.active = [self shouldSwipeBottomEdge]; + self.topConstraintForTopEdgeSwipe.active = ![self shouldSwipeBottomEdge]; + } + [super traitCollectionDidChange:previousTraitCollection]; +} + +- (void)setInitialBubbleViewWithDirection:(BubbleArrowDirection)direction + boundingSize:(CGSize)boundingSize { + [super setInitialBubbleViewWithDirection:[self shouldSwipeBottomEdge] + ? BubbleArrowDirectionDown + : BubbleArrowDirectionUp + boundingSize:boundingSize]; + [self.bubbleView setArrowHidden:NO animated:NO]; +} + +- (NSLayoutConstraint*)initialGestureIndicatorMarginConstraint { + CGFloat margin = + kInitialGestureIndicatorToEdgeSpacing + kGestureIndicatorRadius; + switch (self.animatingDirection) { + case UISwipeGestureRecognizerDirectionUp: + case UISwipeGestureRecognizerDirectionDown: + NOTREACHED(); + return nil; + case UISwipeGestureRecognizerDirectionLeft: + case UISwipeGestureRecognizerDirectionRight: + default: + BOOL directionIsLeading = + self.animatingDirection == + (UseRTLLayout() ? UISwipeGestureRecognizerDirectionRight + : UISwipeGestureRecognizerDirectionLeft); + if (directionIsLeading) { + return [self.gestureIndicator.centerXAnchor + constraintEqualToAnchor:self.trailingAnchor + constant:-margin]; + } + return [self.gestureIndicator.centerXAnchor + constraintEqualToAnchor:self.leadingAnchor + constant:margin]; + } +} + +- (NSLayoutConstraint*)initialGestureIndicatorCenterConstraint { + return [self.gestureIndicator.centerYAnchor + constraintEqualToAnchor:[self shouldSwipeBottomEdge] ? self.bottomAnchor + : self.topAnchor]; +} + +- (NSArray<NSLayoutConstraint*>*)dismissButtonConstraints { + if ([self shouldSwipeBottomEdge]) { + return @[ + [self.dismissButton.centerXAnchor + constraintEqualToAnchor:self.centerXAnchor], + [self.dismissButton.bottomAnchor + constraintEqualToAnchor:self.bubbleView.topAnchor + constant:-kDismissButtonDistanceToBubble] + ]; + } + return [super dismissButtonConstraints]; +} + +- (CGFloat)gestureIndicatorAnimatedDistance { + return kGestureIndicatorDistanceAnimated; +} + +- (void)animateBubbleSwipeInReverseDrection:(BOOL)reverse { + // Bubble should not move during the animation. + return; +} + +- (void)handleInstructedSwipeGesture: + (GestureInProductHelpGestureRecognizer*)gesture { + // Swipe action happens outside the bounds of the gesture in-product help + // view. + return; +} + +- (void)handleDirectionChangeToOppositeDirection { + [self startAnimationAfterDelay:kDurationBetweenBidirectionalCycles]; +} + +#pragma mark - Private + +// Whether the use should swipe the bottom edge, instead of the top. +- (BOOL)shouldSwipeBottomEdge { + return IsSplitToolbarMode(self.traitCollection); +} + +@end
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_coordinator.mm b/ios/chrome/browser/ui/location_bar/location_bar_coordinator.mm index 0bddf74..743957d 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_coordinator.mm +++ b/ios/chrome/browser/ui/location_bar/location_bar_coordinator.mm
@@ -20,6 +20,7 @@ #import "ios/chrome/browser/autocomplete/model/autocomplete_scheme_classifier_impl.h" #import "ios/chrome/browser/browser_state_metrics/model/browser_state_metrics.h" #import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator.h" +#import "ios/chrome/browser/contextual_panel/entrypoint/coordinator/contextual_panel_entrypoint_coordinator_delegate.h" #import "ios/chrome/browser/default_browser/model/default_browser_interest_signals.h" #import "ios/chrome/browser/drag_and_drop/model/drag_item_util.h" #import "ios/chrome/browser/drag_and_drop/model/url_drag_drop_handler.h" @@ -84,12 +85,14 @@ const size_t kMaxURLDisplayChars = 32 * 1024; } // namespace -@interface LocationBarCoordinator () <LoadQueryCommands, - LocationBarViewControllerDelegate, - LocationBarConsumer, - LocationBarSteadyViewConsumer, - OmniboxControllerDelegate, - URLDragDataSource> { +@interface LocationBarCoordinator () < + ContextualPanelEntrypointCoordinatorDelegate, + LoadQueryCommands, + LocationBarViewControllerDelegate, + LocationBarConsumer, + LocationBarSteadyViewConsumer, + OmniboxControllerDelegate, + URLDragDataSource> { // API endpoint for omnibox. std::unique_ptr<WebLocationBarImpl> _locationBar; // Observer that updates `viewController` for fullscreen events. @@ -208,11 +211,12 @@ didMoveToParentViewController:self.viewController]; self.viewController.offsetProvider = [self.omniboxCoordinator offsetProvider]; - if (IsContextualPanelEnabled()) { + if (!isIncognito && IsContextualPanelEnabled()) { self.contextualPanelEntrypointCoordinator = [[ContextualPanelEntrypointCoordinator alloc] initWithBaseViewController:self.viewController browser:self.browser]; + self.contextualPanelEntrypointCoordinator.delegate = self; [self.contextualPanelEntrypointCoordinator start]; [self.viewController @@ -281,6 +285,7 @@ [self.browser->GetCommandDispatcher() stopDispatchingToTarget:self]; [self.contextualPanelEntrypointCoordinator stop]; + self.contextualPanelEntrypointCoordinator.delegate = nil; self.contextualPanelEntrypointCoordinator = nil; // The popup has to be destroyed before the location bar. @@ -497,6 +502,19 @@ displayEntrypointView:display]; } +#pragma mark - ContextualPanelEntrypointCoordinatorDelegate + +- (BOOL)canShowLargeContextualPanelEntrypoint: + (ContextualPanelEntrypointCoordinator*)coordinator { + return [self.viewController canShowLargeContextualPanelEntrypoint]; +} + +- (void)setLocationBarLabelCenteredBetweenContent: + (ContextualPanelEntrypointCoordinator*)coordinator + centered:(BOOL)centered { + [self.viewController setLocationBarLabelCenteredBetweenContent:centered]; +} + #pragma mark - LocationBarConsumer - (void)defocusOmnibox {
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_steady_view.h b/ios/chrome/browser/ui/location_bar/location_bar_steady_view.h index 9daf87f..d5ab009 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_steady_view.h +++ b/ios/chrome/browser/ui/location_bar/location_bar_steady_view.h
@@ -53,6 +53,11 @@ // Sets whether the contents are centered or aligned to the leading side. - (void)setCentered:(BOOL)centered; +// Sets the location label of the location bar centered relative to the content +// around it when centered is passed as YES. Otherwise, resets it to the +// "absolute" center. +- (void)setLocationBarLabelCenteredBetweenContent:(BOOL)centered; + // The tappable button representing the location bar. @property(nonatomic, strong) UIButton* locationButton; // The label displaying the current location URL.
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_steady_view.mm b/ios/chrome/browser/ui/location_bar/location_bar_steady_view.mm index c3d8dcdcf..a69d775 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_steady_view.mm +++ b/ios/chrome/browser/ui/location_bar/location_bar_steady_view.mm
@@ -146,7 +146,16 @@ #pragma mark - LocationBarSteadyView @implementation LocationBarSteadyView { - NSLayoutConstraint* _xConstraint; + // The different X anchor constraints that can apply to the location label at + // a given time. + NSLayoutConstraint* _xStickToLeadingSideConstraint; + NSLayoutConstraint* _xAbsoluteCenteredConstraint; + NSLayoutConstraint* _xRelativeToContentCenteredConstraint; + + // LayoutGuide centered between the contents at the edges of the location bar. + // (i.e. the layout guide will push towards the trailing side when the + // entrypoint is present on the leading edge.) + UILayoutGuide* _centeredBetweenLocationBarContentsLayoutGuide; // The trailing view that is hidden by default, shown for highlight mode. UIView* _trailingButtonSpotlightView; @@ -271,10 +280,34 @@ constraintEqualToAnchor:self.bottomAnchor], ]]]; - // Make the label gravitate towards the center of the view. - _xConstraint = [_locationContainerView.centerXAnchor + // Setup the layout guide centered between the contents of the location bar. + _centeredBetweenLocationBarContentsLayoutGuide = + [[UILayoutGuide alloc] init]; + [_locationButton + addLayoutGuide:_centeredBetweenLocationBarContentsLayoutGuide]; + [NSLayoutConstraint activateConstraints:@[ + [_centeredBetweenLocationBarContentsLayoutGuide.leadingAnchor + constraintEqualToAnchor:_badgesContainerStackView.trailingAnchor], + [_centeredBetweenLocationBarContentsLayoutGuide.trailingAnchor + constraintEqualToAnchor:_trailingButton.leadingAnchor], + ]]; + + // Different possible X anchors for the location label container. + _xStickToLeadingSideConstraint = [_locationContainerView.leadingAnchor + constraintEqualToAnchor:self.leadingAnchor + constant:kLeadingMargin]; + _xStickToLeadingSideConstraint.priority = UILayoutPriorityDefaultHigh; + + _xAbsoluteCenteredConstraint = [_locationContainerView.centerXAnchor constraintEqualToAnchor:self.centerXAnchor]; - _xConstraint.priority = UILayoutPriorityDefaultHigh; + _xAbsoluteCenteredConstraint.priority = UILayoutPriorityDefaultHigh; + + _xRelativeToContentCenteredConstraint = [_locationContainerView + .centerXAnchor + constraintEqualToAnchor:_centeredBetweenLocationBarContentsLayoutGuide + .centerXAnchor]; + _xRelativeToContentCenteredConstraint.priority = + UILayoutPriorityDefaultHigh - 1; _locationContainerViewLeadingAnchorConstraint = [_locationContainerView.leadingAnchor @@ -304,7 +337,7 @@ [_trailingButton.widthAnchor constraintEqualToConstant:kButtonSize], [_trailingButton.heightAnchor constraintEqualToConstant:kButtonSize], _trailingButtonTrailingAnchorConstraint, - _xConstraint, + _xAbsoluteCenteredConstraint, _locationContainerViewLeadingAnchorConstraint, [_trailingButtonSpotlightView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor], @@ -478,17 +511,39 @@ } - (void)setCentered:(BOOL)centered { - _xConstraint.active = NO; if (centered) { - _xConstraint = [_locationContainerView.centerXAnchor - constraintEqualToAnchor:self.centerXAnchor]; + _xStickToLeadingSideConstraint.active = NO; + // If the location label is currently being centered relative to content + // around it, don't activate the following constraint (absolute centering). + _xAbsoluteCenteredConstraint.active = + !_xRelativeToContentCenteredConstraint.active; } else { - _xConstraint = [_locationContainerView.leadingAnchor - constraintEqualToAnchor:self.leadingAnchor - constant:kLeadingMargin]; + _xAbsoluteCenteredConstraint.active = NO; + _xStickToLeadingSideConstraint.active = YES; } - _xConstraint.priority = UILayoutPriorityDefaultHigh; - _xConstraint.active = YES; + + // Call this in case the font was previously made smaller by the large + // Contextual Panel entrypoint. + _locationLabel.font = [self locationLabelFont]; +} + +- (void)setLocationBarLabelCenteredBetweenContent:(BOOL)centered { + // Early return if the label is already justified to the leading edge, or if + // the Contextual Panel entrypoint is not being shown. + if (_xStickToLeadingSideConstraint.active || + (centered && _contextualPanelEntrypointView.hidden)) { + return; + } + + if (centered) { + _xAbsoluteCenteredConstraint.active = NO; + _xRelativeToContentCenteredConstraint.active = YES; + _locationLabel.font = [self locationLabelSmallerFont]; + } else { + _xRelativeToContentCenteredConstraint.active = NO; + _xAbsoluteCenteredConstraint.active = YES; + _locationLabel.font = [self locationLabelFont]; + } } #pragma mark - UIResponder @@ -562,12 +617,19 @@ } } -// Returns the font size for the location label. +// Returns the normal font size for the location label. - (UIFont*)locationLabelFont { return LocationBarSteadyViewFont( self.traitCollection.preferredContentSizeCategory); } +// Returns the smaller font size for the location label, used when a large +// Contextual Panel entrypoint is present. +- (UIFont*)locationLabelSmallerFont { + return SmallLocationBarSteadyViewFont( + self.traitCollection.preferredContentSizeCategory); +} + - (void)updateTrailingButtonWithHighlightedStatus:(BOOL)highlighted { self.trailingButton.tintColor = highlighted ? [UIColor colorNamed:kSolidButtonTextColor]
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_view_controller.h b/ios/chrome/browser/ui/location_bar/location_bar_view_controller.h index f797700..73db19b1 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_view_controller.h +++ b/ios/chrome/browser/ui/location_bar/location_bar_view_controller.h
@@ -131,6 +131,15 @@ // Sets `enabled` of the share button. - (void)setShareButtonEnabled:(BOOL)enabled; +// Whether the location bar is currently in a state where the large Contextual +// Panel entrypoint can be shown (i.e. it is not hidden). +- (BOOL)canShowLargeContextualPanelEntrypoint; + +// Sets the location label of the location bar centered relative to the content +// around it when centered is passed as YES. Otherwise, resets it to the +// "absolute" center. +- (void)setLocationBarLabelCenteredBetweenContent:(BOOL)centered; + @end #endif // IOS_CHROME_BROWSER_UI_LOCATION_BAR_LOCATION_BAR_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm b/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm index 9cd9589..b92ca9c 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm +++ b/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm
@@ -304,6 +304,17 @@ } } +- (BOOL)canShowLargeContextualPanelEntrypoint { + // TODO(crbug.com/330701617): Add actual checks when implementing badge view + // loud moment blocking (check might need to be in the actual view). + return !self.locationBarSteadyView.hidden; +} + +- (void)setLocationBarLabelCenteredBetweenContent:(BOOL)centered { + [self.locationBarSteadyView + setLocationBarLabelCenteredBetweenContent:centered]; +} + #pragma mark - LocationBarAnimatee - (void)offsetTextFieldToMatchSteadyView {
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm b/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm index f798879..0388d8b 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm +++ b/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm
@@ -61,16 +61,17 @@ // Font that should be used in current size class. - (UIFont*)currentFont; -// Length of autocomplete text. -@property(nonatomic) size_t autocompleteTextLength; - // Tap gesture recognizer for this view. @property(nonatomic, strong) UITapGestureRecognizer* tapGestureRecognizer; @end -@implementation OmniboxTextFieldExperimental +@implementation OmniboxTextFieldExperimental { + /// Length of autocomplete text. + NSUInteger _autocompleteTextLength; +} +@synthesize additionalText = _additionalText; @dynamic delegate; #pragma mark - Public methods @@ -127,8 +128,6 @@ - (void)setText:(NSAttributedString*)text userTextLength:(size_t)userTextLength { - self.autocompleteTextLength = text.length - userTextLength; - DCHECK_LE(userTextLength, text.length); if (userTextLength > 0) { [self exitPreEditState]; @@ -154,17 +153,17 @@ } - (NSString*)autocompleteText { - if (self.autocompleteTextLength > 0) { - // In crbug.com/1237851, sometimes self.autocompleteTextLength is greater + if ([self hasAutocompleteText]) { + // In crbug.com/1237851, sometimes _autocompleteTextLength is greater // than self.text.length, causing the subtraction below to overflow, // breaking // `-substringToIndex:`. This shouldn't happen, so use the DCHECK to catch // it to help debug and default to the end of the string if an overflow // would occur. - DCHECK(self.text.length >= self.autocompleteTextLength); + DCHECK(self.text.length >= _autocompleteTextLength); NSUInteger userTextEndIndex = - self.text.length >= self.autocompleteTextLength - ? self.text.length - self.autocompleteTextLength + self.text.length >= _autocompleteTextLength + ? self.text.length - _autocompleteTextLength : self.text.length; return [self.text substringFromIndex:userTextEndIndex]; } @@ -172,16 +171,15 @@ } - (NSString*)userText { - // In crbug.com/1237851, sometimes self.autocompleteTextLength is greater than + // In crbug.com/1237851, sometimes `_autocompleteTextLength` is greater than // self.text.length, causing the subtraction below to overflow, breaking // `-substringToIndex:`. This shouldn't happen, so use the DCHECK to catch it // to help debug and default to the end of the string if an overflow would // occur. - DCHECK(self.text.length >= self.autocompleteTextLength); - NSUInteger userTextEndIndex = - self.text.length >= self.autocompleteTextLength - ? self.text.length - self.autocompleteTextLength - : self.text.length; + DCHECK(self.text.length >= _autocompleteTextLength); + NSUInteger userTextEndIndex = self.text.length >= _autocompleteTextLength + ? self.text.length - _autocompleteTextLength + : self.text.length; return [self.text substringToIndex:userTextEndIndex]; } @@ -190,6 +188,20 @@ return [self textInRange:[self markedTextRange]]; } +- (NSString*)displayedText { + return self.text; +} + +- (BOOL)hasAutocompleteText { + return _autocompleteTextLength > 0; +} + +- (void)clearAutocompleteText { + if ([self hasAutocompleteText]) { + self.text = self.userText; + } +} + - (NSRange)selectedNSRange { DCHECK([self isFirstResponder]); UITextPosition* beginning = [self beginningOfDocument]; @@ -203,7 +215,7 @@ - (NSTextAlignment)bestTextAlignment { if ([self isFirstResponder]) { - return [self bestAlignmentForText:self.text]; + return DetermineBestAlignmentForText(self.text); } return NSTextAlignmentNatural; } @@ -811,44 +823,16 @@ self.selectedTextRange = textRange; } -- (void)acceptAutocompleteText { - [self setText:self.text]; - self.autocompleteTextLength = 0; -} - -- (BOOL)hasAutocompleteText { - return self.autocompleteTextLength > 0; -} - -- (void)clearAutocompleteText { - if ([self hasAutocompleteText]) { - self.text = self.userText; - self.autocompleteTextLength = 0; - } -} - #pragma mark - helpers -- (NSTextAlignment)bestAlignmentForText:(NSString*)text { - if (text.length) { - NSString* lang = CFBridgingRelease(CFStringTokenizerCopyBestStringLanguage( - (CFStringRef)text, CFRangeMake(0, text.length))); - - if ([NSLocale characterDirectionForLanguage:lang] == - NSLocaleLanguageDirectionRightToLeft) { - return NSTextAlignmentRight; - } - } - return NSTextAlignmentLeft; -} - -- (NSString*)displayedText { - return self.text; +- (void)acceptAutocompleteText { + [self setText:self.text]; } // Helper method used to set the text of this field. - (void)setTextInternal:(NSAttributedString*)text autocompleteLength:(NSUInteger)autocompleteLength { + _autocompleteTextLength = autocompleteLength; // Extract substrings for the permanent text and the autocomplete text. The // former needs to retain any text attributes from the original string. NSUInteger beginningOfAutocomplete = text.length - autocompleteLength; @@ -894,18 +878,28 @@ } if (updateText) { self.attributedText = fieldText; - UITextPosition* endOfUserText = - [self positionFromPosition:self.endOfDocument - offset:-autocompleteLength]; - // Move the cursor to the beginning of the field before setting the position - // to the end of the user input so if the text is very wide, the user sees - // the beginning of the text instead of the end. - self.selectedTextRange = - [self textRangeFromPosition:self.beginningOfDocument - toPosition:self.beginningOfDocument]; - // Preserve the cursor position at the end of the user input. - self.selectedTextRange = [self textRangeFromPosition:endOfUserText - toPosition:endOfUserText]; + + // TODO(crbug.com/330964534): Remove DUMP_WILL_BE_CHECK after investigating + // crash. + if (!self.endOfDocument || !self.beginningOfDocument) { + DUMP_WILL_BE_NOTREACHED_NORETURN() + << "autocomplete length: " << autocompleteLength + << " text length: " << text.length << " has text position: " + << (self.beginningOfDocument || self.endOfDocument); + } else { + UITextPosition* endOfUserText = + [self positionFromPosition:self.endOfDocument + offset:-autocompleteLength]; + // Move the cursor to the beginning of the field before setting the + // position to the end of the user input so if the text is very wide, the + // user sees the beginning of the text instead of the end. + self.selectedTextRange = + [self textRangeFromPosition:self.beginningOfDocument + toPosition:self.beginningOfDocument]; + // Preserve the cursor position at the end of the user input. + self.selectedTextRange = [self textRangeFromPosition:endOfUserText + toPosition:endOfUserText]; + } } // iOS changes the font to .LastResort when some unexpected unicode strings @@ -927,14 +921,4 @@ return layers; } -- (BOOL)isTextFieldLTR { - return [[self class] userInterfaceLayoutDirectionForSemanticContentAttribute: - self.semanticContentAttribute] == - UIUserInterfaceLayoutDirectionLeftToRight; -} - -- (CGRect)layoutLeftViewForBounds:(CGRect)bounds { - return CGRectZero; -} - @end
diff --git a/ios/chrome/browser/ui/overlays/infobar_banner/BUILD.gn b/ios/chrome/browser/ui/overlays/infobar_banner/BUILD.gn index 2d5174f..9dd09d6 100644 --- a/ios/chrome/browser/ui/overlays/infobar_banner/BUILD.gn +++ b/ios/chrome/browser/ui/overlays/infobar_banner/BUILD.gn
@@ -34,6 +34,7 @@ "//ios/chrome/browser/ui/overlays/infobar_banner/parcel_tracking", "//ios/chrome/browser/ui/overlays/infobar_banner/passwords", "//ios/chrome/browser/ui/overlays/infobar_banner/permissions", + "//ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing", "//ios/chrome/browser/ui/overlays/infobar_banner/save_card", "//ios/chrome/browser/ui/overlays/infobar_banner/sync_error", "//ios/chrome/browser/ui/overlays/infobar_banner/tab_pickup",
diff --git a/ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_overlay_coordinator.mm b/ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_overlay_coordinator.mm index 0f1909c..aec445c 100644 --- a/ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_overlay_coordinator.mm +++ b/ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_overlay_coordinator.mm
@@ -31,6 +31,7 @@ #import "ios/chrome/browser/ui/overlays/infobar_banner/parcel_tracking/parcel_tracking_infobar_banner_overlay_mediator.h" #import "ios/chrome/browser/ui/overlays/infobar_banner/passwords/password_infobar_banner_overlay_mediator.h" #import "ios/chrome/browser/ui/overlays/infobar_banner/permissions/permissions_infobar_banner_overlay_mediator.h" +#import "ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.h" #import "ios/chrome/browser/ui/overlays/infobar_banner/save_card/save_card_infobar_banner_overlay_mediator.h" #import "ios/chrome/browser/ui/overlays/infobar_banner/sync_error/sync_error_infobar_banner_overlay_mediator.h" #import "ios/chrome/browser/ui/overlays/infobar_banner/tab_pickup/tab_pickup_infobar_banner_overlay_mediator.h" @@ -66,6 +67,7 @@ [SyncErrorInfobarBannerOverlayMediator class], [TabPickupBannerOverlayMediator class], [ParcelTrackingBannerOverlayMediator class], + [EnhancedSafeBrowsingBannerOverlayMediator class], ]; } @@ -247,6 +249,9 @@ case InfobarType::kInfobarTypeParcelTracking: mediatorClass = [ParcelTrackingBannerOverlayMediator class]; break; + case InfobarType::kInfobarTypeEnhancedSafeBrowsing: + mediatorClass = [EnhancedSafeBrowsingBannerOverlayMediator class]; + break; default: NOTREACHED_NORETURN() << "Received unsupported infobarType."; }
diff --git a/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/BUILD.gn b/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/BUILD.gn new file mode 100644 index 0000000..bbd4ea07 --- /dev/null +++ b/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/BUILD.gn
@@ -0,0 +1,22 @@ +# Copyright 2024 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("safe_browsing") { + sources = [ + "enhanced_safe_browsing_infobar_overlay_mediator.h", + "enhanced_safe_browsing_infobar_overlay_mediator.mm", + ] + + deps = [ + "//base", + "//ios/chrome/app/strings", + "//ios/chrome/browser/overlays/model/public/default", + "//ios/chrome/browser/safe_browsing/model:infobar_delegate", + "//ios/chrome/browser/shared/ui/symbols", + "//ios/chrome/browser/ui/infobars/banners", + "//ios/chrome/browser/ui/overlays:coordinators", + "//ios/chrome/browser/ui/overlays/infobar_banner:mediators", + "//ui/base", + ] +}
diff --git a/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.h b/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.h new file mode 100644 index 0000000..03d6389 --- /dev/null +++ b/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.h
@@ -0,0 +1,16 @@ +// Copyright 2024 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_OVERLAYS_INFOBAR_BANNER_SAFE_BROWSING_ENHANCED_SAFE_BROWSING_INFOBAR_OVERLAY_MEDIATOR_H_ +#define IOS_CHROME_BROWSER_UI_OVERLAYS_INFOBAR_BANNER_SAFE_BROWSING_ENHANCED_SAFE_BROWSING_INFOBAR_OVERLAY_MEDIATOR_H_ + +#import "ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_overlay_mediator.h" + +// Mediator that configures an infobar banner for an Enhanced Safe Browsing +// infobar. +@interface EnhancedSafeBrowsingBannerOverlayMediator + : InfobarBannerOverlayMediator +@end + +#endif // IOS_CHROME_BROWSER_UI_OVERLAYS_INFOBAR_BANNER_SAFE_BROWSING_ENHANCED_SAFE_BROWSING_INFOBAR_OVERLAY_MEDIATOR_H_
diff --git a/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.mm b/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.mm new file mode 100644 index 0000000..c497236 --- /dev/null +++ b/ios/chrome/browser/ui/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.mm
@@ -0,0 +1,88 @@ +// Copyright 2024 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/overlays/infobar_banner/safe_browsing/enhanced_safe_browsing_infobar_overlay_mediator.h" + +#import "ios/chrome/browser/overlays/model/public/default/default_infobar_overlay_request_config.h" +#import "ios/chrome/browser/safe_browsing/model/enhanced_safe_browsing_infobar_delegate.h" +#import "ios/chrome/browser/shared/ui/symbols/symbols.h" +#import "ios/chrome/browser/ui/infobars/banners/infobar_banner_consumer.h" +#import "ios/chrome/browser/ui/overlays/infobar_banner/infobar_banner_overlay_mediator+consumer_support.h" +#import "ios/chrome/browser/ui/overlays/overlay_request_mediator+subclassing.h" +#import "ios/chrome/grit/ios_branded_strings.h" +#import "ios/chrome/grit/ios_strings.h" +#import "ui/base/l10n/l10n_util_mac.h" + +@interface EnhancedSafeBrowsingBannerOverlayMediator () + +@property(nonatomic, readonly) DefaultInfobarOverlayRequestConfig* config; + +@end + +@implementation EnhancedSafeBrowsingBannerOverlayMediator + +#pragma mark - Accessors + +- (DefaultInfobarOverlayRequestConfig*)config { + return self.request + ? self.request->GetConfig<DefaultInfobarOverlayRequestConfig>() + : nullptr; +} + +// Returns the delegate attached to the config. +- (EnhancedSafeBrowsingInfobarDelegate*)enhancedSafeBrowsingInfobarDelegate { + return static_cast<EnhancedSafeBrowsingInfobarDelegate*>( + self.config->delegate()); +} + +#pragma mark - OverlayRequestMediator + ++ (const OverlayRequestSupport*)requestSupport { + return DefaultInfobarOverlayRequestConfig::RequestSupport(); +} + +#pragma mark - InfobarOverlayRequestMediator + +- (void)bannerInfobarButtonWasPressed:(UIButton*)sender { + EnhancedSafeBrowsingInfobarDelegate* delegate = + self.enhancedSafeBrowsingInfobarDelegate; + if (!delegate) { + // This can happen if the user quickly navigates to another website while + // the banner is still appearing, where the infobar owning the delegate is + // deleted before handling the button action. + return; + } + + [self dismissOverlay]; + + delegate->ShowSafeBrowsingSettings(); +} + +@end + +@implementation EnhancedSafeBrowsingBannerOverlayMediator (ConsumerSupport) + +- (void)configureConsumer { + NSString* title = l10n_util::GetNSString( + IDS_IOS_SAFE_BROWSING_ENHANCED_PROTECTION_INFOBAR_TITLE); + NSString* subtitle = l10n_util::GetNSString( + IDS_IOS_SAFE_BROWSING_ENHANCED_PROTECTION_INFOBAR_DESCRIPTION); + NSString* buttonText = l10n_util::GetNSString( + IDS_IOS_SAFE_BROWSING_ENHANCED_PROTECTION_INFOBAR_BUTTON_TEXT); +#if BUILDFLAG(IOS_USE_BRANDED_SYMBOLS) + UIImage* gIcon = + CustomSymbolWithPointSize(kGoogleShieldSymbol, kInfobarSymbolPointSize); +#else + UIImage* gIcon = + DefaultSymbolWithPointSize(kInfoCircleSymbol, kInfobarSymbolPointSize); +#endif + + [self.consumer setTitleText:title]; + [self.consumer setSubtitleText:subtitle]; + [self.consumer setButtonText:buttonText]; + [self.consumer setIconImage:gIcon]; + [self.consumer setPresentsModal:NO]; +} + +@end
diff --git a/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/BUILD.gn b/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/BUILD.gn index 237c6a1..82318148 100644 --- a/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/BUILD.gn +++ b/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/BUILD.gn
@@ -15,13 +15,16 @@ "//base", "//components/autofill/core/browser", "//components/autofill/core/common", + "//components/autofill/ios/common", "//ios/chrome/app/strings", "//ios/chrome/browser/autofill/model", + "//ios/chrome/browser/autofill/model/bottom_sheet", "//ios/chrome/browser/overlays/model", "//ios/chrome/browser/overlays/model/public/common/infobars", "//ios/chrome/browser/overlays/model/public/infobar_modal", "//ios/chrome/browser/shared/model/browser", "//ios/chrome/browser/shared/model/browser_state", + "//ios/chrome/browser/shared/model/web_state_list", "//ios/chrome/browser/shared/ui/util", "//ios/chrome/browser/ui/autofill:autofill_shared_ui", "//ios/chrome/browser/ui/autofill/cells",
diff --git a/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/save_address_profile_infobar_modal_overlay_coordinator.mm b/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/save_address_profile_infobar_modal_overlay_coordinator.mm index 5a91f9d..e2b5474e 100644 --- a/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/save_address_profile_infobar_modal_overlay_coordinator.mm +++ b/ios/chrome/browser/ui/overlays/infobar_modal/autofill_address_profile/save_address_profile_infobar_modal_overlay_coordinator.mm
@@ -8,12 +8,15 @@ #import "base/feature_list.h" #import "base/strings/sys_string_conversions.h" #import "components/autofill/core/common/autofill_features.h" +#import "components/autofill/ios/common/features.h" +#import "ios/chrome/browser/autofill/model/bottom_sheet/autofill_bottom_sheet_tab_helper.h" #import "ios/chrome/browser/autofill/model/personal_data_manager_factory.h" #import "ios/chrome/browser/overlays/model/public/infobar_modal/save_address_profile_infobar_modal_overlay_request_config.h" #import "ios/chrome/browser/overlays/model/public/overlay_callback_manager.h" #import "ios/chrome/browser/overlays/model/public/overlay_response.h" #import "ios/chrome/browser/shared/model/browser/browser.h" #import "ios/chrome/browser/shared/model/browser_state/chrome_browser_state.h" +#import "ios/chrome/browser/shared/model/web_state_list/web_state_list.h" #import "ios/chrome/browser/ui/autofill/autofill_country_selection_table_view_controller.h" #import "ios/chrome/browser/ui/autofill/autofill_profile_edit_mediator.h" #import "ios/chrome/browser/ui/autofill/autofill_profile_edit_mediator_delegate.h" @@ -85,57 +88,72 @@ #pragma mark - Private - (void)onSaveUpdateViewDismissed { - SaveAddressProfileInfobarModalOverlayMediator* modalMediator = - static_cast<SaveAddressProfileInfobarModalOverlayMediator*>( - self.modalMediator); if (!self.config) { return; } - _autofillProfile = - std::make_unique<autofill::AutofillProfile>(*(self.config->GetProfile())); - autofill::PersonalDataManager* personalDataManager = - autofill::PersonalDataManagerFactory::GetForBrowserState( - self.browser->GetBrowserState()->GetOriginalChromeBrowserState()); - self.sharedEditViewMediator = [[AutofillProfileEditMediator alloc] - initWithDelegate:self - personalDataManager:personalDataManager - autofillProfile:_autofillProfile.get() - countryCode:nil - isMigrationPrompt:self.config->is_migration_to_account()]; - LegacyInfobarEditAddressProfileTableViewController* editModalViewController = - [[LegacyInfobarEditAddressProfileTableViewController alloc] - initWithModalDelegate:modalMediator]; - self.sharedEditViewController = - [[AutofillProfileEditTableViewController alloc] - initWithDelegate:self.sharedEditViewMediator - userEmail:(self.config->user_email() - ? base::SysUTF16ToNSString( - self.config->user_email().value()) - : nil)controller:editModalViewController - settingsView:NO]; - self.sharedEditViewMediator.consumer = self.sharedEditViewController; - editModalViewController.handler = self.sharedEditViewController; + if (base::FeatureList::IsEnabled( + kAutofillDynamicallyLoadsFieldsForAddressInput)) { + web::WebState* webState = + self.browser->GetWebStateList()->GetActiveWebState(); + AutofillBottomSheetTabHelper* bottomSheetTabHelper = + AutofillBottomSheetTabHelper::FromWebState(webState); + bottomSheetTabHelper->ShowEditAddressBottomSheet(); + } else { + SaveAddressProfileInfobarModalOverlayMediator* modalMediator = + static_cast<SaveAddressProfileInfobarModalOverlayMediator*>( + self.modalMediator); + _autofillProfile = std::make_unique<autofill::AutofillProfile>( + *(self.config->GetProfile())); + autofill::PersonalDataManager* personalDataManager = + autofill::PersonalDataManagerFactory::GetForBrowserState( + self.browser->GetBrowserState()->GetOriginalChromeBrowserState()); + self.sharedEditViewMediator = [[AutofillProfileEditMediator alloc] + initWithDelegate:self + personalDataManager:personalDataManager + autofillProfile:_autofillProfile.get() + countryCode:nil + isMigrationPrompt:self.config->is_migration_to_account()]; - modalMediator.editAddressConsumer = editModalViewController; - self.modalMediator = modalMediator; - self.modalViewController = editModalViewController; + LegacyInfobarEditAddressProfileTableViewController* + editModalViewController = + [[LegacyInfobarEditAddressProfileTableViewController alloc] + initWithModalDelegate:modalMediator]; + self.sharedEditViewController = + [[AutofillProfileEditTableViewController alloc] + initWithDelegate:self.sharedEditViewMediator + userEmail:(self.config->user_email() + ? base::SysUTF16ToNSString( + self.config->user_email().value()) + : nil)controller:editModalViewController + settingsView:NO]; + self.sharedEditViewMediator.consumer = self.sharedEditViewController; + editModalViewController.handler = self.sharedEditViewController; - [self configureViewController]; - [self.baseViewController presentViewController:self.viewController - animated:YES - completion:nil]; + modalMediator.editAddressConsumer = editModalViewController; + self.modalMediator = modalMediator; + self.modalViewController = editModalViewController; + + [self configureViewController]; + [self.baseViewController presentViewController:self.viewController + animated:YES + completion:nil]; + } } #pragma mark - AutofillProfileEditMediatorDelegate - (void)autofillEditProfileMediatorDidFinish: (AutofillProfileEditMediator*)mediator { + CHECK(!base::FeatureList::IsEnabled( + kAutofillDynamicallyLoadsFieldsForAddressInput)); } - (void)willSelectCountryWithCurrentlySelectedCountry:(NSString*)country countryList:(NSArray<CountryItem*>*) allCountries { + CHECK(!base::FeatureList::IsEnabled( + kAutofillDynamicallyLoadsFieldsForAddressInput)); AutofillCountrySelectionTableViewController* autofillCountrySelectionTableViewController = [[AutofillCountrySelectionTableViewController alloc] @@ -150,14 +168,18 @@ } - (void)didSaveProfile { + CHECK(!base::FeatureList::IsEnabled( + kAutofillDynamicallyLoadsFieldsForAddressInput)); [self.modalMediator saveEditedProfileWithProfileData:_autofillProfile.get()]; } #pragma mark - AutofillCountrySelectionTableViewControllerDelegate - (void)didSelectCountry:(CountryItem*)selectedCountry { + CHECK(!base::FeatureList::IsEnabled( + kAutofillDynamicallyLoadsFieldsForAddressInput)); [self.modalViewController.navigationController popViewControllerAnimated:YES]; - DCHECK(self.sharedEditViewMediator); + CHECK(self.sharedEditViewMediator); [self.sharedEditViewMediator didSelectCountry:selectedCountry]; }
diff --git a/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.h b/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.h index 26517c2d3..50db54f0 100644 --- a/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.h +++ b/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.h
@@ -22,6 +22,8 @@ // Notification sent when the user finishes a side swipe (on tablet). extern NSString* const kSideSwipeDidStopNotification; +enum class SwipeType { NONE, CHANGE_TAB, CHANGE_PAGE }; + @protocol SideSwipeMediatorDelegate @required // Called when the horizontal stack view is done and should be removed. @@ -87,6 +89,10 @@ // there is an active swipe. - (void)resetContentView; +// Performs an animation that simulates a swipe with `swipeType` in `direction`. +- (void)animateSwipe:(SwipeType)swipeType + inDirection:(UISwipeGestureRecognizerDirection)direction; + @end #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_MEDIATOR_H_
diff --git a/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.mm b/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.mm index e9c6944..459d966 100644 --- a/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.mm +++ b/ios/chrome/browser/ui/side_swipe/side_swipe_mediator.mm
@@ -39,8 +39,6 @@ namespace { -enum class SwipeType { NONE, CHANGE_TAB, CHANGE_PAGE }; - // Swipe starting distance from edge. const CGFloat kSwipeEdge = 20; @@ -189,6 +187,24 @@ [view addGestureRecognizer:_panGestureRecognizer]; } +- (void)animateSwipe:(SwipeType)swipeType + inDirection:(UISwipeGestureRecognizerDirection)direction { + if (_inSwipe || [_swipeDelegate preventSideSwipe]) { + return; + } + switch (swipeType) { + case SwipeType::NONE: + NOTREACHED(); + break; + case SwipeType::CHANGE_PAGE: + [self animatePageNavigationInDirection:direction]; + break; + case SwipeType::CHANGE_TAB: + // TODO(crbug.com/40276959): Implement. + break; + } +} + - (web::WebState*)activeWebState { return self.webStateList ? self.webStateList->GetActiveWebState() : nullptr; } @@ -365,16 +381,53 @@ __weak SideSwipeMediator* weakSelf = self; [_pageSideSwipeView handleHorizontalPan:gesture onOverThresholdCompletion:^{ - [weakSelf handleOverThresholdCompletion:gesture]; + [weakSelf handleOverThresholdCompletion:gesture.direction]; } onUnderThresholdCompletion:^{ [weakSelf handleUnderThresholdCompletion]; }]; } -- (void)handleOverThresholdCompletion:(SideSwipeGestureRecognizer*)gesture { +// Animate page navigation. +- (void)animatePageNavigationInDirection: + (UISwipeGestureRecognizerDirection)direction { + BOOL canNavigate = [self canNavigate:IsSwipingBack(direction)]; + CHECK(canNavigate); + + _inSwipe = YES; + [_swipeDelegate updateAccessoryViewsForSideSwipeWithVisibility:NO]; + + UIView* navigatingView = [_swipeDelegate sideSwipeContentView].superview; + CGRect navigatingBounds = navigatingView.bounds; + CGFloat headerHeight = [_swipeDelegate headerHeightForSideSwipe]; + CGRect navigationFrame = + CGRectMake(CGRectGetMinX(navigatingBounds), + CGRectGetMinY(navigatingBounds) + headerHeight, + CGRectGetWidth(navigatingBounds), + CGRectGetHeight(navigatingBounds) - headerHeight); + + _pageSideSwipeView = [[SideSwipeNavigationView alloc] + initWithFrame:navigationFrame + withDirection:direction + canNavigate:YES + image:[UIImage imageNamed:@"side_swipe_navigation_back"]]; + [_pageSideSwipeView setTargetView:[_swipeDelegate sideSwipeContentView]]; + + [navigatingView insertSubview:_pageSideSwipeView + belowSubview:[_swipeDelegate topToolbarView]]; + + __weak SideSwipeMediator* weakSelf = self; + [_pageSideSwipeView + animateHorizontalPanWithDirection:direction + completionHandler:^{ + [weakSelf handleOverThresholdCompletion:direction]; + }]; +} + +- (void)handleOverThresholdCompletion: + (UISwipeGestureRecognizerDirection)direction { web::WebState* webState = self.activeWebState; - BOOL wantsBack = IsSwipingBack(gesture.direction); + BOOL wantsBack = IsSwipingBack(direction); if (webState) { if (wantsBack) { web_navigation_util::GoBack(webState);
diff --git a/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.h b/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.h index 12494b53a..907d69a 100644 --- a/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.h +++ b/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.h
@@ -26,6 +26,13 @@ - (void)handleHorizontalPan:(SideSwipeGestureRecognizer*)gesture onOverThresholdCompletion:(void (^)(void))onOverThresholdCompletion onUnderThresholdCompletion:(void (^)(void))onUnderThresholdCompletion; + +// Performs an animation on the view that simulates a swipe in `direction` and +// call `completion` when the animation completes. +- (void)animateHorizontalPanWithDirection: + (UISwipeGestureRecognizerDirection)direction + completionHandler:(void (^)(void))completion; + @end #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_NAVIGATION_VIEW_H_
diff --git a/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.mm b/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.mm index bfcfedf..d0558996 100644 --- a/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.mm +++ b/ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.mm
@@ -7,8 +7,6 @@ #import <numbers> #import "base/check.h" -#import "base/metrics/user_metrics.h" -#import "base/metrics/user_metrics_action.h" #import "base/numerics/math_constants.h" #import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" #import "ios/chrome/browser/ui/side_swipe/side_swipe_gesture_recognizer.h" @@ -63,7 +61,7 @@ const CGFloat kSelectionAnimationScale = 26; // The duration of the animations played when the threshold is met. -const CGFloat kSelectionAnimationDuration = 0.5; +const NSTimeInterval kSelectionAnimationDuration = 0.5; UIColor* SelectionCircleColor() { return [UIColor colorNamed:kTextfieldBackgroundColor]; @@ -167,12 +165,13 @@ } - (void)updateFrameAndAnimateContents:(CGFloat)distance - forGesture:(SideSwipeGestureRecognizer*)gesture { + forDirection: + (UISwipeGestureRecognizerDirection)direction { CGFloat width = CGRectGetWidth(self.targetView.bounds); // Immediately set frame size. CGRect frame = self.frame; - if (gesture.direction == UISwipeGestureRecognizerDirectionRight) { + if (direction == UISwipeGestureRecognizerDirectionRight) { frame.size.width = self.targetView.frame.origin.x; frame.origin.x = 0; } else { @@ -192,7 +191,7 @@ CGFloat rotationStart = -CGFloat(std::numbers::pi) / 2; CGFloat rotationEnd = 0; - if (gesture.direction == UISwipeGestureRecognizerDirectionLeft) { + if (direction == UISwipeGestureRecognizerDirectionLeft) { rotationStart = CGFloat(std::numbers::pi) * 1.5; rotationEnd = CGFloat(std::numbers::pi); } @@ -340,7 +339,7 @@ } self.targetView.frame = frame; - [self updateFrameAndAnimateContents:distance forGesture:gesture]; + [self updateFrameAndAnimateContents:distance forDirection:gesture.direction]; if (gesture.state == UIGestureRecognizerStateEnded || gesture.state == UIGestureRecognizerStateCancelled || @@ -351,51 +350,56 @@ // and that the distance including expected velocity is over `threshold`. if (distance > kArrowThreshold && finalDistance > threshold && _canNavigate && gesture.state == UIGestureRecognizerStateEnded) { - TriggerHapticFeedbackForImpact(UIImpactFeedbackStyleMedium); - // Speed up the animation for higher velocity swipes. - CGFloat animationTime = MapValueToRange( + NSTimeInterval animationTime = MapValueToRange( {threshold, width}, {kSelectionAnimationDuration, kSelectionAnimationDuration / 2}, finalDistance); - [self animateTargetViewCompleted:YES - withDirection:gesture.direction - withDuration:animationTime]; - [self explodeSelection:onOverThresholdCompletion]; - if (IsSwipingForward(gesture.direction)) { - base::RecordAction(base::UserMetricsAction( - "MobileEdgeSwipeNavigationForwardCompleted")); - } else { - base::RecordAction( - base::UserMetricsAction("MobileEdgeSwipeNavigationBackCompleted")); - } + [self performNavigationAnimationWithDirection:gesture.direction + duration:animationTime + completionHandler:onOverThresholdCompletion]; } else { [self animateTargetViewCompleted:NO withDirection:gesture.direction withDuration:0.1]; onUnderThresholdCompletion(); - if (IsSwipingForward(gesture.direction)) { - base::RecordAction(base::UserMetricsAction( - "MobileEdgeSwipeNavigationForwardCancelled")); - } else { - base::RecordAction( - base::UserMetricsAction("MobileEdgeSwipeNavigationBackCancelled")); - } } _thresholdTriggered = NO; } } +- (void)animateHorizontalPanWithDirection: + (UISwipeGestureRecognizerDirection)direction + completionHandler:(void (^)(void))completion { + if (!_canNavigate) { + return; + } + CGFloat width = CGRectGetWidth(self.targetView.bounds); + CGFloat distance = width * kSwipeThreshold; + CGRect frame = self.targetView.frame; + if (direction == UISwipeGestureRecognizerDirectionLeft) { + frame.origin.x = -distance; + } else { + frame.origin.x = distance; + } + self.targetView.frame = frame; + + [self updateFrameAndAnimateContents:distance forDirection:direction]; + [self performNavigationAnimationWithDirection:direction + duration:kSelectionAnimationDuration + completionHandler:completion]; +} + - (void)animateTargetViewCompleted:(BOOL)completed withDirection:(UISwipeGestureRecognizerDirection)direction - withDuration:(CGFloat)duration { + withDuration:(NSTimeInterval)duration { __weak SideSwipeNavigationView* weakSelf = self; - CGFloat cleanUpDelay = completed ? kSelectionAnimationDuration - duration : 0; + NSTimeInterval cleanUpDelay = + completed ? kSelectionAnimationDuration - duration : 0; [UIView animateWithDuration:duration animations:^{ [weakSelf handleTargetViewAnimationWithCompleted:completed - withDirection:direction - withDuration:duration]; + withDirection:direction]; } completion:^(BOOL finished) { // Give the other animations time to complete. @@ -410,8 +414,7 @@ - (void)handleTargetViewAnimationWithCompleted:(BOOL)completed withDirection: (UISwipeGestureRecognizerDirection) - direction - withDuration:(CGFloat)duration { + direction { CGRect targetFrame = self.targetView.frame; CGRect frame = self.frame; CGFloat width = CGRectGetWidth(self.targetView.bounds); @@ -437,6 +440,19 @@ [_arrowView setCenter:AlignPointToPixel(center)]; } +// Animate navigation with the duration `animationTime` and execute completion +// handler afterwards. +- (void)performNavigationAnimationWithDirection: + (UISwipeGestureRecognizerDirection)direction + duration:(NSTimeInterval)animationTime + completionHandler:(void (^)(void))block { + TriggerHapticFeedbackForImpact(UIImpactFeedbackStyleMedium); + [self animateTargetViewCompleted:YES + withDirection:direction + withDuration:animationTime]; + [self explodeSelection:block]; +} + - (void)handleTargetViewAnimationCompletion { // Reset target frame. CGRect frame = self.targetView.frame;
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/BUILD.gn b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/BUILD.gn index 3c9f738..725396fe 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/BUILD.gn +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/BUILD.gn
@@ -216,7 +216,6 @@ sources = [ "tab_groups_egtest.mm" ] deps = [ ":tab_groups_constant", - "//base/test:test_support", "//ios/chrome/app/strings", "//ios/chrome/browser/shared/public/features", "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_ui_constants",
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm index b6aba5d..6de4cc7 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm
@@ -101,7 +101,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.view.accessibilityIdentifier = kCreateTabGroupViewIdentifier; + self.view.accessibilityIdentifier = kCreateTabGroupIdentifier; __weak CreateTabGroupViewController* weakSelf = self; auto selectedDefaultButtonTest = @@ -153,8 +153,6 @@ tabGroupTextField.translatesAutoresizingMaskIntoConstraints = NO; tabGroupTextField.autocorrectionType = UITextAutocorrectionTypeNo; tabGroupTextField.spellCheckingType = UITextSpellCheckingTypeNo; - tabGroupTextField.accessibilityIdentifier = - kCreateTabGroupTextFieldIdentifier; tabGroupTextField.text = _title; [tabGroupTextField addTarget:self @@ -247,7 +245,7 @@ buttonConfiguration.attributedTitle = attributedString; cancelButton.configuration = buttonConfiguration; - cancelButton.accessibilityIdentifier = kCreateTabGroupCancelButtonIdentifier; + [cancelButton addTarget:self action:@selector(cancelButtonTapped) forControlEvents:UIControlEventTouchUpInside]; @@ -294,8 +292,7 @@ buttonConfiguration.attributedTitle = attributedString; creationButton.configuration = buttonConfiguration; - creationButton.accessibilityIdentifier = - kCreateTabGroupCreateButtonIdentifier; + [creationButton addTarget:self action:@selector(creationButtonTapped) forControlEvents:UIControlEventTouchUpInside];
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.h b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.h index 0cbfa5ed..821f858 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.h +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.h
@@ -8,10 +8,7 @@ #import <UIKit/UIKit.h> // Accessibility identifier for the tab group creation view. -extern NSString* const kCreateTabGroupViewIdentifier; -extern NSString* const kCreateTabGroupTextFieldIdentifier; -extern NSString* const kCreateTabGroupCreateButtonIdentifier; -extern NSString* const kCreateTabGroupCancelButtonIdentifier; +extern NSString* const kCreateTabGroupIdentifier; // Timing constants for the animations of the TabGroup presentation/dismissal. extern const CGFloat kTabGroupPresentationDuration;
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.mm index c313040..b0b20d3 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.mm
@@ -4,14 +4,7 @@ #import "ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.h" -NSString* const kCreateTabGroupViewIdentifier = - @"kCreateTabGroupViewIdentifier"; -NSString* const kCreateTabGroupTextFieldIdentifier = - @"kCreateTabGroupTextFieldIdentifier"; -NSString* const kCreateTabGroupCreateButtonIdentifier = - @"kCreateTabGroupCreateButtonIdentifier"; -NSString* const kCreateTabGroupCancelButtonIdentifier = - @"kCreateTabGroupCancelButtonIdentifier"; +NSString* const kCreateTabGroupIdentifier = @"CreateTabGroupIdentifier"; const CGFloat kTabGroupPresentationDuration = 0.3; const CGFloat kTabGroupDismissalDuration = 0.25;
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_egtest.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_egtest.mm index e9dde59..bcb281d 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_egtest.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_egtest.mm
@@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "base/test/ios/wait_util.h" #import "ios/chrome/browser/shared/public/features/features.h" #import "ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_constants.h" #import "ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_groups_constants.h" @@ -16,83 +15,6 @@ #import "ios/testing/earl_grey/earl_grey_test.h" #import "ui/base/l10n/l10n_util.h" -namespace { - -// Matcher for the tab group creation view. -id<GREYMatcher> CreateTabGroupViewMatcher() { - return grey_allOf(grey_accessibilityID(kCreateTabGroupViewIdentifier), - grey_sufficientlyVisible(), nil); -} - -// Matcher for the text field in the tab group creation view. -id<GREYMatcher> CreateTabGroupTextFieldMatcher() { - return grey_allOf(grey_accessibilityID(kCreateTabGroupTextFieldIdentifier), - grey_sufficientlyVisible(), nil); -} - -// Matcher for the create button in the tab group creation view. -id<GREYMatcher> CreateTabGroupCreateButtonMatcher() { - return grey_allOf(grey_accessibilityID(kCreateTabGroupCreateButtonIdentifier), - grey_sufficientlyVisible(), nil); -} - -// Matcher for the cancel button in the tab group creation view. -id<GREYMatcher> CreateTabGroupCancelButtonMatcher() { - return grey_allOf(grey_accessibilityID(kCreateTabGroupCancelButtonIdentifier), - grey_sufficientlyVisible(), nil); -} - -// Matcher for tab group grid cell for the given `group_name`. -id<GREYMatcher> TabGroupGridCellMatcherMatcher(NSString* group_name) { - return grey_allOf(grey_accessibilityLabel(group_name), - grey_kindOfClassName(@"GroupGridCell"), - grey_sufficientlyVisible(), nil); -} - -// Checks that the tab group creation view is `visible`. -void WaitForVisibleTabGroupCreationView(bool visible) { - GREYCondition* tabGroupCreationViewVisible = [GREYCondition - conditionWithName:@"Wait for creation view update" - block:^BOOL { - NSError* error; - [[EarlGrey - selectElementWithMatcher:CreateTabGroupViewMatcher()] - assertWithMatcher:visible ? grey_notNil() : grey_nil() - error:&error]; - return error == nil; - }]; - - GREYAssertTrue([tabGroupCreationViewVisible - waitWithTimeout:base::test::ios::kWaitForUIElementTimeout - .InSecondsF()], - visible ? @"Tab Group creation view is not visible" - : @"Tab Group creation view is still visible"); -} - -// Opens the tab group creation view using the long press context menu for the -// tab at `index`. -void OpenTabGroupCreationViewUsingLongPressForCellAtIndex(int index) { - [[EarlGrey - selectElementWithMatcher:chrome_test_util::TabGridCellAtIndex(index)] - performAction:grey_longPress()]; - - [[EarlGrey - selectElementWithMatcher:grey_text(l10n_util::GetPluralNSStringF( - IDS_IOS_CONTENT_CONTEXT_ADDTABTONEWTABGROUP, - 1))] performAction:grey_tap()]; - - WaitForVisibleTabGroupCreationView(true); -} - -// Sets the tab group name in the tab group creation view. -void SetTabGroupCreationName(NSString* group_name) { - [[EarlGrey selectElementWithMatcher:CreateTabGroupTextFieldMatcher()] - performAction:grey_tap()]; - [ChromeEarlGrey simulatePhysicalKeyboardEvent:group_name flags:0]; -} - -} // namespace - // Test Tab Groups feature. @interface TabGroupsTestCase : ChromeTestCase @end @@ -106,46 +28,22 @@ return config; } -// Tests that creates a tab group and opens the grouped tab. -- (void)testCompleteTabGroupCreation { +// Tests if the tab group creation view is displayed after pushing the button in +// the context menu. +- (void)testCreateTabGroupIsDisplayedAfterLongPressATab { [ChromeEarlGreyUI openTabGrid]; - // Open the creation view. - OpenTabGroupCreationViewUsingLongPressForCellAtIndex(0); - SetTabGroupCreationName(@"Group1"); - - // Valid the creation. - [[EarlGrey selectElementWithMatcher:CreateTabGroupCreateButtonMatcher()] - performAction:grey_tap()]; - - WaitForVisibleTabGroupCreationView(false); - - // Open the group. - [[EarlGrey selectElementWithMatcher:TabGroupGridCellMatcherMatcher(@"Group1")] - performAction:grey_tap()]; - - // Open the tab. [[EarlGrey selectElementWithMatcher:chrome_test_util::TabGridCellAtIndex(0)] - performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:chrome_test_util::RegularTabGrid()] - assertWithMatcher:grey_notVisible()]; -} + performAction:grey_longPress()]; -// Tests that cancels a tab group creation. -- (void)testCancelTabGroupCreation { - [ChromeEarlGreyUI openTabGrid]; + [[EarlGrey + selectElementWithMatcher:grey_text(l10n_util::GetPluralNSStringF( + IDS_IOS_CONTENT_CONTEXT_ADDTABTONEWTABGROUP, + 1))] performAction:grey_tap()]; - // Open the creation view. - OpenTabGroupCreationViewUsingLongPressForCellAtIndex(0); - SetTabGroupCreationName(@"Group1"); - - // Cancel the creation. - [[EarlGrey selectElementWithMatcher:CreateTabGroupCancelButtonMatcher()] - performAction:grey_tap()]; - - WaitForVisibleTabGroupCreationView(false); - [[EarlGrey selectElementWithMatcher:TabGroupGridCellMatcherMatcher(@"Group1")] - assertWithMatcher:grey_nil()]; + [[EarlGrey + selectElementWithMatcher:grey_accessibilityID(kCreateTabGroupIdentifier)] + assertWithMatcher:grey_notNil()]; } @end
diff --git a/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm b/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm index 523dda8c..961e24c 100644 --- a/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm +++ b/ios/web_view/internal/autofill/cwv_credit_card_verifier_unittest.mm
@@ -62,7 +62,7 @@ [credit_card_verifier_ didReceiveUnmaskVerificationResult:result]; })); } - void OnUnmaskPromptClosed() override {} + void OnUnmaskPromptCancelled() override {} bool ShouldOfferFidoAuth() const override { return false; } base::WeakPtr<FakeCardUnmaskDelegate> GetWeakPtr() {
diff --git a/media/gpu/v4l2/v4l2_unittest.cc b/media/gpu/v4l2/v4l2_unittest.cc index 65a42d38..161945e 100644 --- a/media/gpu/v4l2/v4l2_unittest.cc +++ b/media/gpu/v4l2/v4l2_unittest.cc
@@ -300,7 +300,7 @@ // Verifies that V4L2Stateful/StatelessVideoDecoder::Initialize() fails when // called with an unsupported codec profile. TYPED_TEST(V4L2FlatVideoDecoderTest, UnsupportedVideoCodec) { - base::test::SingleThreadTaskEnvironment task_environment; + base::test::TaskEnvironment task_environment; MockVideoDecoderMixinClient mock_client; auto decoder = @@ -324,7 +324,7 @@ // Verifies that V4L2Stateful/StatelessVideoDecoder::Initialize() fails after // the limit of created instances exceeds the threshold. TYPED_TEST(V4L2FlatVideoDecoderTest, TooManyDecoderInstances) { - base::test::SingleThreadTaskEnvironment task_environment; + base::test::TaskEnvironment task_environment; ::testing::NiceMock<MockVideoDecoderMixinClient> mock_client; const auto supported_config = TestVideoConfig::Normal(VideoCodec::kH264);
diff --git a/media/mojo/clients/mojo_stable_video_decoder.cc b/media/mojo/clients/mojo_stable_video_decoder.cc index 752724b..2a0593e 100644 --- a/media/mojo/clients/mojo_stable_video_decoder.cc +++ b/media/mojo/clients/mojo_stable_video_decoder.cc
@@ -59,8 +59,8 @@ void MojoStableVideoDecoder::Reset(base::OnceClosure closure) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - // TODO(b/327268445): finish implementing Reset(). - NOTIMPLEMENTED(); + CHECK(!!oop_video_decoder_); + oop_video_decoder_->Reset(std::move(closure)); } bool MojoStableVideoDecoder::NeedsBitstreamConversion() const {
diff --git a/media/mojo/clients/mojo_stable_video_decoder_unittest.cc b/media/mojo/clients/mojo_stable_video_decoder_unittest.cc index 7fd9ea68..e7f978c9 100644 --- a/media/mojo/clients/mojo_stable_video_decoder_unittest.cc +++ b/media/mojo/clients/mojo_stable_video_decoder_unittest.cc
@@ -566,4 +566,34 @@ EXPECT_EQ(decoder_buffer_to_send->side_data()->secure_handle, kSecureHandle); } +TEST_F(MojoStableVideoDecoderTest, Reset) { + const VideoDecoderConfig config = CreateValidSupportedVideoDecoderConfig(); + std::unique_ptr<TestEndpoints> endpoints = + CreateAndInitializeMojoStableVideoDecoder(config); + ASSERT_TRUE(endpoints); + + // First, we'll call MojoStableVideoDecoder::Reset() and store the Reset() + // reply callback as seen by the service to call it later. + StrictMock<base::MockOnceCallback<void()>> reset_cb_to_send; + stable::mojom::StableVideoDecoder::ResetCallback received_reset_cb; + EXPECT_CALL(*endpoints->service(), Reset(_)) + .WillOnce([&](stable::mojom::StableVideoDecoder::ResetCallback callback) { + received_reset_cb = std::move(callback); + }); + media_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&MojoStableVideoDecoder::Reset, + base::Unretained(endpoints->client()), + reset_cb_to_send.Get())); + task_environment_.RunUntilIdle(); + ASSERT_TRUE(Mock::VerifyAndClearExpectations(endpoints->service())); + + // Now we can pretend that the service replies to the Reset() reply callback + // which should get propagated all the way to the |reset_cb_to_send|. + EXPECT_CALL(reset_cb_to_send, Run()).WillOnce([&]() { + EXPECT_TRUE(media_task_runner_->RunsTasksInCurrentSequence()); + }); + std::move(received_reset_cb).Run(); + task_environment_.RunUntilIdle(); +} + } // namespace media
diff --git a/net/base/registry_controlled_domains/effective_tld_names.dat b/net/base/registry_controlled_domains/effective_tld_names.dat index fb126a8..3e106bd7ee 100644 --- a/net/base/registry_controlled_domains/effective_tld_names.dat +++ b/net/base/registry_controlled_domains/effective_tld_names.dat
@@ -6714,7 +6714,7 @@ // newGTLDs -// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-02-08T15:13:14Z +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2024-03-28T15:13:37Z // This list is auto-generated, don't edit it manually. // aaa : American Automobile Association, Inc. // https://www.iana.org/domains/root/db/aaa.html @@ -6992,10 +6992,6 @@ // https://www.iana.org/domains/root/db/autos.html autos -// avianca : Avianca Inc. -// https://www.iana.org/domains/root/db/avianca.html -avianca - // aws : AWS Registry LLC // https://www.iana.org/domains/root/db/aws.html aws @@ -8360,10 +8356,6 @@ // https://www.iana.org/domains/root/db/group.html group -// guardian : The Guardian Life Insurance Company of America -// https://www.iana.org/domains/root/db/guardian.html -guardian - // gucci : Guccio Gucci S.p.a. // https://www.iana.org/domains/root/db/gucci.html gucci @@ -12088,6 +12080,7 @@ // AVM : https://avm.de // Submitted by Andreas Weise <a.weise@avm.de> +myfritz.link myfritz.net // AVStack Pte. Ltd. : https://avstack.io @@ -12225,7 +12218,9 @@ // Canva Pty Ltd : https://canva.com/ // Submitted by Joel Aquilina <publicsuffixlist@canva.com> canva-apps.cn +*.my.canvasite.cn canva-apps.com +*.my.canva.site // Carrd : https://carrd.co // Submitted by AJ <aj@carrd.co> @@ -12380,22 +12375,33 @@ // CDN77.com : http://www.cdn77.com // Submitted by Jan Krpes <jan.krpes@cdn77.com> -c.cdn77.org +cdn77-storage.com +rsc.contentproxy9.cz cdn77-ssl.net r.cdn77.net -rsc.cdn77.org ssl.origin.cdn77-secure.org +c.cdn77.org +rsc.cdn77.org // Cloud DNS Ltd : http://www.cloudns.net -// Submitted by Aleksander Hristov <noc@cloudns.net> +// Submitted by Aleksander Hristov <noc@cloudns.net> & Boyan Peychev <boyan@cloudns.net> cloudns.asia +cloudns.be cloudns.biz -cloudns.club cloudns.cc +cloudns.ch +cloudns.cl +cloudns.club +dnsabr.com +cloudns.cx cloudns.eu cloudns.in cloudns.info +dns-cloud.net +dns-dynamic.net +cloudns.nz cloudns.org +cloudns.ph cloudns.pro cloudns.pw cloudns.us @@ -12408,6 +12414,11 @@ // Submitted by Moritz Marquardt <git@momar.de> codeberg.page +// CodeSandbox B.V. : https://codesandbox.io +// Submitted by Ives van Hoorne <abuse@codesandbox.io> +csb.app +preview.csb.app + // CoDNS B.V. co.nl co.no @@ -12526,6 +12537,7 @@ // Dark, Inc. : https://darklang.com // Submitted by Paul Biggar <ops@darklang.com> builtwithdark.com +darklang.io // DataDetect, LLC. : https://datadetect.com // Submitted by Andrew Banchich <abanchich@sceven.com> @@ -12965,6 +12977,10 @@ // Submitted by <infracloudteam@namecheap.com> *.ewp.live +// Electromagnetic Field : https://www.emfcamp.org +// Submitted by <noc@emfcamp.org> +at.emf.camp + // Elementor : Elementor Ltd. // Submitted by Anton Barkan <antonb@elementor.com> elementor.cloud @@ -13256,7 +13272,8 @@ id.forgerock.io // Framer : https://www.framer.com -// Submitted by Koen Rouwhorst <koenrh@framer.com> +// Submitted by Koen Rouwhorst <security@framer.com> +framer.ai framer.app framercanvas.com framer.media @@ -13297,6 +13314,24 @@ // Submitted by Daniel A. Maierhofer <vorstand@funkfeuer.at> wien.funkfeuer.at +// Future Versatile Group. :https://www.fvg-on.net/ +// T.Kabu <webmaster@fvg-on.net> +daemon.asia +dix.asia +mydns.bz +0am.jp +0g0.jp +0j0.jp +0t0.jp +mydns.jp +pgw.jp +wjg.jp +keyword-on.net +live-on.net +server-on.net +mydns.tw +mydns.vc + // Futureweb GmbH : https://www.futureweb.at // Submitted by Andreas Schnederle-Wagner <schnederle@futureweb.at> *.futurecms.at @@ -13340,6 +13375,12 @@ lab.ms cdn-edges.net +// Getlocalcert: https://www.getlocalcert.net +// Submitted by Robert Alexander <support@getlocalcert.net> +localcert.net +localhostcert.net +corpnet.work + // Ghost Foundation : https://ghost.org // Submitted by Matt Hanley <security@ghost.org> ghost.io @@ -13486,6 +13527,10 @@ zombie.jp heteml.net +// GoDaddy Registry : https://registry.godaddy +// Submitted by Rohan Durrant <tldns@registry.godaddy> +graphic.design + // GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/ // Submitted by Tom Whitwell <gov-uk-paas-support@digital.cabinet-office.gov.uk> cloudapps.digital @@ -13605,6 +13650,10 @@ // Submitted by <domeinnaam@minaz.nl> gov.nl +// GrayJay Web Solutions Inc. : https://grayjaysports.ca +// Submitted by Matt Yamkowy <info@grayjaysports.ca> +grayjayleagues.com + // Group 53, LLC : https://www.group53.com // Submitted by Tyler Todd <noc@nova53.net> awsmppl.com @@ -13639,6 +13688,11 @@ // Submitted by Richard Zowalla <mi-admin@hs-heilbronn.de> pages.it.hs-heilbronn.de +// Helio Networks : https://heliohost.org +// Submitted by Ben Frede <admin@heliohost.org> +helioho.st +heliohost.us + // Hepforge : https://www.hepforge.org // Submitted by David Grellscheid <admin@hepforge.org> hepforge.org @@ -13652,7 +13706,6 @@ // Submitted by Oren Eini <oren@ravendb.net> ravendb.cloud ravendb.community -ravendb.me development.run ravendb.run @@ -13743,7 +13796,7 @@ info.at // info.cx : http://info.cx -// Submitted by Jacob Slater <whois@igloo.to> +// Submitted by June Slater <whois@igloo.to> info.cx // Interlegis : http://www.interlegis.leg.br @@ -13792,6 +13845,14 @@ // Submitted by Matthew Hardeman <mhardeman@ipifony.com> ipifony.net +// is-a.dev : https://www.is-a.dev +// Submitted by William Harrison <admin@maintainers.is-a.dev> +is-a.dev + +// ir.md : https://nic.ir.md +// Submitted by Ali Soizi <info@nic.ir.md> +ir.md + // IServ GmbH : https://iserv.de // Submitted by Mario Hoberg <info@iserv.de> iservschule.de @@ -13973,6 +14034,10 @@ // Submitted by Lelux Admin <publisuffix@lelux.site> lelux.site +// Libre IT Ltd : https://libre.nz +// Submitted by Tomas Maggio <support@libre.nz> +runcontainers.dev + // Lifetime Hosting : https://Lifetime.Hosting/ // Submitted by Mike Fillator <support@lifetime.hosting> co.business @@ -14147,7 +14212,7 @@ // Managed by Corporate Domains // Microsoft Azure : https://home.azure *.azurecontainer.io -*.cloudapp.azure.com +cloudapp.azure.com azure-api.net azureedge.net azurefd.net @@ -14254,13 +14319,18 @@ torun.pl // Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/ -// Submitted by Nicholas Ford <nick@nimbushosting.co.uk> +// Submitted by Nicholas Ford <dev@nimbushosting.co.uk> nh-serv.co.uk +nimsite.uk // NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ // Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net> nfshost.com +// NFT.Storage : https://nft.storage/ +// Submitted by Vasco Santos <vasco.santos@protocol.ai> or <support@nft.storage> +ipfs.nftstorage.link + // Noop : https://noop.app // Submitted by Nathaniel Schweinberg <noop@rearc.io> *.developer.app @@ -14440,7 +14510,6 @@ 123minsida.se 123miweb.es 123paginaweb.pt -123sait.ru 123siteweb.fr 123webseite.at 123webseite.de @@ -14458,6 +14527,13 @@ // Submitted by Eddie Jones <eddie@onefoldmedia.com> nid.io +// Open Domains : https://open-domains.net +// Submitted by William Harrison <admin@open-domains.net> +is-cool.dev +is-not-a.dev +localplayer.dev +is-local.org + // Open Social : https://www.getopensocial.com/ // Submitted by Alexander Varwijk <security@getopensocial.com> opensocial.site @@ -14478,6 +14554,11 @@ // Submitted by Alexandre Linte <alexandre.linte@orange.com> tech.orange +// OsSav Technology Ltd. : https://ossav.com/ +// TLD Nic: http://nic.can.re - TLD Whois Server: whois.can.re +// Submitted by OsSav Technology Ltd. <support@ossav.com> +can.re + // Oursky Limited : https://authgear.com/, https://skygear.io/ // Submitted by Authgear Team <hello@authgear.com>, Skygear Developer <hello@skygear.io> authgear-staging.com @@ -14528,10 +14609,14 @@ // pcarrier.ca Software Inc: https://pcarrier.ca/ // Submitted by Pierre Carrier <pc@rrier.ca> +*.xmit.co bar0.net bar1.net bar2.net rdv.to +srv.us +gh.srv.us +gl.srv.us // .pl domains (grandfathered) art.pl @@ -14921,6 +15006,10 @@ // Submitted by Shante Adam <shante@skyhat.io> scrysec.com +// Scrypted : https://scrypted.app +// Submitted by Koushik Dutta <public-suffix-list@scrypted.app> +client.scrypted.io + // Securepoint GmbH : https://www.securepoint.de // Submitted by Erik Anders <erik.anders@securepoint.de> firewall-gateway.com @@ -15030,9 +15119,9 @@ vp4.me // Snowflake Inc : https://www.snowflake.com/ -// Submitted by Faith Olapade <faith.olapade@snowflake.com> -snowflake.app -privatelink.snowflake.app +// Submitted by Sam Haar <psl@snowflake.com> +*.snowflake.app +*.privatelink.snowflake.app streamlit.app streamlitapp.com @@ -15044,6 +15133,12 @@ // Submitted by Drew DeVault <sir@cmpwn.com> srht.site +// StackBlitz : https://stackblitz.com +// Submitted by Dominic Elm <hello@stackblitz.com> +w-corp-staticblitz.com +w-credentialless-staticblitz.com +w-staticblitz.com + // Stackhero : https://www.stackhero.io // Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io> stackhero-network.com @@ -15345,6 +15440,10 @@ // Submitted by ITComdomains <to@it.com> it.com +// Unison Computing, PBC : https://unison.cloud +// Submitted by Simon Højberg <security@unison.cloud> +unison-services.cloud + // UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/ // see also: whois -h whois.udr.org.yt help // Submitted by Atanunu Igbunuroghene <publicsuffixlist@udr.org.yt> @@ -15463,6 +15562,10 @@ bookonline.app hotelwithflight.com +// WebWaddle Ltd: https://webwaddle.com/ +// Submitted by Merlin Glander <hostmaster@webwaddle.com> +*.wadl.top + // WeDeploy by Liferay, Inc. : https://www.wedeploy.com // Submitted by Henrique Vicente <security@wedeploy.com> wedeploy.io
diff --git a/net/base/registry_controlled_domains/effective_tld_names.gperf b/net/base/registry_controlled_domains/effective_tld_names.gperf index 4f3186e..42b9ac7 100644 --- a/net/base/registry_controlled_domains/effective_tld_names.gperf +++ b/net/base/registry_controlled_domains/effective_tld_names.gperf
@@ -14,8 +14,12 @@ 0.bg, 0 001.test.code-builder-stg.platform.salesforce.com, 6 001www.com, 4 +0am.jp, 4 0e.vc, 4 0emm.com, 6 +0g0.jp, 4 +0j0.jp, 4 +0t0.jp, 4 1.azurestaticapps.net, 4 1.bg, 0 123hjemmeside.dk, 4 @@ -25,7 +29,6 @@ 123minsida.se, 4 123miweb.es, 4 123paginaweb.pt, 4 -123sait.ru, 4 123siteweb.fr, 4 123webseite.at, 4 123webseite.de, 4 @@ -523,6 +526,7 @@ asuke.aichi.jp, 0 at, 0 at-band-camp.net, 4 +at.emf.camp, 4 at.eu.org, 4 at.it, 0 at.md, 4 @@ -593,7 +597,6 @@ av.tr, 0 avellino.it, 0 averoy.no, 0 -avianca, 0 avocat.fr, 4 avocat.pro, 0 avocats.bj, 0 @@ -1105,6 +1108,7 @@ campinagrande.br, 0 campinas.br, 0 campobasso.it, 0 +can.re, 4 canary.replit.dev, 4 candypop.jp, 4 canon, 0 @@ -1217,6 +1221,7 @@ cdn-edges.net, 4 cdn.prod.atlassian-dev.net, 4 cdn77-ssl.net, 4 +cdn77-storage.com, 4 ce.gov.br, 0 ce.it, 0 ce.leg.br, 4 @@ -1339,6 +1344,7 @@ cleverapps.io, 4 click, 0 clickrising.net, 4 +client.scrypted.io, 4 clinic, 0 clinique, 0 clothing, 0 @@ -1354,7 +1360,7 @@ cloud66.zone, 4 cloudaccess.host, 4 cloudaccess.net, 4 -cloudapp.azure.com, 6 +cloudapp.azure.com, 4 cloudapp.net, 4 cloudapps.digital, 4 cloudcontrolapp.com, 4 @@ -1365,13 +1371,19 @@ cloudfunctions.net, 4 cloudjiffy.net, 4 cloudns.asia, 4 +cloudns.be, 4 cloudns.biz, 4 cloudns.cc, 4 +cloudns.ch, 4 +cloudns.cl, 4 cloudns.club, 4 +cloudns.cx, 4 cloudns.eu, 4 cloudns.in, 4 cloudns.info, 4 +cloudns.nz, 4 cloudns.org, 4 +cloudns.ph, 4 cloudns.pro, 4 cloudns.pw, 4 cloudns.us, 4 @@ -1678,6 +1690,7 @@ coop.tt, 0 cooperativa.bo, 0 copro.uk, 4 +corpnet.work, 4 corsica, 0 cosenza.it, 0 couchpotatofries.org, 4 @@ -1717,6 +1730,7 @@ cs.in, 0 cs.it, 0 cs.keliweb.cloud, 4 +csb.app, 4 csx.cc, 4 ct.it, 0 ct.us, 0 @@ -1766,6 +1780,7 @@ dad, 0 daegu.kr, 0 daejeon.kr, 0 +daemon.asia, 4 daemon.panel.gg, 4 dagestan.ru, 4 dagestan.su, 4 @@ -1780,6 +1795,7 @@ dance, 0 daplie.me, 4 dapps.earth, 6 +darklang.io, 4 data, 0 database.run, 6 date, 0 @@ -1901,6 +1917,7 @@ ditchyourip.com, 4 divtasvuodna.no, 0 divttasvuotna.no, 0 +dix.asia, 4 diy, 0 dj, 0 dk, 0 @@ -1912,6 +1929,9 @@ dni.us, 0 dnipropetrovsk.ua, 0 dnp, 0 +dns-cloud.net, 4 +dns-dynamic.net, 4 +dnsabr.com, 4 dnsalias.com, 4 dnsalias.net, 4 dnsalias.org, 4 @@ -2645,6 +2665,7 @@ fr.eu.org, 4 fr.it, 0 fra1-de.cloudjiffy.net, 4 +framer.ai, 4 framer.app, 4 framer.media, 4 framer.photos, 4 @@ -2882,6 +2903,7 @@ ggee, 0 ggf.br, 0 gh, 0 +gh.srv.us, 4 ghost.io, 4 gi, 0 gialai.vn, 0 @@ -2914,6 +2936,7 @@ gjesdal.no, 0 gjovik.no, 0 gl, 0 +gl.srv.us, 4 glass, 0 gle, 0 gleeze.com, 4 @@ -3156,10 +3179,12 @@ gran.no, 0 grane.no, 0 granvin.no, 0 +graphic.design, 4 graphics, 0 graphox.us, 4 gratangen.no, 0 gratis, 0 +grayjayleagues.com, 4 greater.jp, 4 green, 0 greta.fr, 0 @@ -3209,7 +3234,6 @@ gu, 0 gu.us, 0 guam.gu, 0 -guardian, 0 gub.uy, 0 gucci, 0 guge, 0 @@ -3333,6 +3357,8 @@ heavy.jp, 4 heguri.nara.jp, 0 hekinan.aichi.jp, 0 +helioho.st, 4 +heliohost.us, 4 help, 0 helsinki, 0 hemne.no, 0 @@ -3787,10 +3813,12 @@ iopsys.se, 4 ip.linodeusercontent.com, 4 ip6.arpa, 0 +ipfs.nftstorage.link, 4 ipifony.net, 4 ipiranga, 0 iq, 0 ir, 0 +ir.md, 4 iris.arpa, 0 irish, 0 iruma.saitama.jp, 0 @@ -3843,6 +3871,7 @@ is-a-teacher.com, 4 is-a-techie.com, 4 is-a-therapist.com, 4 +is-a.dev, 4 is-an-accountant.com, 4 is-an-actor.com, 4 is-an-actress.com, 4 @@ -3852,6 +3881,7 @@ is-an-entertainer.com, 4 is-by.us, 4 is-certified.com, 4 +is-cool.dev, 4 is-found.org, 4 is-gone.com, 4 is-into-anime.com, 4 @@ -3859,7 +3889,9 @@ is-into-cartoons.com, 4 is-into-games.com, 4 is-leet.com, 4 +is-local.org, 4 is-lost.org, 4 +is-not-a.dev, 4 is-not-certified.com, 4 is-saved.org, 4 is-slick.com, 4 @@ -4274,6 +4306,7 @@ kerryproperties, 0 ketrzyn.pl, 0 keymachine.de, 4 +keyword-on.net, 4 kfh, 0 kg, 0 kg.kr, 0 @@ -4716,6 +4749,7 @@ lipsy, 0 littlestar.jp, 4 live, 0 +live-on.net, 4 living, 0 livorno.it, 0 lk, 0 @@ -4727,7 +4761,10 @@ loabat.no, 0 loan, 0 loans, 0 +localcert.net, 4 localhost.daplie.me, 4 +localhostcert.net, 4 +localplayer.dev, 4 localzone.xyz, 4 locker, 0 locus, 0 @@ -5340,6 +5377,8 @@ my-router.de, 4 my-vigor.de, 4 my-wan.de, 4 +my.canva.site, 6 +my.canvasite.cn, 6 my.eu.org, 4 my.id, 0 myactivedirectory.com, 4 @@ -5351,6 +5390,10 @@ mydatto.net, 4 myddns.rocks, 4 mydissent.net, 4 +mydns.bz, 4 +mydns.jp, 4 +mydns.tw, 4 +mydns.vc, 4 mydobiss.com, 4 mydrobo.com, 4 myds.me, 4 @@ -5359,6 +5402,7 @@ myfast.space, 4 myfirewall.org, 4 myforum.community, 4 +myfritz.link, 4 myfritz.net, 4 myftp.biz, 4 myftp.org, 4 @@ -5761,6 +5805,7 @@ nikko.tochigi.jp, 0 nikolaev.ua, 0 nikon, 0 +nimsite.uk, 4 ninhbinh.vn, 0 ninhthuan.vn, 0 ninja, 0 @@ -6501,6 +6546,7 @@ pg.it, 0 pgafan.net, 4 pgfog.com, 4 +pgw.jp, 4 ph, 0 pharmacien.fr, 4 pharmaciens.km, 0 @@ -6637,6 +6683,7 @@ presse.ci, 0 presse.km, 0 presse.ml, 0 +preview.csb.app, 4 pri.ee, 0 prime, 0 primetel.cloud, 4 @@ -6648,7 +6695,7 @@ priv.no, 0 priv.pl, 0 private.repost.aws, 6 -privatelink.snowflake.app, 4 +privatelink.snowflake.app, 6 privatizehealthinsurance.net, 4 pro, 0 pro.az, 0 @@ -6781,7 +6828,6 @@ rauma.no, 0 ravendb.cloud, 4 ravendb.community, 4 -ravendb.me, 4 ravendb.run, 4 ravenna.it, 0 ravpage.co.il, 4 @@ -6943,6 +6989,7 @@ rs.leg.br, 4 rs.webaccel.jp, 4 rsc.cdn77.org, 4 +rsc.contentproxy9.cz, 4 rss.my.id, 6 rsvp, 0 ru, 0 @@ -6954,6 +7001,7 @@ rulez.jp, 4 run, 0 run.app, 6 +runcontainers.dev, 4 runs.onstackit.cloud, 4 ruovat.no, 0 rv.ua, 0 @@ -7519,6 +7567,7 @@ servep2p.com, 4 servepics.com, 4 servequake.com, 4 +server-on.net, 4 servername.us, 4 servers.run, 4 servesarcasm.com, 4 @@ -7744,7 +7793,7 @@ sncf, 0 snillfjord.no, 0 snoasa.no, 0 -snowflake.app, 4 +snowflake.app, 6 so, 0 so.gov.pl, 0 so.it, 0 @@ -7827,6 +7876,7 @@ srht.site, 4 srl, 0 srv.br, 0 +srv.us, 4 ss, 0 ss.it, 0 ssl.origin.cdn77-secure.org, 4 @@ -8562,6 +8612,7 @@ unicloud.pl, 4 unicom, 0 union.aero, 0 +unison-services.cloud, 4 univ.bj, 0 univ.sn, 0 university, 0 @@ -8833,6 +8884,9 @@ vultrobjects.com, 6 vv.it, 0 vxl.sh, 4 +w-corp-staticblitz.com, 4 +w-credentialless-staticblitz.com, 4 +w-staticblitz.com, 4 w.bg, 0 w.se, 0 wa.au, 0 @@ -8840,6 +8894,7 @@ wa.gov.au, 0 wa.us, 0 wada.nagano.jp, 0 +wadl.top, 6 wafflecell.com, 4 wajiki.tokushima.jp, 0 wajima.ishikawa.jp, 0 @@ -8993,6 +9048,7 @@ wix.run, 4 wixsite.com, 4 wixstudio.io, 4 +wjg.jp, 4 wkz.gov.pl, 0 wlocl.pl, 0 wloclawek.pl, 0 @@ -9049,6 +9105,7 @@ xii.jp, 4 xin, 0 xj.cn, 0 +xmit.co, 6 xn--0trq7p7nn.jp, 0 xn--11b4c3d, 0 xn--12c1fe0br.xn--o3cw4h, 0
diff --git a/net/cert/internal/system_trust_store.cc b/net/cert/internal/system_trust_store.cc index 0722863..f4603de 100644 --- a/net/cert/internal/system_trust_store.cc +++ b/net/cert/internal/system_trust_store.cc
@@ -4,27 +4,20 @@ #include "net/cert/internal/system_trust_store.h" -#include "base/memory/ptr_util.h" -#include "build/build_config.h" -#include "crypto/crypto_buildflags.h" - -#if BUILDFLAG(USE_NSS_CERTS) -#include "net/cert/internal/system_trust_store_nss.h" -#endif // BUILDFLAG(USE_NSS_CERTS) - -#if BUILDFLAG(IS_MAC) -#include <Security/Security.h> -#endif - #include <memory> +#include <optional> +#include <vector> #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/memory/ptr_util.h" #include "base/no_destructor.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" +#include "base/threading/thread_restrictions.h" #include "build/build_config.h" +#include "crypto/crypto_buildflags.h" #include "net/cert/x509_certificate.h" #include "net/cert/x509_util.h" #include "third_party/boringssl/src/pki/cert_errors.h" @@ -33,8 +26,11 @@ #include "third_party/boringssl/src/pki/trust_store_in_memory.h" #if BUILDFLAG(USE_NSS_CERTS) +#include "net/cert/internal/system_trust_store_nss.h" #include "net/cert/internal/trust_store_nss.h" #elif BUILDFLAG(IS_MAC) +#include <Security/Security.h> + #include "net/base/features.h" #include "net/cert/internal/trust_store_mac.h" #include "net/cert/x509_util_apple.h" @@ -52,6 +48,63 @@ namespace net { +#if BUILDFLAG(IS_CHROMEOS) +namespace internal { +class PemFileCertStore { + public: + explicit PemFileCertStore(std::string_view file_name) { + // This will block on the cert verifier service thread, so the effect will + // just be to block any cert verifications (interactions with the cert + // verifier service are async mojo calls, so it shouldn't block the browser + // UI). There would be no benefit to moving this to a worker thread, since + // all cert verifications would still need to block on loading of the roots + // to complete. + base::ScopedAllowBlocking allow_blocking; + std::optional<std::vector<uint8_t>> certs_file = + base::ReadFileToBytes(base::FilePath(file_name)); + if (!certs_file) { + return; + } + + trust_store_ = std::make_unique<bssl::TrustStoreInMemory>(); + + CertificateList certs = X509Certificate::CreateCertificateListFromBytes( + *certs_file, X509Certificate::FORMAT_AUTO); + + for (const auto& cert : certs) { + bssl::CertErrors errors; + auto parsed = bssl::ParsedCertificate::Create( + bssl::UpRef(cert->cert_buffer()), + x509_util::DefaultParseCertificateOptions(), &errors); + if (!parsed) { + LOG(ERROR) << file_name << ": " << errors.ToDebugString(); + continue; + } + trust_store_->AddTrustAnchor(std::move(parsed)); + } + } + + bssl::TrustStoreInMemory* trust_store() { return trust_store_.get(); } + + private: + std::unique_ptr<bssl::TrustStoreInMemory> trust_store_; +}; +} // namespace internal + +namespace { + +// On ChromeOS look for a PEM file of root CA certs to trust which may be +// present on test images. +bssl::TrustStoreInMemory* GetChromeOSTestTrustStore() { + constexpr char kCrosTestRootCertsFile[] = "/etc/fake_root_ca_certs.pem"; + static base::NoDestructor<internal::PemFileCertStore> cros_test_roots{ + kCrosTestRootCertsFile}; + return cros_test_roots->trust_store(); +} + +} // namespace +#endif + #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) class SystemTrustStoreChromeOnly : public SystemTrustStore { public: @@ -99,6 +152,11 @@ std::unique_ptr<TrustStoreChrome> trust_store_chrome, bssl::TrustStore* trust_store_system) : trust_store_chrome_(std::move(trust_store_chrome)) { +#if BUILDFLAG(IS_CHROMEOS) + if (GetChromeOSTestTrustStore()) { + trust_store_collection_.AddTrustStore(GetChromeOSTestTrustStore()); + } +#endif trust_store_collection_.AddTrustStore(trust_store_system); trust_store_collection_.AddTrustStore(trust_store_chrome_.get()); }
diff --git a/net/http/transport_security_state_static.pins b/net/http/transport_security_state_static.pins index 9a7c235..21c649c 100644 --- a/net/http/transport_security_state_static.pins +++ b/net/http/transport_security_state_static.pins
@@ -43,9 +43,9 @@ # hash function for preloaded entries again (we have already done so once). # -# Last updated: 2024-04-10 12:54 UTC +# Last updated: 2024-04-11 12:55 UTC PinsListTimestamp -1712753661 +1712840121 TestSPKI sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
diff --git a/net/http/transport_security_state_static_pins.json b/net/http/transport_security_state_static_pins.json index e2216c3..ccb03e14 100644 --- a/net/http/transport_security_state_static_pins.json +++ b/net/http/transport_security_state_static_pins.json
@@ -31,7 +31,7 @@ // the 'static_spki_hashes' and 'bad_static_spki_hashes' fields in 'pinsets' // refer to, and the timestamp at which the pins list was last updated. // -// Last updated: 2024-04-10 12:54 UTC +// Last updated: 2024-04-11 12:55 UTC // { "pinsets": [
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc index de1b6b8..fe88426 100644 --- a/net/quic/quic_chromium_client_session.cc +++ b/net/quic/quic_chromium_client_session.cc
@@ -1051,6 +1051,9 @@ UMA_HISTOGRAM_ENUMERATION( "Net.QuicSession.EcnMarksObserved", static_cast<EcnPermutations>(observed_incoming_ecn_)); + UMA_HISTOGRAM_COUNTS_10M( + "Net.QuicSession.PacketsBeforeEcnTransition", + observed_ecn_transition_ ? incoming_packets_before_ecn_transition_ : 0); UMA_HISTOGRAM_COUNTS_1M("Net.QuicSession.NumTotalStreams", num_total_streams_); @@ -3596,8 +3599,16 @@ const quic::QuicSocketAddress& local_address, const quic::QuicSocketAddress& peer_address) { ProcessUdpPacket(local_address, peer_address, packet); - observed_incoming_ecn_ |= + uint8_t new_incoming_ecn = (0x1 << static_cast<uint8_t>(packet.ecn_codepoint())); + if (new_incoming_ecn != observed_incoming_ecn_ && + incoming_packets_before_ecn_transition_ > 0) { + observed_ecn_transition_ = true; + } + if (!observed_ecn_transition_) { + ++incoming_packets_before_ecn_transition_; + } + observed_incoming_ecn_ |= new_incoming_ecn; if (!connection()->connected()) { NotifyFactoryOfSessionClosedLater(); return false;
diff --git a/net/quic/quic_chromium_client_session.h b/net/quic/quic_chromium_client_session.h index f1cc51bc..24b6dd4 100644 --- a/net/quic/quic_chromium_client_session.h +++ b/net/quic/quic_chromium_client_session.h
@@ -1156,6 +1156,14 @@ // end of the session. uint8_t observed_incoming_ecn_ = 0; + // The number of incoming packets in this session before it observes a change + // in the incoming packet ECN marking. + uint64_t incoming_packets_before_ecn_transition_ = 0; + + // When true, the session has observed a transition and can stop incrementing + // incoming_packets_before_ecn_transition_. + bool observed_ecn_transition_ = false; + base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_{this}; };
diff --git a/remoting/host/desktop_geometry.h b/remoting/host/desktop_geometry.h index 9ff922e..69044c5 100644 --- a/remoting/host/desktop_geometry.h +++ b/remoting/host/desktop_geometry.h
@@ -14,6 +14,18 @@ const DesktopScreenId kFullDesktopScreenId = -1; +class DesktopResolution { + public: + DesktopResolution(gfx::Size dimensions, gfx::Vector2d dpi) + : dimensions_(dimensions), dpi_(dpi) {} + const gfx::Size dimensions() const { return dimensions_; } + const gfx::Vector2d dpi() const { return dpi_; } + + private: + gfx::Size dimensions_; + gfx::Vector2d dpi_; +}; + class DesktopLayout { public: DesktopLayout(std::optional<int64_t> screen_id,
diff --git a/remoting/host/desktop_resizer_x11.cc b/remoting/host/desktop_resizer_x11.cc index 393cbb38..afa396d 100644 --- a/remoting/host/desktop_resizer_x11.cc +++ b/remoting/host/desktop_resizer_x11.cc
@@ -4,31 +4,79 @@ #include "remoting/host/desktop_resizer_x11.h" +#include <optional> + +#include "base/ranges/algorithm.h" +#include "remoting/host/base/screen_resolution.h" +#include "remoting/host/desktop_geometry.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/vector2d.h" + namespace remoting { +namespace { + +ScreenResolution DesktopResolutionToScreenResolution( + const DesktopResolution& resolution) { + return ScreenResolution( + webrtc::DesktopSize(resolution.dimensions().width(), + resolution.dimensions().height()), + webrtc::DesktopVector(resolution.dpi().x(), resolution.dpi().y())); +} + +DesktopResolution ScreenResolutionToDesktopResolution( + const ScreenResolution& resolution) { + return DesktopResolution( + gfx::Size(resolution.dimensions().width(), + resolution.dimensions().height()), + gfx::Vector2d(resolution.dpi().x(), resolution.dpi().y())); +} + +} // namespace + DesktopResizerX11::DesktopResizerX11() = default; DesktopResizerX11::~DesktopResizerX11() = default; // DesktopResizer interface ScreenResolution DesktopResizerX11::GetCurrentResolution( webrtc::ScreenId screen_id) { - return resizer_.GetCurrentResolution(screen_id); + return DesktopResolutionToScreenResolution( + resizer_.GetCurrentResolution(static_cast<DesktopScreenId>(screen_id))); } std::list<ScreenResolution> DesktopResizerX11::GetSupportedResolutions( const ScreenResolution& preferred, webrtc::ScreenId screen_id) { - return resizer_.GetSupportedResolutions(preferred, screen_id); + std::list<DesktopResolution> resolutions = resizer_.GetSupportedResolutions( + ScreenResolutionToDesktopResolution(preferred), screen_id); + std::list<ScreenResolution> result; + base::ranges::transform(resolutions, std::back_inserter(result), + DesktopResolutionToScreenResolution); + return result; } void DesktopResizerX11::SetResolution(const ScreenResolution& resolution, webrtc::ScreenId screen_id) { - resizer_.SetResolution(resolution, screen_id); + resizer_.SetResolution(ScreenResolutionToDesktopResolution(resolution), + screen_id); } void DesktopResizerX11::RestoreResolution(const ScreenResolution& original, webrtc::ScreenId screen_id) { - resizer_.SetResolution(original, screen_id); + resizer_.SetResolution(ScreenResolutionToDesktopResolution(original), + screen_id); } void DesktopResizerX11::SetVideoLayout(const protocol::VideoLayout& layout) { - resizer_.SetVideoLayout(layout); + DesktopLayoutSet desktop_layouts; + if (layout.has_primary_screen_id()) { + desktop_layouts.primary_screen_id = layout.primary_screen_id(); + } + for (const auto& track : layout.video_track()) { + desktop_layouts.layouts.emplace_back( + track.has_screen_id() ? std::make_optional(track.screen_id()) + : std::nullopt, + gfx::Rect(track.position_x(), track.position_y(), track.width(), + track.height()), + gfx::Vector2d(track.x_dpi(), track.y_dpi())); + } + resizer_.SetVideoLayout(desktop_layouts); } } // namespace remoting
diff --git a/remoting/host/x11_desktop_resizer.cc b/remoting/host/x11_desktop_resizer.cc index 70004ed..91e8a9b 100644 --- a/remoting/host/x11_desktop_resizer.cc +++ b/remoting/host/x11_desktop_resizer.cc
@@ -16,20 +16,14 @@ #include "base/containers/contains.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/system/sys_info.h" #include "base/types/cxx23_to_underlying.h" #include "remoting/base/logging.h" -#include "remoting/host/desktop_display_layout_util.h" #include "remoting/host/desktop_geometry.h" #include "remoting/host/linux/x11_util.h" #include "remoting/host/x11_crtc_resizer.h" #include "remoting/host/x11_display_util.h" -#include "remoting/proto/control.pb.h" -#include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h" -#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" -#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/vector2d.h" #include "ui/gfx/x/future.h" #include "ui/gfx/x/randr.h" @@ -85,8 +79,8 @@ // Returns a physical size in mm that will work well with GNOME's // automatic scale-selection algorithm. -webrtc::DesktopSize CalculateSizeInMmForGnome( - const remoting::ScreenResolution& resolution) { +gfx::Size CalculateSizeInMmForGnome( + const remoting::DesktopResolution& resolution) { int width_mm = PixelsToMillimeters(resolution.dimensions().width(), resolution.dpi().x()); int height_mm = PixelsToMillimeters(resolution.dimensions().height(), @@ -194,8 +188,8 @@ X11DesktopResizer::~X11DesktopResizer() = default; -ScreenResolution X11DesktopResizer::GetCurrentResolution( - webrtc::ScreenId screen_id) { +DesktopResolution X11DesktopResizer::GetCurrentResolution( + DesktopScreenId screen_id) { // Process pending events so that the connection setup data is updated // with the correct display metrics. if (has_randr_) { @@ -207,30 +201,28 @@ auto reply = randr_->GetMonitors({root_}).Sync(); if (reply) { for (const auto& monitor : reply->monitors) { - if (static_cast<webrtc::ScreenId>(monitor.name) != screen_id) { + if (static_cast<DesktopScreenId>(monitor.name) != screen_id) { continue; } - gfx::Vector2d dpi = GetMonitorDpi(monitor); - return ScreenResolution( - webrtc::DesktopSize(monitor.width, monitor.height), - webrtc::DesktopVector(dpi.x(), dpi.y())); + return DesktopResolution(gfx::Size(monitor.width, monitor.height), + GetMonitorDpi(monitor)); } } LOG(ERROR) << "Cannot find current resolution for screen ID " << screen_id << ". Resolution of the default screen will be returned."; - ScreenResolution result( - webrtc::DesktopSize(connection_->default_screen().width_in_pixels, - connection_->default_screen().height_in_pixels), - webrtc::DesktopVector(kDefaultDPI, kDefaultDPI)); + DesktopResolution result( + gfx::Size(connection_->default_screen().width_in_pixels, + connection_->default_screen().height_in_pixels), + gfx::Vector2d(kDefaultDPI, kDefaultDPI)); return result; } -std::list<ScreenResolution> X11DesktopResizer::GetSupportedResolutions( - const ScreenResolution& preferred, - webrtc::ScreenId screen_id) { - std::list<ScreenResolution> result; +std::list<DesktopResolution> X11DesktopResizer::GetSupportedResolutions( + const DesktopResolution& preferred, + DesktopScreenId screen_id) { + std::list<DesktopResolution> result; if (!has_randr_ || !is_virtual_session_) { return result; } @@ -245,15 +237,14 @@ response->min_height, response->max_height); // Additionally impose a minimum size of 640x480, since anything smaller // doesn't seem very useful. - result.emplace_back( - webrtc::DesktopSize(std::max(640, width), std::max(480, height)), - preferred.dpi()); + result.emplace_back(gfx::Size(std::max(640, width), std::max(480, height)), + preferred.dpi()); } return result; } -void X11DesktopResizer::SetResolution(const ScreenResolution& resolution, - webrtc::ScreenId screen_id) { +void X11DesktopResizer::SetResolution(const DesktopResolution& resolution, + DesktopScreenId screen_id) { if (!has_randr_ || !is_virtual_session_) { return; } @@ -274,7 +265,7 @@ } for (const auto& monitor : reply->monitors) { - if (static_cast<webrtc::ScreenId>(monitor.name) != screen_id) { + if (static_cast<DesktopScreenId>(monitor.name) != screen_id) { continue; } @@ -305,27 +296,24 @@ LOG(ERROR) << "Monitor " << screen_id << " not found."; } -void X11DesktopResizer::RestoreResolution(const ScreenResolution& original, - webrtc::ScreenId screen_id) { +void X11DesktopResizer::RestoreResolution(const DesktopResolution& original, + DesktopScreenId screen_id) { SetResolution(original, screen_id); } -void X11DesktopResizer::SetVideoLayout(const protocol::VideoLayout& layout) { +std::vector<DesktopLayoutWithContext> +X11DesktopResizer::GetLayoutWithContext() { if (!has_randr_ || !is_virtual_session_) { - return; + return std::vector<DesktopLayoutWithContext>(); } - // Grab the X server while we're changing the display resolution. This ensures - // that the display configuration doesn't change under our feet. - ScopedXGrabServer grabber(connection_); - if (!resources_.Refresh(randr_, root_)) { - return; + return std::vector<DesktopLayoutWithContext>(); } auto reply = randr_->GetMonitors({root_}).Sync(); if (!reply) { - return; + return std::vector<DesktopLayoutWithContext>(); } std::vector<DesktopLayoutWithContext> current_displays; @@ -339,26 +327,38 @@ {.layout = ToVideoTrackLayout(monitor), .context = &monitor}); } } + return current_displays; +} - // Convert VideoLayout to DesktopLayoutSet. - DesktopLayoutSet desktop_layout; - for (const auto& video_track : layout.video_track()) { - desktop_layout.layouts.emplace_back( - video_track.screen_id(), - gfx::Rect(video_track.position_x(), video_track.position_y(), - video_track.width(), video_track.height()), - gfx::Vector2d(video_track.x_dpi(), video_track.y_dpi())); +DesktopLayoutSet X11DesktopResizer::GetLayout() { + DesktopLayoutSet result; + for (const auto& layout : GetLayoutWithContext()) { + result.layouts.emplace_back(layout.layout); } + return result; +} + +void X11DesktopResizer::SetVideoLayout(const DesktopLayoutSet& layout) { + if (!has_randr_ || !is_virtual_session_) { + return; + } + // Grab the X server while we're changing the display resolution. This ensures + // that the display configuration doesn't change under our feet. + ScopedXGrabServer grabber(connection_); + + std::vector<x11::RandR::MonitorInfo> monitor_infos; + std::vector<DesktopLayoutWithContext> current_displays = + GetLayoutWithContext(); + // TODO(yuweih): Verify that the layout is valid, e.g. no overlaps or gaps // between displays. - DisplayLayoutDiff diff = - CalculateDisplayLayoutDiff(current_displays, desktop_layout); + DisplayLayoutDiff diff = CalculateDisplayLayoutDiff(current_displays, layout); X11CrtcResizer resizer(resources_.get(), connection_); resizer.FetchActiveCrtcs(); - // Add displays const std::vector<DesktopLayout>& new_layouts = diff.new_displays.layouts; + // Add displays if (!new_layouts.empty()) { auto outputs = GetDisabledOutputs(); size_t i = 0u; @@ -398,8 +398,9 @@ HOST_LOG << "Added display with crtc: " << base::to_underlying(crtc) << ", output: " << base::to_underlying(output); } - if (i < new_layouts.size()) { - LOG(WARNING) << "Failed to create " << (new_layouts.size() - i) + if (i < diff.new_displays.layouts.size()) { + LOG(WARNING) << "Failed to create " + << (diff.new_displays.layouts.size() - i) << " display(s) due to insufficient resources."; } } @@ -451,7 +452,7 @@ void X11DesktopResizer::SetResolutionForOutput( x11::RandR::Output output, - const ScreenResolution& resolution) { + const DesktopResolution& resolution) { // Actually do the resize operation, preserving the current mode name. Note // that we have to detach the output from the mode in order to delete the // mode and re-create it with the new resolution. The output may also need to @@ -488,12 +489,10 @@ } // Update |active_crtcs_| with new sizes and offsets. - resizer.UpdateActiveCrtcs(crtc, mode, - gfx::Size(resolution.dimensions().width(), - resolution.dimensions().height())); + resizer.UpdateActiveCrtcs(crtc, mode, resolution.dimensions()); UpdateRootWindow(resizer); - webrtc::DesktopSize size_mm = CalculateSizeInMmForGnome(resolution); + gfx::Size size_mm = CalculateSizeInMmForGnome(resolution); int width_mm = size_mm.width(); int height_mm = size_mm.height(); HOST_LOG << "Setting physical size in mm: " << width_mm << "x" << height_mm;
diff --git a/remoting/host/x11_desktop_resizer.h b/remoting/host/x11_desktop_resizer.h index 1db5694..05b5eff2 100644 --- a/remoting/host/x11_desktop_resizer.h +++ b/remoting/host/x11_desktop_resizer.h
@@ -7,16 +7,20 @@ #include <string.h> +#include <list> #include <utility> #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/timer/timer.h" -#include "remoting/base/logging.h" +#include "remoting/host/desktop_display_layout_util.h" +#include "remoting/host/desktop_geometry.h" #include "remoting/host/desktop_resizer.h" #include "remoting/host/linux/gnome_display_config_dbus_client.h" #include "remoting/host/linux/scoped_glib.h" -#include "remoting/host/linux/x11_util.h" +#include "ui/gfx/geometry/point.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/vector2d.h" #include "ui/gfx/x/connection.h" #include "ui/gfx/x/randr.h" @@ -40,7 +44,6 @@ std::unique_ptr<x11::RandR::GetScreenResourcesCurrentReply> resources_; }; -// TODO(btriebw): Split this into a different file. class X11DesktopResizer { public: X11DesktopResizer(); @@ -48,15 +51,16 @@ X11DesktopResizer& operator=(const X11DesktopResizer&) = delete; ~X11DesktopResizer(); - ScreenResolution GetCurrentResolution(webrtc::ScreenId screen_id); - std::list<ScreenResolution> GetSupportedResolutions( - const ScreenResolution& preferred, - webrtc::ScreenId screen_id); - void SetResolution(const ScreenResolution& resolution, - webrtc::ScreenId screen_id); - void RestoreResolution(const ScreenResolution& original, - webrtc::ScreenId screen_id); - void SetVideoLayout(const protocol::VideoLayout& layout); + DesktopResolution GetCurrentResolution(DesktopScreenId screen_id); + std::list<DesktopResolution> GetSupportedResolutions( + const DesktopResolution& preferred, + DesktopScreenId screen_id); + void SetResolution(const DesktopResolution& resolution, + DesktopScreenId screen_id); + void RestoreResolution(const DesktopResolution& original, + DesktopScreenId screen_id); + DesktopLayoutSet GetLayout(); + void SetVideoLayout(const DesktopLayoutSet& layout); private: using OutputInfoList = std::vector< @@ -64,16 +68,16 @@ // Add a mode matching the specified resolution and switch to it. void SetResolutionForOutput(x11::RandR::Output output, - const ScreenResolution& resolution); + const DesktopResolution& resolution); // Removes the existing mode from the output and replaces it with the new // size. Returns the new mode ID, or None (0) on failure. x11::RandR::Mode UpdateMode(x11::RandR::Output output, int width, int height); - // Remove the specified mode from the output, and delete it. If the mode is - // in use, it is not deleted. |name| should be set to - // GetModeNameForOutput(output). The parameter is to avoid creating the mode - // name twice. + // Remove the specified mode from the output, and delete it. If the mode is in + // use, it is not deleted. + // |name| should be set to GetModeNameForOutput(output). The parameter is to + // avoid creating the mode name twice. void DeleteMode(x11::RandR::Output output, const std::string& name); // Updates the root window using the bounding box of the CRTCs, then @@ -83,6 +87,9 @@ // Gets a list of outputs that are not connected to any CRTCs. OutputInfoList GetDisabledOutputs(); + // Gets current layout with context information. + std::vector<DesktopLayoutWithContext> GetLayoutWithContext(); + void RequestGnomeDisplayConfig(); void OnGnomeDisplayConfigReceived(GnomeDisplayConfig config);
diff --git a/services/on_device_model/ml/on_device_model_executor.cc b/services/on_device_model/ml/on_device_model_executor.cc index 5493816..2055503f 100644 --- a/services/on_device_model/ml/on_device_model_executor.cc +++ b/services/on_device_model/ml/on_device_model_executor.cc
@@ -4,6 +4,8 @@ #include "services/on_device_model/ml/on_device_model_executor.h" +#include <algorithm> +#include <cstdint> #include <memory> #include <optional> #include <string> @@ -36,6 +38,8 @@ namespace ml { namespace { +constexpr uint32_t kReserveTokensForSafety = 2; + const base::FeatureParam<int> kMaxTopK{ &optimization_guide::features::kOptimizationGuideOnDeviceModel, "on_device_model_max_topk", 128}; @@ -272,10 +276,12 @@ public: SessionImpl(const ChromeML& chrome_ml, ChromeMLModel model, + uint32_t max_tokens, scoped_refptr<LanguageDetector> language_detector, std::optional<uint32_t> adaptation_id) : chrome_ml_(chrome_ml), model_(model), + max_tokens_(max_tokens), language_detector_(std::move(language_detector)), adaptation_id_(adaptation_id) {} ~SessionImpl() override = default; @@ -297,7 +303,8 @@ ChromeMLExecuteOptions options{ .prompt = input->text.c_str(), .context_mode = GetContextMode(*input) | ContextMode::kSave, - .max_tokens = input->max_tokens.value_or(0), + .max_tokens = + std::min(input->max_tokens.value_or(max_tokens_), max_tokens_), .token_offset = input->token_offset.value_or(0), .context_saved_fn = &context_saved_fn, .top_k = GetTopK(input->top_k), @@ -329,7 +336,8 @@ ChromeMLExecuteOptions options{ .prompt = input->text.c_str(), .context_mode = GetContextMode(*input), - .max_tokens = input->max_tokens.value_or(0), + .max_tokens = + std::min(input->max_tokens.value_or(max_tokens_), max_tokens_), .token_offset = input->token_offset.value_or(0), .max_output_tokens = input->max_output_tokens.value_or(0), .score_ts_interval = ts_interval, @@ -364,6 +372,7 @@ bool clear_context_ = true; const raw_ref<const ChromeML> chrome_ml_; ChromeMLModel model_; + const uint32_t max_tokens_; const scoped_refptr<LanguageDetector> language_detector_; std::unique_ptr<Responder> responder_; std::set<std::unique_ptr<ContextHolder>> context_holders_; @@ -402,8 +411,9 @@ std::unique_ptr<on_device_model::OnDeviceModel::Session> OnDeviceModelExecutor::CreateSession(std::optional<uint32_t> adaptation_id) { - return std::make_unique<SessionImpl>(*chrome_ml_, model_, language_detector_, - adaptation_id); + return std::make_unique<SessionImpl>(*chrome_ml_, model_, + max_tokens_ - kReserveTokensForSafety, + language_detector_, adaptation_id); } on_device_model::mojom::SafetyInfoPtr OnDeviceModelExecutor::ClassifyTextSafety( @@ -506,6 +516,8 @@ } } + max_tokens_ = std::max(params->max_tokens, kReserveTokensForSafety); + auto model_proto_dispose = CreateWeakCallbackFn(&OnDeviceModelExecutor::DisposeModelProto, this); ChromeMLModelData data = { @@ -520,7 +532,7 @@ CreateWeakCallbackFn(&OnDeviceModelExecutor::DisposeSentencepiece, this); ChromeMLModelDescriptor descriptor = { .model_data = &data, - .max_tokens = params->max_tokens, + .max_tokens = max_tokens_, .temperature = 0.0f, .top_k = kMaxTopK.Get(), .ts_dimension = params->ts_dimension.value_or(0),
diff --git a/services/on_device_model/ml/on_device_model_executor.h b/services/on_device_model/ml/on_device_model_executor.h index b988196..a23e6b14 100644 --- a/services/on_device_model/ml/on_device_model_executor.h +++ b/services/on_device_model/ml/on_device_model_executor.h
@@ -5,6 +5,7 @@ #ifndef SERVICES_ON_DEVICE_MODEL_ML_ON_DEVICE_MODEL_EXECUTOR_H_ #define SERVICES_ON_DEVICE_MODEL_ML_ON_DEVICE_MODEL_EXECUTOR_H_ +#include <cstdint> #include <functional> #include <memory> @@ -72,6 +73,7 @@ ChromeMLModel model_ = 0; scoped_refptr<base::SequencedTaskRunner> task_runner_; + uint32_t max_tokens_ = 0; }; } // namespace ml
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index f02204e..7663977 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -2158,7 +2158,6 @@ "--recover-devices", "--avd-config=../../tools/android/avd/proto/android_31_google_atd_x64.textpb" ], - "experiment_percentage": 100, "merge": { "args": [ "--bucket",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 904265b..fab2794 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -6800,7 +6800,6 @@ "--avd-config=../../tools/android/avd/proto/android_31_google_apis_x64.textpb" ], "description": "Run with android_31_google_apis_x64", - "experiment_percentage": 100, "isolate_profile_data": true, "merge": { "args": [
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index 6b12440b..f717a391 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -5484,9 +5484,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5496,8 +5496,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -5640,9 +5640,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5652,8 +5652,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index 0000f76..a1c32d35 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -19715,9 +19715,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -19727,8 +19727,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -19865,9 +19865,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -19877,8 +19877,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 14698c0..134e58a 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -41638,9 +41638,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -41649,8 +41649,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -41788,9 +41788,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -41799,8 +41799,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -43137,9 +43137,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -43149,8 +43149,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -43293,9 +43293,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -43305,8 +43305,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -44618,9 +44618,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -44629,8 +44629,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -44768,9 +44768,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -44779,8 +44779,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 07943a7..31344e2b 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -12212,7 +12212,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12240,7 +12240,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12272,7 +12272,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12297,7 +12297,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12319,7 +12319,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12345,7 +12345,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12373,7 +12373,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12412,7 +12412,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12450,7 +12450,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12488,7 +12488,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12534,7 +12534,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12580,7 +12580,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12626,7 +12626,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12663,7 +12663,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12700,7 +12700,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12741,7 +12741,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12788,7 +12788,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12835,7 +12835,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12882,7 +12882,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12920,7 +12920,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12958,7 +12958,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -12996,7 +12996,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13034,7 +13034,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13072,7 +13072,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13110,7 +13110,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13148,7 +13148,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13188,7 +13188,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13230,7 +13230,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13270,7 +13270,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13311,7 +13311,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13351,7 +13351,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800, @@ -13390,7 +13390,7 @@ "display_attached": "1", "gpu": "apple:m1", "mac_model": "Macmini9,1", - "os": "Mac-14.3.1", + "os": "Mac-14.4.1", "pool": "chromium.tests" }, "hard_timeout": 1800,
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 0e168b03..f178bbd 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -15765,12 +15765,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -15780,8 +15780,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": { @@ -15941,12 +15941,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 125.0.6412.0", + "description": "Run with ash-chrome version 125.0.6413.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -15956,8 +15956,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v125.0.6412.0", - "revision": "version:125.0.6412.0" + "location": "lacros_version_skew_tests_v125.0.6413.0", + "revision": "version:125.0.6413.0" } ], "dimensions": {
diff --git a/testing/buildbot/mixins.pyl b/testing/buildbot/mixins.pyl index 0598c51..8d4c749d1 100644 --- a/testing/buildbot/mixins.pyl +++ b/testing/buildbot/mixins.pyl
@@ -803,7 +803,7 @@ 'cpu': 'arm64', 'gpu': 'apple:m1', 'mac_model': 'Macmini9,1', - 'os': 'Mac-14.3.1', + 'os': 'Mac-14.4.1', 'pool': 'chromium.tests', 'display_attached': '1', },
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index f7b0405..c1919b41 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -4657,9 +4657,7 @@ }, 'minidump_uploader_tests': { - 'minidump_uploader_test': { - 'experiment_percentage': 100, - }, + 'minidump_uploader_test': {}, }, 'model_validation_tests_suite': {
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 1d11ec4..b69f186 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -267,16 +267,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'identifier': 'Lacros version skew testing ash canary', - 'description': 'Run with ash-chrome version 125.0.6412.0', + 'description': 'Run with ash-chrome version 125.0.6413.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6412.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v125.0.6413.0/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v125.0.6412.0', - 'revision': 'version:125.0.6412.0', + 'location': 'lacros_version_skew_tests_v125.0.6413.0', + 'revision': 'version:125.0.6413.0', }, ], },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 2a34858c..54962ba 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -3734,6 +3734,21 @@ ] } ], + "ChromeOSOobeQuickStart": [ + { + "platforms": [ + "chromeos" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "OobeQuickStart" + ] + } + ] + } + ], "ChromeOSPrintingIppUsb": [ { "platforms": [ @@ -6935,21 +6950,6 @@ ] } ], - "EnableMojoJSProtectedMemory": [ - { - "platforms": [ - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "EnableMojoJSProtectedMemory" - ] - } - ] - } - ], "EnableOneTapForMaps": [ { "platforms": [ @@ -9608,49 +9608,18 @@ ], "experiments": [ { - "name": "Share_20240222", + "name": "History", "params": { "availability": "any", - "event_1": "name:share_toolbar_item_trigger;comparator:<2;window:365;storage:365", - "event_trigger": "name:share_toolbar_item_trigger;comparator:<1;window:7;storage:7", - "event_used": "name:share_toolbar_item_used;comparator:<1;window:3650;storage:3650", + "event_1": "name:history_on_overflow_menu_trigger;comparator:<2;window:365;storage:365", + "event_trigger": "name:history_on_overflow_menu_trigger;comparator:<1;window:7;storage:7", + "event_used": "name:history_on_overflow_menu_used;comparator:<1;window:3650;storage:3650", "session_rate": "<1" }, "enable_features": [ "IPHForSafariSwitcher", - "IPH_iOSShareToolbarItemFeature" - ], - "disable_features": [ "IPH_iOSHistoryOnOverflowMenuFeature" ] - }, - { - "name": "Share_Tracking_Only_20240222", - "params": { - "availability": "any", - "event_1": "name:share_toolbar_item_trigger;comparator:<2;window:365;storage:365", - "event_trigger": "name:share_toolbar_item_would_trigger;comparator:<1;window:7;storage:7", - "event_used": "name:share_toolbar_item_used;comparator:<1;window:3650;storage:3650", - "session_rate": "<1", - "tracking_only": "true" - }, - "enable_features": [ - "IPHForSafariSwitcher", - "IPH_iOSShareToolbarItemFeature" - ], - "disable_features": [ - "IPH_iOSHistoryOnOverflowMenuFeature" - ] - }, - { - "name": "History_20240222", - "enable_features": [ - "IPHForSafariSwitcher", - "IPH_iOSHistoryOnOverflowMenuFeature" - ], - "disable_features": [ - "IPH_iOSShareToolbarItemFeature" - ] } ] } @@ -15171,6 +15140,40 @@ ] } ], + "ProtectedAudienceMoreGroupByOriginContextsStudy": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled_2_Contexts", + "params": { + "GroupByOriginContextLimit": "2", + "IncludeFacilitatedTestingGroups": "true" + }, + "enable_features": [ + "FledgeBidderWorkletGroupByOriginContextsToKeep" + ] + }, + { + "name": "Enabled_5_Contexts", + "params": { + "GroupByOriginContextLimit": "5", + "IncludeFacilitatedTestingGroups": "true" + }, + "enable_features": [ + "FledgeBidderWorkletGroupByOriginContextsToKeep" + ] + } + ] + } + ], "ProtectedAudienceStoreBandAKeysInDatabaseStudy": [ { "platforms": [
diff --git a/third_party/android_deps/buildSrc/src/main/groovy/ChromiumDepGraph.groovy b/third_party/android_deps/buildSrc/src/main/groovy/ChromiumDepGraph.groovy index 505609e3..65c34cc 100644 --- a/third_party/android_deps/buildSrc/src/main/groovy/ChromiumDepGraph.groovy +++ b/third_party/android_deps/buildSrc/src/main/groovy/ChromiumDepGraph.groovy
@@ -269,8 +269,6 @@ resolveVersion: '1.6.4'), org_jetbrains_kotlinx_kotlinx_coroutines_guava: new PropertyOverride( resolveVersion: '1.6.4'), - org_jetbrains_kotlinx_atomicfu_jvm: new PropertyOverride( - overrideLatest: true), org_jetbrains_kotlin_kotlin_stdlib_jdk8: new PropertyOverride( resolveVersion: '1.8.20'), org_jetbrains_kotlin_kotlin_stdlib_jdk7: new PropertyOverride( @@ -279,8 +277,6 @@ resolveVersion: '1.8.20'), org_jetbrains_kotlin_kotlin_stdlib_common: new PropertyOverride( resolveVersion: '1.8.20'), - org_jetbrains_kotlin_kotlin_parcelize_runtime: new PropertyOverride( - overrideLatest: true), io_grpc_grpc_binder: new PropertyOverride( licenseUrl: 'https://www.apache.org/licenses/LICENSE-2.0.txt', licenseName: 'Apache 2.0'),
diff --git a/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_android_extensions_runtime/3pp/fetch.py b/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_android_extensions_runtime/3pp/fetch.py index 554f6b77..484c0f9bc 100755 --- a/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_android_extensions_runtime/3pp/fetch.py +++ b/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_android_extensions_runtime/3pp/fetch.py
@@ -19,7 +19,7 @@ module_name='kotlin-android-extensions-runtime', file_ext='jar', patch_version='cr1', - version_override='1.9.22', + version_override=None, version_filter=None)
diff --git a/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_parcelize_runtime/3pp/fetch.py b/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_parcelize_runtime/3pp/fetch.py index a3bf2b6f..d0563f2 100755 --- a/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_parcelize_runtime/3pp/fetch.py +++ b/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_parcelize_runtime/3pp/fetch.py
@@ -19,7 +19,7 @@ module_name='kotlin-parcelize-runtime', file_ext='jar', patch_version='cr1', - version_override='1.9.22', + version_override=None, version_filter=None)
diff --git a/third_party/android_deps/libs/org_jetbrains_kotlinx_atomicfu_jvm/3pp/fetch.py b/third_party/android_deps/libs/org_jetbrains_kotlinx_atomicfu_jvm/3pp/fetch.py index b40a870..9858eb859 100755 --- a/third_party/android_deps/libs/org_jetbrains_kotlinx_atomicfu_jvm/3pp/fetch.py +++ b/third_party/android_deps/libs/org_jetbrains_kotlinx_atomicfu_jvm/3pp/fetch.py
@@ -19,7 +19,7 @@ module_name='atomicfu-jvm', file_ext='jar', patch_version='cr1', - version_override='0.23.2', + version_override=None, version_filter=None)
diff --git a/third_party/blink/renderer/core/css/css_math_expression_node.cc b/third_party/blink/renderer/core/css/css_math_expression_node.cc index 35f9d66..e06f349 100644 --- a/third_party/blink/renderer/core/css/css_math_expression_node.cc +++ b/third_party/blink/renderer/core/css/css_math_expression_node.cc
@@ -768,10 +768,10 @@ CSSMathExpressionNumericLiteral::CSSMathExpressionNumericLiteral( const CSSNumericLiteralValue* value) - : CSSMathExpressionNode( - UnitCategory(value->GetType()), - false /* has_comparisons*/, - false /* needs_tree_scope_population*/), + : CSSMathExpressionNode(UnitCategory(value->GetType()), + false /* has_comparisons*/, + false /* has_anchor_functions*/, + false /* needs_tree_scope_population*/), value_(value) { if (!value_->IsNumber() && CanEagerlySimplify(this)) { // "If root is a dimension that is not expressed in its canonical unit, and @@ -1077,6 +1077,7 @@ AtomicString identifier) : CSSMathExpressionNode(UnitCategory(CSSPrimitiveValue::UnitType::kIdent), false /* has_comparisons*/, + false /* has_anchor_unctions*/, false /* needs_tree_scope_population*/), identifier_(std::move(identifier)) {} @@ -1167,6 +1168,7 @@ CSSMathOperator op) : CSSMathExpressionNode(DetermineKeywordCategory(keyword, op), false /* has_comparisons*/, + false /* has_anchor_unctions*/, false /* needs_tree_scope_population*/), keyword_(keyword), operator_(op) {} @@ -1813,6 +1815,7 @@ : CSSMathExpressionNode( category, left_side->HasComparisons() || right_side->HasComparisons(), + left_side->HasAnchorFunctions() || right_side->HasAnchorFunctions(), !left_side->IsScopedValue() || !right_side->IsScopedValue()), operands_({left_side, right_side}), operator_(op) {} @@ -1853,19 +1856,20 @@ return false; } -bool CSSMathExpressionOperation::InvolvesAnchorQueries() const { - for (const CSSMathExpressionNode* operand : operands_) { - if (operand->InvolvesAnchorQueries()) { +static bool AnyOperandHasComparisons( + CSSMathExpressionOperation::Operands& operands) { + for (const CSSMathExpressionNode* operand : operands) { + if (operand->HasComparisons()) { return true; } } return false; } -static bool AnyOperandHasComparisons( +static bool AnyOperandHasAnchorFunctions( CSSMathExpressionOperation::Operands& operands) { for (const CSSMathExpressionNode* operand : operands) { - if (operand->HasComparisons()) { + if (operand->HasAnchorFunctions()) { return true; } } @@ -1889,6 +1893,7 @@ : CSSMathExpressionNode( category, IsComparison(op) || AnyOperandHasComparisons(operands), + AnyOperandHasAnchorFunctions(operands), AnyOperandNeedsTreeScopePopulation(operands)), operands_(std::move(operands)), operator_(op) {} @@ -1898,6 +1903,7 @@ CSSMathOperator op) : CSSMathExpressionNode(category, IsComparison(op), + false /*has_anchor_functions*/, false), operator_(op) {} @@ -2600,6 +2606,16 @@ return this; } +bool CSSMathExpressionOperation::HasInvalidAnchorFunctions( + const CSSLengthResolver& length_resolver) const { + for (const CSSMathExpressionNode* op : operands_) { + if (op->HasInvalidAnchorFunctions(length_resolver)) { + return true; + } + } + return false; +} + #if DCHECK_IS_ON() bool CSSMathExpressionOperation::InvolvesPercentageComparisons() const { if (IsMinOrMax() && Category() == kCalcPercent && operands_.size() > 1u) { @@ -2653,6 +2669,7 @@ const CSSCustomIdentValue* container_name) : CSSMathExpressionNode(CalculationResultCategory::kCalcLength, /*has_comparisons =*/false, + /*has_anchor_functions =*/false, /*needs_tree_scope_population =*/true), size_feature_(size_feature), container_name_(container_name) { @@ -2722,6 +2739,7 @@ : CSSMathExpressionNode( AnchorQueryCategory(fallback), false /* has_comparisons */, + true /* has_anchor_functions */, (anchor_specifier && !anchor_specifier->IsScopedValue()) || (fallback && !fallback->IsScopedValue())), type_(type), @@ -2752,7 +2770,9 @@ return px.value(); } - return fallback_ ? fallback_->ComputeLength<double>(length_resolver) : 0; + // We should have checked HasInvalidAnchorFunctions() before entering here. + CHECK(fallback_); + return fallback_->ComputeLength<double>(length_resolver); } String CSSMathExpressionAnchorQuery::CustomCSSText() const { @@ -2843,10 +2863,10 @@ if (std::optional<LayoutUnit> px = EvaluateQuery(query, length_resolver)) { result = Length::Fixed(px.value()); - } else if (fallback_) { - result = fallback_->ConvertToLength(length_resolver); } else { - result = Length::Fixed(0); + // We should have checked HasInvalidAnchorFunctions() before entering here. + CHECK(fallback_); + result = fallback_->ConvertToLength(length_resolver); } return result.AsCalculationValue()->GetOrCreateExpression(); @@ -3029,6 +3049,31 @@ return this; } +bool CSSMathExpressionAnchorQuery::HasInvalidAnchorFunctions( + const CSSLengthResolver& length_resolver) const { + AnchorQuery query = ToQuery(length_resolver); + std::optional<LayoutUnit> px = EvaluateQuery(query, length_resolver); + + if (px.has_value()) { + return false; + } + + // We need to take the fallback. However, if there is no fallback, + // then we are invalid at computed-value time [1]. + // [1] // https://drafts.csswg.org/css-anchor-position-1/#anchor-valid + + if (fallback_) { + if (auto* math_fallback = + DynamicTo<CSSMathFunctionValue>(fallback_.Get())) { + // The fallback itself may also contain invalid anchor*() functions. + return math_fallback->HasInvalidAnchorFunctions(length_resolver); + } + return false; + } + + return true; +} + void CSSMathExpressionAnchorQuery::Trace(Visitor* visitor) const { visitor->Trace(anchor_specifier_); visitor->Trace(value_);
diff --git a/third_party/blink/renderer/core/css/css_math_expression_node.h b/third_party/blink/renderer/core/css/css_math_expression_node.h index 8430dcba..4d710e9 100644 --- a/third_party/blink/renderer/core/css/css_math_expression_node.h +++ b/third_party/blink/renderer/core/css/css_math_expression_node.h
@@ -188,8 +188,6 @@ Category() == kCalcIntrinsicSize; } - virtual bool InvolvesAnchorQueries() const { return IsAnchorQuery(); } - // Returns the unit type of the math expression *without doing any type // conversion* (e.g., 1px + 1em needs type conversion to resolve). // Returns |UnitType::kUnknown| if type conversion is required. @@ -199,6 +197,7 @@ void SetIsNestedCalc() { is_nested_calc_ = true; } bool HasComparisons() const { return has_comparisons_; } + bool HasAnchorFunctions() const { return has_anchor_functions_; } bool IsScopedValue() const { return !needs_tree_scope_population_; } const CSSMathExpressionNode& EnsureScopedValue( @@ -229,14 +228,18 @@ const TryTacticTransform&, const WritingDirectionMode&) const = 0; + virtual bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const = 0; + virtual void Trace(Visitor* visitor) const {} protected: CSSMathExpressionNode(CalculationResultCategory category, bool has_comparisons, + bool has_anchor_functions, bool needs_tree_scope_population) : category_(category), has_comparisons_(has_comparisons), + has_anchor_functions_(has_anchor_functions), needs_tree_scope_population_(needs_tree_scope_population) { DCHECK_NE(category, kCalcOther); } @@ -251,6 +254,7 @@ CalculationResultCategory category_; bool is_nested_calc_ = false; bool has_comparisons_; + bool has_anchor_functions_; bool needs_tree_scope_population_; }; @@ -283,6 +287,10 @@ return this; } + bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const final { + return false; + } + bool IsZero() const final; String CustomCSSText() const final; scoped_refptr<const CalculationExpressionNode> ToCalculationExpression( @@ -349,6 +357,10 @@ return this; } + bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const final { + return false; + } + bool IsZero() const final { return false; } String CustomCSSText() const final { return identifier_; } scoped_refptr<const CalculationExpressionNode> ToCalculationExpression( @@ -442,6 +454,10 @@ return this; } + bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const final { + return false; + } + bool IsZero() const final { return false; } String CustomCSSText() const final { return getValueName(keyword_); } scoped_refptr<const CalculationExpressionNode> ToCalculationExpression( @@ -617,7 +633,6 @@ bool HasPercentage() const final; bool InvolvesLayout() const final; - bool InvolvesAnchorQueries() const final; String CSSTextAsClamp() const; @@ -643,6 +658,7 @@ LogicalAxis, const TryTacticTransform&, const WritingDirectionMode&) const final; + bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const final; void Trace(Visitor* visitor) const final; #if DCHECK_IS_ON() @@ -708,6 +724,9 @@ const WritingDirectionMode& mode) const final { return this; } + bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const final { + return false; + } CSSValueID GetValue() const { return size_feature_->GetValueID(); } @@ -837,6 +856,7 @@ LogicalAxis, const TryTacticTransform&, const WritingDirectionMode&) const final; + bool HasInvalidAnchorFunctions(const CSSLengthResolver&) const final; protected: double ComputeDouble(const CSSLengthResolver&) const final;
diff --git a/third_party/blink/renderer/core/css/css_math_function_value.h b/third_party/blink/renderer/core/css/css_math_function_value.h index 96279c0..7f47daa5 100644 --- a/third_party/blink/renderer/core/css/css_math_function_value.h +++ b/third_party/blink/renderer/core/css/css_math_function_value.h
@@ -99,8 +99,23 @@ bool Equals(const CSSMathFunctionValue& other) const; bool HasComparisons() const { return expression_->HasComparisons(); } - bool InvolvesAnchorQueries() const { - return expression_->InvolvesAnchorQueries(); + + // True if this value has anchor() or anchor-size() somewhere within + // the math expression (regardless of the validity of those functions). + // + // https://drafts.csswg.org/css-anchor-position-1/#anchor-pos + // https://drafts.csswg.org/css-anchor-position-1/#anchor-size-fn + bool HasAnchorFunctions() const { return expression_->HasAnchorFunctions(); } + + // Checks if any anchor() or anchor-size() functions, when evaluated, would + // cause the declaration holding this value to become invalid at + // computed-value time. + // + // https://drafts.csswg.org/css-anchor-position-1/#anchor-valid + // https://drafts.csswg.org/css-anchor-position-1/#anchor-size-valid + bool HasInvalidAnchorFunctions( + const CSSLengthResolver& length_resolver) const { + return expression_->HasInvalidAnchorFunctions(length_resolver); } const CSSValue& PopulateWithTreeScope(const TreeScope*) const;
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index f832a5c..e42ba1af 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -2107,7 +2107,7 @@ }, { name: "border-bottom-style", - property_methods: ["CSSValueFromComputedStyleInternal"], + property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], field_group: "box", field_template: "keyword", keywords: [ @@ -2255,7 +2255,7 @@ }, { name: "border-left-style", - property_methods: ["CSSValueFromComputedStyleInternal"], + property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], field_group: "box", field_template: "keyword", keywords: [ @@ -2324,7 +2324,7 @@ }, { name: "border-right-style", - property_methods: ["CSSValueFromComputedStyleInternal"], + property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], field_group: "box", field_template: "keyword", keywords: [ @@ -2435,7 +2435,7 @@ }, { name: "border-top-style", - property_methods: ["CSSValueFromComputedStyleInternal"], + property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], field_group: "box", field_template: "keyword", keywords: [
diff --git a/third_party/blink/renderer/core/css/css_to_length_conversion_data_test.cc b/third_party/blink/renderer/core/css/css_to_length_conversion_data_test.cc index 7b95bc3..604ab08d 100644 --- a/third_party/blink/renderer/core/css/css_to_length_conversion_data_test.cc +++ b/third_party/blink/renderer/core/css/css_to_length_conversion_data_test.cc
@@ -378,7 +378,6 @@ CSSPropertyID right = CSSPropertyID::kRight; - EXPECT_FLOAT_EQ(60.0f, ConvertPx(data, "anchor(left)", right)); EXPECT_FLOAT_EQ(60.0f, ConvertPx(data, "anchor(--a left)", right)); EXPECT_FLOAT_EQ(2.0f, ConvertPx(data, "calc(anchor(--a left) / 30)", right)); } @@ -392,7 +391,6 @@ CSSPropertyID right = CSSPropertyID::kRight; - EXPECT_FLOAT_EQ(0.0f, ConvertPx(data, "anchor(left)", right)); EXPECT_FLOAT_EQ(42.0f, ConvertPx(data, "anchor(--a left, 42px)", right)); EXPECT_FLOAT_EQ( 52.0f, ConvertPx(data, "anchor(--a left, calc(42px + 10px))", right)); @@ -424,7 +422,6 @@ CSSPropertyID width = CSSPropertyID::kWidth; - EXPECT_FLOAT_EQ(0.0f, ConvertPx(data, "anchor-size(width)", width)); EXPECT_FLOAT_EQ(42.0f, ConvertPx(data, "anchor-size(--a width, 42px)", width)); EXPECT_FLOAT_EQ( @@ -448,7 +445,7 @@ EXPECT_EQ(ConvertLength(data, "calc(10px + 42%)", right), ConvertLength(data, "calc(anchor(--a left, 10px) + 42%)", right)); EXPECT_EQ(ConvertLength(data, "calc(0px + 42%)", right), - ConvertLength(data, "calc(anchor(--a left) + 42%)", right)); + ConvertLength(data, "calc(anchor(--a left, 0px) + 42%)", right)); EXPECT_EQ(ConvertLength(data, "min(10px, 42%)", right), ConvertLength(data, "min(anchor(--a left, 10px), 42%)", right)); EXPECT_EQ(ConvertLength(data, "min(10px, 42%)", right),
diff --git a/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc b/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc index ca46661..aaf9ae1 100644 --- a/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc +++ b/third_party/blink/renderer/core/css/cssom/css_numeric_value.cc
@@ -337,7 +337,7 @@ CSSNumericValue* CSSNumericValue::FromCSSValue(const CSSPrimitiveValue& value) { if (value.IsCalculated()) { const auto& math_function = To<CSSMathFunctionValue>(value); - if (math_function.InvolvesAnchorQueries()) { + if (math_function.HasAnchorFunctions()) { return nullptr; } return CalcToNumericValue(*math_function.ExpressionNode());
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc index 405bab6..045362f 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
@@ -2330,26 +2330,29 @@ bool ConsumeBorderShorthand(CSSParserTokenRange& range, const CSSParserContext& context, + const CSSParserLocalContext& local_context, const CSSValue*& result_width, const CSSValue*& result_style, const CSSValue*& result_color) { while (!result_width || !result_style || !result_color) { if (!result_width) { - result_width = ConsumeLineWidth(range, context, UnitlessQuirk::kForbid); + result_width = ParseBorderWidthSide(range, context, local_context); if (result_width) { + ConsumeCommaIncludingWhitespace(range); continue; } } if (!result_style) { - result_style = ParseLonghand(CSSPropertyID::kBorderLeftStyle, - CSSPropertyID::kBorder, context, range); + result_style = ParseBorderStyleSide(range, context); if (result_style) { + ConsumeCommaIncludingWhitespace(range); continue; } } if (!result_color) { - result_color = ConsumeColor(range, context); + result_color = ConsumeBorderColorSide(range, context, local_context); if (result_color) { + ConsumeCommaIncludingWhitespace(range); continue; } } @@ -4835,6 +4838,30 @@ return ConsumeBorderWidth(range, context, unitless); } +const CSSValue* ParseBorderStyleSide(CSSParserTokenRange& range, + const CSSParserContext& context) { + if (RuntimeEnabledFeatures::StylableSelectEnabled() && + IsUASheetBehavior(context.Mode()) && + range.Peek().FunctionId() == + CSSValueID::kInternalAppearanceAutoBaseSelect) { + CSSParserTokenRange range_copy = range; + CSSParserTokenRange arg_range = ConsumeFunction(range_copy); + CSSValue* auto_value = ConsumeIdent(arg_range); + if (!auto_value || !ConsumeCommaIncludingWhitespace(arg_range)) { + return nullptr; + } + CSSValue* base_select_value = ConsumeIdent(arg_range); + if (!base_select_value || !arg_range.AtEnd()) { + return nullptr; + } + range = range_copy; + return MakeGarbageCollected<CSSAppearanceAutoBaseSelectValuePair>( + auto_value, base_select_value); + } + return ParseLonghand(CSSPropertyID::kBorderLeftStyle, CSSPropertyID::kBorder, + context, range); +} + CSSValue* ConsumeShadow(CSSParserTokenRange& range, const CSSParserContext& context, AllowInsetAndSpread inset_and_spread) { @@ -6989,12 +7016,39 @@ bool allow_quirky_colors = IsQuirksModeBehavior(context.Mode()) && (shorthand == CSSPropertyID::kInvalid || shorthand == CSSPropertyID::kBorderColor); + if (RuntimeEnabledFeatures::StylableSelectEnabled() && + range.Peek().FunctionId() == + CSSValueID::kInternalAppearanceAutoBaseSelect && + IsUASheetBehavior(context.Mode())) { + return ConsumeAppearanceAutoBaseSelectColor( + range, context, allow_quirky_colors, + AllowedColorKeywords::kAllowSystemColor); + } return ConsumeColor(range, context, allow_quirky_colors); } CSSValue* ConsumeBorderWidth(CSSParserTokenRange& range, const CSSParserContext& context, UnitlessQuirk unitless) { + if (RuntimeEnabledFeatures::StylableSelectEnabled() && + IsUASheetBehavior(context.Mode()) && + range.Peek().FunctionId() == + CSSValueID::kInternalAppearanceAutoBaseSelect) { + CSSParserTokenRange range_copy = range; + CSSParserTokenRange arg_range = ConsumeFunction(range_copy); + CSSValue* auto_value = ConsumeLineWidth(arg_range, context, unitless); + if (!auto_value || !ConsumeCommaIncludingWhitespace(arg_range)) { + return nullptr; + } + CSSValue* base_select_value = + ConsumeLineWidth(arg_range, context, unitless); + if (!base_select_value || !arg_range.AtEnd()) { + return nullptr; + } + range = range_copy; + return MakeGarbageCollected<CSSAppearanceAutoBaseSelectValuePair>( + auto_value, base_select_value); + } return ConsumeLineWidth(range, context, unitless); }
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.h b/third_party/blink/renderer/core/css/properties/css_parsing_utils.h index b2ea400..60bc6a3 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.h +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.h
@@ -194,6 +194,7 @@ CSSValue*& result_y); bool ConsumeBorderShorthand(CSSParserTokenRange&, const CSSParserContext&, + const CSSParserLocalContext&, const CSSValue*& result_width, const CSSValue*& result_style, const CSSValue*& result_color); @@ -412,6 +413,8 @@ CSSValue* ParseBorderWidthSide(CSSParserTokenRange&, const CSSParserContext&, const CSSParserLocalContext&); +const CSSValue* ParseBorderStyleSide(CSSParserTokenRange&, + const CSSParserContext&); CSSValue* ConsumeShadow(CSSParserTokenRange&, const CSSParserContext&,
diff --git a/third_party/blink/renderer/core/css/properties/css_property_test.cc b/third_party/blink/renderer/core/css/properties/css_property_test.cc index 37d9aaa..1eec6d44 100644 --- a/third_party/blink/renderer/core/css/properties/css_property_test.cc +++ b/third_party/blink/renderer/core/css/properties/css_property_test.cc
@@ -352,80 +352,100 @@ ModeCheckingAnchorEvaluator anchor_evaluator(AnchorScope::Mode::kTop); StyleRecalcContext context = {.anchor_evaluator = &anchor_evaluator}; - EXPECT_EQ("1px", ComputedValue("top", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("right", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("left", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-height", "anchor-size(width)", context)); + EXPECT_EQ("1px", ComputedValue("top", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("right", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("left", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-height", "anchor-size(width, 0px)", context)); } TEST_F(CSSPropertyTest, AnchorModeRight) { ModeCheckingAnchorEvaluator anchor_evaluator(AnchorScope::Mode::kRight); StyleRecalcContext context = {.anchor_evaluator = &anchor_evaluator}; - EXPECT_EQ("0px", ComputedValue("top", "anchor(top)", context)); - EXPECT_EQ("1px", ComputedValue("right", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("left", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-height", "anchor-size(width)", context)); + EXPECT_EQ("0px", ComputedValue("top", "anchor(top, 0px)", context)); + EXPECT_EQ("1px", ComputedValue("right", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("left", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-height", "anchor-size(width, 0px)", context)); } TEST_F(CSSPropertyTest, AnchorModeBottom) { ModeCheckingAnchorEvaluator anchor_evaluator(AnchorScope::Mode::kBottom); StyleRecalcContext context = {.anchor_evaluator = &anchor_evaluator}; - EXPECT_EQ("0px", ComputedValue("top", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("right", "anchor(top)", context)); - EXPECT_EQ("1px", ComputedValue("bottom", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("left", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-height", "anchor-size(width)", context)); + EXPECT_EQ("0px", ComputedValue("top", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("right", "anchor(top, 0px)", context)); + EXPECT_EQ("1px", ComputedValue("bottom", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("left", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-height", "anchor-size(width, 0px)", context)); } TEST_F(CSSPropertyTest, AnchorModeLeft) { ModeCheckingAnchorEvaluator anchor_evaluator(AnchorScope::Mode::kLeft); StyleRecalcContext context = {.anchor_evaluator = &anchor_evaluator}; - EXPECT_EQ("0px", ComputedValue("top", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("right", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top)", context)); - EXPECT_EQ("1px", ComputedValue("left", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("min-height", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-width", "anchor-size(width)", context)); - EXPECT_EQ("0px", ComputedValue("max-height", "anchor-size(width)", context)); + EXPECT_EQ("0px", ComputedValue("top", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("right", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top, 0px)", context)); + EXPECT_EQ("1px", ComputedValue("left", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("min-height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("0px", + ComputedValue("max-height", "anchor-size(width, 0px)", context)); } TEST_F(CSSPropertyTest, AnchorModeSize) { ModeCheckingAnchorEvaluator anchor_evaluator(AnchorScope::Mode::kSize); StyleRecalcContext context = {.anchor_evaluator = &anchor_evaluator}; - EXPECT_EQ("0px", ComputedValue("top", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("right", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top)", context)); - EXPECT_EQ("0px", ComputedValue("left", "anchor(top)", context)); - EXPECT_EQ("1px", ComputedValue("width", "anchor-size(width)", context)); - EXPECT_EQ("1px", ComputedValue("height", "anchor-size(width)", context)); - EXPECT_EQ("1px", ComputedValue("min-width", "anchor-size(width)", context)); - EXPECT_EQ("1px", ComputedValue("min-height", "anchor-size(width)", context)); - EXPECT_EQ("1px", ComputedValue("max-width", "anchor-size(width)", context)); - EXPECT_EQ("1px", ComputedValue("max-height", "anchor-size(width)", context)); + EXPECT_EQ("0px", ComputedValue("top", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("right", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("bottom", "anchor(top, 0px)", context)); + EXPECT_EQ("0px", ComputedValue("left", "anchor(top, 0px)", context)); + EXPECT_EQ("1px", ComputedValue("width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("1px", ComputedValue("height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("1px", + ComputedValue("min-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("1px", + ComputedValue("min-height", "anchor-size(width, 0px)", context)); + EXPECT_EQ("1px", + ComputedValue("max-width", "anchor-size(width, 0px)", context)); + EXPECT_EQ("1px", + ComputedValue("max-height", "anchor-size(width, 0px)", context)); } } // namespace blink
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc index 612f10d..b3a0ae9 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -1197,6 +1197,14 @@ return ComputedStyleUtils::ValueForBorderRadiusCorner( style.BorderBottomRightRadius(), style); } + +const CSSValue* BorderBottomStyle::ParseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context, + const CSSParserLocalContext& local_context) const { + return css_parsing_utils::ParseBorderStyleSide(range, context); +} + const CSSValue* BorderBottomStyle::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject*, @@ -1442,6 +1450,13 @@ style, border_left_color, value_phase); } +const CSSValue* BorderLeftStyle::ParseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context, + const CSSParserLocalContext& local_context) const { + return css_parsing_utils::ParseBorderStyleSide(range, context); +} + const CSSValue* BorderLeftStyle::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject*, @@ -1505,6 +1520,13 @@ style, border_right_color, value_phase); } +const CSSValue* BorderRightStyle::ParseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context, + const CSSParserLocalContext& local_context) const { + return css_parsing_utils::ParseBorderStyleSide(range, context); +} + const CSSValue* BorderRightStyle::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject*, @@ -1614,6 +1636,13 @@ style.BorderTopRightRadius(), style); } +const CSSValue* BorderTopStyle::ParseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context, + const CSSParserLocalContext& local_context) const { + return css_parsing_utils::ParseBorderStyleSide(range, context); +} + const CSSValue* BorderTopStyle::CSSValueFromComputedStyleInternal( const ComputedStyle& style, const LayoutObject*,
diff --git a/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc b/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc index ef3ab97..6aacf09 100644 --- a/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc
@@ -589,14 +589,14 @@ bool important, CSSParserTokenRange& range, const CSSParserContext& context, - const CSSParserLocalContext&, + const CSSParserLocalContext& local_context, HeapVector<CSSPropertyValue, 64>& properties) const { const CSSValue* width = nullptr; const CSSValue* style = nullptr; const CSSValue* color = nullptr; - if (!css_parsing_utils::ConsumeBorderShorthand(range, context, width, style, - color)) { + if (!css_parsing_utils::ConsumeBorderShorthand(range, context, local_context, + width, style, color)) { return false; }; @@ -731,14 +731,14 @@ bool important, CSSParserTokenRange& range, const CSSParserContext& context, - const CSSParserLocalContext&, + const CSSParserLocalContext& local_context, HeapVector<CSSPropertyValue, 64>& properties) const { const CSSValue* width = nullptr; const CSSValue* style = nullptr; const CSSValue* color = nullptr; - if (!css_parsing_utils::ConsumeBorderShorthand(range, context, width, style, - color)) { + if (!css_parsing_utils::ConsumeBorderShorthand(range, context, local_context, + width, style, color)) { return false; }; @@ -863,14 +863,14 @@ bool important, CSSParserTokenRange& range, const CSSParserContext& context, - const CSSParserLocalContext&, + const CSSParserLocalContext& local_context, HeapVector<CSSPropertyValue, 64>& properties) const { const CSSValue* width = nullptr; const CSSValue* style = nullptr; const CSSValue* color = nullptr; - if (!css_parsing_utils::ConsumeBorderShorthand(range, context, width, style, - color)) { + if (!css_parsing_utils::ConsumeBorderShorthand(range, context, local_context, + width, style, color)) { return false; };
diff --git a/third_party/blink/renderer/core/css/resolver/style_cascade.cc b/third_party/blink/renderer/core/css/resolver/style_cascade.cc index 121fc22..2787b57 100644 --- a/third_party/blink/renderer/core/css/resolver/style_cascade.cc +++ b/third_party/blink/renderer/core/css/resolver/style_cascade.cc
@@ -17,6 +17,7 @@ #include "third_party/blink/renderer/core/css/css_flip_revert_value.h" #include "third_party/blink/renderer/core/css/css_font_selector.h" #include "third_party/blink/renderer/core/css/css_invalid_variable_value.h" +#include "third_party/blink/renderer/core/css/css_math_function_value.h" #include "third_party/blink/renderer/core/css/css_numeric_literal_value.h" #include "third_party/blink/renderer/core/css/css_pending_substitution_value.h" #include "third_party/blink/renderer/core/css/css_syntax_string_parser.h" @@ -96,6 +97,20 @@ return result.ScopeFromTreeOrder(properties.types_.tree_order); } +const CSSValue* EnsureScopedValue(const Document& document, + const MatchResult& match_result, + CascadePriority priority, + const CSSValue* value) { + CascadeOrigin origin = priority.GetOrigin(); + const TreeScope* tree_scope{nullptr}; + if (origin == CascadeOrigin::kAuthor) { + tree_scope = &TreeScopeAt(match_result, priority.GetPosition()); + } else if (origin == CascadeOrigin::kAuthorPresentationalHint) { + tree_scope = &document; + } + return &value->EnsureScopedValue(tree_scope); +} + PropertyHandle ToPropertyHandle(const CSSProperty& property, CascadePriority priority) { uint32_t position = priority.GetPosition(); @@ -371,10 +386,11 @@ // satisfy the API. CascadeResolver resolver(CascadeFilter(), /* generation */ 0); - // The origin is relevant for 'revert'. We pick kAuthor arbitrarily, - // but the behavior would be the same for any non-animated origin. - // (It always becomes 'unset'). - CascadeOrigin origin = CascadeOrigin::kAuthor; + // The origin is relevant for 'revert', but since the cascade map + // is empty, there will be nothing to revert to regardless of the origin + // We use kNone, because kAuthor (etc) imply that the `value` originates + // from a location on the `MatchResult`, which is not the case. + CascadeOrigin origin = CascadeOrigin::kNone; return cascade.Resolve(name, value, origin, resolver); } @@ -824,14 +840,8 @@ value = Resolve(property, *value, *priority, origin, resolver); DCHECK(IsA<CustomProperty>(property) || !value->IsUnparsedDeclaration()); DCHECK(!value->IsPendingSubstitutionValue()); - const TreeScope* tree_scope{nullptr}; - if (origin == CascadeOrigin::kAuthor) { - tree_scope = &TreeScopeAt(match_result_, priority->GetPosition()); - } else if (origin == CascadeOrigin::kAuthorPresentationalHint) { - tree_scope = &GetDocument(); - } - StyleBuilder::ApplyPhysicalProperty(property, state_, - value->EnsureScopedValue(tree_scope)); + value = EnsureScopedValue(GetDocument(), match_result_, *priority, value); + StyleBuilder::ApplyPhysicalProperty(property, state_, *value); } void StyleCascade::LookupAndApplyInterpolation(const CSSProperty& property, @@ -1001,6 +1011,9 @@ return &auto_base_select_pair->First(); } } + if (const auto* v = DynamicTo<CSSMathFunctionValue>(value)) { + return ResolveMathFunction(property, *v, priority); + } resolver.CollectFlags(property, origin); @@ -1246,6 +1259,60 @@ return flipped; } +// Math functions can become invalid at computed-value time. Currently, this +// is only possible for invalid anchor*() functions. +// +// https://drafts.csswg.org/css-anchor-position-1/#anchor-valid +// https://drafts.csswg.org/css-anchor-position-1/#anchor-size-valid +const CSSValue* StyleCascade::ResolveMathFunction( + const CSSProperty& property, + const CSSMathFunctionValue& math_value, + CascadePriority priority) { + if (!math_value.HasAnchorFunctions()) { + return &math_value; + } + + auto anchor_mode = [](const CSSProperty& property) { + switch (property.PropertyID()) { + case CSSPropertyID::kTop: + return AnchorEvaluator::Mode::kTop; + case CSSPropertyID::kRight: + return AnchorEvaluator::Mode::kRight; + case CSSPropertyID::kBottom: + return AnchorEvaluator::Mode::kBottom; + case CSSPropertyID::kLeft: + return AnchorEvaluator::Mode::kLeft; + case CSSPropertyID::kWidth: + case CSSPropertyID::kHeight: + case CSSPropertyID::kMinWidth: + case CSSPropertyID::kMinHeight: + case CSSPropertyID::kMaxWidth: + case CSSPropertyID::kMaxHeight: + return AnchorEvaluator::Mode::kSize; + default: + return AnchorEvaluator::Mode::kNone; + } + }; + + const CSSLengthResolver& length_resolver = state_.CssToLengthConversionData(); + + // Calling HasInvalidAnchorFunctions evaluates the anchor*() functions + // inside the CSSMathFunctionValue. Evaluating anchor*() requires that we + // have the correct AnchorEvaluator::Mode, so we need to set that just like + // we do for during e.g. Left::ApplyValue, Right::ApplyValue, etc. + AnchorScope anchor_scope(anchor_mode(property), + length_resolver.GetAnchorEvaluator()); + // HasInvalidAnchorFunctions actually evaluates any anchor*() queries + // within the CSSMathFunctionValue, and this requires the TreeScope to + // be populated. + const auto* scoped_math_value = To<CSSMathFunctionValue>( + EnsureScopedValue(GetDocument(), match_result_, priority, &math_value)); + if (scoped_math_value->HasInvalidAnchorFunctions(length_resolver)) { + return cssvalue::CSSUnsetValue::Create(); + } + return scoped_math_value; +} + scoped_refptr<CSSVariableData> StyleCascade::ResolveVariableData( CSSVariableData* data, const CSSParserContext& context,
diff --git a/third_party/blink/renderer/core/css/resolver/style_cascade.h b/third_party/blink/renderer/core/css/resolver/style_cascade.h index 37d4711..4d1be63 100644 --- a/third_party/blink/renderer/core/css/resolver/style_cascade.h +++ b/third_party/blink/renderer/core/css/resolver/style_cascade.h
@@ -32,13 +32,13 @@ class CascadeInterpolations; class CascadeResolver; -class CSSUnparsedDeclarationValue; +class CSSMathFunctionValue; class CSSParserContext; class CSSParserTokenStream; class CSSProperty; +class CSSUnparsedDeclarationValue; class CSSValue; class CSSVariableData; -class CSSUnparsedDeclarationValue; class CustomProperty; class MatchResult; class StyleResolverState; @@ -368,6 +368,9 @@ CascadePriority, CascadeOrigin&, CascadeResolver&); + const CSSValue* ResolveMathFunction(const CSSProperty&, + const CSSMathFunctionValue&, + CascadePriority); scoped_refptr<CSSVariableData> ResolveVariableData(CSSVariableData*, const CSSParserContext&,
diff --git a/third_party/blink/renderer/core/html/anchor_element_metrics.cc b/third_party/blink/renderer/core/html/anchor_element_metrics.cc index eaa9a66..a7a32595d 100644 --- a/third_party/blink/renderer/core/html/anchor_element_metrics.cc +++ b/third_party/blink/renderer/core/html/anchor_element_metrics.cc
@@ -30,6 +30,22 @@ namespace { +// Returns the document of the main frame of the frame tree containing `anchor`. +// This could be null if `anchor` is in an out-of-process iframe. +Document* GetTopDocument(const HTMLAnchorElement& anchor) { + LocalFrame* frame = anchor.GetDocument().GetFrame(); + if (!frame) { + return nullptr; + } + + LocalFrame* local_main_frame = DynamicTo<LocalFrame>(frame->Tree().Top()); + if (!local_main_frame) { + return nullptr; + } + + return local_main_frame->GetDocument(); +} + // Whether the element is inside an iframe. bool IsInIFrame(const HTMLAnchorElement& anchor_element) { Frame* frame = anchor_element.GetDocument().GetFrame(); @@ -154,20 +170,6 @@ } // anonymous namespace -Document* GetTopDocument(const HTMLAnchorElement& anchor) { - LocalFrame* frame = anchor.GetDocument().GetFrame(); - if (!frame) { - return nullptr; - } - - LocalFrame* local_main_frame = DynamicTo<LocalFrame>(frame->Tree().Top()); - if (!local_main_frame) { - return nullptr; - } - - return local_main_frame->GetDocument(); -} - // Computes a unique ID for the anchor. We hash the pointer address of the // object. Note that this implementation can lead to collisions if an element is // destroyed and a new one is created with the same address. We don't mind this
diff --git a/third_party/blink/renderer/core/html/anchor_element_metrics.h b/third_party/blink/renderer/core/html/anchor_element_metrics.h index 633727f..3f58680 100644 --- a/third_party/blink/renderer/core/html/anchor_element_metrics.h +++ b/third_party/blink/renderer/core/html/anchor_element_metrics.h
@@ -10,13 +10,8 @@ namespace blink { -class Document; class HTMLAnchorElement; -// Returns the document of the main frame of the frame tree containing `anchor`. -// This could be null if `anchor` is in an out-of-process iframe. -Document* GetTopDocument(const HTMLAnchorElement& anchor); - uint32_t AnchorElementId(const HTMLAnchorElement& element); // Returns null if the given element should not be evaluated.
diff --git a/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc b/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc index 484e1bf..0150b6598 100644 --- a/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc +++ b/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc
@@ -112,8 +112,9 @@ void AnchorElementMetricsSender::MaybeReportClickedMetricsOnClick( const HTMLAnchorElement& anchor_element) { DCHECK(base::FeatureList::IsEnabled(features::kNavigationPredictor)); - Document* top_document = GetTopDocument(anchor_element); - if (!anchor_element.Href().ProtocolIsInHTTPFamily() || !top_document || + Document* top_document = GetSupplementable(); + CHECK(top_document); + if (!anchor_element.Href().ProtocolIsInHTTPFamily() || !top_document->Url().ProtocolIsInHTTPFamily() || !anchor_element.GetDocument().Url().ProtocolIsInHTTPFamily()) { return; @@ -122,7 +123,7 @@ return; } base::TimeDelta navigation_start_to_click = - clock_->NowTicks() - NavigationStart(anchor_element); + clock_->NowTicks() - NavigationStart(); auto click = mojom::blink::AnchorElementClick::New( AnchorElementId(anchor_element), anchor_element.Href(), navigation_start_to_click); @@ -276,14 +277,13 @@ RegisterForLifecycleNotifications(); } -base::TimeTicks AnchorElementMetricsSender::NavigationStart( - const HTMLAnchorElement& element) { +base::TimeTicks AnchorElementMetricsSender::NavigationStart() const { if (mock_navigation_start_for_testing_.has_value()) { return mock_navigation_start_for_testing_.value(); } - Document* top_document = GetTopDocument(element); - DCHECK(top_document); + const Document* top_document = GetSupplementable(); + CHECK(top_document); return top_document->Loader()->GetTiming().NavigationStart(); } @@ -326,7 +326,7 @@ element_timing.pointer_over_timer_ = clock_->NowTicks(); base::TimeDelta navigation_start_to_pointer_over = - clock_->NowTicks() - NavigationStart(element); + clock_->NowTicks() - NavigationStart(); auto msg = mojom::blink::AnchorElementPointerOver::New( anchor_id, navigation_start_to_pointer_over); @@ -354,7 +354,7 @@ } base::TimeDelta navigation_start_to_pointer_down = - clock_->NowTicks() - NavigationStart(element); + clock_->NowTicks() - NavigationStart(); auto msg = mojom::blink::AnchorElementPointerDown::New( anchor_id, navigation_start_to_pointer_down); metrics_host_->ReportAnchorElementPointerDown(std::move(msg)); @@ -395,7 +395,7 @@ timing_stats.entered_viewport_should_be_enqueued_ = false; base::TimeDelta time_entered_viewport = - clock_->NowTicks() - NavigationStart(element); + clock_->NowTicks() - NavigationStart(); auto msg = mojom::blink::AnchorElementEnteredViewport::New( anchor_id, time_entered_viewport); entered_viewport_messages_.push_back(std::move(msg));
diff --git a/third_party/blink/renderer/core/html/anchor_element_metrics_sender.h b/third_party/blink/renderer/core/html/anchor_element_metrics_sender.h index c3634c180..1d8ac7f 100644 --- a/third_party/blink/renderer/core/html/anchor_element_metrics_sender.h +++ b/third_party/blink/renderer/core/html/anchor_element_metrics_sender.h
@@ -135,7 +135,7 @@ void SetShouldSkipUpdateDelays(bool should_skip_for_testing); - base::TimeTicks NavigationStart(const HTMLAnchorElement& element); + base::TimeTicks NavigationStart() const; void RegisterForLifecycleNotifications();
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc index 236e969..36d1e73 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
@@ -728,8 +728,9 @@ DoPaintInvalidation(gfx::ToEnclosingRect(invalidation_rect)); } - if (context_ && HasImageBitmapContext() && context_->CcLayer()) - context_->CcLayer()->SetNeedsDisplay(); + if (IsImageBitmapRenderingContext() && RenderingContext()->CcLayer()) { + RenderingContext()->CcLayer()->SetNeedsDisplay(); + } NotifyListenersCanvasChanged(); did_notify_listeners_for_current_frame_ = true; @@ -1634,28 +1635,25 @@ // TransferControlToOffscreen is asynchronous, this will need to finish the // first Frame in order to have a first OffscreenCanvasFrame. image = OffscreenCanvasFrame()->Bitmap(); - } else if (!context_) { - image = GetTransparentImage(); - } else if (HasImageBitmapContext()) { - image = context_->GetImage(reason); - - if (!image) - image = GetTransparentImage(); - } else if (IsWebGL()) { - // TODO(ccameron): Canvas should produce sRGB images. - // https://crbug.com/672299 - // Because WebGL sources always require making a copy of the back buffer, we - // use paintRenderingResultsToCanvas instead of getImage in order to keep a - // cached copy of the backing in the canvas's resource provider. - RenderingContext()->PaintRenderingResultsToCanvas(kBackBuffer); - if (ResourceProvider()) - image = ResourceProvider()->Snapshot(reason); - else - image = GetTransparentImage(); } else { - image = RenderingContext()->GetImage(reason); - if (!image) + if (IsWebGL() || IsWebGPU()) { + // TODO(https://crbug.com/672299): Canvas should produce sRGB images. + // Because WebGL/WebGPU sources always require copying the back buffer, + // we use PaintRenderingResultsToCanvas instead of GetImage in order to + // keep a cached copy of the backing in the canvas's resource provider. + RenderingContext()->PaintRenderingResultsToCanvas(kBackBuffer); + // TODO(sunnyps): Check what PaintRenderingResultsToCanvas returns. It + // seems the above returns false unexpectedly in some tests. + if (ResourceProvider()) { + image = ResourceProvider()->Snapshot(reason); + } + } else if (RenderingContext()) { + // This is either CanvasRenderingContext2D or ImageBitmapRenderingContext. + image = RenderingContext()->GetImage(reason); + } + if (!image) { image = GetTransparentImage(); + } } if (!image) { @@ -1678,14 +1676,17 @@ gfx::SizeF HTMLCanvasElement::ElementSize( const gfx::SizeF&, const RespectImageOrientationEnum) const { - if (context_ && HasImageBitmapContext()) { - scoped_refptr<Image> image = context_->GetImage(FlushReason::kNone); - if (image) + if (IsImageBitmapRenderingContext()) { + scoped_refptr<Image> image = + RenderingContext()->GetImage(FlushReason::kNone); + if (image) { return gfx::SizeF(image->width(), image->height()); + } return gfx::SizeF(0, 0); } - if (OffscreenCanvasFrame()) + if (OffscreenCanvasFrame()) { return gfx::SizeF(OffscreenCanvasFrame()->Size()); + } return gfx::SizeF(width(), height()); } @@ -1929,12 +1930,6 @@ return CanvasRenderingContextHost::GetOrCreateCanvasResourceProvider(hint); } -bool HTMLCanvasElement::HasImageBitmapContext() const { - if (!context_) - return false; - return context_->IsImageBitmapRenderingContext(); -} - scoped_refptr<StaticBitmapImage> HTMLCanvasElement::GetTransparentImage() { if (!transparent_image_ || transparent_image_.get()->Size() != Size()) transparent_image_ = CreateTransparentImage(Size());
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h index 8eafaa01..3f8a892 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h
@@ -361,10 +361,6 @@ const double& quality, SourceDrawingBuffer) const; - // Returns true if the canvas' context type is inherited from - // ImageBitmapRenderingContextBase. - bool HasImageBitmapContext() const; - // Returns the transparent image resource for this canvas. scoped_refptr<StaticBitmapImage> GetTransparentImage();
diff --git a/third_party/blink/renderer/core/html/resources/stylable_select.css b/third_party/blink/renderer/core/html/resources/stylable_select.css index 69c4914d..e59982e 100644 --- a/third_party/blink/renderer/core/html/resources/stylable_select.css +++ b/third_party/blink/renderer/core/html/resources/stylable_select.css
@@ -8,6 +8,9 @@ select { background-color: -internal-appearance-auto-base-select(Field, transparent); + border: -internal-appearance-auto-base-select(1px, 0px), + -internal-appearance-auto-base-select(solid, none), + -internal-appearance-auto-base-select(light-dark(#767676, #858585), transparent); } /* Undo unwanted styles from select rules */
diff --git a/third_party/blink/renderer/core/intersection_observer/intersection_observer_test.cc b/third_party/blink/renderer/core/intersection_observer/intersection_observer_test.cc index c5d956cb..23d1cb0 100644 --- a/third_party/blink/renderer/core/intersection_observer/intersection_observer_test.cc +++ b/third_party/blink/renderer/core/intersection_observer/intersection_observer_test.cc
@@ -559,6 +559,64 @@ EXPECT_FALSE(target_observer_delegate->LastEntry()->isIntersecting()); } +TEST_P(IntersectionObserverTest, VisibilityHiddenChangeSize) { + WebView().MainFrameViewWidget()->Resize(gfx::Size(200, 200)); + SimRequest main_resource("https://example.com/", "text/html"); + LoadURL("https://example.com/"); + main_resource.Complete(R"HTML( + <style> + body { + width: 500px; + height: 500px; + } + #target { + position: absolute; + visibility: hidden; + top: -20px; + width: 10px; + height: 10px; + } + </style> + <div id=target></div> + )HTML"); + Compositor().BeginFrame(); + + Element* target = GetDocument().getElementById(AtomicString("target")); + ASSERT_TRUE(target); + + TestIntersectionObserverDelegate* target_observer_delegate = + MakeGarbageCollected<TestIntersectionObserverDelegate>(GetDocument()); + + IntersectionObserver* target_observer = + MakeGarbageCollected<IntersectionObserver>( + *target_observer_delegate, + LocalFrameUkmAggregator::kJavascriptIntersectionObserver, + IntersectionObserver::Params{ + .thresholds = {std::numeric_limits<float>::min()}, + }); + + DummyExceptionStateForTesting exception_state; + target_observer->observe(target, exception_state); + ASSERT_FALSE(exception_state.HadException()); + + Compositor().BeginFrame(); + test::RunPendingTasks(); + ASSERT_FALSE(Compositor().NeedsBeginFrame()); + + EXPECT_EQ(target_observer_delegate->CallCount(), 1); + EXPECT_EQ(target_observer_delegate->EntryCount(), 1); + EXPECT_FALSE(target_observer_delegate->LastEntry()->isIntersecting()); + + target->SetInlineStyleProperty(CSSPropertyID::kHeight, "100px"); + Compositor().BeginFrame(); + test::RunPendingTasks(); + ASSERT_FALSE(Compositor().NeedsBeginFrame()); + + EXPECT_EQ(target_observer_delegate->CallCount(), 2); + EXPECT_EQ(target_observer_delegate->EntryCount(), 2); + EXPECT_TRUE(target_observer_delegate->LastEntry()->isIntersecting()); +} + TEST_P(IntersectionObserverTest, ResumePostsTask) { WebView().MainFrameViewWidget()->Resize(gfx::Size(800, 600)); SimRequest main_resource("https://example.com/", "text/html");
diff --git a/third_party/blink/renderer/core/layout/grid/grid_line_resolver.cc b/third_party/blink/renderer/core/layout/grid/grid_line_resolver.cc index 00a2279..71d616a 100644 --- a/third_party/blink/renderer/core/layout/grid/grid_line_resolver.cc +++ b/third_party/blink/renderer/core/layout/grid/grid_line_resolver.cc
@@ -208,22 +208,17 @@ // to be in area defined by `subgridded_columns` and `subgridded_rows`. auto ClampSubgridAreas = [](NamedGridAreaMap& subgrid_map, const NamedGridAreaMap& style_map, - GridArea subgrid_span) -> void { - const wtf_size_t subgrid_column_span = - subgrid_span.columns.IsTranslatedDefinite() - ? subgrid_span.columns.IntegerSpan() - : 1; - const wtf_size_t subgrid_row_span = subgrid_span.rows.IsTranslatedDefinite() - ? subgrid_span.rows.IntegerSpan() - : 1; + const GridArea& subgrid_span) { for (const auto& pair : style_map) { - auto position = pair.value; + auto clamped_area = pair.value; - position.columns.Intersect(0, subgrid_column_span); - position.rows.Intersect(0, subgrid_row_span); - - GridArea clamped_area(position.rows, position.columns); - subgrid_map.Set(pair.key, clamped_area); + if (subgrid_span.columns.IsTranslatedDefinite()) { + clamped_area.columns.Intersect(0, subgrid_span.columns.IntegerSpan()); + } + if (subgrid_span.rows.IsTranslatedDefinite()) { + clamped_area.rows.Intersect(0, subgrid_span.rows.IntegerSpan()); + } + subgrid_map.Set(pair.key, std::move(clamped_area)); } };
diff --git a/third_party/blink/renderer/core/paint/paint_invalidator.cc b/third_party/blink/renderer/core/paint/paint_invalidator.cc index 0baf4ad4..cbcea30 100644 --- a/third_party/blink/renderer/core/paint/paint_invalidator.cc +++ b/third_party/blink/renderer/core/paint/paint_invalidator.cc
@@ -275,7 +275,10 @@ if (RuntimeEnabledFeatures::IntersectionOptimizationEnabled() && object.ShouldCheckLayoutForPaintInvalidation() && (IsLayoutPaintInvalidationReason(reason) || - reason == PaintInvalidationReason::kJustCreated)) { + reason == PaintInvalidationReason::kJustCreated || + // We don't invalidate paint of visibility:hidden objects, but observe + // intersection for them. + object.StyleRef().Visibility() != EVisibility::kVisible)) { object.GetFrameView()->SetIntersectionObservationState( LocalFrameView::kDesired); }
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 1ba02e2..1b6a841 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
@@ -713,6 +713,8 @@ // Need to update the bounds of the scroll property. GetLayoutBox()->SetNeedsPaintPropertyUpdate(); Layer()->SetNeedsCompositingInputsUpdate(); + GetLayoutBox()->GetFrameView()->SetIntersectionObservationState( + LocalFrameView::kDesired); } gfx::Point PaintLayerScrollableArea::LastKnownMousePosition() const {
diff --git a/third_party/blink/renderer/core/svg/svg_animate_element.cc b/third_party/blink/renderer/core/svg/svg_animate_element.cc index 9daf9f3..ee180c3f 100644 --- a/third_party/blink/renderer/core/svg/svg_animate_element.cc +++ b/third_party/blink/renderer/core/svg/svg_animate_element.cc
@@ -441,6 +441,18 @@ to_at_end_of_duration_value, targetElement()); } +AnimationMode SVGAnimateElement::CalculateAnimationMode() { + AnimationMode animation_mode = SVGAnimationElement::CalculateAnimationMode(); + if (animation_mode == kByAnimation || animation_mode == kFromByAnimation) { + // by/from-by animation may only be used with attributes that support addition + // (e.g. most numeric attributes). + if (!AnimatedPropertyTypeSupportsAddition()) { + return kNoAnimation; + } + } + return animation_mode; +} + bool SVGAnimateElement::CalculateToAtEndOfDurationValue( const String& to_at_end_of_duration_string) { if (to_at_end_of_duration_string.empty()) @@ -464,12 +476,7 @@ DCHECK(targetElement()); DCHECK(GetAnimationMode() == kByAnimation || GetAnimationMode() == kFromByAnimation); - - // by/from-by animation may only be used with attributes that support addition - // (e.g. most numeric attributes). - if (!AnimatedPropertyTypeSupportsAddition()) - return false; - + DCHECK(AnimatedPropertyTypeSupportsAddition()); DCHECK(!IsA<SVGSetElement>(*this)); from_property_ = ParseValue(from_string);
diff --git a/third_party/blink/renderer/core/svg/svg_animate_element.h b/third_party/blink/renderer/core/svg/svg_animate_element.h index 2ea9c62..63efffbd8 100644 --- a/third_party/blink/renderer/core/svg/svg_animate_element.h +++ b/third_party/blink/renderer/core/svg/svg_animate_element.h
@@ -64,6 +64,7 @@ SMILAnimationValue CreateAnimationValue() const final; void ClearAnimationValue() final; + AnimationMode CalculateAnimationMode() override; bool CalculateToAtEndOfDurationValue( const String& to_at_end_of_duration_string) final; bool CalculateFromAndToValues(const String& from_string,
diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc index 48d780e..3df206d9 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
@@ -748,8 +748,9 @@ return kIncludeObject; // Anything with an explicit ARIA role should be included. - if (AriaRoleAttribute() != ax::mojom::blink::Role::kUnknown) + if (RawAriaRole() != ax::mojom::blink::Role::kUnknown) { return kIncludeObject; + } // Anything with CSS alt should be included. // Descendants are pruned: IsRelevantPseudoElementDescendant() returns false. @@ -1314,7 +1315,7 @@ } unsigned AXNodeObject::ColumnCount() const { - if (AriaRoleAttribute() != ax::mojom::blink::Role::kUnknown) { + if (RawAriaRole() != ax::mojom::blink::Role::kUnknown) { return AXObject::ColumnCount(); } @@ -1326,7 +1327,7 @@ } unsigned AXNodeObject::RowCount() const { - if (AriaRoleAttribute() != ax::mojom::blink::Role::kUnknown) { + if (RawAriaRole() != ax::mojom::blink::Role::kUnknown) { return AXObject::RowCount(); } @@ -2281,7 +2282,7 @@ return RoleFromLayoutObjectOrNode(); } -ax::mojom::blink::Role AXNodeObject::DetermineAccessibilityRole() { +ax::mojom::blink::Role AXNodeObject::DetermineRoleValue() { #if DCHECK_IS_ON() base::AutoReset<bool> reentrancy_protector(&is_computing_role_, true); #endif @@ -2294,7 +2295,7 @@ native_role_ = NativeRoleIgnoringAria(); - aria_role_ = DetermineAriaRoleAttribute(); + aria_role_ = DetermineAriaRole(); return aria_role_ == ax::mojom::blink::Role::kUnknown ? native_role_ : aria_role_; @@ -2343,8 +2344,9 @@ } Element* AXNodeObject::MenuItemElementForMenu() const { - if (AriaRoleAttribute() != ax::mojom::blink::Role::kMenu) + if (RawAriaRole() != ax::mojom::blink::Role::kMenu) { return nullptr; + } return SiblingWithAriaRole("menuitem", GetNode()); } @@ -2394,7 +2396,7 @@ auto* element = DynamicTo<Element>(node); return ((element && element->IsFormControlElement()) || - AXObject::IsARIAControl(AriaRoleAttribute())); + AXObject::IsARIAControl(RawAriaRole())); } bool AXNodeObject::IsAutofillAvailable() const { @@ -3912,7 +3914,7 @@ // - scrollbar, slider : half way between aria-valuemin and aria-valuemax // - separator : 50 // - spinbutton : 0 - switch (AriaRoleAttribute()) { + switch (RawAriaRole()) { case ax::mojom::blink::Role::kScrollBar: case ax::mojom::blink::Role::kSlider: { float min_value, max_value; @@ -3965,7 +3967,7 @@ // In ARIA 1.1, default value of scrollbar, separator and slider // for aria-valuemax were changed to 100. This change was made for // progressbar in ARIA 1.2. - switch (AriaRoleAttribute()) { + switch (RawAriaRole()) { case ax::mojom::blink::Role::kMeter: case ax::mojom::blink::Role::kProgressIndicator: case ax::mojom::blink::Role::kScrollBar: @@ -4001,7 +4003,7 @@ // In ARIA 1.1, default value of scrollbar, separator and slider // for aria-valuemin were changed to 0. This change was made for // progressbar in ARIA 1.2. - switch (AriaRoleAttribute()) { + switch (RawAriaRole()) { case ax::mojom::blink::Role::kMeter: case ax::mojom::blink::Role::kProgressIndicator: case ax::mojom::blink::Role::kScrollBar: @@ -4046,7 +4048,7 @@ return std::isfinite(*out_value); } - switch (AriaRoleAttribute()) { + switch (RawAriaRole()) { case ax::mojom::blink::Role::kScrollBar: case ax::mojom::blink::Role::kSplitter: case ax::mojom::blink::Role::kSlider: { @@ -4270,7 +4272,7 @@ return GetValueForControl(); } -ax::mojom::blink::Role AXNodeObject::AriaRoleAttribute() const { +ax::mojom::blink::Role AXNodeObject::RawAriaRole() const { return aria_role_; } @@ -5719,11 +5721,10 @@ case ax::mojom::blink::Role::kSplitter: case ax::mojom::blink::Role::kSwitch: case ax::mojom::blink::Role::kTab: - DCHECK(!result) << "Expected to disallow children for:" - << "\n* Node: " << GetNode() - << "\n* Layout Object: " << GetLayoutObject() + DCHECK(!result) << "Expected to disallow children for:" << "\n* Node: " + << GetNode() << "\n* Layout Object: " << GetLayoutObject() << "\n* Native role: " << native_role_ - << "\n* Aria role: " << AriaRoleAttribute(); + << "\n* Aria role: " << RawAriaRole(); break; case ax::mojom::blink::Role::kComboBoxSelect: case ax::mojom::blink::Role::kPopUpButton: @@ -6408,7 +6409,7 @@ name_sources->push_back(NameSource(*found_text_alternative, kAltAttr)); name_sources->back().type = name_from; } - if (!alt.empty() && !alt.IsNull()) { + if (!alt.empty()) { text_alternative = alt; if (name_sources) { NameSource& source = name_sources->back(); @@ -6541,7 +6542,7 @@ name_sources->push_back(NameSource(*found_text_alternative, kAltAttr)); name_sources->back().type = name_from; } - if (!alt.IsNull()) { + if (!alt.empty()) { text_alternative = alt; if (name_sources) { NameSource& source = name_sources->back(); @@ -6773,7 +6774,7 @@ } for (NameSource& name_source : *name_sources) { - if (name_source.text.IsNull() || name_source.superseded) { + if (name_source.text.empty() || name_source.superseded) { continue; }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.h b/third_party/blink/renderer/modules/accessibility/ax_node_object.h index f494ca8f..2ba5bd4 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.h
@@ -81,7 +81,7 @@ AXObjectInclusion ShouldIncludeBasedOnSemantics( IgnoredReasons* = nullptr) const; bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override; - ax::mojom::blink::Role DetermineAccessibilityRole() override; + ax::mojom::blink::Role DetermineRoleValue() override; ax::mojom::blink::Role NativeRoleIgnoringAria() const override; void AlterSliderOrSpinButtonValue(bool increase); AXObject* ActiveDescendant() override; @@ -221,7 +221,7 @@ bool recursive) const override; // ARIA attributes. - ax::mojom::blink::Role AriaRoleAttribute() const final; + ax::mojom::blink::Role RawAriaRole() const final; void AriaDescribedbyElements(AXObjectVector&) const override; void AriaOwnsElements(AXObjectVector&) const override; void Dropeffects(
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc index 12a012b..0a8b1d3 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc
@@ -456,7 +456,7 @@ } // The role name vector contains only ARIA roles, and no internal roles. -static Vector<AtomicString>* CreateARIARoleNameVector() { +static Vector<AtomicString>* CreateAriaRoleNameVector() { Vector<AtomicString>* role_name_vector = new Vector<AtomicString>(kNumRoles); role_name_vector->Fill(g_null_atom, kNumRoles); @@ -718,7 +718,7 @@ // The role must be determined immediately. // Note: in order to avoid reentrancy, the role computation cannot use the // ParentObject(), although it can use the DOM parent. - role_ = DetermineAccessibilityRole(); + role_ = DetermineRoleValue(); #if DCHECK_IS_ON() DCHECK(IsValidRole(role_)) << "Illegal " << role_ << " for\n" << GetNode() << '\n' @@ -1621,8 +1621,7 @@ // Expose StringAttribute::kRole, which is used for the xml-roles object // attribute. Prefer the raw ARIA role attribute value, otherwise, the ARIA // equivalent role is used, if it is a role that is exposed in xml-roles. - const AtomicString& role_str = - GetRoleAttributeStringForObjectAttribute(node_data); + const AtomicString& role_str = GetRoleStringForSerialization(node_data); TruncateAndAddStringAttribute( node_data, ax::mojom::blink::StringAttribute::kRole, role_str); } @@ -2522,7 +2521,7 @@ if (IsA<HTMLSelectElement>(listbox_candidate->GetNode())) return nullptr; // Require an ARIA role on the next sibling. - if (!ui::IsComboBoxContainer(listbox_candidate->AriaRoleAttribute())) { + if (!ui::IsComboBoxContainer(listbox_candidate->RawAriaRole())) { return nullptr; } // Naming a listbox within a composite combobox widget is not part of a @@ -2540,7 +2539,7 @@ return listbox_candidate; } -const AtomicString& AXObject::GetRoleAttributeStringForObjectAttribute( +const AtomicString& AXObject::GetRoleStringForSerialization( ui::AXNodeData* node_data) { // All ARIA roles are exposed in xml-roles. if (const AtomicString& role_str = @@ -2559,7 +2558,7 @@ // Landmarks are the only roles exposed in xml-roles, matching Firefox. return g_null_atom; } - return ARIARoleName(landmark_role); + return AriaRoleName(landmark_role); } void AXObject::SerializeMarkerAttributes(ui::AXNodeData* node_data) const { @@ -2736,7 +2735,7 @@ // if it is a child of a landmark disallowed element, UNLESS it has // an accessible name. if (role_ == ax::mojom::blink::Role::kComplementary && - AriaRoleAttribute() != ax::mojom::blink::Role::kComplementary) { + RawAriaRole() != ax::mojom::blink::Role::kComplementary) { if (IsDescendantOfLandmarkDisallowedElement() && !IsNameFromAuthorAttribute()) { return ax::mojom::blink::Role::kGenericContainer; @@ -2762,9 +2761,9 @@ bool AXObject::IsARIATextField() const { if (IsAtomicTextField()) return false; // Native role supercedes the ARIA one. - return AriaRoleAttribute() == ax::mojom::blink::Role::kTextField || - AriaRoleAttribute() == ax::mojom::blink::Role::kSearchBox || - AriaRoleAttribute() == ax::mojom::blink::Role::kTextFieldWithComboBox; + return RawAriaRole() == ax::mojom::blink::Role::kTextField || + RawAriaRole() == ax::mojom::blink::Role::kSearchBox || + RawAriaRole() == ax::mojom::blink::Role::kTextFieldWithComboBox; } bool AXObject::IsButton() const { @@ -4207,13 +4206,12 @@ LastKnownIsIgnoredButIncludedInTreeValue(); } -ax::mojom::blink::Role AXObject::DetermineAccessibilityRole() { +ax::mojom::blink::Role AXObject::DetermineRoleValue() { #if DCHECK_IS_ON() base::AutoReset<bool> reentrancy_protector(&is_computing_role_, true); DCHECK(!IsDetached()); - // Check parent object to work around circularity issues during - // AXObject::Init (DetermineAccessibilityRole is called there but before - // the parent is set). + // Check parent object to work around circularity issues during AXObject::Init + // (DetermineRoleValue is called there but before the parent is set). if (CachedParentObject()) { DCHECK(GetDocument()); DCHECK(GetDocument()->Lifecycle().GetState() >= @@ -4382,8 +4380,9 @@ // inside an ARIA 1.1 role of "table", should not be selectable. We may // need to create separate role enums for grid cells vs table cells // to implement this. - if (AriaRoleAttribute() != ax::mojom::blink::Role::kUnknown) + if (RawAriaRole() != ax::mojom::blink::Role::kUnknown) { return true; + } // Otherwise it's only a subwidget if it's in a grid or treegrid, // not in a table. @@ -5211,7 +5210,7 @@ // A role is considered an ARIA attribute. if (!does_undo_role_presentation && - AriaRoleAttribute() != ax::mojom::blink::Role::kUnknown) { + RawAriaRole() != ax::mojom::blink::Role::kUnknown) { return true; } @@ -5366,11 +5365,11 @@ return kRestrictionNone; } -ax::mojom::blink::Role AXObject::AriaRoleAttribute() const { +ax::mojom::blink::Role AXObject::RawAriaRole() const { return ax::mojom::blink::Role::kUnknown; } -ax::mojom::blink::Role AXObject::RawAriaRole() const { +ax::mojom::blink::Role AXObject::DetermineRawAriaRole() const { const AtomicString& aria_role = GetAOMPropertyOrARIAAttribute(AOMStringProperty::kRole); if (aria_role.IsNull() || aria_role.empty()) @@ -5378,8 +5377,8 @@ return AriaRoleStringToRoleEnum(aria_role); } -ax::mojom::blink::Role AXObject::DetermineAriaRoleAttribute() const { - ax::mojom::blink::Role role = RawAriaRole(); +ax::mojom::blink::Role AXObject::DetermineAriaRole() const { + ax::mojom::blink::Role role = DetermineRawAriaRole(); if ((role == ax::mojom::blink::Role::kForm || role == ax::mojom::blink::Role::kRegion) && @@ -7889,9 +7888,9 @@ } // static -const AtomicString& AXObject::ARIARoleName(ax::mojom::blink::Role role) { +const AtomicString& AXObject::AriaRoleName(ax::mojom::blink::Role role) { static const Vector<AtomicString>* aria_role_name_vector = - CreateARIARoleNameVector(); + CreateAriaRoleNameVector(); return aria_role_name_vector->at(static_cast<wtf_size_t>(role)); } @@ -7912,8 +7911,9 @@ bool* is_internal) { if (is_internal) *is_internal = false; - if (const auto& role_name = ARIARoleName(role)) + if (const auto& role_name = AriaRoleName(role)) { return role_name.GetString(); + } if (is_internal) *is_internal = true;
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h index bcfd7298..e03f03b4 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
@@ -392,17 +392,6 @@ virtual bool IsValidationMessage() const; virtual bool IsVirtualObject() const; - // Check object role or purpose. - ax::mojom::blink::Role RoleValue() const; - - // This method is useful in cases where the final role exposed to ATs needs - // to change based on contextual information. For instance, an svgRoot should - // be exposed as an image if it lacks accessible children. Whether or not it - // has accessible children is not known at the time the role is assigned and - // may depend on whether or not a given platform includes children that other - // platforms ignore. - ax::mojom::blink::Role ComputeFinalRoleForSerialization() const; - // Returns true if this object is an ARIA text field, i.e. it is neither an // <input> nor a <textarea>, but it has an ARIA role of textbox, searchbox or // (on certain platforms) combobox. @@ -825,14 +814,78 @@ virtual AXRestriction Restriction() const; + // + // ARIA role attribute. + // + // How role calculation works: + // + // Note that “ARIA role” does not refer to the same thing as “role” here. + // + // (1) Extract the raw ARIA role from the role=”role type” in the object. + // (2) Process the raw ARIA role by applying a set of rules. This new value is + // considered the ARIA role. + // (3) Determine the native role. + // (4) Using the ARIA role and native role, determine the role. + // (5) If possible, apply contextual rules on the role to get the final role. + // + // Because the final role calculation in (5) involves ancestor values, a + // change in an ancestor can affect the final role of the object. In cases + // where it is difficult to check for this change, the role from (4) is used + // instead of the final role from (5). + + // (1) Determine the ARIA role purely based on the role attribute, when no + // additional rules or limitations on role usage are applied. Use + // RawAriaRole() instead if the raw role does not need to be recomputed. + ax::mojom::blink::Role DetermineRawAriaRole() const; + + // (2) Determine the ARIA role after applying rules based on other properties. + ax::mojom::blink::Role DetermineAriaRole() const; + + // (3) Determine the native role using other ARIA properties (without using + // the ARIA role). + virtual ax::mojom::blink::Role NativeRoleIgnoringAria() const = 0; + + // (4) Determine the role using the ARIA role and native role. Use + // RoleValue() instead if the role does not need to be recomputed. + virtual ax::mojom::blink::Role DetermineRoleValue(); + + // (5) Return the role after all possible rules from HTML-AAM, WAI-ARIA, etc. + // have been applied. + // + // This method is useful in cases where the final role exposed to ATs needs + // to change based on contextual information. For instance, an svgRoot should + // be exposed as an image if it lacks accessible children. Whether or not it + // has accessible children is not known at the time the role is assigned and + // may depend on whether or not a given platform includes children that other + // platforms ignore. + ax::mojom::blink::Role ComputeFinalRoleForSerialization() const; + + // Returns the cached raw ARIA role from DetermineRawAriaRole(). + virtual ax::mojom::blink::Role RawAriaRole() const; + + // Returns the cached role from DetermineRoleValue(). + ax::mojom::blink::Role RoleValue() const; + + static ax::mojom::blink::Role AriaRoleStringToRoleEnum(const String&); + + // Return the equivalent ARIA name for an enumerated role, or g_null_atom. + static const AtomicString& AriaRoleName(ax::mojom::blink::Role); + + // Return the equivalent internal role name as a string. Used in DOM Inspector + // and for debugging. + static const String InternalRoleName(ax::mojom::blink::Role); + + // Return a role name, preferring the ARIA over the internal name. + // Optional boolean out param |*is_internal| will be false if the role matches + // an ARIA role, and true if an internal role name is used (no ARIA mapping). + static const String RoleName(ax::mojom::blink::Role, + bool* is_internal = nullptr); + + // Get the role to be used in StringAttribute::kRole, which is used in the + // xml-roles object attribute. + const AtomicString& GetRoleStringForSerialization(ui::AXNodeData* node_data); + // ARIA attributes. - virtual ax::mojom::blink::Role DetermineAccessibilityRole(); - // Determine the ARIA role purely based on the role attribute, when no - // additional rules or limitations on role usage are applied. - ax::mojom::blink::Role RawAriaRole() const; - // Determine the ARIA role after post-processing on the raw ARIA role. - ax::mojom::blink::Role DetermineAriaRoleAttribute() const; - virtual ax::mojom::blink::Role AriaRoleAttribute() const; bool HasAriaAttribute(bool does_undo_role_presentation = false) const; virtual AXObject* ActiveDescendant() { return nullptr; } virtual String AutoComplete() const { return String(); } @@ -1374,19 +1427,6 @@ virtual bool IsEmbeddingElement() const { return false; } // Is this a widget that requires container widget. bool IsSubWidget() const; - static ax::mojom::blink::Role AriaRoleStringToRoleEnum(const String&); - - // Return the equivalent ARIA name for an enumerated role, or g_null_atom. - static const AtomicString& ARIARoleName(ax::mojom::blink::Role); - - // Return the equivalent internal role name as a string. - static const String InternalRoleName(ax::mojom::blink::Role); - - // Return a role name, preferring the ARIA over the internal name. - // Optional boolean out param |*is_internal| will be false if the role matches - // an ARIA role, and true if an internal role name is used (no ARIA mapping). - static const String RoleName(ax::mojom::blink::Role, - bool* is_internal = nullptr); static void AccessibleNodeListToElementVector(const AccessibleNodeList&, HeapVector<Member<Element>>&); @@ -1406,14 +1446,6 @@ bool IsHiddenForTextAlternativeCalculation( const AXObject* aria_label_or_description_root) const; - // What should the role be assuming an ARIA role is not present? - virtual ax::mojom::blink::Role NativeRoleIgnoringAria() const = 0; - - // Get the role to be used in StringAttribute::kRole, which is used in the - // xml-roles object attribute. - const AtomicString& GetRoleAttributeStringForObjectAttribute( - ui::AXNodeData* node_data); - // Extra checks that occur right before a node is evaluated for serialization. void PreSerializationConsistencyCheck();
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc index f7a71fb..9669d1b1 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -4255,7 +4255,7 @@ // Require <section> or role="region" markup. if (!element->HasTagName(html_names::kSectionTag) && - ax_object->RawAriaRole() != ax::mojom::blink::Role::kRegion) { + ax_object->DetermineRawAriaRole() != ax::mojom::blink::Role::kRegion) { return; } @@ -4286,7 +4286,7 @@ void AXObjectCacheImpl::HandleRoleMaybeChangedWithCleanLayout(Node* node) { if (AXObject* obj = GetOrCreate(node)) { // If role would stay the same, do nothing. - if (obj->RoleValue() == obj->DetermineAccessibilityRole()) { + if (obj->RoleValue() == obj->DetermineRoleValue()) { return; } @@ -5537,6 +5537,11 @@ // Kept here for convenient debugging: // DVLOG(1) << "*** AX Serialize: " << ObjectFromAXID(id)->ToString(true); already_serialized_ids.insert(node_data.id); + + // Now that the bounding box for this node is serialized, we can clear the + // node from changed_bounds_ids_ to avoid sending it in + // SerializeLocationChanges() later. + changed_bounds_ids_.erase(id); } DCHECK(already_serialized_ids.Contains(obj->AXObjectID())) @@ -5944,6 +5949,9 @@ void AXObjectCacheImpl::SetCachedBoundingBox( AXID id, const ui::AXRelativeBounds& bounds) { + // When a bounding box of a node is serialized, we store the last value for it + // in cached_bounding_boxes_, to help with comparing if it really changed + // or not when sending another serialization later. cached_bounding_boxes_.Set(id, bounds); } @@ -5969,7 +5977,7 @@ ProcessDeferredAccessibilityEvents(GetDocument(), /*force*/ true); ScopedFreezeAXCache scoped_freeze_cache(*this); AXObject* obj = Get(node); - return AXObject::ARIARoleName(obj ? obj->ComputeFinalRoleForSerialization() + return AXObject::AriaRoleName(obj ? obj->ComputeFinalRoleForSerialization() : ax::mojom::blink::Role::kUnknown); }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_virtual_object.cc b/third_party/blink/renderer/modules/accessibility/ax_virtual_object.cc index c128224f..c81ca07 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_virtual_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_virtual_object.cc
@@ -110,8 +110,8 @@ &found_text_alternative); } -ax::mojom::blink::Role AXVirtualObject::DetermineAccessibilityRole() { - aria_role_ = DetermineAriaRoleAttribute(); +ax::mojom::blink::Role AXVirtualObject::DetermineRoleValue() { + aria_role_ = DetermineAriaRole(); if (aria_role_ != ax::mojom::blink::Role::kUnknown) return aria_role_; @@ -119,7 +119,7 @@ return NativeRoleIgnoringAria(); } -ax::mojom::blink::Role AXVirtualObject::AriaRoleAttribute() const { +ax::mojom::blink::Role AXVirtualObject::RawAriaRole() const { return aria_role_; }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_virtual_object.h b/third_party/blink/renderer/modules/accessibility/ax_virtual_object.h index 39b97df..61569b0 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_virtual_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_virtual_object.h
@@ -35,9 +35,9 @@ AXRelatedObjectVector*, NameSources*) const override; Document* GetDocument() const override; - ax::mojom::blink::Role DetermineAccessibilityRole() override; + ax::mojom::blink::Role DetermineRoleValue() override; ax::mojom::blink::Role NativeRoleIgnoringAria() const override; - ax::mojom::blink::Role AriaRoleAttribute() const override; + ax::mojom::blink::Role RawAriaRole() const override; private: Member<AccessibleNode> accessible_node_;
diff --git a/third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc b/third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc index 807a58fc..2c01cba 100644 --- a/third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc +++ b/third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.cc
@@ -43,11 +43,11 @@ const Element* element) { AXObject* ax_object = GetAXObject(element); if (!ax_object || ax_object->AccessibilityIsIgnored()) { - return AXObject::ARIARoleName(ax::mojom::Role::kNone); + return AXObject::AriaRoleName(ax::mojom::Role::kNone); } ax::mojom::blink::Role role = ax_object->ComputeFinalRoleForSerialization(); - return AXObject::ARIARoleName(role); + return AXObject::AriaRoleName(role); } } // namespace blink
diff --git a/third_party/blink/renderer/modules/buckets/storage_bucket_manager.cc b/third_party/blink/renderer/modules/buckets/storage_bucket_manager.cc index f6d57b7..e5f7ebaf 100644 --- a/third_party/blink/renderer/modules/buckets/storage_bucket_manager.cc +++ b/third_party/blink/renderer/modules/buckets/storage_bucket_manager.cc
@@ -108,8 +108,13 @@ auto promise = resolver->Promise(); ExecutionContext* context = ExecutionContext::From(script_state); - if (context->IsContextDestroyed() || - !context->GetSecurityOrigin()->CanAccessStorageBuckets()) { + + if (context->IsContextDestroyed()) { + exception_state.ThrowTypeError("The window/worker has been destroyed."); + return promise; + } + + if (!context->GetSecurityOrigin()->CanAccessStorageBuckets()) { exception_state.ThrowSecurityError( "Access to Storage Buckets API is denied in this context."); return promise; @@ -147,8 +152,12 @@ auto promise = resolver->Promise(); ExecutionContext* context = ExecutionContext::From(script_state); - if (context->IsContextDestroyed() || - !context->GetSecurityOrigin()->CanAccessStorageBuckets()) { + if (context->IsContextDestroyed()) { + exception_state.ThrowTypeError("The window/worker has been destroyed."); + return promise; + } + + if (!context->GetSecurityOrigin()->CanAccessStorageBuckets()) { exception_state.ThrowSecurityError( "Access to Storage Buckets API is denied in this context."); return promise; @@ -169,8 +178,12 @@ auto promise = resolver->Promise(); ExecutionContext* context = ExecutionContext::From(script_state); - if (context->IsContextDestroyed() || - !context->GetSecurityOrigin()->CanAccessStorageBuckets()) { + if (context->IsContextDestroyed()) { + exception_state.ThrowTypeError("The window/worker has been destroyed."); + return promise; + } + + if (!context->GetSecurityOrigin()->CanAccessStorageBuckets()) { exception_state.ThrowSecurityError( "Access to Storage Buckets API is denied in this context."); return promise;
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc index 50bd30e..5ea1c3d 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
@@ -3522,6 +3522,10 @@ "Unable to replace canvas image."); } + // Destroy the WebGPU texture to prevent it from being used after + // endWebGPUAccess. + webgpu_access_texture_->destroy(); + // We are finished with the WebGPU texture and its associated device. webgpu_access_texture_ = nullptr; }
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.h b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.h index 3256a7b..26b5a8b 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.h +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.h
@@ -293,8 +293,8 @@ // is restored, and Canvas2D method calls will function normally once more. // Throws InvalidStateError if a matching call to beginWebGPUAccess was not // performed. - // TODO(crbug.com/1517367): document the expected behavior if WebGPU continues - // to access the GPUTexture after endWebGPUAccess is called. + // Generates a GPUValidationError if the GPUTexture is used after + // endWebGPUAccess is called. void endWebGPUAccess(ExceptionState& exception_state); // Returns the format of the GPUTexture that beginWebGPUAccess will return.
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_canvas_context.cc b/third_party/blink/renderer/modules/webgpu/gpu_canvas_context.cc index 37b44d2..d70490f 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_canvas_context.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu_canvas_context.cc
@@ -158,8 +158,9 @@ bool GPUCanvasContext::PaintRenderingResultsToCanvas( SourceDrawingBuffer source_buffer) { - if (!swap_buffers_) + if (!swap_buffers_) { return false; + } if (Host()->ResourceProvider() && Host()->ResourceProvider()->Size() != swap_buffers_->Size()) { @@ -168,6 +169,9 @@ CanvasResourceProvider* resource_provider = Host()->GetOrCreateCanvasResourceProvider(RasterModeHint::kPreferGPU); + if (!resource_provider) { + return false; + } return CopyRenderingResultsFromDrawingBuffer(resource_provider, source_buffer);
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index dbecbf64..6ac69ef 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1482,8 +1482,9 @@ // This is the "new" version of getHTML() used for declarative shadow // DOM, and this version will replace the deprecated getInnerHTML(), which // is enabled by the ElementGetInnerHTML feature. + // Shipped in M125, flag can be removed in M127. name: "ElementGetHTML", - status: "experimental", + status: "stable", }, { // This is the "old" version of getInnerHTML() used for declarative shadow
diff --git a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py index 683cfb7..59788d68f 100644 --- a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py +++ b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py
@@ -30,6 +30,7 @@ import json import logging import optparse +import posixpath import re import traceback from typing import List, Optional @@ -326,6 +327,12 @@ virtual_suites = port.virtual_test_suites() virtual_suites.sort(key=lambda s: s.full_prefix) + wpt_tests = set() + for wpt_dir in port.WPT_DIRS: + wpt_tests.update( + posixpath.join(wpt_dir, url) + for url in port.wpt_manifest(wpt_dir).all_urls()) + failures = [] for suite in virtual_suites: suite_comps = suite.full_prefix.split(port.TEST_PATH_SEPARATOR) @@ -353,7 +360,9 @@ continue base_comps = base.split(port.TEST_PATH_SEPARATOR) absolute_base = port.abspath_for_test(base) - if fs.isfile(absolute_base): + # Also, allow any WPT URLs that are valid generated tests but + # aren't test files (e.g., `.any.js` and variants). + if fs.isfile(absolute_base) or base in wpt_tests: del base_comps[-1] elif not fs.isdir(absolute_base): failure = 'Base "{}" in virtual suite "{}" must refer to a real file or directory'.format( @@ -380,7 +389,8 @@ failures.append(failure) for exclusive_test in suite.exclusive_tests: - if not fs.exists(port.abspath_for_test(exclusive_test)): + if not fs.exists(port.abspath_for_test( + exclusive_test)) and base not in wpt_tests: failure = 'Exclusive_tests entry "{}" in virtual suite "{}" must refer to a real file or directory'.format( exclusive_test, prefix) failures.append(failure)
diff --git a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py index 0c6dbd13..8c0cd17c 100644 --- a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py +++ b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py
@@ -30,7 +30,7 @@ import optparse import textwrap import unittest -from unittest import mock +from unittest.mock import patch from blinkpy.common import exit_codes from blinkpy.common.host_mock import MockHost @@ -469,11 +469,21 @@ self.host = MockHost() self.options = optparse.Values({ 'platform': 'test', - 'debug_rwt_logging': False + 'debug_rwt_logging': False, + # Assume the manifest is already up-to-date. + 'manifest_update': False, }) self.port = self.host.port_factory.get('test', options=self.options) self.host.port_factory.get = lambda options=None: self.port + fs = self.host.filesystem + manifest_path = fs.join(self.port.web_tests_dir(), 'external', 'wpt', + 'MANIFEST.json') + fs.write_text_file(manifest_path, json.dumps({})) + manifest_path = fs.join(self.port.web_tests_dir(), 'wpt_internal', + 'MANIFEST.json') + fs.write_text_file(manifest_path, json.dumps({})) + def test_check_virtual_test_suites_readme(self): self.port.virtual_test_suites = lambda: [ VirtualTestSuite(prefix='foo', platforms=['Linux', 'Mac', 'Win'], bases=['test'], args=['--foo']), @@ -494,6 +504,46 @@ self.host, self.options) self.assertFalse(res) + def test_check_virtual_test_suites_generated(self): + fs = self.host.filesystem + # Satisfy the README check, which is out of scope for this test. + fs.write_text_file( + fs.join(self.port.web_tests_dir(), 'virtual', 'wpt-generated', + 'README.md'), '') + manifest = { + 'items': { + 'testharness': { + 'test.any.js': [ + 'df2f8b048c370d3ab009946d73d7de6f8a412471', + ['test.any.html?a', {}], + ['test.any.worker.html?a', {}], + ['test.any.html?b', {}], + ['test.any.worker.html?b', {}], + ], + }, + }, + } + manifest_path = fs.join(self.port.web_tests_dir(), 'external', 'wpt', + 'MANIFEST.json') + fs.write_text_file(manifest_path, json.dumps(manifest)) + + suites = [ + VirtualTestSuite(prefix='wpt-generated', + platforms=['Linux', 'Mac', 'Win'], + bases=[ + 'external/wpt/test.any.html?a', + 'external/wpt/test.any.worker.html?b' + ], + exclusive_tests='ALL', + args=['--arg']), + ] + with patch.object(self.port, + 'virtual_test_suites', + return_value=suites): + self.assertEqual( + lint_test_expectations.check_virtual_test_suites( + self.host, self.options), []) + def test_check_virtual_test_suites_redundant(self): self.port.virtual_test_suites = lambda: [ VirtualTestSuite(prefix='foo', platforms=['Linux', 'Mac', 'Win'], bases=['test/sub', 'test'], args=['--foo']),
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/android.py b/third_party/blink/tools/blinkpy/web_tests/port/android.py index d2793ef..accdbd6 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/android.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/android.py
@@ -60,6 +60,11 @@ self._filesystem.join(self.web_tests_dir(), 'SlowTests') ])) + def default_child_processes(self): + # Test against a single device by default to avoid timeouts + return 1 + + # product constants used by the wpt runner. ANDROID_WEBVIEW = 'android_webview' CHROME_ANDROID = 'chrome_android' @@ -69,4 +74,4 @@ PRODUCTS_TO_STEPNAMES = { ANDROID_WEBVIEW: 'system_webview_wpt', CHROME_ANDROID: 'chrome_public_wpt', -} \ No newline at end of file +}
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/webview.py b/third_party/blink/tools/blinkpy/web_tests/port/webview.py index e0810060..9cee813 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/webview.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/webview.py
@@ -57,3 +57,7 @@ 'StaleTestExpectations'), self._filesystem.join(self.web_tests_dir(), 'SlowTests') ])) + + def default_child_processes(self): + # Test against a single device by default to avoid timeouts + return 1
diff --git a/third_party/blink/tools/blinkpy/wpt_tests/product.py b/third_party/blink/tools/blinkpy/wpt_tests/product.py index 707a220..6e585bef 100644 --- a/third_party/blink/tools/blinkpy/wpt_tests/product.py +++ b/third_party/blink/tools/blinkpy/wpt_tests/product.py
@@ -164,11 +164,6 @@ self.adb_binary = devil_env.config.FetchPath('adb') # pylint: disable=undefined-variable; self.devices = [] - @functools.cached_property - def processes(self) -> int: - # TODO(crbug.com/333782826): Ensure the derived parallelism is one. - return 1 - @contextlib.contextmanager def _install_apk(self, device, path): """Helper context manager for ensuring a device uninstalls an APK."""
diff --git a/third_party/blink/web_tests/FlagExpectations/enable-skia-graphite b/third_party/blink/web_tests/FlagExpectations/enable-skia-graphite index c418aa6c..c974cf2 100644 --- a/third_party/blink/web_tests/FlagExpectations/enable-skia-graphite +++ b/third_party/blink/web_tests/FlagExpectations/enable-skia-graphite
@@ -32,141 +32,16 @@ crbug.com/1518086 external/wpt/html/semantics/embedded-content/media-elements/ready-states/autoplay-hidden.optional.html [ Failure ] # ====== New tests from wpt-importer added here ====== -crbug.com/332936305 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-match-ident.html [ Failure ] -crbug.com/332806531 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-match-wildcard-no-star.html [ Failure ] -crbug.com/332572759 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html [ Failure ] -crbug.com/332572759 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-match-wildcard-no-star.html [ Failure ] -crbug.com/332345862 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html [ Failure ] -crbug.com/332345830 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html [ Failure ] -crbug.com/332345830 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-match-multiple.html [ Failure ] -crbug.com/331835720 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-exit.html [ Failure ] -crbug.com/331884460 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-old-with-class-new-without.html [ Failure ] -crbug.com/331786266 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-mismatch-wildcard.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-match-wildard.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-mismatch-wildcard.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-match-wildard.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-mismatch-partial.html [ Failure ] crbug.com/626703 external/wpt/css/compositing/mix-blend-mode/mix-blend-mode-video-sibling.html [ Crash ] crbug.com/626703 external/wpt/css/compositing/mix-blend-mode/mix-blend-mode-video.html [ Crash ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-exit.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-mismatch-partial.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-entry.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/hit-test-unpainted-element.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/new-and-old-sizes-match.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/fractional-box-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-match-multiple.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-on-top-of-viewport-partially-onscreen-old.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-match-wildard.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/transform-origin-view-transition-group.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/hit-test-unpainted-element.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-entry.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/new-and-old-sizes-match.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/new-content-container-writing-modes.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/content-with-clip-root.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-left-of-viewport-partially-onscreen-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/new-content-container-writing-modes.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/new-content-element-writing-modes.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/new-content-captures-clip-path.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/new-and-old-sizes-match.html [ Failure ] crbug.com/626703 external/wpt/webnn/conformance_tests/gpu/constant.https.any.worker.html [ Crash Failure ] crbug.com/626703 external/wpt/webnn/conformance_tests/gpu/expand.https.any.html [ Crash ] crbug.com/626703 external/wpt/webnn/conformance_tests/gpu/pad.https.any.worker.html [ Crash ] crbug.com/626703 external/wpt/webnn/conformance_tests/gpu/pooling.https.any.worker.html [ Crash Failure ] crbug.com/626703 external/wpt/webnn/conformance_tests/gpu/prelu.https.any.worker.html [ Crash Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/clip-path-larger-than-border-box-on-child-of-named-element.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/clip-path-larger-than-border-box-on-child-of-named-element.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/clip-path-larger-than-border-box-on-child-of-named-element.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-match-ident.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/span-with-overflowing-text-hidden.html [ Failure ] crbug.com/626703 virtual/composite-clip-path-animation/external/wpt/css/css-masking/clip-path/animations/clip-path-animation-fixed-position.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/set-current-time.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/new-content-element-writing-modes.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/new-content-object-view-box-clip-path.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/iframe-new-has-scrollbar.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-rendering-invalidation.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/content-with-clip-root.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/transform-origin-view-transition-group.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/fragmented-at-start-ignored.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/iframe-new-has-scrollbar.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/snapshot-containing-block-absolute.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/content-with-clip-root.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/exit-transition-with-anonymous-layout-object.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/fractional-box-with-overflow-children-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/new-content-object-view-box-clip-path-reference.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/new-content-object-view-box-clip-path.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-match-ident.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/transform-origin-view-transition-group.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/content-with-clip.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/fractional-box-new.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/fractional-box-with-overflow-children-new.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/fractional-box-with-shadow-new.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/fragmented-at-start-ignored.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/new-content-object-view-box-clip-path-reference.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/snapshot-containing-block-absolute.html [ Failure ] crbug.com/626703 virtual/threaded-prefer-compositing/external/wpt/scroll-animations/css/animation-range-visual-test.html [ Failure ] crbug.com/626703 virtual/threaded/external/wpt/scroll-animations/css/animation-range-visual-test.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/content-with-clip.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/dialog-in-rtl-iframe.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/exit-transition-with-anonymous-layout-object.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/fractional-box-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/fractional-box-with-overflow-children-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/fractional-box-with-shadow-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/fractional-translation-from-position.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/iframe-old-has-scrollbar.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/inline-with-offset-from-containing-block.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-below-viewport-offscreen-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-below-viewport-partially-onscreen-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-right-and-left-of-viewport-partially-onscreen-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-right-of-viewport-offscreen-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/massive-element-right-of-viewport-partially-onscreen-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/new-content-captures-clip-path.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/new-content-object-view-box-clip-path-reference.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-rendering-invalidation.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/snapshot-containing-block-static.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/transition-in-empty-iframe.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/wpt_internal/view-transition/snapshot-containing-block-fixed-descendants.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/content-with-clip.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/dialog-in-rtl-iframe.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/fractional-box-with-shadow-new.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/fractional-translation-from-position.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/fragmented-at-start-ignored.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/iframe-old-has-scrollbar.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/inline-with-offset-from-containing-block.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/set-current-time.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/snapshot-containing-block-absolute.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/snapshot-containing-block-static.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/transition-in-empty-iframe.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/wpt_internal/view-transition/snapshot-containing-block-fixed-descendants.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/dialog-in-rtl-iframe.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/exit-transition-with-anonymous-layout-object.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/fractional-translation-from-position.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/iframe-new-has-scrollbar.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/iframe-old-has-scrollbar.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/inline-with-offset-from-containing-block.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/new-content-captures-clip-path.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/new-content-object-view-box-clip-path.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-rendering-invalidation.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/set-current-time.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/snapshot-containing-block-static.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/transition-in-empty-iframe.html [ Failure ] -crbug.com/626703 virtual/view-transition/wpt_internal/view-transition/snapshot-containing-block-fixed-descendants.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-old-with-class-new-without.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-mismatch-ident.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-view-transition-group.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-entry.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-mismatch-ident.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html [ Failure ] -crbug.com/626703 virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-view-transition-group.html [ Failure ] -crbug.com/626703 virtual/view-transition/external/wpt/css/css-view-transitions/pseudo-with-classes-view-transition-group.html [ Failure ] -crbug.com/626703 virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/pseudo-with-classes-match-multiple.html [ Failure ] crbug.com/626703 virtual/force-eager/external/wpt/measure-memory/redirect.client.https.window.html [ Timeout ] crbug.com/626703 virtual/force-eager/external/wpt/measure-memory/redirect.server.https.window.html [ Timeout ] crbug.com/626703 external/wpt/css/css-masking/mask-image/mask-opacity-1e.html [ Failure ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 71c9532c..4b6597d 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -293,6 +293,11 @@ crbug.com/1430357 [ Mac ] virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/massive-element-* [ Failure Pass ] crbug.com/40283765 [ Mac ] virtual/view-transition-on-navigation/wpt_internal/view-transition-on-navigation/transition-to-prerender.html [ Failure ] +crbug.com/333739950 [ Mac ] virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/clip-path-larger-than-border-box-on-child-of-named-element.html [ Failure Pass ] +crbug.com/333739950 [ Mac ] virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/clip-path-larger-than-border-box-on-child-of-named-element.html [ Failure Pass ] +crbug.com/333739950 [ Mac ] virtual/view-transition/external/wpt/css/css-view-transitions/clip-path-larger-than-border-box-on-child-of-named-element.html [ Failure Pass ] +crbug.com/333739950 [ Mac ] virtual/view-transition-wide-gamut/external/wpt/css/css-view-transitions/pseudo-with-classes-* [ Failure Pass ] + # View transition SPA failures with MPA serialization. crbug.com/1443559 [ Mac ] virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/fractional-translation-from-transform.html [ Failure ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index 71fb060f..427527e 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -2573,6 +2573,16 @@ "owners": ["dylancutler@google.com"] }, { + "prefix": "ancestor-chain-bit-considered", + "platforms": ["Linux"], + "bases": [ + "http/tests/cookies/partitioned-cookies/ancestor-chain.https.html" + ], + "args": ["--enable-features=AncestorChainBitEnabledInPartitionedCookies"], + "expires": "Oct 1, 2024", + "owners": ["selya@google.com"] + }, + { "prefix": "permission-element", "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/semantics/permission-element"],
diff --git a/third_party/blink/web_tests/WebGPUExpectations b/third_party/blink/web_tests/WebGPUExpectations index b997050..4be3d2e 100644 --- a/third_party/blink/web_tests/WebGPUExpectations +++ b/third_party/blink/web_tests/WebGPUExpectations
@@ -28,10 +28,10 @@ crbug.com/40823053 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/beginWebGPUAccess-texture-readback.https.worker.html [ Skip ] # Sandbox issue on MacOS < 14.4 -crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba8.https.html [ Failure ] -crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba8.https.worker.html [ Failure ] -crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba16f.https.html [ Failure ] -crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba16f.https.worker.html [ Failure ] +crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba8.https.html [ Failure Pass ] +crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba8.https.worker.html [ Failure Pass ] +crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba16f.https.html [ Failure Pass ] +crbug.com/41485470 [ Mac ] wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-canvas-readback-rgba16f.https.worker.html [ Failure Pass ] # Linux does not yet properly support readback on shared images. crbug.com/40218893 [ Linux ] wpt_internal/webgpu/canvas_webgpu_access/beginWebGPUAccess-texture-readback.https.html [ Skip ]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-invalid-fallback.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-invalid-fallback.html new file mode 100644 index 0000000..57c4e47f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-invalid-fallback.html
@@ -0,0 +1,163 @@ +<!DOCTYPE html> +<title>CSS Anchor Position Test: invalid at computed-value time</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#anchor-valid"> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#anchor-size-valid"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + #cb { + position: relative; + width: 200px; + height: 200px; + border: 1px solid black; + } + + #anchor { + anchor-name: --a; + position: absolute; + width: 50px; + height: 40px; + left: 75px; + top: 75px; + background: coral; + } + + #main > div, #ref { + position: absolute; + background: seagreen; + } + + #ref { + inset: unset; + width: unset; + height: unset; + min-width: unset; + min-height: unset; + max-width: unset; + max-height: unset; + } + +</style> +<div id=cb> + <div id=anchor></div> + <div id=main></div> + <div id=ref>X</div> +</div> +<script> + +// Append <div>X</div> to `container`, and remove it again once the test (`t`) +// is finished. +function createTarget(t, container) { + t.add_cleanup(() => { container.replaceChildren(); }); + let target = document.createElement('div'); + target.textContent = 'X'; + container.append(target); + return target; +} + +// First, some sanity checks to verify that the anchor etc is set up correctly, +// and that anchor() queries can produce results if done correctly. + +test((t) => { + let target = createTarget(t, main); + target.style = ` + position-anchor: --a; + left:anchor(right); + top:anchor(top); + width:anchor-size(width); + height:anchor-size(height); + `; + let cs = getComputedStyle(target); + assert_equals(cs.left, '125px'); + assert_equals(cs.top, '75px'); + assert_equals(cs.width, '50px'); + assert_equals(cs.height, '40px'); +}, 'Element can be anchor positioned'); + +test((t) => { + let target = createTarget(t, main); + target.style = ` + /* No position-anchor here */ + left:anchor(right, 17px); + top:anchor(top, 18px); + width:anchor-size(width, 42px); + height:anchor-size(height, 43px); + `; + let cs = getComputedStyle(target); + assert_equals(cs.left, '17px'); + assert_equals(cs.top, '18px'); + assert_equals(cs.width, '42px'); + assert_equals(cs.height, '43px'); +}, 'Element can use <length> fallback if present'); + +// Now test that any invalid anchor*() behaves as invalid at computed-value +// time if there's no fallback specified. + +// Check that an anchored element with the specified style has the same +// computed insets and sizing as the reference element (#ref), i.e. all +// insets and sizing properties behave as 'unset'. +function test_ref(style, description) { + test((t) => { + let target = createTarget(t, main); + target.style = style; + let cs = getComputedStyle(target); + let ref_cs = getComputedStyle(ref); + assert_equals(cs.top, ref_cs.top, 'top'); + assert_equals(cs.left, ref_cs.left, 'left'); + assert_equals(cs.right, ref_cs.right, 'right'); + assert_equals(cs.bottom, ref_cs.bottom, 'bottom'); + assert_equals(cs.width, ref_cs.width, 'width'); + assert_equals(cs.height, ref_cs.height, 'height'); + assert_equals(cs.minWidth, ref_cs.minWidth, 'minWidth'); + assert_equals(cs.minHeight, ref_cs.minHeight, 'minHeight'); + assert_equals(cs.maxWidth, ref_cs.maxWidth, 'maxWidth'); + assert_equals(cs.maxHeight, ref_cs.maxHeight, 'maxHeight'); + }, `Invalid anchor function, ${description}`); +} + +// No default anchor (position-anchor): +test_ref('left:anchor(left)', 'left'); +test_ref('right:anchor(right)', 'right'); +test_ref('bottom:anchor(bottom)', 'bottom'); +test_ref('top:anchor(top)', 'top'); +test_ref('width:anchor-size(width)', 'width'); +test_ref('height:anchor-size(height)', 'height'); +test_ref('min-width:anchor-size(width)', 'min-width'); +test_ref('min-height:anchor-size(height)', 'min-height'); +test_ref('max-width:anchor-size(width)', 'max-width'); +test_ref('max-height:anchor-size(height)', 'max-height'); + +// Unknown anchor reference: +test_ref('left:anchor(--unknown left)', '--unknown left'); +test_ref('width:anchor-size(--unknown width)', '--unknown width'); + +// Wrong axis; +test_ref('left:anchor(--a top)', 'cross-axis query (vertical)'); +test_ref('top:anchor(--a left)', ' cross-axis query (horizontal)'); + +// Wrong query for the given property: +test_ref('top:anchor-size(--a width)', 'anchor-size() in inset'); +test_ref('width:anchor(--a left)', 'anchor() in sizing property'); + +// Invalid anchor*() deeper within calc(): +test_ref('left:calc(anchor(left) + 10px)', 'nested left'); +test_ref('right:calc(anchor(right) + 10px)', 'nested right'); +test_ref('bottom:calc(anchor(bottom) + 10px)', 'nested bottom'); +test_ref('top:calc(anchor(top) + 10px)', 'nested top'); +test_ref('min-width:calc(anchor-size(width) + 10px)', 'nested min-width'); +test_ref('min-height:calc(anchor-size(height) + 10px)', 'nested min-height'); +test_ref('max-width:calc(anchor-size(width) + 10px)', 'nested max-width'); +test_ref('max-height:calc(anchor-size(height) + 10px)', 'nested max-height'); + +// Invalid anchor*() within fallback: +test_ref('top:anchor(top, anchor(--unknown top))', 'invalid anchor() in fallback'); +test_ref('width:anchor-size(width, anchor-size(--unknown width))', 'invalid anchor-size() in fallback'); + +// Non-calc() functions: +test_ref('top:min(10px, anchor(top))', 'min()'); +test_ref('top:max(10px, anchor(top))', 'max()'); +test_ref('top:abs(anchor(top) - 100px)', 'abs()'); +test_ref('top:calc(sign(anchor(top) - 100px) * 20px)', 'sign()'); + +</script> +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-size-adjust-reload.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-size-adjust-reload.html index 37d79a6..68ccba4 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-size-adjust-reload.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-size-adjust-reload.html
@@ -16,8 +16,7 @@ </body> <script> const iframe = document.getElementById('iframe'); - // Forcing reload - iframe.src += ''; + iframe.contentWindow.location.reload(); iframe.contentWindow.onload = function(){ document.documentElement.classList.remove("reftest-wait"); };
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/line-names-013.html b/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/line-names-013.html new file mode 100644 index 0000000..a964cf7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/line-names-013.html
@@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Test: Clamping a subgrid's own grid-template-areas</title> +<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-2/#grid-template-areas-property"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<style> +.grid { + background: red; + display: grid; + grid-template: 100px 100px / 100px; + height: 100px; + width: 100px; +} +.subgrid { + display: grid; + grid-template-areas: "item item" + "item item"; + grid-template-rows: subgrid; +} +.item { + background: green; + grid-area: item; +} +</style> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div class="grid"> + <div class="subgrid"> + <div class="item"></div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html index 0554414..c1ca0ab 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html
@@ -4,72 +4,82 @@ <h1 style="font-size: 20px;">2d.filter.canvasFilterObject.gaussianBlur.tentative</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 0" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur0)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 0" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur0)" /> + </svg> + </div> </span> <span> <div>mostly-x</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 1" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur1)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 1" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur1)" /> + </svg> + </div> </span> <span> <div>isotropic</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur2)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur2)" /> + </svg> + </div> </span> <span> <div>mostly-y</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="1 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur3)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="1 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur3)" /> + </svg> + </div> </span> <span> <div>y-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="0 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur4)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="0 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur4)" /> + </svg> + </div> </span> </div>
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html index 75f154e..498418c 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html
@@ -5,12 +5,12 @@ <h1 style="font-size: 20px;">2d.filter.canvasFilterObject.gaussianBlur.tentative</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <canvas id="canvas0" width="100" height="100"> + <canvas id="canvas0" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -28,7 +28,7 @@ <span> <div>mostly-x</div> - <canvas id="canvas1" width="100" height="100"> + <canvas id="canvas1" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -46,7 +46,7 @@ <span> <div>isotropic</div> - <canvas id="canvas2" width="100" height="100"> + <canvas id="canvas2" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -64,7 +64,7 @@ <span> <div>mostly-y</div> - <canvas id="canvas3" width="100" height="100"> + <canvas id="canvas3" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -82,7 +82,7 @@ <span> <div>y-only</div> - <canvas id="canvas4" width="100" height="100"> + <canvas id="canvas4" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur-expected.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur-expected.html index c9d10b5..f24e9d0 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur-expected.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur-expected.html
@@ -4,72 +4,82 @@ <h1 style="font-size: 20px;">2d.filter.layers.gaussianBlur</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 0" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur0)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 0" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur0)" /> + </svg> + </div> </span> <span> <div>mostly-x</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 1" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur1)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 1" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur1)" /> + </svg> + </div> </span> <span> <div>isotropic</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur2)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur2)" /> + </svg> + </div> </span> <span> <div>mostly-y</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="1 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur3)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="1 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur3)" /> + </svg> + </div> </span> <span> <div>y-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="0 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur4)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="0 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur4)" /> + </svg> + </div> </span> </div>
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur.html index 9b04fce..19db679 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/element/filters/2d.filter.layers.gaussianBlur.html
@@ -5,12 +5,12 @@ <h1 style="font-size: 20px;">2d.filter.layers.gaussianBlur</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <canvas id="canvas0" width="100" height="100"> + <canvas id="canvas0" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -29,7 +29,7 @@ <span> <div>mostly-x</div> - <canvas id="canvas1" width="100" height="100"> + <canvas id="canvas1" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -48,7 +48,7 @@ <span> <div>isotropic</div> - <canvas id="canvas2" width="100" height="100"> + <canvas id="canvas2" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -67,7 +67,7 @@ <span> <div>mostly-y</div> - <canvas id="canvas3" width="100" height="100"> + <canvas id="canvas3" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -86,7 +86,7 @@ <span> <div>y-only</div> - <canvas id="canvas4" width="100" height="100"> + <canvas id="canvas4" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html index 0554414..c1ca0ab 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative-expected.html
@@ -4,72 +4,82 @@ <h1 style="font-size: 20px;">2d.filter.canvasFilterObject.gaussianBlur.tentative</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 0" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur0)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 0" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur0)" /> + </svg> + </div> </span> <span> <div>mostly-x</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 1" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur1)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 1" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur1)" /> + </svg> + </div> </span> <span> <div>isotropic</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur2)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur2)" /> + </svg> + </div> </span> <span> <div>mostly-y</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="1 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur3)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="1 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur3)" /> + </svg> + </div> </span> <span> <div>y-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="0 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur4)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="0 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur4)" /> + </svg> + </div> </span> </div>
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html index acab5fd..8e7ea3f7 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.html
@@ -5,12 +5,12 @@ <h1 style="font-size: 20px;">2d.filter.canvasFilterObject.gaussianBlur.tentative</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <canvas id="canvas0" width="100" height="100"> + <canvas id="canvas0" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -32,7 +32,7 @@ <span> <div>mostly-x</div> - <canvas id="canvas1" width="100" height="100"> + <canvas id="canvas1" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -54,7 +54,7 @@ <span> <div>isotropic</div> - <canvas id="canvas2" width="100" height="100"> + <canvas id="canvas2" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -76,7 +76,7 @@ <span> <div>mostly-y</div> - <canvas id="canvas3" width="100" height="100"> + <canvas id="canvas3" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -98,7 +98,7 @@ <span> <div>y-only</div> - <canvas id="canvas4" width="100" height="100"> + <canvas id="canvas4" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.w.html b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.w.html index fc509fb..71626ac4 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.w.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.gaussianBlur.tentative.w.html
@@ -7,12 +7,12 @@ <p class="desc">Test CanvasFilter() with gaussianBlur.</p> <script>pending_tests = 5;</script> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <canvas id="canvas0" width="100" height="100"> + <canvas id="canvas0" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker0" type="text/worker"> @@ -48,7 +48,7 @@ <span> <div>mostly-x</div> - <canvas id="canvas1" width="100" height="100"> + <canvas id="canvas1" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker1" type="text/worker"> @@ -84,7 +84,7 @@ <span> <div>isotropic</div> - <canvas id="canvas2" width="100" height="100"> + <canvas id="canvas2" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker2" type="text/worker"> @@ -120,7 +120,7 @@ <span> <div>mostly-y</div> - <canvas id="canvas3" width="100" height="100"> + <canvas id="canvas3" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker3" type="text/worker"> @@ -156,7 +156,7 @@ <span> <div>y-only</div> - <canvas id="canvas4" width="100" height="100"> + <canvas id="canvas4" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker4" type="text/worker">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur-expected.html b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur-expected.html index c9d10b5..f24e9d0 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur-expected.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur-expected.html
@@ -4,72 +4,82 @@ <h1 style="font-size: 20px;">2d.filter.layers.gaussianBlur</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 0" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur0)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur0" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 0" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur0)" /> + </svg> + </div> </span> <span> <div>mostly-x</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 1" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur1)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur1" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 1" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur1)" /> + </svg> + </div> </span> <span> <div>isotropic</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="4 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur2)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur2" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="4 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur2)" /> + </svg> + </div> </span> <span> <div>mostly-y</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="1 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur3)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur3" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="1 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur3)" /> + </svg> + </div> </span> <span> <div>y-only</div> - <svg xmlns="http://www.w3.org/2000/svg" - width="100" height="100" - color-interpolation-filters="sRGB"> - <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> - <feGaussianBlur stdDeviation="0 4" /> - </filter> - <rect x="25" y="25" width="50" height="50" - fill="teal" filter="url(#blur4)" /> - </svg> + <div style="width: 100px; height: 100px; outline: 1px solid"> + <svg xmlns="http://www.w3.org/2000/svg" + width="100" height="100" + color-interpolation-filters="sRGB"> + <filter id="blur4" x="-50%" y="-50%" width="200%" height="200%"> + <feGaussianBlur stdDeviation="0 4" /> + </filter> + <rect x="25" y="25" width="50" height="50" + fill="teal" filter="url(#blur4)" /> + </svg> + </div> </span> </div>
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.html b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.html index 7651737..a51fe32 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.html
@@ -5,12 +5,12 @@ <h1 style="font-size: 20px;">2d.filter.layers.gaussianBlur</h1> <p class="desc">Test CanvasFilter() with gaussianBlur.</p> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <canvas id="canvas0" width="100" height="100"> + <canvas id="canvas0" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -33,7 +33,7 @@ <span> <div>mostly-x</div> - <canvas id="canvas1" width="100" height="100"> + <canvas id="canvas1" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -56,7 +56,7 @@ <span> <div>isotropic</div> - <canvas id="canvas2" width="100" height="100"> + <canvas id="canvas2" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -79,7 +79,7 @@ <span> <div>mostly-y</div> - <canvas id="canvas3" width="100" height="100"> + <canvas id="canvas3" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module"> @@ -102,7 +102,7 @@ <span> <div>y-only</div> - <canvas id="canvas4" width="100" height="100"> + <canvas id="canvas4" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.w.html b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.w.html index 99a4fbf..10ea8ba 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.w.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/filters/2d.filter.layers.gaussianBlur.w.html
@@ -7,12 +7,12 @@ <p class="desc">Test CanvasFilter() with gaussianBlur.</p> <script>pending_tests = 5;</script> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat(5, max-content); font-size: 13px; text-align: center;"> <span> <div>x-only</div> - <canvas id="canvas0" width="100" height="100"> + <canvas id="canvas0" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker0" type="text/worker"> @@ -49,7 +49,7 @@ <span> <div>mostly-x</div> - <canvas id="canvas1" width="100" height="100"> + <canvas id="canvas1" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker1" type="text/worker"> @@ -86,7 +86,7 @@ <span> <div>isotropic</div> - <canvas id="canvas2" width="100" height="100"> + <canvas id="canvas2" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker2" type="text/worker"> @@ -123,7 +123,7 @@ <span> <div>mostly-y</div> - <canvas id="canvas3" width="100" height="100"> + <canvas id="canvas3" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker3" type="text/worker"> @@ -160,7 +160,7 @@ <span> <div>y-only</div> - <canvas id="canvas4" width="100" height="100"> + <canvas id="canvas4" width="100" height="100" style="outline: 1px solid"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker4" type="text/worker">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_element_grid.html b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_element_grid.html index 80c2513..d1c90bd 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_element_grid.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_element_grid.html
@@ -22,7 +22,7 @@ }}" class="resource"></svg> {% endfor %} -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat({{ grid_width }}, max-content); font-size: 13px; text-align: center;"> {% for variant in element_variants %} @@ -30,8 +30,10 @@ {% for variant_name in variant.grid_variant_names %} <div>{{ variant_name }}</div> {% endfor %} - <canvas id="canvas{{ variant.id }}" width="{{ variant.size[0] - }}" height="{{ variant.size[1] }}"{{ variant.canvas }}> + <canvas id="canvas{{ variant.id + }}" width="{{ variant.size[0] + }}" height="{{ variant.size[1] + }}" style="outline: 1px solid"{{ variant.canvas }}> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_grid.html b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_grid.html index 7de7f688..9fd42b7 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_grid.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_grid.html
@@ -12,7 +12,7 @@ }}" id="{{ svgimage }}" class="resource"></svg> {% endfor %} -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat({{ grid_width }}, max-content); font-size: 13px; text-align: center;"> {% for variant in element_variants %} @@ -20,7 +20,10 @@ {% for variant_name in variant.grid_variant_names %} <div>{{ variant_name }}</div> {% endfor %} - {{ variant.html_reference | trim | indent(2) }} + <div style="width: {{ variant.size[0] }}px; height: {{ variant.size[1] + }}px; outline: 1px solid"> + {{ variant.html_reference | trim | indent(4) }} + </div> </span> {% endfor %}
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_offscreen_grid.html b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_offscreen_grid.html index ecd9d09..d001260 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_offscreen_grid.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_offscreen_grid.html
@@ -13,7 +13,7 @@ <p class="desc">{{ desc }}</p> {% if notes %}<p class="notes">{{ notes }}{% endif %} -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat({{ grid_width }}, max-content); font-size: 13px; text-align: center;"> {% for variant in offscreen_variants %} @@ -21,8 +21,10 @@ {% for variant_name in variant.grid_variant_names %} <div>{{ variant_name }}</div> {% endfor %} - <canvas id="canvas{{ variant.id }}" width="{{ variant.size[0] - }}" height="{{ variant.size[1] }}"{{ variant.canvas }}> + <canvas id="canvas{{ variant.id + }}" width="{{ variant.size[0] + }}" height="{{ variant.size[1] + }}" style="outline: 1px solid"{{ variant.canvas }}> <p class="fallback">FAIL (fallback content)</p> </canvas> <script type="module">
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_worker_grid.html b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_worker_grid.html index 739b7b6a..652dddf 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_worker_grid.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/tools/templates/reftest_worker_grid.html
@@ -12,7 +12,7 @@ {% if notes %}<p class="notes">{{ notes }}{% endif %} <script>pending_tests = {{ worker_variants | length }};</script> -<div style="display: grid; grid-gap: 5px; +<div style="display: grid; grid-gap: 4px; grid-template-columns: repeat({{ grid_width }}, max-content); font-size: 13px; text-align: center;"> {% for variant in worker_variants %} @@ -20,8 +20,10 @@ {% for variant_name in variant.grid_variant_names %} <div>{{ variant_name }}</div> {% endfor %} - <canvas id="canvas{{ variant.id }}" width="{{ variant.size[0] - }}" height="{{ variant.size[1] }}"{{ variant.canvas }}> + <canvas id="canvas{{ variant.id + }}" width="{{ variant.size[0] + }}" height="{{ variant.size[1] + }}" style="outline: 1px solid"{{ variant.canvas }}> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id="myWorker{{ variant.id }}" type="text/worker">
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css index 5902d9e..ed572669 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css
@@ -1,8 +1,6 @@ /* These are UA styles for select and stylable select. */ .stylable-select-container { - border: 1px solid rgba(0, 0, 0, 0); - border-radius: 0; box-sizing: border-box; display: inline-block; }
diff --git a/third_party/blink/web_tests/external/wpt/storage/buckets/detached-iframe.https.html b/third_party/blink/web_tests/external/wpt/storage/buckets/detached-iframe.https.html index 1a9c67b3d..6b3f3a2b 100644 --- a/third_party/blink/web_tests/external/wpt/storage/buckets/detached-iframe.https.html +++ b/third_party/blink/web_tests/external/wpt/storage/buckets/detached-iframe.https.html
@@ -23,12 +23,12 @@ // too late to delete buckets. await bucketManager.delete('iframe-bucket'); - const IFrameDOMException = iframe.contentWindow.DOMException; + const IFrameTypeError = iframe.contentWindow.TypeError; iframe.remove(); // Calling open() from a detached iframe should fail but not crash. - await promise_rejects_dom(testCase, 'SecurityError', IFrameDOMException, - bucketManager.open('iframe-bucket')); + await promise_rejects_js(testCase, IFrameTypeError, + bucketManager.open('iframe-bucket')); }, 'Verify open() on detached iframe returns an error'); promise_test(async testCase => { @@ -41,12 +41,12 @@ assert_equals(bucketKeys.length, 1); await bucketManager.delete('iframe-bucket'); - const IFrameDOMException = iframe.contentWindow.DOMException; + const IFrameTypeError = iframe.contentWindow.TypeError; iframe.remove(); // Calling keys() from a detached iframe should fail but not crash. - await promise_rejects_dom(testCase, 'SecurityError', IFrameDOMException, - bucketManager.keys()); + await promise_rejects_js(testCase, IFrameTypeError, + bucketManager.keys()); }, 'Verify keys() on detached iframe returns an error'); promise_test(async testCase => { @@ -56,12 +56,12 @@ await bucketManager.open('iframe-bucket'); await bucketManager.delete('iframe-bucket'); - const IFrameDOMException = iframe.contentWindow.DOMException; + const IFrameTypeError = iframe.contentWindow.TypeError; iframe.remove(); // Calling delete() from a detached iframe should fail but not crash. - await promise_rejects_dom(testCase, 'SecurityError', IFrameDOMException, - bucketManager.delete('foo-bucket')); + await promise_rejects_js(testCase, IFrameTypeError, + bucketManager.delete('foo-bucket')); }, 'Verify delete() on detached iframe returns an error'); </script>
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt index 89dc52a2..e803479 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt
@@ -704,4 +704,51 @@ value : image } } +{ + childIds : <object> + chromeRole : { + type : internalRole + value : 99 + } + domNode : img + ignored : false + name : { + sources : [ + [0] : { + attribute : aria-labelledby + type : relatedElement + } + [1] : { + attribute : aria-label + type : attribute + } + [2] : { + attribute : alt + type : attribute + } + [3] : { + attribute : title + attributeValue : { + type : string + value : title + } + type : attribute + value : { + type : computedString + value : title + } + } + ] + type : computedString + value : title + } + nodeId : <string> + parentId : <string> + properties : [ + ] + role : { + type : role + value : image + } +}
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.js b/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.js index 969bf8c..9d002ed 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.js +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/accessibility/accessibility-nameSources-img-figure.js
@@ -58,6 +58,8 @@ <title>svg1-title</title> </svg> </div> + + <img data-dump title="title" alt="" src='resources/cake.png'> `, 'Tests name sources in images and figures.'); var dumpAccessibilityNodesBySelectorAndCompleteTest =
diff --git a/third_party/blink/web_tests/virtual/ancestor-chain-bit-considered/README.md b/third_party/blink/web_tests/virtual/ancestor-chain-bit-considered/README.md new file mode 100644 index 0000000..f8aafac1 --- /dev/null +++ b/third_party/blink/web_tests/virtual/ancestor-chain-bit-considered/README.md
@@ -0,0 +1,2 @@ +This directory verifies behavior of CookiePartitionKeys when the cross site ancestor chain bit is enabled. +`--enable-features=AncestorChainBitEnabledInPartitionedCookies` \ No newline at end of file
diff --git a/third_party/blink/web_tests/virtual/ancestor-chain-bit-considered/http/tests/cookies/partitioned-cookies/ancestor-chain.https-expected.txt b/third_party/blink/web_tests/virtual/ancestor-chain-bit-considered/http/tests/cookies/partitioned-cookies/ancestor-chain.https-expected.txt new file mode 100644 index 0000000..e3653fe2 --- /dev/null +++ b/third_party/blink/web_tests/virtual/ancestor-chain-bit-considered/http/tests/cookies/partitioned-cookies/ancestor-chain.https-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] Same-site embed partitioned cookie access + assert_true: expected true got false +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/stable/webexposed/element-instance-property-listing-expected.txt b/third_party/blink/web_tests/virtual/stable/webexposed/element-instance-property-listing-expected.txt index b6056f96..0f99026 100644 --- a/third_party/blink/web_tests/virtual/stable/webexposed/element-instance-property-listing-expected.txt +++ b/third_party/blink/web_tests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
@@ -118,6 +118,7 @@ property getElementsByClassName property getElementsByTagName property getElementsByTagNameNS + property getHTML property getInnerHTML property getRootNode property hasAttribute @@ -1047,6 +1048,7 @@ property shadowRootClonable property shadowRootDelegatesFocus property shadowRootMode + property shadowRootSerializable html element textarea property autocomplete property checkValidity @@ -1327,6 +1329,7 @@ property getElementsByClassName property getElementsByTagName property getElementsByTagNameNS + property getHTML property getInnerHTML property getRootNode property hasAttribute
diff --git a/third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt index 4370062..d372123 100644 --- a/third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -1982,6 +1982,7 @@ method getElementsByClassName method getElementsByTagName method getElementsByTagNameNS + method getHTML method getInnerHTML method hasAttribute method hasAttributeNS @@ -4373,10 +4374,12 @@ getter shadowRootClonable getter shadowRootDelegatesFocus getter shadowRootMode + getter shadowRootSerializable method constructor setter shadowRootClonable setter shadowRootDelegatesFocus setter shadowRootMode + setter shadowRootSerializable interface HTMLTextAreaElement : HTMLElement attribute @@toStringTag getter autocomplete @@ -8418,12 +8421,14 @@ getter onslotchange getter pictureInPictureElement getter pointerLockElement + getter serializable getter slotAssignment getter styleSheets method constructor method elementFromPoint method elementsFromPoint method getAnimations + method getHTML method getInnerHTML method getSelection method setHTMLUnsafe @@ -8431,6 +8436,7 @@ setter fullscreenElement setter innerHTML setter onslotchange + setter serializable interface SharedWorker : EventTarget attribute @@toStringTag getter onerror
diff --git a/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-destroys-texture.https.html b/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-destroys-texture.https.html new file mode 100644 index 0000000..643cdc5 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-destroys-texture.https.html
@@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="./webgpu-helpers.js"></script> +</head> + +<h1>Canvas WebGPU Access: endWebGPUAccess-destroys-texture</h1> + +<p>endWebGPUAccess() causes the GPUTexture returned by beginWebGPUAccess() to +enter a destroyed state.</p> + +<canvas id="c" width="50" height="50"></canvas> + +<script> + +promise_test(() => { + return with_webgpu((adapter, adapterInfo, device) => { + return test_endWebGPUAccess_destroys_texture( + device, + document.getElementById('c')); + }); + }, + 'endWebGPUAccess() should destroy the associated GPUTexture.' +); + +promise_test(() => { + return with_webgpu((adapter, adapterInfo, device) => { + return test_endWebGPUAccess_destroys_texture( + device, + new OffscreenCanvas(50, 50)); + }); + }, + 'endWebGPUAccess() on an offscreen canvas should destroy the associated ' + + 'GPUTexture.' +); + +</script>
diff --git a/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-destroys-texture.https.worker.js b/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-destroys-texture.https.worker.js new file mode 100644 index 0000000..d5b3e433 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/endWebGPUAccess-destroys-texture.https.worker.js
@@ -0,0 +1,20 @@ +// META: global=worker + +// ============================================================================ + +importScripts("/resources/testharness.js"); +importScripts("./webgpu-helpers.js"); + +// This test parallels endWebGPUAccess-destroys-texture.https.html. +promise_test(() => { + return with_webgpu((adapter, adapterInfo, device) => { + return test_endWebGPUAccess_destroys_texture( + device, + new OffscreenCanvas(50, 50), + {}); + }); + }, + 'endWebGPUAccess() on a worker should destroy the associated GPUTexture.' +); + +done();
diff --git a/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/webgpu-helpers.js b/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/webgpu-helpers.js index 61f633bf..c124a8c 100644 --- a/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/webgpu-helpers.js +++ b/third_party/blink/web_tests/wpt_internal/webgpu/canvas_webgpu_access/webgpu-helpers.js
@@ -203,3 +203,40 @@ assert_unreached('endWebGPUAccess should be safe when context is lost.'); } } + +/** + * endWebGPUAccess() should cause the GPUTexture returned by beginWebGPUAccess() + * to enter a destroyed state. + */ +function test_endWebGPUAccess_destroys_texture(device, canvas) { + // Briefly begin a WebGPU access session. + const ctx = canvas.getContext('2d'); + const tex = ctx.beginWebGPUAccess({device: device}); + ctx.endWebGPUAccess(); + + // Make a buffer which will allow us to copy one pixel to or from the texture. + const buf = device.createBuffer({usage: GPUBufferUsage.COPY_SRC | + GPUBufferUsage.COPY_DST, + size: 4}); + + // `tex` should be in a destroyed state. Unfortunately, there isn't a + // foolproof way to test for this state in WebGPU. The best we can do is try + // to use the texture in various ways and check for GPUValidationErrors. + // So we verify that we are not able to read-from or write-to the texture. + device.pushErrorScope('validation'); + const texToBufEncoder = device.createCommandEncoder(); + texToBufEncoder.copyTextureToBuffer({texture: tex}, {buffer: buf}, [1, 1]); + device.queue.submit([texToBufEncoder.finish()]); + + device.pushErrorScope('validation'); + const bufToTexEncoder = device.createCommandEncoder(); + bufToTexEncoder.copyBufferToTexture({buffer: buf}, {texture: tex}, [1, 1]); + device.queue.submit([bufToTexEncoder.finish()]); + + return device.popErrorScope().then((writeError) => { + return device.popErrorScope().then((readError) => { + assert_true(readError instanceof GPUValidationError); + assert_true(writeError instanceof GPUValidationError); + }); + }); +}
diff --git a/third_party/chromite b/third_party/chromite index 004355d..ffd6d71 160000 --- a/third_party/chromite +++ b/third_party/chromite
@@ -1 +1 @@ -Subproject commit 004355d6885f0d4735fea67a97761604c85a9940 +Subproject commit ffd6d710ef3788efef6227ef8fd42b2bfd747ac8
diff --git a/third_party/cros_system_api b/third_party/cros_system_api index b7dce64..a402de0 160000 --- a/third_party/cros_system_api +++ b/third_party/cros_system_api
@@ -1 +1 @@ -Subproject commit b7dce64f68622017e2cd32c32cfd34cefc6150f4 +Subproject commit a402de012c03f81bed7c69a21f442f60a86aeb44
diff --git a/third_party/depot_tools b/third_party/depot_tools index a7c97f7..76f20f7 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools
@@ -1 +1 @@ -Subproject commit a7c97f7871fa7a80af50e68cf2ea563ade59749b +Subproject commit 76f20f73a04e620918439aa510a186129d33a761
diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index 7827c0d..ac773bc 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal
@@ -1 +1 @@ -Subproject commit 7827c0d9878c8c2e78dbce3e518545b2ca180cfe +Subproject commit ac773bc1e6de69f43c4d0f52af0843747609c952
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index a4b48c8..2b15a13 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit a4b48c8d99babc040a53175d65d00e46adecce7e +Subproject commit 2b15a13468d006b360d9ca8583ac76ead624e2e7
diff --git a/third_party/nearby/BUILD.gn b/third_party/nearby/BUILD.gn index 5df54c4..ba3e7790 100644 --- a/third_party/nearby/BUILD.gn +++ b/third_party/nearby/BUILD.gn
@@ -292,8 +292,6 @@ "src/connections/implementation/mediums/bluetooth_classic.cc", "src/connections/implementation/mediums/bluetooth_radio.cc", "src/connections/implementation/mediums/mediums.cc", - "src/connections/implementation/mediums/multiplex/multiplex_frames.cc", - "src/connections/implementation/mediums/multiplex/multiplex_output_stream.cc", "src/connections/implementation/mediums/webrtc.cc", "src/connections/implementation/mediums/wifi_direct.cc", "src/connections/implementation/mediums/wifi_hotspot.cc", @@ -315,8 +313,6 @@ "src/connections/implementation/mediums/bluetooth_radio.h", "src/connections/implementation/mediums/lost_entity_tracker.h", "src/connections/implementation/mediums/mediums.h", - "src/connections/implementation/mediums/multiplex/multiplex_frames.h", - "src/connections/implementation/mediums/multiplex/multiplex_output_stream.h", "src/connections/implementation/mediums/webrtc.h", "src/connections/implementation/mediums/wifi_direct.h", "src/connections/implementation/mediums/wifi_hotspot.h", @@ -327,7 +323,6 @@ ":connections_implementation_flags", ":connections_implementation_mediums_webrtc", ":connections_types", - ":multiplex_frames_proto", ":platform_base", ":platform_base_cancellation_flag", ":platform_base_util", @@ -342,7 +337,6 @@ configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] } - source_set("connections_implementation_mediums_utils") { public_configs = [ ":nearby_include_config", @@ -367,7 +361,6 @@ configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] } - source_set("connections_implementation_mediums_webrtc_data_types") { public_configs = [ ":nearby_include_config", @@ -386,7 +379,6 @@ configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] } - source_set("connections_implementation_mediums_webrtc") { public_configs = [ ":nearby_include_config", @@ -1008,9 +1000,8 @@ ] sources = [ "src/presence/implementation/action_factory.cc", - "src/presence/implementation/advertisement_decoder_impl.cc", + "src/presence/implementation/advertisement_decoder.cc", "src/presence/implementation/advertisement_factory.cc", - "src/presence/implementation/advertisement_filter.cc", "src/presence/implementation/base_broadcast_request.cc", "src/presence/implementation/broadcast_manager.cc", "src/presence/implementation/connection_authenticator_impl.cc", @@ -1022,9 +1013,7 @@ public = [ "src/presence/implementation/action_factory.h", "src/presence/implementation/advertisement_decoder.h", - "src/presence/implementation/advertisement_decoder_impl.h", "src/presence/implementation/advertisement_factory.h", - "src/presence/implementation/advertisement_filter.h", "src/presence/implementation/base_broadcast_request.h", "src/presence/implementation/broadcast_manager.h", "src/presence/implementation/connection_authenticator.h", @@ -1248,12 +1237,6 @@ proto_out_dir = "third_party/nearby" } -proto_library("multiplex_frames_proto") { - proto_in_dir = "src" - sources = [ "${proto_in_dir}/proto/mediums/multiplex_frames.proto" ] - proto_out_dir = "third_party/nearby" -} - proto_library("web_rtc_signaling_frames_proto") { proto_in_dir = "src" sources = [ "${proto_in_dir}/proto/mediums/web_rtc_signaling_frames.proto" ]
diff --git a/third_party/nearby/README.chromium b/third_party/nearby/README.chromium index 2df1bcef..757d793b 100644 --- a/third_party/nearby/README.chromium +++ b/third_party/nearby/README.chromium
@@ -1,7 +1,7 @@ Name: Nearby Connections Library Short Name: Nearby URL: https://github.com/google/nearby -Version: 03f0b3dae98d218e8420add5a13893822d290855 +Version: 33e682f24427a0eb634bd3186fe3c6fd96bd6768 License: Apache 2.0 License File: LICENSE Security Critical: yes
diff --git a/third_party/nearby/src b/third_party/nearby/src index 03f0b3d..33e682f 160000 --- a/third_party/nearby/src +++ b/third_party/nearby/src
@@ -1 +1 @@ -Subproject commit 03f0b3dae98d218e8420add5a13893822d290855 +Subproject commit 33e682f24427a0eb634bd3186fe3c6fd96bd6768
diff --git a/third_party/perfetto b/third_party/perfetto index 7c2650c..f585035 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit 7c2650cb53369ddc5324c58b671bc7906f08d86a +Subproject commit f5850350645c54d2a3f1b5016a76b992afe7babe
diff --git a/third_party/rust/chromium_crates_io/Cargo.lock b/third_party/rust/chromium_crates_io/Cargo.lock index 3cdb971..0778582f 100644 --- a/third_party/rust/chromium_crates_io/Cargo.lock +++ b/third_party/rust/chromium_crates_io/Cargo.lock
@@ -84,8 +84,7 @@ "rustversion", "serde", "serde_json", - "serde_json_lenient 0.1.8", - "serde_json_lenient 0.2.1", + "serde_json_lenient", "skrifa", "small_ctor", "static_assertions", @@ -477,16 +476,6 @@ [[package]] name = "serde_json_lenient" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_json_lenient" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [
diff --git a/third_party/rust/chromium_crates_io/Cargo.toml b/third_party/rust/chromium_crates_io/Cargo.toml index 0b58769..2248f9fb 100644 --- a/third_party/rust/chromium_crates_io/Cargo.toml +++ b/third_party/rust/chromium_crates_io/Cargo.toml
@@ -68,15 +68,11 @@ # Temporarily inform our cargo tooling that we care about # the new version of serde_json_lenient. We are in the midst # of CLs that move from the older to the newer. -[dependencies.serde_json_lenient_new_epoch] +[dependencies.serde_json_lenient] package = "serde_json_lenient" version = "0.2" features = ["unbounded_depth", "float_roundtrip"] -[dependencies.serde_json_lenient] -version = "0.1" -features = ["unbounded_depth", "float_roundtrip"] - [dependencies.syn] version = "2" features = ["full"]
diff --git a/third_party/rust/chromium_crates_io/supply-chain/config.toml b/third_party/rust/chromium_crates_io/supply-chain/config.toml index 14bb0b64..9b4b42fc 100644 --- a/third_party/rust/chromium_crates_io/supply-chain/config.toml +++ b/third_party/rust/chromium_crates_io/supply-chain/config.toml
@@ -218,9 +218,6 @@ [policy."serde_json:1.0.115"] criteria = ["does-not-implement-crypto", "safe-to-run"] -[policy."serde_json_lenient:0.1.8"] -criteria = ["does-not-implement-crypto", "safe-to-deploy", "ub-risk-2"] - [policy."serde_json_lenient:0.2.1"] criteria = ["does-not-implement-crypto", "safe-to-deploy", "ub-risk-2"]
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/.cargo-checksum.json deleted file mode 100644 index 697c9ce..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/.cargo-checksum.json +++ /dev/null
@@ -1 +0,0 @@ -{"files":{}}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/.cargo_vcs_info.json deleted file mode 100644 index 9d872dc..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/.cargo_vcs_info.json +++ /dev/null
@@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "34fa6dd20359598309633790680f6e3b2e360d84" - }, - "path_in_vcs": "" -} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/Cargo.toml deleted file mode 100644 index 04a51f9..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/Cargo.toml +++ /dev/null
@@ -1,118 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies. -# -# If you are reading this file be aware that the original Cargo.toml -# will likely look very different (and much more reasonable). -# See Cargo.toml.orig for the original contents. - -[package] -edition = "2021" -rust-version = "1.56" -name = "serde_json_lenient" -version = "0.1.8" -authors = [ - "Adrian Taylor <adetaylor@chromium.org>", - "Michael Bolin <bolinfest@gmail.com>", - "Erick Tryzelaar <erick.tryzelaar@gmail.com>", - "David Tolnay <dtolnay@gmail.com>", -] -include = [ - "build.rs", - "src/**/*.rs", - "README.md", - "LICENSE-APACHE", - "LICENSE-MIT", -] -description = "A lenient JSON serialization file format" -documentation = "https://docs.rs/serde_json_lenient/latest/" -readme = "README.md" -keywords = [ - "json", - "serde", - "serialization", -] -categories = [ - "encoding", - "parser-implementations", - "no-std", -] -license = "MIT/Apache-2.0" -repository = "https://github.com/google/serde_json_lenient" - -[package.metadata.docs.rs] -features = [ - "raw_value", - "unbounded_depth", -] -rustdoc-args = [ - "--cfg", - "docsrs", - "--generate-link-to-definition", -] -targets = ["x86_64-unknown-linux-gnu"] - -[package.metadata.playground] -features = ["raw_value"] - -[lib] -doc-scrape-examples = false - -[dependencies.indexmap] -version = "2" -optional = true - -[dependencies.itoa] -version = "1.0" - -[dependencies.ryu] -version = "1.0" - -[dependencies.serde] -version = "1.0.166" -default-features = false - -[dev-dependencies.automod] -version = "1.0.11" - -[dev-dependencies.indoc] -version = "2.0.2" - -[dev-dependencies.ref-cast] -version = "1.0.18" - -[dev-dependencies.rustversion] -version = "1.0.13" - -[dev-dependencies.serde] -version = "1.0.166" -features = ["derive"] - -[dev-dependencies.serde_bytes] -version = "0.11.10" - -[dev-dependencies.serde_derive] -version = "1.0.166" - -[dev-dependencies.serde_stacker] -version = "0.1.8" - -[dev-dependencies.trybuild] -version = "1.0.81" -features = ["diff"] - -[features] -alloc = ["serde/alloc"] -arbitrary_precision = [] -default = ["std"] -float_roundtrip = [] -preserve_order = [ - "indexmap", - "std", -] -raw_value = [] -std = ["serde/std"] -unbounded_depth = []
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/Cargo.toml.orig deleted file mode 100644 index f3b8895b..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/Cargo.toml.orig +++ /dev/null
@@ -1,95 +0,0 @@ -[package] -name = "serde_json_lenient" -version = "0.1.8" # remember to update html_root_url -authors = [ - "Adrian Taylor <adetaylor@chromium.org>", - "Michael Bolin <bolinfest@gmail.com>", - "Erick Tryzelaar <erick.tryzelaar@gmail.com>", - "David Tolnay <dtolnay@gmail.com>", -] -license = "MIT/Apache-2.0" -description = "A lenient JSON serialization file format" -repository = "https://github.com/google/serde_json_lenient" -documentation = "https://docs.rs/serde_json_lenient/latest/" -categories = ["encoding", "parser-implementations", "no-std"] -readme = "README.md" -include = ["build.rs", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] -edition = "2021" -keywords = ["json", "serde", "serialization"] -rust-version = "1.56" - -[dependencies] -indexmap = { version = "2", optional = true } -itoa = "1.0" -ryu = "1.0" -serde = { version = "1.0.166", default-features = false } - -[dev-dependencies] -automod = "1.0.11" -indoc = "2.0.2" -ref-cast = "1.0.18" -rustversion = "1.0.13" -serde = { version = "1.0.166", features = ["derive"] } -serde_bytes = "0.11.10" -serde_derive = "1.0.166" -serde_stacker = "0.1.8" -trybuild = { version = "1.0.81", features = ["diff"] } - -[lib] -doc-scrape-examples = false - -[package.metadata.docs.rs] -features = ["raw_value", "unbounded_depth"] -targets = ["x86_64-unknown-linux-gnu"] -rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] - -[package.metadata.playground] -features = ["raw_value"] - - -### FEATURES ################################################################# - -[features] -default = ["std"] - -std = ["serde/std"] - -# Provide integration for heap-allocated collections without depending on the -# rest of the Rust standard library. -# NOTE: Disabling both `std` *and* `alloc` features is not supported yet. -alloc = ["serde/alloc"] - -# Make serde_json::Map use a representation which maintains insertion order. -# This allows data to be read into a Value and written back to a JSON string -# while preserving the order of map keys in the input. -preserve_order = ["indexmap", "std"] - -# Use sufficient precision when parsing fixed precision floats from JSON to -# ensure that they maintain accuracy when round-tripped through JSON. This comes -# at an approximately 2x performance cost for parsing floats compared to the -# default best-effort precision. -# -# Unlike arbitrary_precision, this feature makes f64 -> JSON -> f64 produce -# output identical to the input. -float_roundtrip = [] - -# Use an arbitrary precision number representation for serde_json_lenient::Number. This -# allows JSON numbers of arbitrary size/precision to be read into a Number and -# written back to a JSON string without loss of precision. -# -# Unlike float_roundtrip, this feature makes JSON -> serde_json::Number -> JSON -# produce output identical to the input. -arbitrary_precision = [] - -# Provide a RawValue type that can hold unprocessed JSON during deserialization. -raw_value = [] - -# Provide a method disable_recursion_limit to parse arbitrarily deep JSON -# structures without any consideration for overflowing the stack. When using -# this feature, you will want to provide some other way to protect against stack -# overflows, such as by wrapping your Deserializer in the dynamically growing -# stack adapter provided by the serde_stacker crate. Additionally you will need -# to be careful around other recursive operations on the parsed result which may -# overflow the stack after deserialization has completed, including, but not -# limited to, Display and Debug and Drop impls. -unbounded_depth = []
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-APACHE b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-APACHE deleted file mode 100644 index 1b5ec8b..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-APACHE +++ /dev/null
@@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-MIT b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-MIT deleted file mode 100644 index 31aa7938..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-MIT +++ /dev/null
@@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE.
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/README.md b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/README.md deleted file mode 100644 index 9b6cdca..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/README.md +++ /dev/null
@@ -1,49 +0,0 @@ -# serde_json_lenient   [![Build Status]][actions] [![Latest Version]][crates.io] [![Rustc Version 1.36+]][rustc] - -[Build Status]: https://img.shields.io/github/actions/workflow/status/google/serde_json_lenient/ci.yml?branch=master -[actions]: https://github.com/google/serde_json_lenient/actions?query=branch%3Amaster -[Latest Version]: https://img.shields.io/crates/v/serde_json_lenient.svg -[crates.io]: https://crates.io/crates/serde\_json\_lenient -[Rustc Version 1.36+]: https://img.shields.io/badge/rustc-1.36+-lightgray.svg -[rustc]: https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html - -This is a lenient JSON parser forked from the -[serde_json](https://crates.io/crates/serde_json) crate -that is that is designed to parse JSON written by humans -(e.g., JSON config files). This means that it supports: - -- `/*` and `//` style comments. -- Trailing commas for object and array literals. -- `\v` and `\xDD` literal escapes (for vertical tab and - two-digit hexadecimal characters) -- [planned] Unquoted object keys (precise spec TBD). - -Each such feature is switchable. - -Earlier work to make `serde_json` more lenient was performed -by Michael Bolin as the crate [serde_jsonrc](https://docs.rs/serde_jsonrc/latest/serde_jsonrc/). -This crate builds on his work and updates to more recent [serde_json]. - -### Why not make `serde_json` more lenient? - -[The maintainer wanted to keep the -scope of `serde_json` limited to strict JSON](https://github.com/dtolnay/request-for-implementation/issues/24), -so we respectfully agreed that forking was the way to go. - -## License - -Because serde_json_lenient is a fork of serde_json, it maintains the original licence, -which means it is licensed under either of - -- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) -- MIT license ([LICENSE-MIT](LICENSE-MIT) or - http://opensource.org/licenses/MIT) - -at your option. - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in serde_json_lenient by you, as defined in the Apache-2.0 license, shall -be dual licensed as above, without any additional terms or conditions.
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/build.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/build.rs deleted file mode 100644 index 0e12602..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/build.rs +++ /dev/null
@@ -1,54 +0,0 @@ -use std::env; -use std::process::Command; -use std::str::{self, FromStr}; - -fn main() { - println!("cargo:rerun-if-changed=build.rs"); - - // Decide ideal limb width for arithmetic in the float parser. Refer to - // src/lexical/math.rs for where this has an effect. - let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); - match target_arch.as_str() { - "aarch64" | "mips64" | "powerpc64" | "x86_64" => { - println!("cargo:rustc-cfg=limb_width_64"); - } - _ => { - println!("cargo:rustc-cfg=limb_width_32"); - } - } - - let minor = match rustc_minor_version() { - Some(minor) => minor, - None => return, - }; - - // BTreeMap::get_key_value - // https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html#additions-to-the-standard-library - if minor < 40 { - println!("cargo:rustc-cfg=no_btreemap_get_key_value"); - } - - // BTreeMap::remove_entry - // https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#library-changes - if minor < 45 { - println!("cargo:rustc-cfg=no_btreemap_remove_entry"); - } - - // BTreeMap::retain - // https://blog.rust-lang.org/2021/06/17/Rust-1.53.0.html#stabilized-apis - if minor < 53 { - println!("cargo:rustc-cfg=no_btreemap_retain"); - } -} - -fn rustc_minor_version() -> Option<u32> { - let rustc = env::var_os("RUSTC")?; - let output = Command::new(rustc).arg("--version").output().ok()?; - let version = str::from_utf8(&output.stdout).ok()?; - let mut pieces = version.split('.'); - if pieces.next() != Some("rustc 1") { - return None; - } - let next = pieces.next()?; - u32::from_str(next).ok() -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/de.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/de.rs deleted file mode 100644 index 4ad4ac9..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/de.rs +++ /dev/null
@@ -1,2813 +0,0 @@ -//! Deserialize JSON data to a Rust data structure. - -use crate::error::{Error, ErrorCode, Result}; -#[cfg(feature = "float_roundtrip")] -use crate::lexical; -use crate::number::Number; -use crate::read::{self, Fused, Reference}; -use alloc::string::String; -use alloc::vec::Vec; -#[cfg(feature = "float_roundtrip")] -use core::iter; -use core::iter::FusedIterator; -use core::marker::PhantomData; -use core::result; -use core::str::FromStr; -use serde::de::{self, Expected, Unexpected}; -use serde::forward_to_deserialize_any; - -#[cfg(feature = "arbitrary_precision")] -use crate::number::NumberDeserializer; - -pub use crate::read::{Read, SliceRead, StrRead}; - -#[cfg(feature = "std")] -pub use crate::read::IoRead; - -////////////////////////////////////////////////////////////////////////////// - -/// A structure that deserializes JSON into Rust values. -#[allow(clippy::struct_excessive_bools)] -pub struct Deserializer<R> { - read: R, - scratch: Vec<u8>, - remaining_depth: u8, - #[cfg(feature = "float_roundtrip")] - single_precision: bool, - #[cfg(feature = "unbounded_depth")] - disable_recursion_limit: bool, - ignore_trailing_commas: bool, - allow_comments: bool, -} - -impl<'de, R> Deserializer<R> -where - R: read::Read<'de>, -{ - /// Create a JSON deserializer from one of the possible serde_json_lenient input - /// sources. - /// - /// Typically it is more convenient to use one of these methods instead: - /// - /// - Deserializer::from_str - /// - Deserializer::from_slice - /// - Deserializer::from_reader - pub fn new(read: R) -> Self { - Deserializer { - read, - scratch: Vec::new(), - remaining_depth: 128, - #[cfg(feature = "float_roundtrip")] - single_precision: false, - #[cfg(feature = "unbounded_depth")] - disable_recursion_limit: false, - ignore_trailing_commas: true, - allow_comments: true, - } - } -} - -#[cfg(feature = "std")] -impl<R> Deserializer<read::IoRead<R>> -where - R: crate::io::Read, -{ - /// Creates a JSON deserializer from an `io::Read`. - /// - /// Reader-based deserializers do not support deserializing borrowed types - /// like `&str`, since the `std::io::Read` trait has no non-copying methods - /// -- everything it does involves copying bytes out of the data source. - pub fn from_reader(reader: R) -> Self { - Deserializer::new(read::IoRead::new(reader)) - } -} - -impl<'a> Deserializer<read::SliceRead<'a>> { - /// Creates a JSON deserializer from a `&[u8]`. - pub fn from_slice(bytes: &'a [u8]) -> Self { - Deserializer::new(read::SliceRead::new(bytes, false, false, false, false)) - } - - /// Creates a JSON deserializer from a `&[u8]`, - /// providing some flexibility for some non-standard JSON options. - #[allow(clippy::fn_params_excessive_bools)] - pub fn from_slice_with_options( - bytes: &'a [u8], - replace_invalid_characters: bool, - allow_control_characters_in_string: bool, - allow_v_escapes: bool, - allow_x_escapes: bool, - ) -> Self { - Deserializer::new(read::SliceRead::new( - bytes, - replace_invalid_characters, - allow_control_characters_in_string, - allow_v_escapes, - allow_x_escapes, - )) - } -} - -impl<'a> Deserializer<read::StrRead<'a>> { - /// Creates a JSON deserializer from a `&str`. - pub fn from_str(s: &'a str) -> Self { - Deserializer::new(read::StrRead::new(s)) - } -} - -macro_rules! overflow { - ($a:ident * 10 + $b:ident, $c:expr) => { - match $c { - c => $a >= c / 10 && ($a > c / 10 || $b > c % 10), - } - }; -} - -pub(crate) enum ParserNumber { - F64(f64), - U64(u64), - I64(i64), - #[cfg(feature = "arbitrary_precision")] - String(String), -} - -impl ParserNumber { - fn visit<'de, V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - match self { - ParserNumber::F64(x) => visitor.visit_f64(x), - ParserNumber::U64(x) => visitor.visit_u64(x), - ParserNumber::I64(x) => visitor.visit_i64(x), - #[cfg(feature = "arbitrary_precision")] - ParserNumber::String(x) => visitor.visit_map(NumberDeserializer { number: x.into() }), - } - } - - fn invalid_type(self, exp: &dyn Expected) -> Error { - match self { - ParserNumber::F64(x) => de::Error::invalid_type(Unexpected::Float(x), exp), - ParserNumber::U64(x) => de::Error::invalid_type(Unexpected::Unsigned(x), exp), - ParserNumber::I64(x) => de::Error::invalid_type(Unexpected::Signed(x), exp), - #[cfg(feature = "arbitrary_precision")] - ParserNumber::String(_) => de::Error::invalid_type(Unexpected::Other("number"), exp), - } - } -} - -impl<'de, R: Read<'de>> Deserializer<R> { - /// The `Deserializer::end` method should be called after a value has been fully deserialized. - /// This allows the `Deserializer` to validate that the input stream is at the end or that it - /// only has trailing whitespace. - pub fn end(&mut self) -> Result<()> { - match tri!(self.parse_whitespace()) { - Some(_) => Err(self.peek_error(ErrorCode::TrailingCharacters)), - None => Ok(()), - } - } - - /// Turn a JSON deserializer into an iterator over values of type T. - pub fn into_iter<T>(self) -> StreamDeserializer<'de, R, T> - where - T: de::Deserialize<'de>, - { - // This cannot be an implementation of std::iter::IntoIterator because - // we need the caller to choose what T is. - let offset = self.read.byte_offset(); - StreamDeserializer { - de: self, - offset, - failed: false, - output: PhantomData, - lifetime: PhantomData, - } - } - - /// Parse arbitrarily deep JSON structures without any consideration for - /// overflowing the stack. - /// - /// You will want to provide some other way to protect against stack - /// overflows, such as by wrapping your Deserializer in the dynamically - /// growing stack adapter provided by the serde_stacker crate. Additionally - /// you will need to be careful around other recursive operations on the - /// parsed result which may overflow the stack after deserialization has - /// completed, including, but not limited to, Display and Debug and Drop - /// impls. - /// - /// *This method is only available if serde_json is built with the - /// `"unbounded_depth"` feature.* - /// - /// # Examples - /// - /// ``` - /// use serde::Deserialize; - /// use serde_json_lenient::Value; - /// - /// fn main() { - /// let mut json = String::new(); - /// for _ in 0..10000 { - /// json = format!("[{}]", json); - /// } - /// - /// let mut deserializer = serde_json_lenient::Deserializer::from_str(&json); - /// deserializer.disable_recursion_limit(); - /// let deserializer = serde_stacker::Deserializer::new(&mut deserializer); - /// let value = Value::deserialize(deserializer).unwrap(); - /// - /// carefully_drop_nested_arrays(value); - /// } - /// - /// fn carefully_drop_nested_arrays(value: Value) { - /// let mut stack = vec![value]; - /// while let Some(value) = stack.pop() { - /// if let Value::Array(array) = value { - /// stack.extend(array); - /// } - /// } - /// } - /// ``` - #[cfg(feature = "unbounded_depth")] - #[cfg_attr(docsrs, doc(cfg(feature = "unbounded_depth")))] - pub fn disable_recursion_limit(&mut self) { - self.disable_recursion_limit = true; - } - - /// Whether to ignore trailing commas. - /// - /// By default, serde_json_lenient ignores trailing commas in its JSON input even - /// though this is not specification-compliant. This API allows the parser - /// to be switched to a strict mode in this respect, by passing `false` into - /// this API. - /// - /// # Example - /// - /// ``` - /// use serde_json_lenient::{Deserializer, Value}; - /// use serde::de::Deserialize; - /// - /// let s = r#" { "a", "b", }"#; - /// let mut deserializer = Deserializer::from_str(&s); - /// deserializer.set_ignore_trailing_commas(false); - /// assert!(Value::deserialize(&mut deserializer).is_err()); - /// ``` - pub fn set_ignore_trailing_commas(&mut self, ignore: bool) { - self.ignore_trailing_commas = ignore; - } - - /// Whether to allow comments. - pub fn set_allow_comments(&mut self, allow: bool) { - self.allow_comments = allow; - } - - pub(crate) fn peek(&mut self) -> Result<Option<u8>> { - self.read.peek() - } - - fn peek_or_null(&mut self) -> Result<u8> { - Ok(tri!(self.peek()).unwrap_or(b'\x00')) - } - - fn eat_char(&mut self) { - self.read.discard(); - } - - fn next_char(&mut self) -> Result<Option<u8>> { - self.read.next() - } - - fn next_char_or_null(&mut self) -> Result<u8> { - Ok(tri!(self.next_char()).unwrap_or(b'\x00')) - } - - /// Error caused by a byte from next_char(). - #[cold] - fn error(&self, reason: ErrorCode) -> Error { - let position = self.read.position(); - Error::syntax(reason, position.line, position.column) - } - - /// Error caused by a byte from peek(). - #[cold] - fn peek_error(&self, reason: ErrorCode) -> Error { - let position = self.read.peek_position(); - Error::syntax(reason, position.line, position.column) - } - - /// Returns the first non-whitespace byte without consuming it, or `None` if - /// EOF is encountered. - fn parse_whitespace(&mut self) -> Result<Option<u8>> { - // Consume comments as if they were whitespace. - loop { - match tri!(self.peek()) { - Some(b' ' | b'\n' | b'\t' | b'\r') => { - self.eat_char(); - } - Some(b'/') if self.allow_comments => { - self.eat_char(); - match tri!(self.peek()) { - Some(b'/') => { - // TODO: Read until newline. - loop { - match tri!(self.peek()) { - Some(b'\n') => { - self.eat_char(); - break; - } - Some(_) => { - self.eat_char(); - } - None => { - return Ok(None); - } - } - } - } - Some(b'*') => loop { - match tri!(self.peek()) { - Some(b'*') => { - self.eat_char(); - match tri!(self.peek()) { - Some(b'/') => { - self.eat_char(); - break; - } - Some(_) => {} - None => { - return Err(self.peek_error( - ErrorCode::EofWhileParsingBlockComment, - )); - } - } - } - Some(_) => { - self.eat_char(); - } - None => { - return Err( - self.peek_error(ErrorCode::EofWhileParsingBlockComment) - ); - } - } - }, - _ => { - return Err(self.peek_error(ErrorCode::ExpectedCommentSlashOrStar)); - } - }; - } - other => { - return Ok(other); - } - } - } - } - - #[cold] - fn peek_invalid_type(&mut self, exp: &dyn Expected) -> Error { - let err = match self.peek_or_null().unwrap_or(b'\x00') { - b'n' => { - self.eat_char(); - if let Err(err) = self.parse_ident(b"ull") { - return err; - } - de::Error::invalid_type(Unexpected::Unit, exp) - } - b't' => { - self.eat_char(); - if let Err(err) = self.parse_ident(b"rue") { - return err; - } - de::Error::invalid_type(Unexpected::Bool(true), exp) - } - b'f' => { - self.eat_char(); - if let Err(err) = self.parse_ident(b"alse") { - return err; - } - de::Error::invalid_type(Unexpected::Bool(false), exp) - } - b'-' => { - self.eat_char(); - match self.parse_any_number(false) { - Ok(n) => n.invalid_type(exp), - Err(err) => return err, - } - } - b'0'..=b'9' => match self.parse_any_number(true) { - Ok(n) => n.invalid_type(exp), - Err(err) => return err, - }, - b'"' => { - self.eat_char(); - self.scratch.clear(); - match self.read.parse_str(&mut self.scratch) { - Ok(s) => de::Error::invalid_type(Unexpected::Str(&s), exp), - Err(err) => return err, - } - } - b'[' => de::Error::invalid_type(Unexpected::Seq, exp), - b'{' => de::Error::invalid_type(Unexpected::Map, exp), - _ => self.peek_error(ErrorCode::ExpectedSomeValue), - }; - - self.fix_position(err) - } - - pub(crate) fn deserialize_number<'any, V>(&mut self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'any>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'-' => { - self.eat_char(); - tri!(self.parse_integer(false)).visit(visitor) - } - b'0'..=b'9' => tri!(self.parse_integer(true)).visit(visitor), - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - #[cfg(feature = "float_roundtrip")] - pub(crate) fn do_deserialize_f32<'any, V>(&mut self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'any>, - { - self.single_precision = true; - let val = self.deserialize_number(visitor); - self.single_precision = false; - val - } - - pub(crate) fn do_deserialize_i128<'any, V>(&mut self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'any>, - { - let mut buf = String::new(); - - match tri!(self.parse_whitespace()) { - Some(b'-') => { - self.eat_char(); - buf.push('-'); - } - Some(_) => {} - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - tri!(self.scan_integer128(&mut buf)); - - let value = match buf.parse() { - Ok(int) => visitor.visit_i128(int), - Err(_) => { - return Err(self.error(ErrorCode::NumberOutOfRange)); - } - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - pub(crate) fn do_deserialize_u128<'any, V>(&mut self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'any>, - { - match tri!(self.parse_whitespace()) { - Some(b'-') => { - return Err(self.peek_error(ErrorCode::NumberOutOfRange)); - } - Some(_) => {} - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - } - - let mut buf = String::new(); - tri!(self.scan_integer128(&mut buf)); - - let value = match buf.parse() { - Ok(int) => visitor.visit_u128(int), - Err(_) => { - return Err(self.error(ErrorCode::NumberOutOfRange)); - } - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - fn scan_integer128(&mut self, buf: &mut String) -> Result<()> { - match tri!(self.next_char_or_null()) { - b'0' => { - buf.push('0'); - // There can be only one leading '0'. - match tri!(self.peek_or_null()) { - b'0'..=b'9' => Err(self.peek_error(ErrorCode::InvalidNumber)), - _ => Ok(()), - } - } - c @ b'1'..=b'9' => { - buf.push(c as char); - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - buf.push(c as char); - } - Ok(()) - } - _ => Err(self.error(ErrorCode::InvalidNumber)), - } - } - - #[cold] - fn fix_position(&self, err: Error) -> Error { - err.fix_position(move |code| self.error(code)) - } - - fn parse_ident(&mut self, ident: &[u8]) -> Result<()> { - for expected in ident { - match tri!(self.next_char()) { - None => { - return Err(self.error(ErrorCode::EofWhileParsingValue)); - } - Some(next) => { - if next != *expected { - return Err(self.error(ErrorCode::ExpectedSomeIdent)); - } - } - } - } - - Ok(()) - } - - fn parse_integer(&mut self, positive: bool) -> Result<ParserNumber> { - let next = match tri!(self.next_char()) { - Some(b) => b, - None => { - return Err(self.error(ErrorCode::EofWhileParsingValue)); - } - }; - - match next { - b'0' => { - // There can be only one leading '0'. - match tri!(self.peek_or_null()) { - b'0'..=b'9' => Err(self.peek_error(ErrorCode::InvalidNumber)), - _ => self.parse_number(positive, 0), - } - } - c @ b'1'..=b'9' => { - let mut significand = (c - b'0') as u64; - - loop { - match tri!(self.peek_or_null()) { - c @ b'0'..=b'9' => { - let digit = (c - b'0') as u64; - - // We need to be careful with overflow. If we can, - // try to keep the number as a `u64` until we grow - // too large. At that point, switch to parsing the - // value as a `f64`. - if overflow!(significand * 10 + digit, u64::max_value()) { - return Ok(ParserNumber::F64(tri!( - self.parse_long_integer(positive, significand), - ))); - } - - self.eat_char(); - significand = significand * 10 + digit; - } - _ => { - return self.parse_number(positive, significand); - } - } - } - } - _ => Err(self.error(ErrorCode::InvalidNumber)), - } - } - - fn parse_number(&mut self, positive: bool, significand: u64) -> Result<ParserNumber> { - Ok(match tri!(self.peek_or_null()) { - b'.' => ParserNumber::F64(tri!(self.parse_decimal(positive, significand, 0))), - b'e' | b'E' => ParserNumber::F64(tri!(self.parse_exponent(positive, significand, 0))), - _ => { - if positive { - ParserNumber::U64(significand) - } else { - let neg = (significand as i64).wrapping_neg(); - - // Convert into a float if we underflow, or on `-0`. - if neg >= 0 { - ParserNumber::F64(-(significand as f64)) - } else { - ParserNumber::I64(neg) - } - } - } - }) - } - - fn parse_decimal( - &mut self, - positive: bool, - mut significand: u64, - exponent_before_decimal_point: i32, - ) -> Result<f64> { - self.eat_char(); - - let mut exponent_after_decimal_point = 0; - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - let digit = (c - b'0') as u64; - - if overflow!(significand * 10 + digit, u64::max_value()) { - let exponent = exponent_before_decimal_point + exponent_after_decimal_point; - return self.parse_decimal_overflow(positive, significand, exponent); - } - - self.eat_char(); - significand = significand * 10 + digit; - exponent_after_decimal_point -= 1; - } - - // Error if there is not at least one digit after the decimal point. - if exponent_after_decimal_point == 0 { - match tri!(self.peek()) { - Some(_) => return Err(self.peek_error(ErrorCode::InvalidNumber)), - None => return Err(self.peek_error(ErrorCode::EofWhileParsingValue)), - } - } - - let exponent = exponent_before_decimal_point + exponent_after_decimal_point; - match tri!(self.peek_or_null()) { - b'e' | b'E' => self.parse_exponent(positive, significand, exponent), - _ => self.f64_from_parts(positive, significand, exponent), - } - } - - fn parse_exponent( - &mut self, - positive: bool, - significand: u64, - starting_exp: i32, - ) -> Result<f64> { - self.eat_char(); - - let positive_exp = match tri!(self.peek_or_null()) { - b'+' => { - self.eat_char(); - true - } - b'-' => { - self.eat_char(); - false - } - _ => true, - }; - - let next = match tri!(self.next_char()) { - Some(b) => b, - None => { - return Err(self.error(ErrorCode::EofWhileParsingValue)); - } - }; - - // Make sure a digit follows the exponent place. - let mut exp = match next { - c @ b'0'..=b'9' => (c - b'0') as i32, - _ => { - return Err(self.error(ErrorCode::InvalidNumber)); - } - }; - - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - let digit = (c - b'0') as i32; - - if overflow!(exp * 10 + digit, i32::max_value()) { - let zero_significand = significand == 0; - return self.parse_exponent_overflow(positive, zero_significand, positive_exp); - } - - exp = exp * 10 + digit; - } - - let final_exp = if positive_exp { - starting_exp.saturating_add(exp) - } else { - starting_exp.saturating_sub(exp) - }; - - self.f64_from_parts(positive, significand, final_exp) - } - - #[cfg(feature = "float_roundtrip")] - fn f64_from_parts(&mut self, positive: bool, significand: u64, exponent: i32) -> Result<f64> { - let f = if self.single_precision { - lexical::parse_concise_float::<f32>(significand, exponent) as f64 - } else { - lexical::parse_concise_float::<f64>(significand, exponent) - }; - - if f.is_infinite() { - Err(self.error(ErrorCode::NumberOutOfRange)) - } else { - Ok(if positive { f } else { -f }) - } - } - - #[cfg(not(feature = "float_roundtrip"))] - fn f64_from_parts( - &mut self, - positive: bool, - significand: u64, - mut exponent: i32, - ) -> Result<f64> { - let mut f = significand as f64; - loop { - match POW10.get(exponent.wrapping_abs() as usize) { - Some(&pow) => { - if exponent >= 0 { - f *= pow; - if f.is_infinite() { - return Err(self.error(ErrorCode::NumberOutOfRange)); - } - } else { - f /= pow; - } - break; - } - None => { - if f == 0.0 { - break; - } - if exponent >= 0 { - return Err(self.error(ErrorCode::NumberOutOfRange)); - } - f /= 1e308; - exponent += 308; - } - } - } - Ok(if positive { f } else { -f }) - } - - #[cfg(feature = "float_roundtrip")] - #[cold] - #[inline(never)] - fn parse_long_integer(&mut self, positive: bool, partial_significand: u64) -> Result<f64> { - // To deserialize floats we'll first push the integer and fraction - // parts, both as byte strings, into the scratch buffer and then feed - // both slices to lexical's parser. For example if the input is - // `12.34e5` we'll push b"1234" into scratch and then pass b"12" and - // b"34" to lexical. `integer_end` will be used to track where to split - // the scratch buffer. - // - // Note that lexical expects the integer part to contain *no* leading - // zeroes and the fraction part to contain *no* trailing zeroes. The - // first requirement is already handled by the integer parsing logic. - // The second requirement will be enforced just before passing the - // slices to lexical in f64_long_from_parts. - self.scratch.clear(); - self.scratch - .extend_from_slice(itoa::Buffer::new().format(partial_significand).as_bytes()); - - loop { - match tri!(self.peek_or_null()) { - c @ b'0'..=b'9' => { - self.scratch.push(c); - self.eat_char(); - } - b'.' => { - self.eat_char(); - return self.parse_long_decimal(positive, self.scratch.len()); - } - b'e' | b'E' => { - return self.parse_long_exponent(positive, self.scratch.len()); - } - _ => { - return self.f64_long_from_parts(positive, self.scratch.len(), 0); - } - } - } - } - - #[cfg(not(feature = "float_roundtrip"))] - #[cold] - #[inline(never)] - fn parse_long_integer(&mut self, positive: bool, significand: u64) -> Result<f64> { - let mut exponent = 0; - loop { - match tri!(self.peek_or_null()) { - b'0'..=b'9' => { - self.eat_char(); - // This could overflow... if your integer is gigabytes long. - // Ignore that possibility. - exponent += 1; - } - b'.' => { - return self.parse_decimal(positive, significand, exponent); - } - b'e' | b'E' => { - return self.parse_exponent(positive, significand, exponent); - } - _ => { - return self.f64_from_parts(positive, significand, exponent); - } - } - } - } - - #[cfg(feature = "float_roundtrip")] - #[cold] - fn parse_long_decimal(&mut self, positive: bool, integer_end: usize) -> Result<f64> { - let mut at_least_one_digit = integer_end < self.scratch.len(); - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - self.scratch.push(c); - self.eat_char(); - at_least_one_digit = true; - } - - if !at_least_one_digit { - match tri!(self.peek()) { - Some(_) => return Err(self.peek_error(ErrorCode::InvalidNumber)), - None => return Err(self.peek_error(ErrorCode::EofWhileParsingValue)), - } - } - - match tri!(self.peek_or_null()) { - b'e' | b'E' => self.parse_long_exponent(positive, integer_end), - _ => self.f64_long_from_parts(positive, integer_end, 0), - } - } - - #[cfg(feature = "float_roundtrip")] - fn parse_long_exponent(&mut self, positive: bool, integer_end: usize) -> Result<f64> { - self.eat_char(); - - let positive_exp = match tri!(self.peek_or_null()) { - b'+' => { - self.eat_char(); - true - } - b'-' => { - self.eat_char(); - false - } - _ => true, - }; - - let next = match tri!(self.next_char()) { - Some(b) => b, - None => { - return Err(self.error(ErrorCode::EofWhileParsingValue)); - } - }; - - // Make sure a digit follows the exponent place. - let mut exp = match next { - c @ b'0'..=b'9' => (c - b'0') as i32, - _ => { - return Err(self.error(ErrorCode::InvalidNumber)); - } - }; - - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - let digit = (c - b'0') as i32; - - if overflow!(exp * 10 + digit, i32::max_value()) { - let zero_significand = self.scratch.iter().all(|&digit| digit == b'0'); - return self.parse_exponent_overflow(positive, zero_significand, positive_exp); - } - - exp = exp * 10 + digit; - } - - let final_exp = if positive_exp { exp } else { -exp }; - - self.f64_long_from_parts(positive, integer_end, final_exp) - } - - // This cold code should not be inlined into the middle of the hot - // decimal-parsing loop above. - #[cfg(feature = "float_roundtrip")] - #[cold] - #[inline(never)] - fn parse_decimal_overflow( - &mut self, - positive: bool, - significand: u64, - exponent: i32, - ) -> Result<f64> { - let mut buffer = itoa::Buffer::new(); - let significand = buffer.format(significand); - let fraction_digits = -exponent as usize; - self.scratch.clear(); - if let Some(zeros) = fraction_digits.checked_sub(significand.len() + 1) { - self.scratch.extend(iter::repeat(b'0').take(zeros + 1)); - } - self.scratch.extend_from_slice(significand.as_bytes()); - let integer_end = self.scratch.len() - fraction_digits; - self.parse_long_decimal(positive, integer_end) - } - - #[cfg(not(feature = "float_roundtrip"))] - #[cold] - #[inline(never)] - fn parse_decimal_overflow( - &mut self, - positive: bool, - significand: u64, - exponent: i32, - ) -> Result<f64> { - // The next multiply/add would overflow, so just ignore all further - // digits. - while let b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - } - - match tri!(self.peek_or_null()) { - b'e' | b'E' => self.parse_exponent(positive, significand, exponent), - _ => self.f64_from_parts(positive, significand, exponent), - } - } - - // This cold code should not be inlined into the middle of the hot - // exponent-parsing loop above. - #[cold] - #[inline(never)] - fn parse_exponent_overflow( - &mut self, - positive: bool, - zero_significand: bool, - positive_exp: bool, - ) -> Result<f64> { - // Error instead of +/- infinity. - if !zero_significand && positive_exp { - return Err(self.error(ErrorCode::NumberOutOfRange)); - } - - while let b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - } - Ok(if positive { 0.0 } else { -0.0 }) - } - - #[cfg(feature = "float_roundtrip")] - fn f64_long_from_parts( - &mut self, - positive: bool, - integer_end: usize, - exponent: i32, - ) -> Result<f64> { - let integer = &self.scratch[..integer_end]; - let fraction = &self.scratch[integer_end..]; - - let f = if self.single_precision { - lexical::parse_truncated_float::<f32>(integer, fraction, exponent) as f64 - } else { - lexical::parse_truncated_float::<f64>(integer, fraction, exponent) - }; - - if f.is_infinite() { - Err(self.error(ErrorCode::NumberOutOfRange)) - } else { - Ok(if positive { f } else { -f }) - } - } - - fn parse_any_signed_number(&mut self) -> Result<ParserNumber> { - let peek = match tri!(self.peek()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'-' => { - self.eat_char(); - self.parse_any_number(false) - } - b'0'..=b'9' => self.parse_any_number(true), - _ => Err(self.peek_error(ErrorCode::InvalidNumber)), - }; - - let value = match tri!(self.peek()) { - Some(_) => Err(self.peek_error(ErrorCode::InvalidNumber)), - None => value, - }; - - match value { - Ok(value) => Ok(value), - // The de::Error impl creates errors with unknown line and column. - // Fill in the position here by looking at the current index in the - // input. There is no way to tell whether this should call `error` - // or `peek_error` so pick the one that seems correct more often. - // Worst case, the position is off by one character. - Err(err) => Err(self.fix_position(err)), - } - } - - #[cfg(not(feature = "arbitrary_precision"))] - fn parse_any_number(&mut self, positive: bool) -> Result<ParserNumber> { - self.parse_integer(positive) - } - - #[cfg(feature = "arbitrary_precision")] - fn parse_any_number(&mut self, positive: bool) -> Result<ParserNumber> { - let mut buf = String::with_capacity(16); - if !positive { - buf.push('-'); - } - tri!(self.scan_integer(&mut buf)); - if positive { - if let Ok(unsigned) = buf.parse() { - return Ok(ParserNumber::U64(unsigned)); - } - } else { - if let Ok(signed) = buf.parse() { - return Ok(ParserNumber::I64(signed)); - } - } - Ok(ParserNumber::String(buf)) - } - - #[cfg(feature = "arbitrary_precision")] - fn scan_or_eof(&mut self, buf: &mut String) -> Result<u8> { - match tri!(self.next_char()) { - Some(b) => { - buf.push(b as char); - Ok(b) - } - None => Err(self.error(ErrorCode::EofWhileParsingValue)), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn scan_integer(&mut self, buf: &mut String) -> Result<()> { - match tri!(self.scan_or_eof(buf)) { - b'0' => { - // There can be only one leading '0'. - match tri!(self.peek_or_null()) { - b'0'..=b'9' => Err(self.peek_error(ErrorCode::InvalidNumber)), - _ => self.scan_number(buf), - } - } - b'1'..=b'9' => loop { - match tri!(self.peek_or_null()) { - c @ b'0'..=b'9' => { - self.eat_char(); - buf.push(c as char); - } - _ => { - return self.scan_number(buf); - } - } - }, - _ => Err(self.error(ErrorCode::InvalidNumber)), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn scan_number(&mut self, buf: &mut String) -> Result<()> { - match tri!(self.peek_or_null()) { - b'.' => self.scan_decimal(buf), - e @ (b'e' | b'E') => self.scan_exponent(e as char, buf), - _ => Ok(()), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn scan_decimal(&mut self, buf: &mut String) -> Result<()> { - self.eat_char(); - buf.push('.'); - - let mut at_least_one_digit = false; - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - buf.push(c as char); - at_least_one_digit = true; - } - - if !at_least_one_digit { - match tri!(self.peek()) { - Some(_) => return Err(self.peek_error(ErrorCode::InvalidNumber)), - None => return Err(self.peek_error(ErrorCode::EofWhileParsingValue)), - } - } - - match tri!(self.peek_or_null()) { - e @ (b'e' | b'E') => self.scan_exponent(e as char, buf), - _ => Ok(()), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn scan_exponent(&mut self, e: char, buf: &mut String) -> Result<()> { - self.eat_char(); - buf.push(e); - - match tri!(self.peek_or_null()) { - b'+' => { - self.eat_char(); - buf.push('+'); - } - b'-' => { - self.eat_char(); - buf.push('-'); - } - _ => {} - } - - // Make sure a digit follows the exponent place. - match tri!(self.scan_or_eof(buf)) { - b'0'..=b'9' => {} - _ => { - return Err(self.error(ErrorCode::InvalidNumber)); - } - } - - while let c @ b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - buf.push(c as char); - } - - Ok(()) - } - - fn parse_object_colon(&mut self) -> Result<()> { - match tri!(self.parse_whitespace()) { - Some(b':') => { - self.eat_char(); - Ok(()) - } - Some(_) => Err(self.peek_error(ErrorCode::ExpectedColon)), - None => Err(self.peek_error(ErrorCode::EofWhileParsingObject)), - } - } - - fn end_seq(&mut self) -> Result<()> { - match tri!(self.parse_whitespace()) { - Some(b']') => { - self.eat_char(); - Ok(()) - } - Some(b',') => { - self.eat_char(); - match self.parse_whitespace() { - Ok(Some(b']')) => Err(self.peek_error(ErrorCode::TrailingComma)), - _ => Err(self.peek_error(ErrorCode::TrailingCharacters)), - } - } - Some(_) => Err(self.peek_error(ErrorCode::TrailingCharacters)), - None => Err(self.peek_error(ErrorCode::EofWhileParsingList)), - } - } - - fn end_map(&mut self) -> Result<()> { - match tri!(self.parse_whitespace()) { - Some(b'}') => { - self.eat_char(); - Ok(()) - } - Some(b',') => Err(self.peek_error(ErrorCode::TrailingComma)), - Some(_) => Err(self.peek_error(ErrorCode::TrailingCharacters)), - None => Err(self.peek_error(ErrorCode::EofWhileParsingObject)), - } - } - - fn ignore_value(&mut self) -> Result<()> { - self.scratch.clear(); - let mut enclosing = None; - - loop { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let frame = match peek { - b'n' => { - self.eat_char(); - tri!(self.parse_ident(b"ull")); - None - } - b't' => { - self.eat_char(); - tri!(self.parse_ident(b"rue")); - None - } - b'f' => { - self.eat_char(); - tri!(self.parse_ident(b"alse")); - None - } - b'-' => { - self.eat_char(); - tri!(self.ignore_integer()); - None - } - b'0'..=b'9' => { - tri!(self.ignore_integer()); - None - } - b'"' => { - self.eat_char(); - tri!(self.read.ignore_str()); - None - } - frame @ (b'[' | b'{') => { - self.scratch.extend(enclosing.take()); - self.eat_char(); - Some(frame) - } - _ => return Err(self.peek_error(ErrorCode::ExpectedSomeValue)), - }; - - let (mut accept_comma, mut frame) = match frame { - Some(frame) => (false, frame), - None => match enclosing.take() { - Some(frame) => (true, frame), - None => match self.scratch.pop() { - Some(frame) => (true, frame), - None => return Ok(()), - }, - }, - }; - - loop { - match tri!(self.parse_whitespace()) { - Some(b',') if accept_comma => { - self.eat_char(); - break; - } - Some(b']') if frame == b'[' => {} - Some(b'}') if frame == b'{' => {} - Some(_) => { - if accept_comma { - return Err(self.peek_error(match frame { - b'[' => ErrorCode::ExpectedListCommaOrEnd, - b'{' => ErrorCode::ExpectedObjectCommaOrEnd, - _ => unreachable!(), - })); - } else { - break; - } - } - None => { - return Err(self.peek_error(match frame { - b'[' => ErrorCode::EofWhileParsingList, - b'{' => ErrorCode::EofWhileParsingObject, - _ => unreachable!(), - })); - } - } - - self.eat_char(); - frame = match self.scratch.pop() { - Some(frame) => frame, - None => return Ok(()), - }; - accept_comma = true; - } - - if frame == b'{' { - match tri!(self.parse_whitespace()) { - Some(b'"') => self.eat_char(), - Some(_) => return Err(self.peek_error(ErrorCode::KeyMustBeAString)), - None => return Err(self.peek_error(ErrorCode::EofWhileParsingObject)), - } - tri!(self.read.ignore_str()); - match tri!(self.parse_whitespace()) { - Some(b':') => self.eat_char(), - Some(_) => return Err(self.peek_error(ErrorCode::ExpectedColon)), - None => return Err(self.peek_error(ErrorCode::EofWhileParsingObject)), - } - } - - enclosing = Some(frame); - } - } - - fn ignore_integer(&mut self) -> Result<()> { - match tri!(self.next_char_or_null()) { - b'0' => { - // There can be only one leading '0'. - if let b'0'..=b'9' = tri!(self.peek_or_null()) { - return Err(self.peek_error(ErrorCode::InvalidNumber)); - } - } - b'1'..=b'9' => { - while let b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - } - } - _ => { - return Err(self.error(ErrorCode::InvalidNumber)); - } - } - - match tri!(self.peek_or_null()) { - b'.' => self.ignore_decimal(), - b'e' | b'E' => self.ignore_exponent(), - _ => Ok(()), - } - } - - fn ignore_decimal(&mut self) -> Result<()> { - self.eat_char(); - - let mut at_least_one_digit = false; - while let b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - at_least_one_digit = true; - } - - if !at_least_one_digit { - return Err(self.peek_error(ErrorCode::InvalidNumber)); - } - - match tri!(self.peek_or_null()) { - b'e' | b'E' => self.ignore_exponent(), - _ => Ok(()), - } - } - - fn ignore_exponent(&mut self) -> Result<()> { - self.eat_char(); - - match tri!(self.peek_or_null()) { - b'+' | b'-' => self.eat_char(), - _ => {} - } - - // Make sure a digit follows the exponent place. - match tri!(self.next_char_or_null()) { - b'0'..=b'9' => {} - _ => { - return Err(self.error(ErrorCode::InvalidNumber)); - } - } - - while let b'0'..=b'9' = tri!(self.peek_or_null()) { - self.eat_char(); - } - - Ok(()) - } - - #[cfg(feature = "raw_value")] - fn deserialize_raw_value<V>(&mut self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - tri!(self.parse_whitespace()); - self.read.begin_raw_buffering(); - tri!(self.ignore_value()); - self.read.end_raw_buffering(visitor) - } -} - -impl FromStr for Number { - type Err = Error; - - fn from_str(s: &str) -> result::Result<Self, Self::Err> { - Deserializer::from_str(s) - .parse_any_signed_number() - .map(Into::into) - } -} - -#[cfg(not(feature = "float_roundtrip"))] -static POW10: [f64; 309] = [ - 1e000, 1e001, 1e002, 1e003, 1e004, 1e005, 1e006, 1e007, 1e008, 1e009, // - 1e010, 1e011, 1e012, 1e013, 1e014, 1e015, 1e016, 1e017, 1e018, 1e019, // - 1e020, 1e021, 1e022, 1e023, 1e024, 1e025, 1e026, 1e027, 1e028, 1e029, // - 1e030, 1e031, 1e032, 1e033, 1e034, 1e035, 1e036, 1e037, 1e038, 1e039, // - 1e040, 1e041, 1e042, 1e043, 1e044, 1e045, 1e046, 1e047, 1e048, 1e049, // - 1e050, 1e051, 1e052, 1e053, 1e054, 1e055, 1e056, 1e057, 1e058, 1e059, // - 1e060, 1e061, 1e062, 1e063, 1e064, 1e065, 1e066, 1e067, 1e068, 1e069, // - 1e070, 1e071, 1e072, 1e073, 1e074, 1e075, 1e076, 1e077, 1e078, 1e079, // - 1e080, 1e081, 1e082, 1e083, 1e084, 1e085, 1e086, 1e087, 1e088, 1e089, // - 1e090, 1e091, 1e092, 1e093, 1e094, 1e095, 1e096, 1e097, 1e098, 1e099, // - 1e100, 1e101, 1e102, 1e103, 1e104, 1e105, 1e106, 1e107, 1e108, 1e109, // - 1e110, 1e111, 1e112, 1e113, 1e114, 1e115, 1e116, 1e117, 1e118, 1e119, // - 1e120, 1e121, 1e122, 1e123, 1e124, 1e125, 1e126, 1e127, 1e128, 1e129, // - 1e130, 1e131, 1e132, 1e133, 1e134, 1e135, 1e136, 1e137, 1e138, 1e139, // - 1e140, 1e141, 1e142, 1e143, 1e144, 1e145, 1e146, 1e147, 1e148, 1e149, // - 1e150, 1e151, 1e152, 1e153, 1e154, 1e155, 1e156, 1e157, 1e158, 1e159, // - 1e160, 1e161, 1e162, 1e163, 1e164, 1e165, 1e166, 1e167, 1e168, 1e169, // - 1e170, 1e171, 1e172, 1e173, 1e174, 1e175, 1e176, 1e177, 1e178, 1e179, // - 1e180, 1e181, 1e182, 1e183, 1e184, 1e185, 1e186, 1e187, 1e188, 1e189, // - 1e190, 1e191, 1e192, 1e193, 1e194, 1e195, 1e196, 1e197, 1e198, 1e199, // - 1e200, 1e201, 1e202, 1e203, 1e204, 1e205, 1e206, 1e207, 1e208, 1e209, // - 1e210, 1e211, 1e212, 1e213, 1e214, 1e215, 1e216, 1e217, 1e218, 1e219, // - 1e220, 1e221, 1e222, 1e223, 1e224, 1e225, 1e226, 1e227, 1e228, 1e229, // - 1e230, 1e231, 1e232, 1e233, 1e234, 1e235, 1e236, 1e237, 1e238, 1e239, // - 1e240, 1e241, 1e242, 1e243, 1e244, 1e245, 1e246, 1e247, 1e248, 1e249, // - 1e250, 1e251, 1e252, 1e253, 1e254, 1e255, 1e256, 1e257, 1e258, 1e259, // - 1e260, 1e261, 1e262, 1e263, 1e264, 1e265, 1e266, 1e267, 1e268, 1e269, // - 1e270, 1e271, 1e272, 1e273, 1e274, 1e275, 1e276, 1e277, 1e278, 1e279, // - 1e280, 1e281, 1e282, 1e283, 1e284, 1e285, 1e286, 1e287, 1e288, 1e289, // - 1e290, 1e291, 1e292, 1e293, 1e294, 1e295, 1e296, 1e297, 1e298, 1e299, // - 1e300, 1e301, 1e302, 1e303, 1e304, 1e305, 1e306, 1e307, 1e308, -]; - -macro_rules! deserialize_number { - ($method:ident) => { - deserialize_number!($method, deserialize_number); - }; - - ($method:ident, $using:ident) => { - fn $method<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.$using(visitor) - } - }; -} - -#[cfg(not(feature = "unbounded_depth"))] -macro_rules! if_checking_recursion_limit { - ($($body:tt)*) => { - $($body)* - }; -} - -#[cfg(feature = "unbounded_depth")] -macro_rules! if_checking_recursion_limit { - ($this:ident $($body:tt)*) => { - if !$this.disable_recursion_limit { - $this $($body)* - } - }; -} - -macro_rules! check_recursion { - ($this:ident $($body:tt)*) => { - if_checking_recursion_limit! { - $this.remaining_depth -= 1; - if $this.remaining_depth == 0 { - return Err($this.peek_error(ErrorCode::RecursionLimitExceeded)); - } - } - - $this $($body)* - - if_checking_recursion_limit! { - $this.remaining_depth += 1; - } - }; -} - -impl<'de, 'a, R: Read<'de>> de::Deserializer<'de> for &'a mut Deserializer<R> { - type Error = Error; - - #[inline] - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'n' => { - self.eat_char(); - tri!(self.parse_ident(b"ull")); - visitor.visit_unit() - } - b't' => { - self.eat_char(); - tri!(self.parse_ident(b"rue")); - visitor.visit_bool(true) - } - b'f' => { - self.eat_char(); - tri!(self.parse_ident(b"alse")); - visitor.visit_bool(false) - } - b'-' => { - self.eat_char(); - tri!(self.parse_any_number(false)).visit(visitor) - } - b'0'..=b'9' => tri!(self.parse_any_number(true)).visit(visitor), - b'"' => { - self.eat_char(); - self.scratch.clear(); - match tri!(self.read.parse_str(&mut self.scratch)) { - Reference::Borrowed(s) => visitor.visit_borrowed_str(s), - Reference::Copied(s) => visitor.visit_str(s), - } - } - b'[' => { - check_recursion! { - self.eat_char(); - let ret = visitor.visit_seq(SeqAccess::new(self)); - } - - match (ret, self.end_seq()) { - (Ok(ret), Ok(())) => Ok(ret), - (Err(err), _) | (_, Err(err)) => Err(err), - } - } - b'{' => { - check_recursion! { - self.eat_char(); - let ret = visitor.visit_map(MapAccess::new(self)); - } - - match (ret, self.end_map()) { - (Ok(ret), Ok(())) => Ok(ret), - (Err(err), _) | (_, Err(err)) => Err(err), - } - } - _ => Err(self.peek_error(ErrorCode::ExpectedSomeValue)), - }; - - match value { - Ok(value) => Ok(value), - // The de::Error impl creates errors with unknown line and column. - // Fill in the position here by looking at the current index in the - // input. There is no way to tell whether this should call `error` - // or `peek_error` so pick the one that seems correct more often. - // Worst case, the position is off by one character. - Err(err) => Err(self.fix_position(err)), - } - } - - fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b't' => { - self.eat_char(); - tri!(self.parse_ident(b"rue")); - visitor.visit_bool(true) - } - b'f' => { - self.eat_char(); - tri!(self.parse_ident(b"alse")); - visitor.visit_bool(false) - } - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - deserialize_number!(deserialize_i8); - deserialize_number!(deserialize_i16); - deserialize_number!(deserialize_i32); - deserialize_number!(deserialize_i64); - deserialize_number!(deserialize_u8); - deserialize_number!(deserialize_u16); - deserialize_number!(deserialize_u32); - deserialize_number!(deserialize_u64); - #[cfg(not(feature = "float_roundtrip"))] - deserialize_number!(deserialize_f32); - deserialize_number!(deserialize_f64); - - #[cfg(feature = "float_roundtrip")] - deserialize_number!(deserialize_f32, do_deserialize_f32); - deserialize_number!(deserialize_i128, do_deserialize_i128); - deserialize_number!(deserialize_u128, do_deserialize_u128); - - fn deserialize_char<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_str(visitor) - } - - fn deserialize_str<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'"' => { - self.eat_char(); - self.scratch.clear(); - match tri!(self.read.parse_str(&mut self.scratch)) { - Reference::Borrowed(s) => visitor.visit_borrowed_str(s), - Reference::Copied(s) => visitor.visit_str(s), - } - } - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - fn deserialize_string<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_str(visitor) - } - - /// Parses a JSON string as bytes. Note that this function does not check - /// whether the bytes represent a valid UTF-8 string. - /// - /// The relevant part of the JSON specification is Section 8.2 of [RFC - /// 7159]: - /// - /// > When all the strings represented in a JSON text are composed entirely - /// > of Unicode characters (however escaped), then that JSON text is - /// > interoperable in the sense that all software implementations that - /// > parse it will agree on the contents of names and of string values in - /// > objects and arrays. - /// > - /// > However, the ABNF in this specification allows member names and string - /// > values to contain bit sequences that cannot encode Unicode characters; - /// > for example, "\uDEAD" (a single unpaired UTF-16 surrogate). Instances - /// > of this have been observed, for example, when a library truncates a - /// > UTF-16 string without checking whether the truncation split a - /// > surrogate pair. The behavior of software that receives JSON texts - /// > containing such values is unpredictable; for example, implementations - /// > might return different values for the length of a string value or even - /// > suffer fatal runtime exceptions. - /// - /// [RFC 7159]: https://tools.ietf.org/html/rfc7159 - /// - /// The behavior of serde_json_lenient is specified to fail on non-UTF-8 strings - /// when deserializing into Rust UTF-8 string types such as String, and - /// succeed with non-UTF-8 bytes when deserializing using this method. - /// - /// Escape sequences are processed as usual, and for `\uXXXX` escapes it is - /// still checked if the hex number represents a valid Unicode code point. - /// - /// # Examples - /// - /// You can use this to parse JSON strings containing invalid UTF-8 bytes, - /// or unpaired surrogates. - /// - /// ``` - /// use serde_bytes::ByteBuf; - /// - /// fn look_at_bytes() -> Result<(), serde_json_lenient::Error> { - /// let json_data = b"\"some bytes: \xe5\x00\xe5\""; - /// let bytes: ByteBuf = serde_json_lenient::from_slice(json_data)?; - /// - /// assert_eq!(b'\xe5', bytes[12]); - /// assert_eq!(b'\0', bytes[13]); - /// assert_eq!(b'\xe5', bytes[14]); - /// - /// Ok(()) - /// } - /// # - /// # look_at_bytes().unwrap(); - /// ``` - /// - /// Backslash escape sequences like `\n` are still interpreted and required - /// to be valid. `\u` escape sequences are required to represent a valid - /// Unicode code point or lone surrogate. - /// - /// ``` - /// use serde_bytes::ByteBuf; - /// - /// fn look_at_bytes() -> Result<(), serde_json_lenient::Error> { - /// let json_data = b"\"lone surrogate: \\uD801\""; - /// let bytes: ByteBuf = serde_json_lenient::from_slice(json_data)?; - /// let expected = b"lone surrogate: \xED\xA0\x81"; - /// assert_eq!(expected, bytes.as_slice()); - /// Ok(()) - /// } - /// # - /// # look_at_bytes(); - /// ``` - fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'"' => { - self.eat_char(); - self.scratch.clear(); - match tri!(self.read.parse_str_raw(&mut self.scratch)) { - Reference::Borrowed(b) => visitor.visit_borrowed_bytes(b), - Reference::Copied(b) => visitor.visit_bytes(b), - } - } - b'[' => self.deserialize_seq(visitor), - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - #[inline] - fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_bytes(visitor) - } - - /// Parses a `null` as a None, and any other values as a `Some(...)`. - #[inline] - fn deserialize_option<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - match tri!(self.parse_whitespace()) { - Some(b'n') => { - self.eat_char(); - tri!(self.parse_ident(b"ull")); - visitor.visit_none() - } - _ => visitor.visit_some(self), - } - } - - fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'n' => { - self.eat_char(); - tri!(self.parse_ident(b"ull")); - visitor.visit_unit() - } - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - fn deserialize_unit_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_unit(visitor) - } - - /// Parses a newtype struct as the underlying value. - #[inline] - fn deserialize_newtype_struct<V>(self, name: &str, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - #[cfg(feature = "raw_value")] - { - if name == crate::raw::TOKEN { - return self.deserialize_raw_value(visitor); - } - } - - let _ = name; - visitor.visit_newtype_struct(self) - } - - fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'[' => { - check_recursion! { - self.eat_char(); - let ret = visitor.visit_seq(SeqAccess::new(self)); - } - - match (ret, self.end_seq()) { - (Ok(ret), Ok(())) => Ok(ret), - (Err(err), _) | (_, Err(err)) => Err(err), - } - } - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_seq(visitor) - } - - fn deserialize_tuple_struct<V>( - self, - _name: &'static str, - _len: usize, - visitor: V, - ) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_seq(visitor) - } - - fn deserialize_map<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'{' => { - check_recursion! { - self.eat_char(); - let ret = visitor.visit_map(MapAccess::new(self)); - } - - match (ret, self.end_map()) { - (Ok(ret), Ok(())) => Ok(ret), - (Err(err), _) | (_, Err(err)) => Err(err), - } - } - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - fn deserialize_struct<V>( - self, - _name: &'static str, - _fields: &'static [&'static str], - visitor: V, - ) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - let peek = match tri!(self.parse_whitespace()) { - Some(b) => b, - None => { - return Err(self.peek_error(ErrorCode::EofWhileParsingValue)); - } - }; - - let value = match peek { - b'[' => { - check_recursion! { - self.eat_char(); - let ret = visitor.visit_seq(SeqAccess::new(self)); - } - - match (ret, self.end_seq()) { - (Ok(ret), Ok(())) => Ok(ret), - (Err(err), _) | (_, Err(err)) => Err(err), - } - } - b'{' => { - check_recursion! { - self.eat_char(); - let ret = visitor.visit_map(MapAccess::new(self)); - } - - match (ret, self.end_map()) { - (Ok(ret), Ok(())) => Ok(ret), - (Err(err), _) | (_, Err(err)) => Err(err), - } - } - _ => Err(self.peek_invalid_type(&visitor)), - }; - - match value { - Ok(value) => Ok(value), - Err(err) => Err(self.fix_position(err)), - } - } - - /// Parses an enum as an object like `{"$KEY":$VALUE}`, where $VALUE is either a straight - /// value, a `[..]`, or a `{..}`. - #[inline] - fn deserialize_enum<V>( - self, - _name: &str, - _variants: &'static [&'static str], - visitor: V, - ) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - match tri!(self.parse_whitespace()) { - Some(b'{') => { - check_recursion! { - self.eat_char(); - let value = tri!(visitor.visit_enum(VariantAccess::new(self))); - } - - match tri!(self.parse_whitespace()) { - Some(b'}') => { - self.eat_char(); - Ok(value) - } - Some(_) => Err(self.error(ErrorCode::ExpectedSomeValue)), - None => Err(self.error(ErrorCode::EofWhileParsingObject)), - } - } - Some(b'"') => visitor.visit_enum(UnitVariantAccess::new(self)), - Some(_) => Err(self.peek_error(ErrorCode::ExpectedSomeValue)), - None => Err(self.peek_error(ErrorCode::EofWhileParsingValue)), - } - } - - fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_str(visitor) - } - - fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - tri!(self.ignore_value()); - visitor.visit_unit() - } -} - -struct SeqAccess<'a, R: 'a> { - de: &'a mut Deserializer<R>, - first: bool, -} - -impl<'a, R: 'a> SeqAccess<'a, R> { - fn new(de: &'a mut Deserializer<R>) -> Self { - SeqAccess { de, first: true } - } -} - -impl<'de, 'a, R: Read<'de> + 'a> de::SeqAccess<'de> for SeqAccess<'a, R> { - type Error = Error; - - fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>> - where - T: de::DeserializeSeed<'de>, - { - let peek = tri!(self.de.parse_whitespace()); - if self.de.ignore_trailing_commas { - match peek { - Some(b) => { - // List most common branch first. - if b != b']' { - let result = Ok(Some(tri!(seed.deserialize(&mut *self.de)))); - - match tri!(self.de.parse_whitespace()) { - Some(b',') => self.de.eat_char(), - Some(b']') => { - // Ignore. - } - Some(_) => { - return Err(self.de.peek_error(ErrorCode::ExpectedListCommaOrEnd)); - } - None => { - return Err(self.de.peek_error(ErrorCode::EofWhileParsingList)); - } - } - result - } else { - Ok(None) - } - } - None => Err(self.de.peek_error(ErrorCode::EofWhileParsingList)), - } - } else { - let peek = match peek { - Some(b']') => { - return Ok(None); - } - Some(b',') if !self.first => { - self.de.eat_char(); - tri!(self.de.parse_whitespace()) - } - Some(b) => { - if self.first { - self.first = false; - Some(b) - } else { - return Err(self.de.peek_error(ErrorCode::ExpectedListCommaOrEnd)); - } - } - None => { - return Err(self.de.peek_error(ErrorCode::EofWhileParsingList)); - } - }; - - match peek { - Some(b']') => Err(self.de.peek_error(ErrorCode::TrailingComma)), - Some(_) => Ok(Some(tri!(seed.deserialize(&mut *self.de)))), - None => Err(self.de.peek_error(ErrorCode::EofWhileParsingValue)), - } - } - } -} - -struct MapAccess<'a, R: 'a> { - de: &'a mut Deserializer<R>, - first: bool, -} - -impl<'a, R: 'a> MapAccess<'a, R> { - fn new(de: &'a mut Deserializer<R>) -> Self { - MapAccess { de, first: true } - } -} - -impl<'de, 'a, R: Read<'de> + 'a> de::MapAccess<'de> for MapAccess<'a, R> { - type Error = Error; - - fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>> - where - K: de::DeserializeSeed<'de>, - { - let mut peek = tri!(self.de.parse_whitespace()); - if !self.de.ignore_trailing_commas { - peek = match peek { - Some(b'}') => { - return Ok(None); - } - Some(b',') if !self.first => { - self.de.eat_char(); - tri!(self.de.parse_whitespace()) - } - Some(b) => { - if self.first { - self.first = false; - Some(b) - } else { - return Err(self.de.peek_error(ErrorCode::ExpectedObjectCommaOrEnd)); - } - } - None => { - return Err(self.de.peek_error(ErrorCode::EofWhileParsingObject)); - } - }; - } - - match peek { - Some(b'"') => seed.deserialize(MapKey { de: &mut *self.de }).map(Some), - Some(b'}') => { - if self.de.ignore_trailing_commas { - Ok(None) - } else { - Err(self.de.peek_error(ErrorCode::TrailingComma)) - } - } - Some(_) => Err(self.de.peek_error(ErrorCode::KeyMustBeAString)), - None => Err(self.de.peek_error(if self.de.ignore_trailing_commas { - ErrorCode::EofWhileParsingObject - } else { - ErrorCode::EofWhileParsingValue - })), - } - } - - fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value> - where - V: de::DeserializeSeed<'de>, - { - tri!(self.de.parse_object_colon()); - let result = seed.deserialize(&mut *self.de); - - if self.de.ignore_trailing_commas && result.is_ok() { - match tri!(self.de.parse_whitespace()) { - Some(b',') => self.de.eat_char(), - Some(b'}') => { - // Ignore. - } - Some(_) => { - return Err(self.de.peek_error(ErrorCode::ExpectedObjectCommaOrEnd)); - } - None => { - return Err(self.de.peek_error(ErrorCode::EofWhileParsingObject)); - } - }; - } - result - } -} - -struct VariantAccess<'a, R: 'a> { - de: &'a mut Deserializer<R>, -} - -impl<'a, R: 'a> VariantAccess<'a, R> { - fn new(de: &'a mut Deserializer<R>) -> Self { - VariantAccess { de } - } -} - -impl<'de, 'a, R: Read<'de> + 'a> de::EnumAccess<'de> for VariantAccess<'a, R> { - type Error = Error; - type Variant = Self; - - fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self)> - where - V: de::DeserializeSeed<'de>, - { - let val = tri!(seed.deserialize(&mut *self.de)); - tri!(self.de.parse_object_colon()); - Ok((val, self)) - } -} - -impl<'de, 'a, R: Read<'de> + 'a> de::VariantAccess<'de> for VariantAccess<'a, R> { - type Error = Error; - - fn unit_variant(self) -> Result<()> { - de::Deserialize::deserialize(self.de) - } - - fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value> - where - T: de::DeserializeSeed<'de>, - { - seed.deserialize(self.de) - } - - fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - de::Deserializer::deserialize_seq(self.de, visitor) - } - - fn struct_variant<V>(self, fields: &'static [&'static str], visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - de::Deserializer::deserialize_struct(self.de, "", fields, visitor) - } -} - -struct UnitVariantAccess<'a, R: 'a> { - de: &'a mut Deserializer<R>, -} - -impl<'a, R: 'a> UnitVariantAccess<'a, R> { - fn new(de: &'a mut Deserializer<R>) -> Self { - UnitVariantAccess { de } - } -} - -impl<'de, 'a, R: Read<'de> + 'a> de::EnumAccess<'de> for UnitVariantAccess<'a, R> { - type Error = Error; - type Variant = Self; - - fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self)> - where - V: de::DeserializeSeed<'de>, - { - let variant = tri!(seed.deserialize(&mut *self.de)); - Ok((variant, self)) - } -} - -impl<'de, 'a, R: Read<'de> + 'a> de::VariantAccess<'de> for UnitVariantAccess<'a, R> { - type Error = Error; - - fn unit_variant(self) -> Result<()> { - Ok(()) - } - - fn newtype_variant_seed<T>(self, _seed: T) -> Result<T::Value> - where - T: de::DeserializeSeed<'de>, - { - Err(de::Error::invalid_type( - Unexpected::UnitVariant, - &"newtype variant", - )) - } - - fn tuple_variant<V>(self, _len: usize, _visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - Err(de::Error::invalid_type( - Unexpected::UnitVariant, - &"tuple variant", - )) - } - - fn struct_variant<V>(self, _fields: &'static [&'static str], _visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - Err(de::Error::invalid_type( - Unexpected::UnitVariant, - &"struct variant", - )) - } -} - -/// Only deserialize from this after peeking a '"' byte! Otherwise it may -/// deserialize invalid JSON successfully. -struct MapKey<'a, R: 'a> { - de: &'a mut Deserializer<R>, -} - -macro_rules! deserialize_numeric_key { - ($method:ident) => { - fn $method<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.deserialize_number(visitor) - } - }; - - ($method:ident, $delegate:ident) => { - fn $method<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.de.eat_char(); - - match tri!(self.de.peek()) { - Some(b'0'..=b'9' | b'-') => {} - _ => return Err(self.de.error(ErrorCode::ExpectedNumericKey)), - } - - let value = tri!(self.de.$delegate(visitor)); - - match tri!(self.de.peek()) { - Some(b'"') => self.de.eat_char(), - _ => return Err(self.de.peek_error(ErrorCode::ExpectedDoubleQuote)), - } - - Ok(value) - } - }; -} - -impl<'de, 'a, R> MapKey<'a, R> -where - R: Read<'de>, -{ - deserialize_numeric_key!(deserialize_number, deserialize_number); -} - -impl<'de, 'a, R> de::Deserializer<'de> for MapKey<'a, R> -where - R: Read<'de>, -{ - type Error = Error; - - #[inline] - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.de.eat_char(); - self.de.scratch.clear(); - match tri!(self.de.read.parse_str(&mut self.de.scratch)) { - Reference::Borrowed(s) => visitor.visit_borrowed_str(s), - Reference::Copied(s) => visitor.visit_str(s), - } - } - - deserialize_numeric_key!(deserialize_i8); - deserialize_numeric_key!(deserialize_i16); - deserialize_numeric_key!(deserialize_i32); - deserialize_numeric_key!(deserialize_i64); - deserialize_numeric_key!(deserialize_i128, deserialize_i128); - deserialize_numeric_key!(deserialize_u8); - deserialize_numeric_key!(deserialize_u16); - deserialize_numeric_key!(deserialize_u32); - deserialize_numeric_key!(deserialize_u64); - deserialize_numeric_key!(deserialize_u128, deserialize_u128); - #[cfg(not(feature = "float_roundtrip"))] - deserialize_numeric_key!(deserialize_f32); - #[cfg(feature = "float_roundtrip")] - deserialize_numeric_key!(deserialize_f32, deserialize_f32); - deserialize_numeric_key!(deserialize_f64); - - #[inline] - fn deserialize_option<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - // Map keys cannot be null. - visitor.visit_some(self) - } - - #[inline] - fn deserialize_newtype_struct<V>(self, name: &'static str, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - #[cfg(feature = "raw_value")] - { - if name == crate::raw::TOKEN { - return self.de.deserialize_raw_value(visitor); - } - } - - let _ = name; - visitor.visit_newtype_struct(self) - } - - #[inline] - fn deserialize_enum<V>( - self, - name: &'static str, - variants: &'static [&'static str], - visitor: V, - ) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.de.deserialize_enum(name, variants, visitor) - } - - #[inline] - fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.de.deserialize_bytes(visitor) - } - - #[inline] - fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value> - where - V: de::Visitor<'de>, - { - self.de.deserialize_bytes(visitor) - } - - forward_to_deserialize_any! { - bool char str string unit unit_struct seq tuple tuple_struct map struct - identifier ignored_any - } -} - -////////////////////////////////////////////////////////////////////////////// - -/// Iterator that deserializes a stream into multiple JSON values. -/// -/// A stream deserializer can be created from any JSON deserializer using the -/// `Deserializer::into_iter` method. -/// -/// The data can consist of any JSON value. Values need to be a self-delineating value e.g. -/// arrays, objects, or strings, or be followed by whitespace or a self-delineating value. -/// -/// ``` -/// use serde_json_lenient::{Deserializer, Value}; -/// -/// fn main() { -/// let data = "{\"k\": 3}1\"cool\"\"stuff\" 3{} [0, 1, 2]"; -/// -/// let stream = Deserializer::from_str(data).into_iter::<Value>(); -/// -/// for value in stream { -/// println!("{}", value.unwrap()); -/// } -/// } -/// ``` -pub struct StreamDeserializer<'de, R, T> { - de: Deserializer<R>, - offset: usize, - failed: bool, - output: PhantomData<T>, - lifetime: PhantomData<&'de ()>, -} - -impl<'de, R, T> StreamDeserializer<'de, R, T> -where - R: read::Read<'de>, - T: de::Deserialize<'de>, -{ - /// Create a JSON stream deserializer from one of the possible serde_json_lenient - /// input sources. - /// - /// Typically it is more convenient to use one of these methods instead: - /// - /// - Deserializer::from_str(...).into_iter() - /// - Deserializer::from_slice(...).into_iter() - /// - Deserializer::from_reader(...).into_iter() - pub fn new(read: R) -> Self { - let offset = read.byte_offset(); - StreamDeserializer { - de: Deserializer::new(read), - offset, - failed: false, - output: PhantomData, - lifetime: PhantomData, - } - } - - /// Returns the number of bytes so far deserialized into a successful `T`. - /// - /// If a stream deserializer returns an EOF error, new data can be joined to - /// `old_data[stream.byte_offset()..]` to try again. - /// - /// ``` - /// let data = b"[0] [1] ["; - /// - /// let de = serde_json_lenient::Deserializer::from_slice(data); - /// let mut stream = de.into_iter::<Vec<i32>>(); - /// assert_eq!(0, stream.byte_offset()); - /// - /// println!("{:?}", stream.next()); // [0] - /// assert_eq!(3, stream.byte_offset()); - /// - /// println!("{:?}", stream.next()); // [1] - /// assert_eq!(7, stream.byte_offset()); - /// - /// println!("{:?}", stream.next()); // error - /// assert_eq!(8, stream.byte_offset()); - /// - /// // If err.is_eof(), can join the remaining data to new data and continue. - /// let remaining = &data[stream.byte_offset()..]; - /// ``` - /// - /// *Note:* In the future this method may be changed to return the number of - /// bytes so far deserialized into a successful T *or* syntactically valid - /// JSON skipped over due to a type error. See [serde-rs/json#70] for an - /// example illustrating this. - /// - /// [serde-rs/json#70]: https://github.com/serde-rs/json/issues/70 - pub fn byte_offset(&self) -> usize { - self.offset - } - - fn peek_end_of_value(&mut self) -> Result<()> { - match tri!(self.de.peek()) { - Some(b' ' | b'\n' | b'\t' | b'\r' | b'"' | b'[' | b']' | b'{' | b'}' | b',' | b':') - | None => Ok(()), - Some(_) => { - let position = self.de.read.peek_position(); - Err(Error::syntax( - ErrorCode::TrailingCharacters, - position.line, - position.column, - )) - } - } - } -} - -impl<'de, R, T> Iterator for StreamDeserializer<'de, R, T> -where - R: Read<'de>, - T: de::Deserialize<'de>, -{ - type Item = Result<T>; - - fn next(&mut self) -> Option<Result<T>> { - if R::should_early_return_if_failed && self.failed { - return None; - } - - // skip whitespaces, if any - // this helps with trailing whitespaces, since whitespaces between - // values are handled for us. - match self.de.parse_whitespace() { - Ok(None) => { - self.offset = self.de.read.byte_offset(); - None - } - Ok(Some(b)) => { - // If the value does not have a clear way to show the end of the value - // (like numbers, null, true etc.) we have to look for whitespace or - // the beginning of a self-delineated value. - let self_delineated_value = match b { - b'[' | b'"' | b'{' => true, - _ => false, - }; - self.offset = self.de.read.byte_offset(); - let result = de::Deserialize::deserialize(&mut self.de); - - Some(match result { - Ok(value) => { - self.offset = self.de.read.byte_offset(); - if self_delineated_value { - Ok(value) - } else { - self.peek_end_of_value().map(|()| value) - } - } - Err(e) => { - self.de.read.set_failed(&mut self.failed); - Err(e) - } - }) - } - Err(e) => { - self.de.read.set_failed(&mut self.failed); - Some(Err(e)) - } - } - } -} - -impl<'de, R, T> FusedIterator for StreamDeserializer<'de, R, T> -where - R: Read<'de> + Fused, - T: de::Deserialize<'de>, -{ -} - -////////////////////////////////////////////////////////////////////////////// - -fn from_trait<'de, R, T>(read: R) -> Result<T> -where - R: Read<'de>, - T: de::Deserialize<'de>, -{ - let mut de = Deserializer::new(read); - let value = tri!(de::Deserialize::deserialize(&mut de)); - - // Make sure the whole stream has been consumed. - tri!(de.end()); - Ok(value) -} - -/// Deserialize an instance of type `T` from an I/O stream of JSON. -/// -/// The content of the I/O stream is deserialized directly from the stream -/// without being buffered in memory by serde_json_lenient. -/// -/// When reading from a source against which short reads are not efficient, such -/// as a [`File`], you will want to apply your own buffering because serde_json_lenient -/// will not buffer the input. See [`std::io::BufReader`]. -/// -/// It is expected that the input stream ends after the deserialized object. -/// If the stream does not end, such as in the case of a persistent socket connection, -/// this function will not return. It is possible instead to deserialize from a prefix of an input -/// stream without looking for EOF by managing your own [`Deserializer`]. -/// -/// Note that counter to intuition, this function is usually slower than -/// reading a file completely into memory and then applying [`from_str`] -/// or [`from_slice`] on it. See [issue #160]. -/// -/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html -/// [`std::io::BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html -/// [`from_str`]: ./fn.from_str.html -/// [`from_slice`]: ./fn.from_slice.html -/// [issue #160]: https://github.com/serde-rs/json/issues/160 -/// -/// # Example -/// -/// Reading the contents of a file. -/// -/// ``` -/// use serde::Deserialize; -/// -/// use std::error::Error; -/// use std::fs::File; -/// use std::io::BufReader; -/// use std::path::Path; -/// -/// #[derive(Deserialize, Debug)] -/// struct User { -/// fingerprint: String, -/// location: String, -/// } -/// -/// fn read_user_from_file<P: AsRef<Path>>(path: P) -> Result<User, Box<dyn Error>> { -/// // Open the file in read-only mode with buffer. -/// let file = File::open(path)?; -/// let reader = BufReader::new(file); -/// -/// // Read the JSON contents of the file as an instance of `User`. -/// let u = serde_json_lenient::from_reader(reader)?; -/// -/// // Return the `User`. -/// Ok(u) -/// } -/// -/// fn main() { -/// # } -/// # fn fake_main() { -/// let u = read_user_from_file("test.json").unwrap(); -/// println!("{:#?}", u); -/// } -/// ``` -/// -/// Reading from a persistent socket connection. -/// -/// ``` -/// use serde::Deserialize; -/// -/// use std::error::Error; -/// use std::net::{TcpListener, TcpStream}; -/// -/// #[derive(Deserialize, Debug)] -/// struct User { -/// fingerprint: String, -/// location: String, -/// } -/// -/// fn read_user_from_stream(tcp_stream: TcpStream) -> Result<User, Box<dyn Error>> { -/// let mut de = serde_json_lenient::Deserializer::from_reader(tcp_stream); -/// let u = User::deserialize(&mut de)?; -/// -/// Ok(u) -/// } -/// -/// fn main() { -/// # } -/// # fn fake_main() { -/// let listener = TcpListener::bind("127.0.0.1:4000").unwrap(); -/// -/// for stream in listener.incoming() { -/// println!("{:#?}", read_user_from_stream(stream.unwrap())); -/// } -/// } -/// ``` -/// -/// # Errors -/// -/// This conversion can fail if the structure of the input does not match the -/// structure expected by `T`, for example if `T` is a struct type but the input -/// contains something other than a JSON map. It can also fail if the structure -/// is correct but `T`'s implementation of `Deserialize` decides that something -/// is wrong with the data, for example required struct fields are missing from -/// the JSON map or some number is too big to fit in the expected primitive -/// type. -#[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -pub fn from_reader<R, T>(rdr: R) -> Result<T> -where - R: crate::io::Read, - T: de::DeserializeOwned, -{ - from_trait(read::IoRead::new(rdr)) -} - -/// Deserialize an instance of type `T` from bytes of JSON text. -/// -/// # Example -/// -/// ``` -/// use serde::Deserialize; -/// -/// #[derive(Deserialize, Debug)] -/// struct User { -/// fingerprint: String, -/// location: String, -/// } -/// -/// fn main() { -/// // The type of `j` is `&[u8]` -/// let j = b" -/// { -/// \"fingerprint\": \"0xF9BA143B95FF6D82\", -/// \"location\": \"Menlo Park, CA\" -/// }"; -/// -/// let u: User = serde_json_lenient::from_slice(j).unwrap(); -/// println!("{:#?}", u); -/// } -/// ``` -/// -/// # Errors -/// -/// This conversion can fail if the structure of the input does not match the -/// structure expected by `T`, for example if `T` is a struct type but the input -/// contains something other than a JSON map. It can also fail if the structure -/// is correct but `T`'s implementation of `Deserialize` decides that something -/// is wrong with the data, for example required struct fields are missing from -/// the JSON map or some number is too big to fit in the expected primitive -/// type. -pub fn from_slice<'a, T>(v: &'a [u8]) -> Result<T> -where - T: de::Deserialize<'a>, -{ - from_trait(read::SliceRead::new(v, false, false, false, false)) -} - -/// Like `from_slice`, but switches on all our quirks modes. For tests. -/// (Isn't marked `#[cfg(test)]` because we need this in UI tests.) -pub fn from_str_lenient<'a, T>(s: &'a str) -> Result<T> -where - T: de::Deserialize<'a>, -{ - from_trait(read::SliceRead::new(s.as_bytes(), true, true, true, true)) -} - -/// Deserialize an instance of type `T` from a string of JSON text. -/// -/// # Example -/// -/// ``` -/// use serde::Deserialize; -/// -/// #[derive(Deserialize, Debug)] -/// struct User { -/// fingerprint: String, -/// location: String, -/// } -/// -/// fn main() { -/// // The type of `j` is `&str` -/// let j = " -/// { -/// \"fingerprint\": \"0xF9BA143B95FF6D82\", -/// \"location\": \"Menlo Park, CA\" -/// }"; -/// -/// let u: User = serde_json_lenient::from_str(j).unwrap(); -/// println!("{:#?}", u); -/// } -/// ``` -/// -/// # Errors -/// -/// This conversion can fail if the structure of the input does not match the -/// structure expected by `T`, for example if `T` is a struct type but the input -/// contains something other than a JSON map. It can also fail if the structure -/// is correct but `T`'s implementation of `Deserialize` decides that something -/// is wrong with the data, for example required struct fields are missing from -/// the JSON map or some number is too big to fit in the expected primitive -/// type. -pub fn from_str<'a, T>(s: &'a str) -> Result<T> -where - T: de::Deserialize<'a>, -{ - from_trait(read::StrRead::new(s)) -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/error.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/error.rs deleted file mode 100644 index adf7a49..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/error.rs +++ /dev/null
@@ -1,529 +0,0 @@ -//! When serializing or deserializing JSON goes wrong. - -use crate::io; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use core::fmt::{self, Debug, Display}; -use core::result; -use core::str::FromStr; -use serde::{de, ser}; -#[cfg(feature = "std")] -use std::error; -#[cfg(feature = "std")] -use std::io::ErrorKind; - -/// This type represents all possible errors that can occur when serializing or -/// deserializing JSON data. -pub struct Error { - /// This `Box` allows us to keep the size of `Error` as small as possible. A - /// larger `Error` type was substantially slower due to all the functions - /// that pass around `Result<T, Error>`. - err: Box<ErrorImpl>, -} - -/// Alias for a `Result` with the error type `serde_json_lenient::Error`. -pub type Result<T> = result::Result<T, Error>; - -impl Error { - /// One-based line number at which the error was detected. - /// - /// Characters in the first line of the input (before the first newline - /// character) are in line 1. - pub fn line(&self) -> usize { - self.err.line - } - - /// One-based column number at which the error was detected. - /// - /// The first character in the input and any characters immediately - /// following a newline character are in column 1. - /// - /// Note that errors may occur in column 0, for example if a read from an - /// I/O stream fails immediately following a previously read newline - /// character. - pub fn column(&self) -> usize { - self.err.column - } - - /// Categorizes the cause of this error. - /// - /// - `Category::Io` - failure to read or write bytes on an I/O stream - /// - `Category::Syntax` - input that is not syntactically valid JSON - /// - `Category::Data` - input data that is semantically incorrect - /// - `Category::Eof` - unexpected end of the input data - pub fn classify(&self) -> Category { - match self.err.code { - ErrorCode::Message(_) => Category::Data, - ErrorCode::Io(_) => Category::Io, - ErrorCode::EofWhileParsingBlockComment - | ErrorCode::EofWhileParsingList - | ErrorCode::EofWhileParsingObject - | ErrorCode::EofWhileParsingString - | ErrorCode::EofWhileParsingValue => Category::Eof, - ErrorCode::ExpectedColon - | ErrorCode::ExpectedCommentSlashOrStar - | ErrorCode::ExpectedListCommaOrEnd - | ErrorCode::ExpectedObjectCommaOrEnd - | ErrorCode::ExpectedSomeIdent - | ErrorCode::ExpectedSomeValue - | ErrorCode::ExpectedDoubleQuote - | ErrorCode::InvalidEscape - | ErrorCode::InvalidNumber - | ErrorCode::NumberOutOfRange - | ErrorCode::InvalidUnicodeCodePoint - | ErrorCode::ControlCharacterWhileParsingString - | ErrorCode::KeyMustBeAString - | ErrorCode::ExpectedNumericKey - | ErrorCode::FloatKeyMustBeFinite - | ErrorCode::LoneLeadingSurrogateInHexEscape - | ErrorCode::TrailingComma - | ErrorCode::TrailingCharacters - | ErrorCode::UnexpectedEndOfHexEscape - | ErrorCode::RecursionLimitExceeded => Category::Syntax, - } - } - - /// Returns true if this error was caused by a failure to read or write - /// bytes on an I/O stream. - pub fn is_io(&self) -> bool { - self.classify() == Category::Io - } - - /// Returns true if this error was caused by input that was not - /// syntactically valid JSON. - pub fn is_syntax(&self) -> bool { - self.classify() == Category::Syntax - } - - /// Returns true if this error was caused by input data that was - /// semantically incorrect. - /// - /// For example, JSON containing a number is semantically incorrect when the - /// type being deserialized into holds a String. - pub fn is_data(&self) -> bool { - self.classify() == Category::Data - } - - /// Returns true if this error was caused by prematurely reaching the end of - /// the input data. - /// - /// Callers that process streaming input may be interested in retrying the - /// deserialization once more data is available. - pub fn is_eof(&self) -> bool { - self.classify() == Category::Eof - } - - /// The kind reported by the underlying standard library I/O error, if this - /// error was caused by a failure to read or write bytes on an I/O stream. - /// - /// # Example - /// - /// ``` - /// use serde_json_lenient::Value; - /// use std::io::{self, ErrorKind, Read}; - /// use std::process; - /// - /// struct ReaderThatWillTimeOut<'a>(&'a [u8]); - /// - /// impl<'a> Read for ReaderThatWillTimeOut<'a> { - /// fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { - /// if self.0.is_empty() { - /// Err(io::Error::new(ErrorKind::TimedOut, "timed out")) - /// } else { - /// self.0.read(buf) - /// } - /// } - /// } - /// - /// fn main() { - /// let reader = ReaderThatWillTimeOut(br#" {"k": "#); - /// - /// let _: Value = match serde_json_lenient::from_reader(reader) { - /// Ok(value) => value, - /// Err(error) => { - /// if error.io_error_kind() == Some(ErrorKind::TimedOut) { - /// // Maybe this application needs to retry certain kinds of errors. - /// - /// # return; - /// } else { - /// eprintln!("error: {}", error); - /// process::exit(1); - /// } - /// } - /// }; - /// } - /// ``` - #[cfg(feature = "std")] - pub fn io_error_kind(&self) -> Option<ErrorKind> { - if let ErrorCode::Io(io_error) = &self.err.code { - Some(io_error.kind()) - } else { - None - } - } -} - -/// Categorizes the cause of a `serde_json_lenient::Error`. -#[derive(Copy, Clone, PartialEq, Eq, Debug)] -pub enum Category { - /// The error was caused by a failure to read or write bytes on an I/O - /// stream. - Io, - - /// The error was caused by input that was not syntactically valid JSON. - Syntax, - - /// The error was caused by input data that was semantically incorrect. - /// - /// For example, JSON containing a number is semantically incorrect when the - /// type being deserialized into holds a String. - Data, - - /// The error was caused by prematurely reaching the end of the input data. - /// - /// Callers that process streaming input may be interested in retrying the - /// deserialization once more data is available. - Eof, -} - -#[cfg(feature = "std")] -#[allow(clippy::fallible_impl_from)] -impl From<Error> for io::Error { - /// Convert a `serde_json_lenient::Error` into an `io::Error`. - /// - /// JSON syntax and data errors are turned into `InvalidData` I/O errors. - /// EOF errors are turned into `UnexpectedEof` I/O errors. - /// - /// ``` - /// use std::io; - /// - /// enum MyError { - /// Io(io::Error), - /// Json(serde_json_lenient::Error), - /// } - /// - /// impl From<serde_json_lenient::Error> for MyError { - /// fn from(err: serde_json_lenient::Error) -> MyError { - /// use serde_json_lenient::error::Category; - /// match err.classify() { - /// Category::Io => { - /// MyError::Io(err.into()) - /// } - /// Category::Syntax | Category::Data | Category::Eof => { - /// MyError::Json(err) - /// } - /// } - /// } - /// } - /// ``` - fn from(j: Error) -> Self { - if let ErrorCode::Io(err) = j.err.code { - err - } else { - match j.classify() { - Category::Io => unreachable!(), - Category::Syntax | Category::Data => io::Error::new(ErrorKind::InvalidData, j), - Category::Eof => io::Error::new(ErrorKind::UnexpectedEof, j), - } - } - } -} - -struct ErrorImpl { - code: ErrorCode, - line: usize, - column: usize, -} - -pub(crate) enum ErrorCode { - /// Catchall for syntax error messages - Message(Box<str>), - - /// Some I/O error occurred while serializing or deserializing. - Io(io::Error), - - /// Saw an opening `'/*'` without a closing `'*/'`. - EofWhileParsingBlockComment, - - /// EOF while parsing a list. - EofWhileParsingList, - - /// EOF while parsing an object. - EofWhileParsingObject, - - /// EOF while parsing a string. - EofWhileParsingString, - - /// EOF while parsing a JSON value. - EofWhileParsingValue, - - /// Expected this character to be a `':'`. - ExpectedColon, - - /// Saw a `'/'` while parsing whitespace, so expected it to be - /// followed by either `'/'` or `'*'`. - ExpectedCommentSlashOrStar, - - /// Expected this character to be either a `','` or a `']'`. - ExpectedListCommaOrEnd, - - /// Expected this character to be either a `','` or a `'}'`. - ExpectedObjectCommaOrEnd, - - /// Expected to parse either a `true`, `false`, or a `null`. - ExpectedSomeIdent, - - /// Expected this character to start a JSON value. - ExpectedSomeValue, - - /// Expected this character to be a `"`. - ExpectedDoubleQuote, - - /// Invalid hex escape code. - InvalidEscape, - - /// Invalid number. - InvalidNumber, - - /// Number is bigger than the maximum value of its type. - NumberOutOfRange, - - /// Invalid unicode code point. - InvalidUnicodeCodePoint, - - /// Control character found while parsing a string. - ControlCharacterWhileParsingString, - - /// Object key is not a string. - KeyMustBeAString, - - /// Contents of key were supposed to be a number. - ExpectedNumericKey, - - /// Object key is a non-finite float value. - FloatKeyMustBeFinite, - - /// Lone leading surrogate in hex escape. - LoneLeadingSurrogateInHexEscape, - - /// JSON has a comma after the last value in an array or map. - TrailingComma, - - /// JSON has non-whitespace trailing characters after the value. - TrailingCharacters, - - /// Unexpected end of hex escape. - UnexpectedEndOfHexEscape, - - /// Encountered nesting of JSON maps and arrays more than 128 layers deep. - RecursionLimitExceeded, -} - -impl Error { - #[cold] - pub(crate) fn syntax(code: ErrorCode, line: usize, column: usize) -> Self { - Error { - err: Box::new(ErrorImpl { code, line, column }), - } - } - - // Not public API. Should be pub(crate). - // - // Update `eager_json` crate when this function changes. - #[doc(hidden)] - #[cold] - pub fn io(error: io::Error) -> Self { - Error { - err: Box::new(ErrorImpl { - code: ErrorCode::Io(error), - line: 0, - column: 0, - }), - } - } - - #[cold] - pub(crate) fn fix_position<F>(self, f: F) -> Self - where - F: FnOnce(ErrorCode) -> Error, - { - if self.err.line == 0 { - f(self.err.code) - } else { - self - } - } -} - -impl Display for ErrorCode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - ErrorCode::Message(msg) => f.write_str(msg), - ErrorCode::Io(err) => Display::fmt(err, f), - ErrorCode::EofWhileParsingBlockComment => { - f.write_str("EOF while parsing a block comment") - } - ErrorCode::EofWhileParsingList => f.write_str("EOF while parsing a list"), - ErrorCode::EofWhileParsingObject => f.write_str("EOF while parsing an object"), - ErrorCode::EofWhileParsingString => f.write_str("EOF while parsing a string"), - ErrorCode::EofWhileParsingValue => f.write_str("EOF while parsing a value"), - ErrorCode::ExpectedColon => f.write_str("expected `:`"), - ErrorCode::ExpectedCommentSlashOrStar => f.write_str("expected `/` or `*` after `/`"), - ErrorCode::ExpectedListCommaOrEnd => f.write_str("expected `,` or `]`"), - ErrorCode::ExpectedObjectCommaOrEnd => f.write_str("expected `,` or `}`"), - ErrorCode::ExpectedSomeIdent => f.write_str("expected ident"), - ErrorCode::ExpectedSomeValue => f.write_str("expected value"), - ErrorCode::ExpectedDoubleQuote => f.write_str("expected `\"`"), - ErrorCode::InvalidEscape => f.write_str("invalid escape"), - ErrorCode::InvalidNumber => f.write_str("invalid number"), - ErrorCode::NumberOutOfRange => f.write_str("number out of range"), - ErrorCode::InvalidUnicodeCodePoint => f.write_str("invalid unicode code point"), - ErrorCode::ControlCharacterWhileParsingString => { - f.write_str("control character (\\u0000-\\u001F) found while parsing a string") - } - ErrorCode::KeyMustBeAString => f.write_str("key must be a string"), - ErrorCode::ExpectedNumericKey => { - f.write_str("invalid value: expected key to be a number in quotes") - } - ErrorCode::FloatKeyMustBeFinite => { - f.write_str("float key must be finite (got NaN or +/-inf)") - } - ErrorCode::LoneLeadingSurrogateInHexEscape => { - f.write_str("lone leading surrogate in hex escape") - } - ErrorCode::TrailingComma => f.write_str("trailing comma"), - ErrorCode::TrailingCharacters => f.write_str("trailing characters"), - ErrorCode::UnexpectedEndOfHexEscape => f.write_str("unexpected end of hex escape"), - ErrorCode::RecursionLimitExceeded => f.write_str("recursion limit exceeded"), - } - } -} - -impl serde::de::StdError for Error { - #[cfg(feature = "std")] - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - match &self.err.code { - ErrorCode::Io(err) => err.source(), - _ => None, - } - } -} - -impl Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - Display::fmt(&*self.err, f) - } -} - -impl Display for ErrorImpl { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - if self.line == 0 { - Display::fmt(&self.code, f) - } else { - write!( - f, - "{} at line {} column {}", - self.code, self.line, self.column - ) - } - } -} - -// Remove two layers of verbosity from the debug representation. Humans often -// end up seeing this representation because it is what unwrap() shows. -impl Debug for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Error({:?}, line: {}, column: {})", - self.err.code.to_string(), - self.err.line, - self.err.column - ) - } -} - -impl de::Error for Error { - #[cold] - fn custom<T: Display>(msg: T) -> Error { - make_error(msg.to_string()) - } - - #[cold] - fn invalid_type(unexp: de::Unexpected, exp: &dyn de::Expected) -> Self { - if let de::Unexpected::Unit = unexp { - Error::custom(format_args!("invalid type: null, expected {}", exp)) - } else { - Error::custom(format_args!("invalid type: {}, expected {}", unexp, exp)) - } - } -} - -impl ser::Error for Error { - #[cold] - fn custom<T: Display>(msg: T) -> Error { - make_error(msg.to_string()) - } -} - -// Parse our own error message that looks like "{} at line {} column {}" to work -// around erased-serde round-tripping the error through de::Error::custom. -fn make_error(mut msg: String) -> Error { - let (line, column) = parse_line_col(&mut msg).unwrap_or((0, 0)); - Error { - err: Box::new(ErrorImpl { - code: ErrorCode::Message(msg.into_boxed_str()), - line, - column, - }), - } -} - -fn parse_line_col(msg: &mut String) -> Option<(usize, usize)> { - let start_of_suffix = match msg.rfind(" at line ") { - Some(index) => index, - None => return None, - }; - - // Find start and end of line number. - let start_of_line = start_of_suffix + " at line ".len(); - let mut end_of_line = start_of_line; - while starts_with_digit(&msg[end_of_line..]) { - end_of_line += 1; - } - - if !msg[end_of_line..].starts_with(" column ") { - return None; - } - - // Find start and end of column number. - let start_of_column = end_of_line + " column ".len(); - let mut end_of_column = start_of_column; - while starts_with_digit(&msg[end_of_column..]) { - end_of_column += 1; - } - - if end_of_column < msg.len() { - return None; - } - - // Parse numbers. - let line = match usize::from_str(&msg[start_of_line..end_of_line]) { - Ok(line) => line, - Err(_) => return None, - }; - let column = match usize::from_str(&msg[start_of_column..end_of_column]) { - Ok(column) => column, - Err(_) => return None, - }; - - msg.truncate(start_of_suffix); - Some((line, column)) -} - -fn starts_with_digit(slice: &str) -> bool { - match slice.as_bytes().first() { - None => false, - Some(&byte) => byte >= b'0' && byte <= b'9', - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/error.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/error.rs deleted file mode 100644 index 22e5823..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/error.rs +++ /dev/null
@@ -1 +0,0 @@ -"serde_json requires that either `std` (default) or `alloc` feature is enabled"
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/mod.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/mod.rs deleted file mode 100644 index d12032ce..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/mod.rs +++ /dev/null
@@ -1,13 +0,0 @@ -//! Shows a user-friendly compiler error on incompatible selected features. - -#[allow(unused_macros)] -macro_rules! hide_from_rustfmt { - ($mod:item) => { - $mod - }; -} - -#[cfg(not(any(feature = "std", feature = "alloc")))] -hide_from_rustfmt! { - mod error; -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/core.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/core.rs deleted file mode 100644 index 54c8ddf..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/core.rs +++ /dev/null
@@ -1,79 +0,0 @@ -//! Reimplements core logic and types from `std::io` in an `alloc`-friendly -//! fashion. - -use alloc::vec::Vec; -use core::fmt::{self, Display}; -use core::result; - -pub enum ErrorKind { - Other, -} - -// I/O errors can never occur in no-std mode. All our no-std I/O implementations -// are infallible. -pub struct Error; - -impl Display for Error { - fn fmt(&self, _formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - unreachable!() - } -} - -impl Error { - pub(crate) fn new(_kind: ErrorKind, _error: &'static str) -> Error { - Error - } -} - -pub type Result<T> = result::Result<T, Error>; - -pub trait Write { - fn write(&mut self, buf: &[u8]) -> Result<usize>; - - fn write_all(&mut self, buf: &[u8]) -> Result<()> { - // All our Write impls in no_std mode always write the whole buffer in - // one call infallibly. - let result = self.write(buf); - debug_assert!(result.is_ok()); - debug_assert_eq!(result.unwrap_or(0), buf.len()); - Ok(()) - } - - fn flush(&mut self) -> Result<()>; -} - -impl<W: Write> Write for &mut W { - #[inline] - fn write(&mut self, buf: &[u8]) -> Result<usize> { - (*self).write(buf) - } - - #[inline] - fn write_all(&mut self, buf: &[u8]) -> Result<()> { - (*self).write_all(buf) - } - - #[inline] - fn flush(&mut self) -> Result<()> { - (*self).flush() - } -} - -impl Write for Vec<u8> { - #[inline] - fn write(&mut self, buf: &[u8]) -> Result<usize> { - self.extend_from_slice(buf); - Ok(buf.len()) - } - - #[inline] - fn write_all(&mut self, buf: &[u8]) -> Result<()> { - self.extend_from_slice(buf); - Ok(()) - } - - #[inline] - fn flush(&mut self) -> Result<()> { - Ok(()) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/mod.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/mod.rs deleted file mode 100644 index 9dee4a0..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/mod.rs +++ /dev/null
@@ -1,20 +0,0 @@ -//! A tiny, `no_std`-friendly facade around `std::io`. -//! Reexports types from `std` when available; otherwise reimplements and -//! provides some of the core logic. -//! -//! The main reason that `std::io` hasn't found itself reexported as part of -//! the `core` crate is the `std::io::{Read, Write}` traits' reliance on -//! `std::io::Error`, which may contain internally a heap-allocated `Box<Error>` -//! and/or now relying on OS-specific `std::backtrace::Backtrace`. - -pub use self::imp::{Error, ErrorKind, Result, Write}; - -#[cfg(not(feature = "std"))] -#[path = "core.rs"] -mod imp; - -#[cfg(feature = "std")] -use std::io as imp; - -#[cfg(feature = "std")] -pub use std::io::{Bytes, Read};
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/iter.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/iter.rs deleted file mode 100644 index 9792916d..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/iter.rs +++ /dev/null
@@ -1,70 +0,0 @@ -use crate::io; - -pub struct LineColIterator<I> { - iter: I, - - /// Index of the current line. Characters in the first line of the input - /// (before the first newline character) are in line 1. - line: usize, - - /// Index of the current column. The first character in the input and any - /// characters immediately following a newline character are in column 1. - /// The column is 0 immediately after a newline character has been read. - col: usize, - - /// Byte offset of the start of the current line. This is the sum of lengths - /// of all previous lines. Keeping track of things this way allows efficient - /// computation of the current line, column, and byte offset while only - /// updating one of the counters in `next()` in the common case. - start_of_line: usize, -} - -impl<I> LineColIterator<I> -where - I: Iterator<Item = io::Result<u8>>, -{ - pub fn new(iter: I) -> LineColIterator<I> { - LineColIterator { - iter, - line: 1, - col: 0, - start_of_line: 0, - } - } - - pub fn line(&self) -> usize { - self.line - } - - pub fn col(&self) -> usize { - self.col - } - - pub fn byte_offset(&self) -> usize { - self.start_of_line + self.col - } -} - -impl<I> Iterator for LineColIterator<I> -where - I: Iterator<Item = io::Result<u8>>, -{ - type Item = io::Result<u8>; - - fn next(&mut self) -> Option<io::Result<u8>> { - match self.iter.next() { - None => None, - Some(Ok(b'\n')) => { - self.start_of_line += self.col + 1; - self.line += 1; - self.col = 0; - Some(Ok(b'\n')) - } - Some(Ok(c)) => { - self.col += 1; - Some(Ok(c)) - } - Some(Err(e)) => Some(Err(e)), - } - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/algorithm.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/algorithm.rs deleted file mode 100644 index eaa5e7e..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/algorithm.rs +++ /dev/null
@@ -1,196 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Algorithms to efficiently convert strings to floats. - -use super::bhcomp::*; -use super::cached::*; -use super::errors::*; -use super::float::ExtendedFloat; -use super::num::*; -use super::small_powers::*; - -// FAST -// ---- - -/// Convert mantissa to exact value for a non-base2 power. -/// -/// Returns the resulting float and if the value can be represented exactly. -pub(crate) fn fast_path<F>(mantissa: u64, exponent: i32) -> Option<F> -where - F: Float, -{ - // `mantissa >> (F::MANTISSA_SIZE+1) != 0` effectively checks if the - // value has a no bits above the hidden bit, which is what we want. - let (min_exp, max_exp) = F::exponent_limit(); - let shift_exp = F::mantissa_limit(); - let mantissa_size = F::MANTISSA_SIZE + 1; - if mantissa == 0 { - Some(F::ZERO) - } else if mantissa >> mantissa_size != 0 { - // Would require truncation of the mantissa. - None - } else if exponent == 0 { - // 0 exponent, same as value, exact representation. - let float = F::as_cast(mantissa); - Some(float) - } else if exponent >= min_exp && exponent <= max_exp { - // Value can be exactly represented, return the value. - // Do not use powi, since powi can incrementally introduce - // error. - let float = F::as_cast(mantissa); - Some(float.pow10(exponent)) - } else if exponent >= 0 && exponent <= max_exp + shift_exp { - // Check to see if we have a disguised fast-path, where the - // number of digits in the mantissa is very small, but and - // so digits can be shifted from the exponent to the mantissa. - // https://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ - let small_powers = POW10_64; - let shift = exponent - max_exp; - let power = small_powers[shift as usize]; - - // Compute the product of the power, if it overflows, - // prematurely return early, otherwise, if we didn't overshoot, - // we can get an exact value. - let value = match mantissa.checked_mul(power) { - None => return None, - Some(value) => value, - }; - if value >> mantissa_size != 0 { - None - } else { - // Use powi, since it's correct, and faster on - // the fast-path. - let float = F::as_cast(value); - Some(float.pow10(max_exp)) - } - } else { - // Cannot be exactly represented, exponent too small or too big, - // would require truncation. - None - } -} - -// MODERATE -// -------- - -/// Multiply the floating-point by the exponent. -/// -/// Multiply by pre-calculated powers of the base, modify the extended- -/// float, and return if new value and if the value can be represented -/// accurately. -fn multiply_exponent_extended<F>(fp: &mut ExtendedFloat, exponent: i32, truncated: bool) -> bool -where - F: Float, -{ - let powers = ExtendedFloat::get_powers(); - let exponent = exponent.saturating_add(powers.bias); - let small_index = exponent % powers.step; - let large_index = exponent / powers.step; - if exponent < 0 { - // Guaranteed underflow (assign 0). - fp.mant = 0; - true - } else if large_index as usize >= powers.large.len() { - // Overflow (assign infinity) - fp.mant = 1 << 63; - fp.exp = 0x7FF; - true - } else { - // Within the valid exponent range, multiply by the large and small - // exponents and return the resulting value. - - // Track errors to as a factor of unit in last-precision. - let mut errors: u32 = 0; - if truncated { - errors += u64::error_halfscale(); - } - - // Multiply by the small power. - // Check if we can directly multiply by an integer, if not, - // use extended-precision multiplication. - match fp - .mant - .overflowing_mul(powers.get_small_int(small_index as usize)) - { - // Overflow, multiplication unsuccessful, go slow path. - (_, true) => { - fp.normalize(); - fp.imul(&powers.get_small(small_index as usize)); - errors += u64::error_halfscale(); - } - // No overflow, multiplication successful. - (mant, false) => { - fp.mant = mant; - fp.normalize(); - } - } - - // Multiply by the large power - fp.imul(&powers.get_large(large_index as usize)); - if errors > 0 { - errors += 1; - } - errors += u64::error_halfscale(); - - // Normalize the floating point (and the errors). - let shift = fp.normalize(); - errors <<= shift; - - u64::error_is_accurate::<F>(errors, fp) - } -} - -/// Create a precise native float using an intermediate extended-precision float. -/// -/// Return the float approximation and if the value can be accurately -/// represented with mantissa bits of precision. -#[inline] -pub(crate) fn moderate_path<F>( - mantissa: u64, - exponent: i32, - truncated: bool, -) -> (ExtendedFloat, bool) -where - F: Float, -{ - let mut fp = ExtendedFloat { - mant: mantissa, - exp: 0, - }; - let valid = multiply_exponent_extended::<F>(&mut fp, exponent, truncated); - (fp, valid) -} - -// FALLBACK -// -------- - -/// Fallback path when the fast path does not work. -/// -/// Uses the moderate path, if applicable, otherwise, uses the slow path -/// as required. -pub(crate) fn fallback_path<F>( - integer: &[u8], - fraction: &[u8], - mantissa: u64, - exponent: i32, - mantissa_exponent: i32, - truncated: bool, -) -> F -where - F: Float, -{ - // Moderate path (use an extended 80-bit representation). - let (fp, valid) = moderate_path::<F>(mantissa, mantissa_exponent, truncated); - if valid { - return fp.into_float::<F>(); - } - - // Slow path, fast path didn't work. - let b = fp.into_downward_float::<F>(); - if b.is_special() { - // We have a non-finite number, we get to leave early. - b - } else { - bhcomp(b, integer, fraction, exponent) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bhcomp.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bhcomp.rs deleted file mode 100644 index 1f2a7bbd..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bhcomp.rs +++ /dev/null
@@ -1,218 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Compare the mantissa to the halfway representation of the float. -//! -//! Compares the actual significant digits of the mantissa to the -//! theoretical digits from `b+h`, scaled into the proper range. - -use super::bignum::*; -use super::digit::*; -use super::exponent::*; -use super::float::*; -use super::math::*; -use super::num::*; -use super::rounding::*; -use core::{cmp, mem}; - -// MANTISSA - -/// Parse the full mantissa into a big integer. -/// -/// Max digits is the maximum number of digits plus one. -fn parse_mantissa<F>(integer: &[u8], fraction: &[u8]) -> Bigint -where - F: Float, -{ - // Main loop - let small_powers = POW10_LIMB; - let step = small_powers.len() - 2; - let max_digits = F::MAX_DIGITS - 1; - let mut counter = 0; - let mut value: Limb = 0; - let mut i: usize = 0; - let mut result = Bigint::default(); - - // Iteratively process all the data in the mantissa. - for &digit in integer.iter().chain(fraction) { - // We've parsed the max digits using small values, add to bignum - if counter == step { - result.imul_small(small_powers[counter]); - result.iadd_small(value); - counter = 0; - value = 0; - } - - value *= 10; - value += as_limb(to_digit(digit).unwrap()); - - i += 1; - counter += 1; - if i == max_digits { - break; - } - } - - // We will always have a remainder, as long as we entered the loop - // once, or counter % step is 0. - if counter != 0 { - result.imul_small(small_powers[counter]); - result.iadd_small(value); - } - - // If we have any remaining digits after the last value, we need - // to add a 1 after the rest of the array, it doesn't matter where, - // just move it up. This is good for the worst-possible float - // representation. We also need to return an index. - // Since we already trimmed trailing zeros, we know there has - // to be a non-zero digit if there are any left. - if i < integer.len() + fraction.len() { - result.imul_small(10); - result.iadd_small(1); - } - - result -} - -// FLOAT OPS - -/// Calculate `b` from a a representation of `b` as a float. -#[inline] -pub(super) fn b_extended<F: Float>(f: F) -> ExtendedFloat { - ExtendedFloat::from_float(f) -} - -/// Calculate `b+h` from a a representation of `b` as a float. -#[inline] -pub(super) fn bh_extended<F: Float>(f: F) -> ExtendedFloat { - // None of these can overflow. - let b = b_extended(f); - ExtendedFloat { - mant: (b.mant << 1) + 1, - exp: b.exp - 1, - } -} - -// ROUNDING - -/// Custom round-nearest, tie-event algorithm for bhcomp. -#[inline] -fn round_nearest_tie_even(fp: &mut ExtendedFloat, shift: i32, is_truncated: bool) { - let (mut is_above, mut is_halfway) = round_nearest(fp, shift); - if is_halfway && is_truncated { - is_above = true; - is_halfway = false; - } - tie_even(fp, is_above, is_halfway); -} - -// BHCOMP - -/// Calculate the mantissa for a big integer with a positive exponent. -fn large_atof<F>(mantissa: Bigint, exponent: i32) -> F -where - F: Float, -{ - let bits = mem::size_of::<u64>() * 8; - - // Simple, we just need to multiply by the power of the radix. - // Now, we can calculate the mantissa and the exponent from this. - // The binary exponent is the binary exponent for the mantissa - // shifted to the hidden bit. - let mut bigmant = mantissa; - bigmant.imul_pow10(exponent as u32); - - // Get the exact representation of the float from the big integer. - let (mant, is_truncated) = bigmant.hi64(); - let exp = bigmant.bit_length() as i32 - bits as i32; - let mut fp = ExtendedFloat { mant, exp }; - fp.round_to_native::<F, _>(|fp, shift| round_nearest_tie_even(fp, shift, is_truncated)); - into_float(fp) -} - -/// Calculate the mantissa for a big integer with a negative exponent. -/// -/// This invokes the comparison with `b+h`. -fn small_atof<F>(mantissa: Bigint, exponent: i32, f: F) -> F -where - F: Float, -{ - // Get the significant digits and radix exponent for the real digits. - let mut real_digits = mantissa; - let real_exp = exponent; - debug_assert!(real_exp < 0); - - // Get the significant digits and the binary exponent for `b+h`. - let theor = bh_extended(f); - let mut theor_digits = Bigint::from_u64(theor.mant); - let theor_exp = theor.exp; - - // We need to scale the real digits and `b+h` digits to be the same - // order. We currently have `real_exp`, in `radix`, that needs to be - // shifted to `theor_digits` (since it is negative), and `theor_exp` - // to either `theor_digits` or `real_digits` as a power of 2 (since it - // may be positive or negative). Try to remove as many powers of 2 - // as possible. All values are relative to `theor_digits`, that is, - // reflect the power you need to multiply `theor_digits` by. - - // Can remove a power-of-two, since the radix is 10. - // Both are on opposite-sides of equation, can factor out a - // power of two. - // - // Example: 10^-10, 2^-10 -> ( 0, 10, 0) - // Example: 10^-10, 2^-15 -> (-5, 10, 0) - // Example: 10^-10, 2^-5 -> ( 5, 10, 0) - // Example: 10^-10, 2^5 -> (15, 10, 0) - let binary_exp = theor_exp - real_exp; - let halfradix_exp = -real_exp; - let radix_exp = 0; - - // Carry out our multiplication. - if halfradix_exp != 0 { - theor_digits.imul_pow5(halfradix_exp as u32); - } - if radix_exp != 0 { - theor_digits.imul_pow10(radix_exp as u32); - } - if binary_exp > 0 { - theor_digits.imul_pow2(binary_exp as u32); - } else if binary_exp < 0 { - real_digits.imul_pow2(-binary_exp as u32); - } - - // Compare real digits to theoretical digits and round the float. - match real_digits.compare(&theor_digits) { - cmp::Ordering::Greater => f.next_positive(), - cmp::Ordering::Less => f, - cmp::Ordering::Equal => f.round_positive_even(), - } -} - -/// Calculate the exact value of the float. -/// -/// Note: fraction must not have trailing zeros. -pub(crate) fn bhcomp<F>(b: F, integer: &[u8], mut fraction: &[u8], exponent: i32) -> F -where - F: Float, -{ - // Calculate the number of integer digits and use that to determine - // where the significant digits start in the fraction. - let integer_digits = integer.len(); - let fraction_digits = fraction.len(); - let digits_start = if integer_digits == 0 { - let start = fraction.iter().take_while(|&x| *x == b'0').count(); - fraction = &fraction[start..]; - start - } else { - 0 - }; - let sci_exp = scientific_exponent(exponent, integer_digits, digits_start); - let count = F::MAX_DIGITS.min(integer_digits + fraction_digits - digits_start); - let scaled_exponent = sci_exp + 1 - count as i32; - - let mantissa = parse_mantissa::<F>(integer, fraction); - if scaled_exponent >= 0 { - large_atof(mantissa, scaled_exponent) - } else { - small_atof(mantissa, scaled_exponent, b) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bignum.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bignum.rs deleted file mode 100644 index f9551f5..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bignum.rs +++ /dev/null
@@ -1,33 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Big integer type definition. - -use super::math::*; -use alloc::vec::Vec; - -/// Storage for a big integer type. -#[derive(Clone, PartialEq, Eq)] -pub(crate) struct Bigint { - /// Internal storage for the Bigint, in little-endian order. - pub(crate) data: Vec<Limb>, -} - -impl Default for Bigint { - fn default() -> Self { - Bigint { - data: Vec::with_capacity(20), - } - } -} - -impl Math for Bigint { - #[inline] - fn data(&self) -> &Vec<Limb> { - &self.data - } - - #[inline] - fn data_mut(&mut self) -> &mut Vec<Limb> { - &mut self.data - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached.rs deleted file mode 100644 index ef5a9fe..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached.rs +++ /dev/null
@@ -1,82 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Cached powers trait for extended-precision floats. - -use super::cached_float80; -use super::float::ExtendedFloat; - -// POWERS - -/// Precalculated powers that uses two-separate arrays for memory-efficiency. -#[doc(hidden)] -pub(crate) struct ExtendedFloatArray { - // Pre-calculated mantissa for the powers. - pub mant: &'static [u64], - // Pre-calculated binary exponents for the powers. - pub exp: &'static [i32], -} - -/// Allow indexing of values without bounds checking -impl ExtendedFloatArray { - #[inline] - pub fn get_extended_float(&self, index: usize) -> ExtendedFloat { - let mant = self.mant[index]; - let exp = self.exp[index]; - ExtendedFloat { mant, exp } - } - - #[inline] - pub fn len(&self) -> usize { - self.mant.len() - } -} - -// MODERATE PATH POWERS - -/// Precalculated powers of base N for the moderate path. -#[doc(hidden)] -pub(crate) struct ModeratePathPowers { - // Pre-calculated small powers. - pub small: ExtendedFloatArray, - // Pre-calculated large powers. - pub large: ExtendedFloatArray, - /// Pre-calculated small powers as 64-bit integers - pub small_int: &'static [u64], - // Step between large powers and number of small powers. - pub step: i32, - // Exponent bias for the large powers. - pub bias: i32, -} - -/// Allow indexing of values without bounds checking -impl ModeratePathPowers { - #[inline] - pub fn get_small(&self, index: usize) -> ExtendedFloat { - self.small.get_extended_float(index) - } - - #[inline] - pub fn get_large(&self, index: usize) -> ExtendedFloat { - self.large.get_extended_float(index) - } - - #[inline] - pub fn get_small_int(&self, index: usize) -> u64 { - self.small_int[index] - } -} - -// CACHED EXTENDED POWERS - -/// Cached powers as a trait for a floating-point type. -pub(crate) trait ModeratePathCache { - /// Get cached powers. - fn get_powers() -> &'static ModeratePathPowers; -} - -impl ModeratePathCache for ExtendedFloat { - #[inline] - fn get_powers() -> &'static ModeratePathPowers { - cached_float80::get_powers() - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached_float80.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached_float80.rs deleted file mode 100644 index 9beda3d..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached_float80.rs +++ /dev/null
@@ -1,206 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Cached exponents for basen values with 80-bit extended floats. -//! -//! Exact versions of base**n as an extended-precision float, with both -//! large and small powers. Use the large powers to minimize the amount -//! of compounded error. -//! -//! These values were calculated using Python, using the arbitrary-precision -//! integer to calculate exact extended-representation of each value. -//! These values are all normalized. - -use super::cached::{ExtendedFloatArray, ModeratePathPowers}; - -// LOW-LEVEL -// --------- - -// BASE10 - -const BASE10_SMALL_MANTISSA: [u64; 10] = [ - 9223372036854775808, // 10^0 - 11529215046068469760, // 10^1 - 14411518807585587200, // 10^2 - 18014398509481984000, // 10^3 - 11258999068426240000, // 10^4 - 14073748835532800000, // 10^5 - 17592186044416000000, // 10^6 - 10995116277760000000, // 10^7 - 13743895347200000000, // 10^8 - 17179869184000000000, // 10^9 -]; -const BASE10_SMALL_EXPONENT: [i32; 10] = [ - -63, // 10^0 - -60, // 10^1 - -57, // 10^2 - -54, // 10^3 - -50, // 10^4 - -47, // 10^5 - -44, // 10^6 - -40, // 10^7 - -37, // 10^8 - -34, // 10^9 -]; -const BASE10_LARGE_MANTISSA: [u64; 66] = [ - 11555125961253852697, // 10^-350 - 13451937075301367670, // 10^-340 - 15660115838168849784, // 10^-330 - 18230774251475056848, // 10^-320 - 10611707258198326947, // 10^-310 - 12353653155963782858, // 10^-300 - 14381545078898527261, // 10^-290 - 16742321987285426889, // 10^-280 - 9745314011399999080, // 10^-270 - 11345038669416679861, // 10^-260 - 13207363278391631158, // 10^-250 - 15375394465392026070, // 10^-240 - 17899314949046850752, // 10^-230 - 10418772551374772303, // 10^-220 - 12129047596099288555, // 10^-210 - 14120069793541087484, // 10^-200 - 16437924692338667210, // 10^-190 - 9568131466127621947, // 10^-180 - 11138771039116687545, // 10^-170 - 12967236152753102995, // 10^-160 - 15095849699286165408, // 10^-150 - 17573882009934360870, // 10^-140 - 10229345649675443343, // 10^-130 - 11908525658859223294, // 10^-120 - 13863348470604074297, // 10^-110 - 16139061738043178685, // 10^-100 - 9394170331095332911, // 10^-90 - 10936253623915059621, // 10^-80 - 12731474852090538039, // 10^-70 - 14821387422376473014, // 10^-60 - 17254365866976409468, // 10^-50 - 10043362776618689222, // 10^-40 - 11692013098647223345, // 10^-30 - 13611294676837538538, // 10^-20 - 15845632502852867518, // 10^-10 - 9223372036854775808, // 10^0 - 10737418240000000000, // 10^10 - 12500000000000000000, // 10^20 - 14551915228366851806, // 10^30 - 16940658945086006781, // 10^40 - 9860761315262647567, // 10^50 - 11479437019748901445, // 10^60 - 13363823550460978230, // 10^70 - 15557538194652854267, // 10^80 - 18111358157653424735, // 10^90 - 10542197943230523224, // 10^100 - 12272733663244316382, // 10^110 - 14287342391028437277, // 10^120 - 16632655625031838749, // 10^130 - 9681479787123295682, // 10^140 - 11270725851789228247, // 10^150 - 13120851772591970218, // 10^160 - 15274681817498023410, // 10^170 - 17782069995880619867, // 10^180 - 10350527006597618960, // 10^190 - 12049599325514420588, // 10^200 - 14027579833653779454, // 10^210 - 16330252207878254650, // 10^220 - 9505457831475799117, // 10^230 - 11065809325636130661, // 10^240 - 12882297539194266616, // 10^250 - 14996968138956309548, // 10^260 - 17458768723248864463, // 10^270 - 10162340898095201970, // 10^280 - 11830521861667747109, // 10^290 - 13772540099066387756, // 10^300 -]; -const BASE10_LARGE_EXPONENT: [i32; 66] = [ - -1226, // 10^-350 - -1193, // 10^-340 - -1160, // 10^-330 - -1127, // 10^-320 - -1093, // 10^-310 - -1060, // 10^-300 - -1027, // 10^-290 - -994, // 10^-280 - -960, // 10^-270 - -927, // 10^-260 - -894, // 10^-250 - -861, // 10^-240 - -828, // 10^-230 - -794, // 10^-220 - -761, // 10^-210 - -728, // 10^-200 - -695, // 10^-190 - -661, // 10^-180 - -628, // 10^-170 - -595, // 10^-160 - -562, // 10^-150 - -529, // 10^-140 - -495, // 10^-130 - -462, // 10^-120 - -429, // 10^-110 - -396, // 10^-100 - -362, // 10^-90 - -329, // 10^-80 - -296, // 10^-70 - -263, // 10^-60 - -230, // 10^-50 - -196, // 10^-40 - -163, // 10^-30 - -130, // 10^-20 - -97, // 10^-10 - -63, // 10^0 - -30, // 10^10 - 3, // 10^20 - 36, // 10^30 - 69, // 10^40 - 103, // 10^50 - 136, // 10^60 - 169, // 10^70 - 202, // 10^80 - 235, // 10^90 - 269, // 10^100 - 302, // 10^110 - 335, // 10^120 - 368, // 10^130 - 402, // 10^140 - 435, // 10^150 - 468, // 10^160 - 501, // 10^170 - 534, // 10^180 - 568, // 10^190 - 601, // 10^200 - 634, // 10^210 - 667, // 10^220 - 701, // 10^230 - 734, // 10^240 - 767, // 10^250 - 800, // 10^260 - 833, // 10^270 - 867, // 10^280 - 900, // 10^290 - 933, // 10^300 -]; -const BASE10_SMALL_INT_POWERS: [u64; 10] = [ - 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, -]; -const BASE10_STEP: i32 = 10; -const BASE10_BIAS: i32 = 350; - -// HIGH LEVEL -// ---------- - -const BASE10_POWERS: ModeratePathPowers = ModeratePathPowers { - small: ExtendedFloatArray { - mant: &BASE10_SMALL_MANTISSA, - exp: &BASE10_SMALL_EXPONENT, - }, - large: ExtendedFloatArray { - mant: &BASE10_LARGE_MANTISSA, - exp: &BASE10_LARGE_EXPONENT, - }, - small_int: &BASE10_SMALL_INT_POWERS, - step: BASE10_STEP, - bias: BASE10_BIAS, -}; - -/// Get powers from base. -pub(crate) fn get_powers() -> &'static ModeratePathPowers { - &BASE10_POWERS -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/digit.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/digit.rs deleted file mode 100644 index 3d150a1..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/digit.rs +++ /dev/null
@@ -1,18 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Helpers to convert and add digits from characters. - -// Convert u8 to digit. -#[inline] -pub(crate) fn to_digit(c: u8) -> Option<u32> { - (c as char).to_digit(10) -} - -// Add digit to mantissa. -#[inline] -pub(crate) fn add_digit(value: u64, digit: u32) -> Option<u64> { - match value.checked_mul(10) { - None => None, - Some(n) => n.checked_add(digit as u64), - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/errors.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/errors.rs deleted file mode 100644 index f4f41cd..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/errors.rs +++ /dev/null
@@ -1,132 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Estimate the error in an 80-bit approximation of a float. -//! -//! This estimates the error in a floating-point representation. -//! -//! This implementation is loosely based off the Golang implementation, -//! found here: <https://golang.org/src/strconv/atof.go> - -use super::float::*; -use super::num::*; -use super::rounding::*; - -pub(crate) trait FloatErrors { - /// Get the full error scale. - fn error_scale() -> u32; - /// Get the half error scale. - fn error_halfscale() -> u32; - /// Determine if the number of errors is tolerable for float precision. - fn error_is_accurate<F: Float>(count: u32, fp: &ExtendedFloat) -> bool; -} - -/// Check if the error is accurate with a round-nearest rounding scheme. -#[inline] -fn nearest_error_is_accurate(errors: u64, fp: &ExtendedFloat, extrabits: u64) -> bool { - // Round-to-nearest, need to use the halfway point. - if extrabits == 65 { - // Underflow, we have a shift larger than the mantissa. - // Representation is valid **only** if the value is close enough - // overflow to the next bit within errors. If it overflows, - // the representation is **not** valid. - !fp.mant.overflowing_add(errors).1 - } else { - let mask: u64 = lower_n_mask(extrabits); - let extra: u64 = fp.mant & mask; - - // Round-to-nearest, need to check if we're close to halfway. - // IE, b10100 | 100000, where `|` signifies the truncation point. - let halfway: u64 = lower_n_halfway(extrabits); - let cmp1 = halfway.wrapping_sub(errors) < extra; - let cmp2 = extra < halfway.wrapping_add(errors); - - // If both comparisons are true, we have significant rounding error, - // and the value cannot be exactly represented. Otherwise, the - // representation is valid. - !(cmp1 && cmp2) - } -} - -impl FloatErrors for u64 { - #[inline] - fn error_scale() -> u32 { - 8 - } - - #[inline] - fn error_halfscale() -> u32 { - u64::error_scale() / 2 - } - - #[inline] - fn error_is_accurate<F: Float>(count: u32, fp: &ExtendedFloat) -> bool { - // Determine if extended-precision float is a good approximation. - // If the error has affected too many units, the float will be - // inaccurate, or if the representation is too close to halfway - // that any operations could affect this halfway representation. - // See the documentation for dtoa for more information. - let bias = -(F::EXPONENT_BIAS - F::MANTISSA_SIZE); - let denormal_exp = bias - 63; - // This is always a valid u32, since (denormal_exp - fp.exp) - // will always be positive and the significand size is {23, 52}. - let extrabits = if fp.exp <= denormal_exp { - 64 - F::MANTISSA_SIZE + denormal_exp - fp.exp - } else { - 63 - F::MANTISSA_SIZE - }; - - // Our logic is as follows: we want to determine if the actual - // mantissa and the errors during calculation differ significantly - // from the rounding point. The rounding point for round-nearest - // is the halfway point, IE, this when the truncated bits start - // with b1000..., while the rounding point for the round-toward - // is when the truncated bits are equal to 0. - // To do so, we can check whether the rounding point +/- the error - // are >/< the actual lower n bits. - // - // For whether we need to use signed or unsigned types for this - // analysis, see this example, using u8 rather than u64 to simplify - // things. - // - // # Comparisons - // cmp1 = (halfway - errors) < extra - // cmp1 = extra < (halfway + errors) - // - // # Large Extrabits, Low Errors - // - // extrabits = 8 - // halfway = 0b10000000 - // extra = 0b10000010 - // errors = 0b00000100 - // halfway - errors = 0b01111100 - // halfway + errors = 0b10000100 - // - // Unsigned: - // halfway - errors = 124 - // halfway + errors = 132 - // extra = 130 - // cmp1 = true - // cmp2 = true - // Signed: - // halfway - errors = 124 - // halfway + errors = -124 - // extra = -126 - // cmp1 = false - // cmp2 = true - // - // # Conclusion - // - // Since errors will always be small, and since we want to detect - // if the representation is accurate, we need to use an **unsigned** - // type for comparisons. - - let extrabits = extrabits as u64; - let errors = count as u64; - if extrabits > 65 { - // Underflow, we have a literal 0. - return true; - } - - nearest_error_is_accurate(errors, fp, extrabits) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/exponent.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/exponent.rs deleted file mode 100644 index 6fc5197..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/exponent.rs +++ /dev/null
@@ -1,50 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Utilities to calculate exponents. - -/// Convert usize into i32 without overflow. -/// -/// This is needed to ensure when adjusting the exponent relative to -/// the mantissa we do not overflow for comically-long exponents. -#[inline] -fn into_i32(value: usize) -> i32 { - if value > i32::max_value() as usize { - i32::max_value() - } else { - value as i32 - } -} - -// EXPONENT CALCULATION - -// Calculate the scientific notation exponent without overflow. -// -// For example, 0.1 would be -1, and 10 would be 1 in base 10. -#[inline] -pub(crate) fn scientific_exponent( - exponent: i32, - integer_digits: usize, - fraction_start: usize, -) -> i32 { - if integer_digits == 0 { - let fraction_start = into_i32(fraction_start); - exponent.saturating_sub(fraction_start).saturating_sub(1) - } else { - let integer_shift = into_i32(integer_digits - 1); - exponent.saturating_add(integer_shift) - } -} - -// Calculate the mantissa exponent without overflow. -// -// Remove the number of digits that contributed to the mantissa past -// the dot, and add the number of truncated digits from the mantissa, -// to calculate the scaling factor for the mantissa from a raw exponent. -#[inline] -pub(crate) fn mantissa_exponent(exponent: i32, fraction_digits: usize, truncated: usize) -> i32 { - if fraction_digits > truncated { - exponent.saturating_sub(into_i32(fraction_digits - truncated)) - } else { - exponent.saturating_add(into_i32(truncated - fraction_digits)) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/float.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/float.rs deleted file mode 100644 index 2d434a2..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/float.rs +++ /dev/null
@@ -1,183 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -// FLOAT TYPE - -use super::num::*; -use super::rounding::*; -use super::shift::*; - -/// Extended precision floating-point type. -/// -/// Private implementation, exposed only for testing purposes. -#[doc(hidden)] -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub(crate) struct ExtendedFloat { - /// Mantissa for the extended-precision float. - pub mant: u64, - /// Binary exponent for the extended-precision float. - pub exp: i32, -} - -impl ExtendedFloat { - // PROPERTIES - - // OPERATIONS - - /// Multiply two normalized extended-precision floats, as if by `a*b`. - /// - /// The precision is maximal when the numbers are normalized, however, - /// decent precision will occur as long as both values have high bits - /// set. The result is not normalized. - /// - /// Algorithm: - /// 1. Non-signed multiplication of mantissas (requires 2x as many bits as input). - /// 2. Normalization of the result (not done here). - /// 3. Addition of exponents. - pub(crate) fn mul(&self, b: &ExtendedFloat) -> ExtendedFloat { - // Logic check, values must be decently normalized prior to multiplication. - debug_assert!((self.mant & u64::HIMASK != 0) && (b.mant & u64::HIMASK != 0)); - - // Extract high-and-low masks. - let ah = self.mant >> u64::HALF; - let al = self.mant & u64::LOMASK; - let bh = b.mant >> u64::HALF; - let bl = b.mant & u64::LOMASK; - - // Get our products - let ah_bl = ah * bl; - let al_bh = al * bh; - let al_bl = al * bl; - let ah_bh = ah * bh; - - let mut tmp = (ah_bl & u64::LOMASK) + (al_bh & u64::LOMASK) + (al_bl >> u64::HALF); - // round up - tmp += 1 << (u64::HALF - 1); - - ExtendedFloat { - mant: ah_bh + (ah_bl >> u64::HALF) + (al_bh >> u64::HALF) + (tmp >> u64::HALF), - exp: self.exp + b.exp + u64::FULL, - } - } - - /// Multiply in-place, as if by `a*b`. - /// - /// The result is not normalized. - #[inline] - pub(crate) fn imul(&mut self, b: &ExtendedFloat) { - *self = self.mul(b); - } - - // NORMALIZE - - /// Normalize float-point number. - /// - /// Shift the mantissa so the number of leading zeros is 0, or the value - /// itself is 0. - /// - /// Get the number of bytes shifted. - #[inline] - pub(crate) fn normalize(&mut self) -> u32 { - // Note: - // Using the cltz intrinsic via leading_zeros is way faster (~10x) - // than shifting 1-bit at a time, via while loop, and also way - // faster (~2x) than an unrolled loop that checks at 32, 16, 4, - // 2, and 1 bit. - // - // Using a modulus of pow2 (which will get optimized to a bitwise - // and with 0x3F or faster) is slightly slower than an if/then, - // however, removing the if/then will likely optimize more branched - // code as it removes conditional logic. - - // Calculate the number of leading zeros, and then zero-out - // any overflowing bits, to avoid shl overflow when self.mant == 0. - let shift = if self.mant == 0 { - 0 - } else { - self.mant.leading_zeros() - }; - shl(self, shift as i32); - shift - } - - // ROUND - - /// Lossy round float-point number to native mantissa boundaries. - #[inline] - pub(crate) fn round_to_native<F, Algorithm>(&mut self, algorithm: Algorithm) - where - F: Float, - Algorithm: FnOnce(&mut ExtendedFloat, i32), - { - round_to_native::<F, _>(self, algorithm); - } - - // FROM - - /// Create extended float from native float. - #[inline] - pub fn from_float<F: Float>(f: F) -> ExtendedFloat { - from_float(f) - } - - // INTO - - /// Convert into default-rounded, lower-precision native float. - #[inline] - pub(crate) fn into_float<F: Float>(mut self) -> F { - self.round_to_native::<F, _>(round_nearest_tie_even); - into_float(self) - } - - /// Convert into downward-rounded, lower-precision native float. - #[inline] - pub(crate) fn into_downward_float<F: Float>(mut self) -> F { - self.round_to_native::<F, _>(round_downward); - into_float(self) - } -} - -// FROM FLOAT - -// Import ExtendedFloat from native float. -#[inline] -pub(crate) fn from_float<F>(f: F) -> ExtendedFloat -where - F: Float, -{ - ExtendedFloat { - mant: u64::as_cast(f.mantissa()), - exp: f.exponent(), - } -} - -// INTO FLOAT - -// Export extended-precision float to native float. -// -// The extended-precision float must be in native float representation, -// with overflow/underflow appropriately handled. -#[inline] -pub(crate) fn into_float<F>(fp: ExtendedFloat) -> F -where - F: Float, -{ - // Export floating-point number. - if fp.mant == 0 || fp.exp < F::DENORMAL_EXPONENT { - // sub-denormal, underflow - F::ZERO - } else if fp.exp >= F::MAX_EXPONENT { - // overflow - F::from_bits(F::INFINITY_BITS) - } else { - // calculate the exp and fraction bits, and return a float from bits. - let exp: u64; - if (fp.exp == F::DENORMAL_EXPONENT) && (fp.mant & F::HIDDEN_BIT_MASK.as_u64()) == 0 { - exp = 0; - } else { - exp = (fp.exp + F::EXPONENT_BIAS) as u64; - } - let exp = exp << F::MANTISSA_SIZE; - let mant = fp.mant & F::MANTISSA_MASK.as_u64(); - F::from_bits(F::Unsigned::as_cast(mant | exp)) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers.rs deleted file mode 100644 index c63ce1c..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers.rs +++ /dev/null
@@ -1,9 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Precalculated large powers for limbs. - -#[cfg(limb_width_32)] -pub(crate) use super::large_powers32::*; - -#[cfg(limb_width_64)] -pub(crate) use super::large_powers64::*;
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers32.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers32.rs deleted file mode 100644 index 79911972..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers32.rs +++ /dev/null
@@ -1,183 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Precalculated large powers for 32-bit limbs. - -/// Large powers (&[u32]) for base5 operations. -const POW5_1: [u32; 1] = [5]; -const POW5_2: [u32; 1] = [25]; -const POW5_3: [u32; 1] = [625]; -const POW5_4: [u32; 1] = [390625]; -const POW5_5: [u32; 2] = [2264035265, 35]; -const POW5_6: [u32; 3] = [2242703233, 762134875, 1262]; -const POW5_7: [u32; 5] = [3211403009, 1849224548, 3668416493, 3913284084, 1593091]; -const POW5_8: [u32; 10] = [ - 781532673, 64985353, 253049085, 594863151, 3553621484, 3288652808, 3167596762, 2788392729, - 3911132675, 590, -]; -const POW5_9: [u32; 19] = [ - 2553183233, 3201533787, 3638140786, 303378311, 1809731782, 3477761648, 3583367183, 649228654, - 2915460784, 487929380, 1011012442, 1677677582, 3428152256, 1710878487, 1438394610, 2161952759, - 4100910556, 1608314830, 349175, -]; -const POW5_10: [u32; 38] = [ - 4234999809, 2012377703, 2408924892, 1570150255, 3090844311, 3273530073, 1187251475, 2498123591, - 3364452033, 1148564857, 687371067, 2854068671, 1883165473, 505794538, 2988060450, 3159489326, - 2531348317, 3215191468, 849106862, 3892080979, 3288073877, 2242451748, 4183778142, 2995818208, - 2477501924, 325481258, 2487842652, 1774082830, 1933815724, 2962865281, 1168579910, 2724829000, - 2360374019, 2315984659, 2360052375, 3251779801, 1664357844, 28, -]; -const POW5_11: [u32; 75] = [ - 689565697, 4116392818, 1853628763, 516071302, 2568769159, 365238920, 336250165, 1283268122, - 3425490969, 248595470, 2305176814, 2111925499, 507770399, 2681111421, 589114268, 591287751, - 1708941527, 4098957707, 475844916, 3378731398, 2452339615, 2817037361, 2678008327, 1656645978, - 2383430340, 73103988, 448667107, 2329420453, 3124020241, 3625235717, 3208634035, 2412059158, - 2981664444, 4117622508, 838560765, 3069470027, 270153238, 1802868219, 3692709886, 2161737865, - 2159912357, 2585798786, 837488486, 4237238160, 2540319504, 3798629246, 3748148874, 1021550776, - 2386715342, 1973637538, 1823520457, 1146713475, 833971519, 3277251466, 905620390, 26278816, - 2680483154, 2294040859, 373297482, 5996609, 4109575006, 512575049, 917036550, 1942311753, - 2816916778, 3248920332, 1192784020, 3537586671, 2456567643, 2925660628, 759380297, 888447942, - 3559939476, 3654687237, 805, -]; -const POW5_12: [u32; 149] = [ - 322166785, 3809044581, 2994556223, 1239584207, 3962455841, 4001882964, 3053876612, 915114683, - 2783289745, 785739093, 4253185907, 3931164994, 1370983858, 2553556126, 3360742076, 2255410929, - 422849554, 2457422215, 3539495362, 1720790602, 1908931983, 1470596141, 592794347, 4219465164, - 4085652704, 941661409, 2534650953, 885063988, 2355909854, 2812815516, 767256131, 3821757683, - 2155151105, 3817418473, 281116564, 2834395026, 2821201622, 2524625843, 1511330880, 2572352493, - 330571332, 2951088579, 2730271766, 4044456479, 4212286644, 2444937588, 3603420843, 2387148597, - 1142537539, 3299235429, 1751012624, 861228086, 2873722519, 230498814, 1023297821, 2553128038, - 3421129895, 2651917435, 2042981258, 1606787143, 2228751918, 447345732, 1930371132, 1784132011, - 3612538790, 2275925090, 2487567871, 1080427616, 2009179183, 3383506781, 3899054063, 1950782960, - 2168622213, 2717674390, 3616636027, 2079341593, 1530129217, 1461057425, 2406264415, 3674671357, - 2972036238, 2019354295, 1455849819, 1866918619, 1324269294, 424891864, 2722422332, 2641594816, - 1400249021, 3482963993, 3734946379, 225889849, 1891545473, 777383150, 3589824633, 4117601611, - 4220028667, 334453379, 1083130821, 1060342180, 4208163139, 1489826908, 4163762246, 1096580926, - 689301528, 2336054516, 1782865703, 4175148410, 3398369392, 2329412588, 3001580596, 59740741, - 3202189932, 3351895776, 246185302, 718535188, 3772647488, 4151666556, 4055698133, 2461934110, - 2281316281, 3466396836, 3536023465, 1064267812, 2955456354, 2423805422, 3627960790, 1325057500, - 3876919979, 2009959531, 175455101, 184092852, 2358785571, 3842977831, 2485266289, 487121622, - 4159252710, 4075707558, 459389244, 300652075, 2521346588, 3458976673, 888631636, 2076098096, - 3844514585, 2363697580, 3729421522, 3051115477, 649395, -]; -const POW5_13: [u32; 298] = [ - 711442433, 3564261005, 2399042279, 4170849936, 4010295575, 1423987028, 330414929, 1349249065, - 4213813618, 3852031822, 4040843590, 2154565331, 3094013374, 1159028371, 3227065538, 2115927092, - 2085102554, 488590542, 2609619432, 3602898805, 3812736528, 3269439096, 23816114, 253984538, - 1035905997, 2942969204, 3400787671, 338562688, 1637191975, 740509713, 2264962817, 3410753922, - 4162231428, 2282041228, 1759373012, 3155367777, 4278913285, 1420532801, 1981002276, 438054990, - 1006507643, 1142697287, 1332538012, 2029019521, 3949305784, 818392641, 2491288846, 2716584663, - 3648886102, 556814413, 444795339, 4071412999, 1066321706, 4253169466, 2510832316, 672091442, - 4083256000, 2165985028, 1841538484, 3549854235, 364431512, 3707648143, 1162785440, 2268641545, - 281340310, 735693841, 848809228, 1700785200, 2919703985, 4094234344, 58530286, 965505005, - 1000010347, 3381961808, 3040089923, 1973852082, 2890971585, 1019960210, 4292895237, 2821887841, - 3756675650, 3951282907, 3885870583, 1008791145, 503998487, 1881258362, 1949332730, 392996726, - 2012973814, 3970014187, 2461725150, 2942547730, 3728066699, 2766901132, 3778532841, 1085564064, - 2278673896, 1116879805, 3448726271, 774279411, 157211670, 1506320155, 531168605, 1362654525, - 956967721, 2148871960, 769186085, 4186232894, 2055679604, 3248365487, 3981268013, 3975787984, - 2489510517, 3309046495, 212771124, 933418041, 3371839114, 562115198, 1853601831, 757336096, - 1354633440, 1486083256, 2872126393, 522920738, 1141587749, 3210903262, 1926940553, 3054024853, - 2021162538, 2262742000, 1877899947, 3147002868, 669840763, 4158174590, 4238502559, 1023731922, - 3386840011, 829588074, 3449720188, 2835142880, 2999162007, 813056473, 482949569, 638108879, - 3067201471, 1026714238, 4004452838, 2383667807, 3999477803, 771648919, 630660440, 3827121348, - 176185980, 2878191002, 2666149832, 3909811063, 2429163983, 2665690412, 907266128, 4269332098, - 2022665808, 1527122180, 3072053668, 1072477492, 3006022924, 549664855, 2800340954, 37352654, - 1212772743, 2711280533, 3029527946, 2511120040, 1305308377, 3474662224, 4226330922, 442988428, - 954940108, 3274548099, 4212288177, 2688499880, 3982226758, 3922609956, 1279948029, 1939943640, - 3650489901, 2733364929, 2494263275, 1864579964, 1225941120, 2390465139, 1267503249, 3533240729, - 904410805, 2842550015, 2517736241, 1796069820, 3335274381, 673539835, 1924694759, 3598098235, - 2792633405, 16535707, 3703535497, 3592841791, 2929082877, 1317622811, 294990855, 1396706563, - 2383271770, 3853857605, 277813677, 277580220, 1101318484, 3761974115, 1132150143, 2544692622, - 3419825776, 743770306, 1695464553, 1548693232, 2421159615, 2575672031, 2678971806, 1591267897, - 626546738, 3823443129, 267710932, 1455435162, 2353985540, 3248523795, 335348168, 3872552561, - 2814522612, 2634118860, 3503767026, 1301019273, 1414467789, 722985138, 3070909565, 4253482569, - 3744939841, 558142907, 2229819389, 13833173, 77003966, 2763671364, 3905603970, 2931990126, - 2280419384, 1879090457, 2934846267, 4284933164, 2331863845, 62191163, 3178861020, 1522063815, - 785672270, 1215568492, 2936443917, 802972489, 2956820173, 3916732783, 2893572089, 1391232801, - 3168640330, 2396859648, 894950918, 1103583736, 961991865, 2807302642, 305977505, 3054505899, - 1048256994, 781017659, 2459278754, 3164823415, 537658277, 905753687, 464963300, 4149131560, - 1029507924, 2278300961, 1231291503, 414073408, 3630740085, 2345841814, 475358196, 3258243317, - 4167625072, 4178911231, 2927355042, 655438830, 3138378018, 623200562, 2785714112, 273403236, - 807993669, 98, -]; -const POW5_14: [u32; 595] = [ - 1691320321, 2671006246, 1682531301, 2072858707, 1240508969, 3108358191, 1125119096, 2470144952, - 1610099978, 1690632660, 1941696884, 2663506355, 1006364675, 3909158537, 4147711374, 1072663936, - 4078768933, 745751659, 4123687570, 471458681, 655028926, 4113407388, 3945524552, 985625313, - 1254424514, 2127508744, 570530434, 945388122, 3194649404, 2589065070, 2731705399, 202030749, - 2090780394, 3348662271, 1481754777, 1130635472, 4025144705, 1924486271, 2578567861, 125491448, - 1558036315, 994248173, 3817216711, 763950077, 1030439870, 959586474, 3845661701, 483795093, - 1637944470, 2275463649, 3398804829, 1758016486, 2665513698, 2004912571, 1094885097, 4223064276, - 3307819021, 651121777, 1757003305, 3603542336, 129917786, 2215974994, 3042386306, 2205352757, - 3944939700, 3710987569, 97967515, 1217242524, 930630949, 3660328512, 1787663098, 1784141600, - 2500542892, 4034561586, 3444961378, 785043562, 3869499367, 885623728, 2625011087, 3053789617, - 1965731793, 3900511934, 2648823592, 3851062028, 3321968688, 799195417, 1011847510, 1369129160, - 1348009103, 2876796955, 2915408967, 3305284948, 263399535, 1715990604, 2645821294, 1587844552, - 2624912049, 3035631499, 2306636348, 3499275462, 675152704, 854794152, 4004972748, 1739996642, - 1333476491, 4012621867, 3658792931, 3297985728, 2864481726, 3066357406, 785287846, 1671499798, - 433044045, 1919608025, 264833858, 3999983367, 1116778570, 1301982149, 4213901070, 4081649357, - 536169226, 1389008649, 188923873, 373495152, 2551132278, 1800758715, 3951840330, 2632334454, - 3118778225, 1034046547, 1862428410, 3037609062, 1994608505, 29051798, 2571685694, 264151332, - 2260643090, 2717535964, 3508441116, 3283713017, 1903365635, 923575694, 1219598101, 2288281570, - 3676533911, 1014136356, 555142354, 2389170030, 4185108175, 884862419, 836141292, 2957159173, - 1997444768, 4233903127, 2876184692, 3089125070, 1480848293, 1097600237, 299700527, 2507669891, - 2982628312, 2114881043, 2529576251, 2812279824, 2987750993, 4241938954, 2204775591, 1037094060, - 829315638, 1231047149, 52608178, 3735136637, 3455232602, 962039123, 488286513, 50685385, - 3516451821, 843975207, 1572355722, 675489076, 2428445672, 1555117248, 3708476086, 10375249, - 4172112346, 2117510871, 2227658327, 3187664554, 3050656558, 328034318, 3179601324, 1247769761, - 3439263953, 1431538938, 2962525068, 1213366289, 3813013550, 2651093719, 1860661503, 3933716208, - 264320617, 789980519, 2257856172, 102000748, 977269860, 1113845122, 3008928583, 1461738106, - 557786285, 2926560363, 1038106190, 3643478847, 828004507, 457818698, 1933056971, 373408056, - 2076808229, 3160935130, 2781854874, 2519636100, 177606000, 4237103862, 3977834316, 1621936232, - 2599050516, 319893558, 3343370366, 765044144, 976657331, 7026264, 294277429, 3829376742, - 3029627280, 2705178718, 3614653880, 230519152, 3288033233, 293525479, 3805751881, 3227511198, - 2520308544, 3648103003, 1111086184, 437622105, 2232033852, 3239146386, 584244184, 1450926016, - 2462430443, 3226534010, 298582169, 4214576928, 1762099469, 964985185, 1585788148, 1641127666, - 787006566, 2315956284, 3258232694, 2275058964, 2541003317, 1508235863, 2613339827, 4080647514, - 1152057965, 3149266279, 731345410, 914737650, 65395712, 1884566942, 1379520432, 2611027720, - 4163073378, 2619704967, 2746552541, 1388822415, 3005141199, 843440249, 4288674003, 3136174279, - 4051522914, 4144149433, 3427566947, 3419023197, 3758479825, 3893877676, 96899594, 1657725776, - 253618880, 434129337, 1499045748, 2996992534, 4036042074, 2110713869, 906222950, 928326225, - 2541827893, 1604330202, 226792470, 4022228930, 815850898, 1466012310, 3377712199, 292769859, - 2822055597, 3225701344, 3052947004, 385831222, 705324593, 4030158636, 3540280538, 2982120874, - 2136414455, 255762046, 3852783591, 3262064164, 2358991588, 3756586117, 4143612643, 3326743817, - 2897365738, 807711264, 3719310016, 3721264861, 3627337076, 944539331, 3640975513, 3712525681, - 1162911839, 2008243316, 2179489649, 2867584109, 261861553, 3570253908, 2062868357, 2220328623, - 3857004679, 3744109002, 4138041873, 1451860932, 2364975637, 2802161722, 2680106834, 753401584, - 1223182946, 1245401957, 4163377735, 3565815922, 2216942838, 4036140094, 71979081, 3924559643, - 400477238, 551750683, 1174153235, 859969898, 1185921017, 1711399735, 812991545, 4051735761, - 3549118738, 1631653329, 3631835958, 3648867800, 1206500363, 2155893137, 361030362, 3454286017, - 2505909489, 1083595169, 453595313, 1510564703, 1706163902, 1632924345, 1381875722, 1661526119, - 1082778324, 3571910052, 1140625929, 851544870, 1145546234, 2938573139, 907528924, 1304752338, - 1764668294, 1788942063, 1700368828, 104979467, 1413911959, 3327497828, 1956384744, 1272712474, - 2815637534, 3307809377, 1320574940, 1111968962, 4073107827, 434096622, 169451929, 3201183459, - 3331028877, 2852366972, 3369830128, 2924794558, 3106537952, 3739481231, 1612955817, 4138608722, - 2721281595, 2755775390, 843505117, 982234295, 1157276611, 814674632, 4246504726, 3532006708, - 992340967, 1647538031, 204696133, 193866982, 3899126129, 300851698, 1379496684, 1759463683, - 1354782756, 1374637239, 3410883240, 1073406229, 3038431791, 1053909855, 3607043270, 173719711, - 3733903830, 171820911, 1573050589, 932781534, 4183534770, 2158849555, 372245998, 3573073830, - 841339264, 2759200520, 1610547277, 2603293319, 3890906486, 1557138278, 3964109906, 677238797, - 537994297, 1124184993, 4287078344, 4207654540, 2943022776, 2977947524, 3255359985, 4098397558, - 2274666217, 2915862060, 243524940, 2467726756, 2869020032, 507521339, 3403121914, 522051455, - 1803903108, 3471254194, 473535371, 1948602036, 3352095732, 3116527002, 1795743673, 775867940, - 2551469548, 3757442064, 3162525227, 3765412747, 3040105484, 1927625810, 48214767, 2997207130, - 1342349989, 2536583992, 1501320191, 3592287317, 887432730, 967585477, 3334212779, 948663609, - 1064513472, 15386372, 2465931737, 3230242590, 3036652803, 2063155087, 1927500726, 2821790499, - 2187774383, 501520074, 3688568496, 3606711121, 2576459247, 3176542345, 378322447, 156541411, - 1400607301, 1406179107, 677848877, 2253753529, 193196070, 4207435024, 4166396241, 509467541, - 2906024136, 1221753746, 3375413222, 431327897, 2749265123, 2848827671, 3412997614, 2051920238, - 1283516885, 1300498239, 1957256104, 2634010560, 3531900395, 360276850, 1461184973, 2012063967, - 2873572430, 2914608609, 4289554777, 1539331673, 1859532928, 4213441063, 538215691, 3512720863, - 4258743698, 3040408445, 982396546, 343095663, 4138069496, 1021581857, 214185242, 1968079460, - 2864275059, 3347192726, 4096783459, 3259169450, 3707808869, 142485006, 399610869, 230556456, - 2219467721, 4191227798, 2242548189, 3136366572, 179755707, 3464881829, 452317775, 3887426070, - 3446430233, 1473370015, 1576807208, 3964523248, 419325089, 2373067114, 1596072055, 1928415752, - 3635452689, 1005598891, 3335462724, 3290848636, 3669078247, 1178176812, 2110774376, 3068593619, - 1253036518, 908857731, 3631223047, 4138506423, 2903592318, 3596915748, 3289036113, 3721512676, - 2704409359, 3386016968, 3676268074, 2185259502, 1096257611, 3360076717, 3548676554, 170167319, - 3360064287, 3899940843, 9640, -]; - -pub(crate) const POW5: [&'static [u32]; 14] = [ - &POW5_1, &POW5_2, &POW5_3, &POW5_4, &POW5_5, &POW5_6, &POW5_7, &POW5_8, &POW5_9, &POW5_10, - &POW5_11, &POW5_12, &POW5_13, &POW5_14, -];
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers64.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers64.rs deleted file mode 100644 index ee36561..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers64.rs +++ /dev/null
@@ -1,625 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Precalculated large powers for 64-bit limbs. - -/// Large powers (&[u64]) for base5 operations. -const POW5_1: [u64; 1] = [5]; -const POW5_2: [u64; 1] = [25]; -const POW5_3: [u64; 1] = [625]; -const POW5_4: [u64; 1] = [390625]; -const POW5_5: [u64; 1] = [152587890625]; -const POW5_6: [u64; 2] = [3273344365508751233, 1262]; -const POW5_7: [u64; 3] = [7942358959831785217, 16807427164405733357, 1593091]; -const POW5_8: [u64; 5] = [ - 279109966635548161, - 2554917779393558781, - 14124656261812188652, - 11976055582626787546, - 2537941837315, -]; -const POW5_9: [u64; 10] = [ - 13750482914757213185, - 1302999927698857842, - 14936872543252795590, - 2788415840139466767, - 2095640732773017264, - 7205570348933370714, - 7348167152523113408, - 9285516396840364274, - 6907659600622710236, - 349175, -]; -const POW5_10: [u64; 19] = [ - 8643096425819600897, - 6743743997439985372, - 14059704609098336919, - 10729359125898331411, - 4933048501514368705, - 12258131603170554683, - 2172371001088594721, - 13569903330219142946, - 13809142207969578845, - 16716360519037769646, - 9631256923806107285, - 12866941232305103710, - 1397931361048440292, - 7619627737732970332, - 12725409486282665900, - 11703051443360963910, - 9947078370803086083, - 13966287901448440471, - 121923442132, -]; -const POW5_11: [u64; 38] = [ - 17679772531488845825, - 2216509366347768155, - 1568689219195129479, - 5511594616325588277, - 1067709417009240089, - 9070650952098657518, - 11515285870634858015, - 2539561553659505564, - 17604889300961091799, - 14511540856854204724, - 12099083339557485471, - 7115240299237943815, - 313979240050606788, - 10004784664717172195, - 15570268847930131473, - 10359715202835930803, - 17685054012115162812, - 13183273382855797757, - 7743260039872919062, - 9284593436392572926, - 11105921222066415013, - 18198799323400703846, - 16314988383739458320, - 4387527177871570570, - 8476708682254672590, - 4925096874831034057, - 14075687868072027455, - 112866656203221926, - 9852830467773230418, - 25755239915196746, - 2201493076310172510, - 8342165458688466438, - 13954006576066379050, - 15193819059903295636, - 12565616718911389531, - 3815854855847885129, - 15696762163583540628, - 805, -]; -const POW5_12: [u64; 75] = [ - 16359721904723189761, - 5323973632697650495, - 17187956456762001185, - 3930387638628283780, - 3374723710406992273, - 16884225088663222131, - 10967440051041439154, - 9686916182456720060, - 10554548046311730194, - 7390739362393647554, - 6316162333127736719, - 18122464886584070891, - 4044404959645932768, - 3801320885861987401, - 12080950653257274590, - 16414324262488991299, - 16395687498836410113, - 12173633940896186260, - 10843185433142632150, - 11048169832730399808, - 12674828934734683716, - 17370808310130582550, - 10500926985433408692, - 10252725158410704555, - 14170108270502067523, - 3698946465517688080, - 989984870770509463, - 10965601426733943069, - 11389898658438335655, - 6901098232861256586, - 1921335291173932590, - 7662788640922083388, - 9775023833308395430, - 4640401278902814207, - 14532050972198413359, - 8378549018693130223, - 11672322628395371653, - 8930704142764178555, - 6275193859483102017, - 15782593304269205087, - 8673060659034172558, - 8018354414354334043, - 1824896661540749038, - 11345563346725559868, - 14959216444480821949, - 970189517688324683, - 3338835207603007873, - 17684964260791738489, - 1436466329061721851, - 4554134986752476101, - 6398757850768963907, - 4709779218751158342, - 10033277748582410264, - 17932125878679265063, - 10004750887749091440, - 256584531835386932, - 14396282740722731628, - 3086085133731396950, - 17831272085689600064, - 10573926491412564693, - 14888061047859191737, - 4570995450261499817, - 10410165022312935266, - 5691078631447480790, - 8632710455805418155, - 790672778942823293, - 16505464105756800547, - 2092171438149740401, - 17505030673829275878, - 1291290830058928444, - 14856191690683232796, - 8916773426496500052, - 10152003807578858265, - 13104441193763861714, - 649395, -]; -const POW5_13: [u64; 149] = [ - 15308384451594534913, - 17913664074042735335, - 6115977719198531863, - 5794980608663993169, - 16544350702855106930, - 9253787637781258566, - 4977988951675168190, - 9087837664087448770, - 2098480401110016986, - 15474332540882100712, - 14042133997396540944, - 1090855284423485362, - 12639956485351058381, - 1454115676006639319, - 3180465001342538023, - 14649076551958697729, - 9801292446545910916, - 13552201410826594004, - 6101141927469189381, - 1881431857880609316, - 4907847477899433595, - 8714572486973123228, - 3514969632331374520, - 11667642286891470094, - 2391499697425323350, - 17486585679659076043, - 18267223761882105642, - 2886610765822313148, - 9302834862968900288, - 15246507846733637044, - 15924227519624562840, - 9743741243284697760, - 3159780987244964246, - 7304816812369628428, - 17584602612559717809, - 4146812420657846766, - 14525415362681041515, - 8477630142371600195, - 4380695748062263745, - 12119915994367943173, - 16970630866565485122, - 4332724980155264503, - 8079943140620527639, - 1687908087554405626, - 17051081099834002166, - 12638146269730763230, - 11883749876933445771, - 4662462156371383785, - 4796962238316531176, - 3325504751659868927, - 6469595803187862550, - 5852556621152583005, - 9229334792448387881, - 17979733373938620709, - 13951623534175792756, - 17075879371091039277, - 14212246479457938037, - 4008999959804158260, - 2414266395366403722, - 3252733766253918247, - 6382678985007829216, - 2245927470982310841, - 13790724502051307301, - 13116936866733148041, - 9718402891306794538, - 13516274400356104875, - 17859223875778049403, - 4396895129099725471, - 3563053650368467915, - 12176845952536972668, - 3492050964335269015, - 2740656767075170753, - 4409704077614761919, - 10237775279597492710, - 3314206875098230827, - 16437361028114095448, - 12361736225407656572, - 16792510651790145480, - 11449053143229929935, - 18336641737580333136, - 6558939822118891088, - 4606255756908155300, - 2360792578991605004, - 160428430149144538, - 11644861220729221511, - 10785178451159739786, - 14923560618031934681, - 1902620814992781610, - 14064076995338910412, - 11547019064112212657, - 16847481479966225734, - 8331994491163145469, - 11739712981738851885, - 8008309968651120619, - 10266969595459035264, - 15175153381217702033, - 12208659352573720245, - 7714061140750342961, - 2892831567213510541, - 15453714249045017319, - 71020323573871677, - 15431137995750602633, - 5659146884637671933, - 5998809010488554503, - 16552192379299157850, - 1192197967194298797, - 16157555793424861524, - 10929371590994640255, - 3194469143425738352, - 6651586784672005225, - 11062427140788057791, - 6834443579468668318, - 16421563197797455922, - 6251046422506172884, - 13952303462156793860, - 16632486601871393224, - 11313454360291325172, - 5587835232504462834, - 3105197524618514637, - 18268568531031972989, - 2397205535804309313, - 59413027864729597, - 11869878125348715710, - 12592801707270523266, - 8070632061321113656, - 18403647807860650811, - 267109013517069093, - 6537214311028855260, - 5220826919973709902, - 3448740582779163661, - 16822239213112884941, - 5975299384311048185, - 10294433804430712138, - 4739856055412448774, - 12057273038326387897, - 13119002941950056609, - 3354445304051737058, - 13592813067499314594, - 3890182464434078629, - 17820384357466425060, - 9785228118969879380, - 1778431746734556271, - 10075313876350055029, - 13994048489400919028, - 17948287074199726448, - 2815088342305858722, - 2676626035777198370, - 1174257960026283968, - 421714788677, -]; -const POW5_14: [u64; 298] = [ - 11471884475673051137, - 8902860357476377573, - 13350296775839230505, - 10609191786344608888, - 7261211985859587338, - 11439672689354862964, - 16789708072300570627, - 4607056528866348430, - 3202978990421512997, - 2024899620433984146, - 17666950207239811774, - 4233228489390288200, - 9137580478688460738, - 4060411066587388546, - 11119949806060600124, - 867715462473090103, - 14382394941384869610, - 4856042377419278489, - 8265605599571137921, - 538981667666252469, - 4270263388700786523, - 3281140600308898503, - 4121392524544394174, - 2077884106245940229, - 9773041957329767574, - 7550623316597646685, - 8611033926449791714, - 18137922955420802793, - 2796546741236224013, - 15477096484628446761, - 9517540128113714010, - 9471917970500821378, - 15938570248662483124, - 5228016831978462619, - 15720991252586974501, - 7662829825220776698, - 17328310068068434348, - 3371736428170309730, - 3803724952191098855, - 13115926536504376719, - 16752571196153442257, - 16540185467776259880, - 3432518182450051120, - 5880364967211798870, - 12355748840305392783, - 14196090758536469575, - 7370123524686686319, - 6819740424617592686, - 13037938013537368753, - 15029273671291927100, - 3671312928327205696, - 7473228676544792780, - 17234079691312938123, - 14164740848093544419, - 13169904779481875902, - 7179036968465894054, - 8244653688947194445, - 17179797746073799490, - 5591970751047577674, - 17530550506268329742, - 5965746721852312330, - 1604149463243472865, - 7734199791463116918, - 11305790396015856714, - 4441196105025505137, - 13046431581185664762, - 124776524294606713, - 1134521334706523966, - 11671728093344476434, - 14103440020972933148, - 3966727403013869059, - 9828094508409132821, - 4355682486381147287, - 10261407143988481234, - 3800455155249557199, - 12700901937937547500, - 18184475466894579360, - 13267691151779895412, - 4714157123477697445, - 10770360171308585263, - 9083344917597998040, - 12078649873810212155, - 18218989082046199377, - 4454285072780637351, - 5287307245618354742, - 16042289702059031730, - 4131926574212754010, - 217692071448455473, - 3624845916216282093, - 2901203491797614218, - 6679177724033967080, - 44561358851332790, - 9094639944041587162, - 13690915012276084311, - 1408896670826320686, - 5359130319612337580, - 6148412925099835601, - 5211368532286409612, - 11386360825549027374, - 16895182466965795071, - 3392940493846427241, - 438089879085393580, - 4783928372776399972, - 6278117363595909959, - 12569481049412674733, - 15648622492570893902, - 1966316336235305115, - 1603775390515993547, - 13576113010204316709, - 10821754650102840474, - 18198222517222903152, - 6966163076615302988, - 1373932372410129684, - 3285839581819684990, - 30177575069719475, - 16447047871247307061, - 11618654126674833808, - 990072222556306872, - 1260682336135768017, - 13862055046689532489, - 15668483092844698432, - 1879572630092764264, - 13912027797058626108, - 6231679788219816920, - 13857858054844167403, - 18101470072534728857, - 4144579812461609229, - 7048589655616599284, - 9946956499532694630, - 9771303850109874038, - 6477823708780339765, - 17526247621747041971, - 13525995675852669549, - 3928768291901239810, - 8094153383078124544, - 11214278667728965552, - 11251547162596832610, - 5964946855123292381, - 3622548288590237903, - 13469765967150053587, - 17798986288523466082, - 14684592818807932259, - 16724077276802963921, - 7119877993753121290, - 1864571304902781632, - 12871984921385213812, - 9065447042604670298, - 3987130777300360550, - 6890545752116901685, - 17275341711601865750, - 6296474927799264658, - 1257436973037243463, - 13854281781965301421, - 1657132483318662716, - 17309399540017292849, - 12808111630089217242, - 1098489625264462071, - 14010458905686364135, - 16134414519481621220, - 14288255900328821475, - 3469093466388187882, - 15982710881468295872, - 4056765540058056052, - 15945176389096104089, - 8625339365793505375, - 12316179968863788913, - 15334123773538054321, - 9536238824220581765, - 16080825720106203271, - 6235695225418121745, - 12035192956458019349, - 3235835166714703698, - 5348960676912581218, - 15315062772709464647, - 17335089708021308662, - 16855855317958414409, - 2369751139431140406, - 3693542588628609043, - 7350405893393987577, - 17402072586341663801, - 7007897690013647122, - 15671767872059304758, - 9259490518292347915, - 14836045474406130394, - 4654005815464502513, - 6487825998330548401, - 7013356660323385022, - 7136200343936679946, - 15341236858676437716, - 3657357368867197449, - 12621075530054608378, - 5603868621997066972, - 7683447656788439942, - 450883379216880060, - 14291494350184945047, - 5466258454997635048, - 14206933098432772126, - 4775870327277641692, - 1864430798867181939, - 13748978265070608793, - 12250822864261576589, - 12561896977498605296, - 16060949594257359328, - 17775189113543311529, - 11835965177892927035, - 4218664174878121437, - 3499000902478111683, - 15169853304359126294, - 7076121963053575143, - 832652347668916805, - 1292148207755194737, - 7556838978364207852, - 5904021986723518500, - 4610244652288570024, - 4526508363195533871, - 746120481022614726, - 737965197247830486, - 4006266184415762653, - 9272188239892688050, - 15346235246415709678, - 11850675997347533184, - 11181059668610842701, - 6687857983250662774, - 2908718488661492818, - 4828337780126983225, - 18071738646453002184, - 12790187227727197880, - 17602483480871623153, - 12523532189621855977, - 10598805712727696716, - 2179787555896149376, - 2242193929457337594, - 14908923241136742532, - 8369182018012550027, - 13385381554043022324, - 3332327430110633913, - 16138090784046208492, - 16172324607469047339, - 8279089815915615244, - 12872906602736235247, - 10894545290539475621, - 15428756545851905023, - 4155747980686992922, - 4074479178894544043, - 66083965608603584, - 13873786284662268377, - 8861183628277687555, - 12119497911296021430, - 2154012318305274287, - 15490706314503067312, - 13643145488710608367, - 672340241093017103, - 6039493278284091973, - 9679797700977436461, - 18070795828318171174, - 2188146431134935377, - 5247392385741514952, - 1852539214842869734, - 12235621681634112739, - 8812930319623534062, - 5585597406294108629, - 11312989214475901864, - 1547377291787797995, - 8641748937186208205, - 12518148659168623694, - 6611379197521520985, - 18096591571068008576, - 15087021227100112139, - 13058454842015958418, - 1473584652966833794, - 4387660670140018168, - 8452836916843525402, - 14376083294443363955, - 13998026203969090659, - 611968444648172645, - 990232438801273845, - 18001186324715561929, - 13470591857250177501, - 14881554140239420091, - 16696367836720124495, - 6328076032778459673, - 17027497695968504616, - 10192245646262428833, - 8282482589527318647, - 4319014353374321425, - 14134087271041670980, - 5060230880114618599, - 13179509240430058600, - 3903514232614801894, - 17774749744702165255, - 15448635507030969726, - 15983775238358480209, - 14542832143965487887, - 9385618098039514666, - 14431419612662304843, - 730863073501675978, - 16750118380379734815, - 9640, -]; - -pub(crate) const POW5: [&[u64]; 14] = [ - &POW5_1, &POW5_2, &POW5_3, &POW5_4, &POW5_5, &POW5_6, &POW5_7, &POW5_8, &POW5_9, &POW5_10, - &POW5_11, &POW5_12, &POW5_13, &POW5_14, -];
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/math.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/math.rs deleted file mode 100644 index d7122bff..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/math.rs +++ /dev/null
@@ -1,886 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Building-blocks for arbitrary-precision math. -//! -//! These algorithms assume little-endian order for the large integer -//! buffers, so for a `vec![0, 1, 2, 3]`, `3` is the most significant limb, -//! and `0` is the least significant limb. - -use super::large_powers; -use super::num::*; -use super::small_powers::*; -use alloc::vec::Vec; -use core::{cmp, iter, mem}; - -// ALIASES -// ------- - -// Type for a single limb of the big integer. -// -// A limb is analogous to a digit in base10, except, it stores 32-bit -// or 64-bit numbers instead. -// -// This should be all-known 64-bit platforms supported by Rust. -// https://forge.rust-lang.org/platform-support.html -// -// Platforms where native 128-bit multiplication is explicitly supported: -// - x86_64 (Supported via `MUL`). -// - mips64 (Supported via `DMULTU`, which `HI` and `LO` can be read-from). -// -// Platforms where native 64-bit multiplication is supported and -// you can extract hi-lo for 64-bit multiplications. -// aarch64 (Requires `UMULH` and `MUL` to capture high and low bits). -// powerpc64 (Requires `MULHDU` and `MULLD` to capture high and low bits). -// -// Platforms where native 128-bit multiplication is not supported, -// requiring software emulation. -// sparc64 (`UMUL` only supported double-word arguments). - -// 32-BIT LIMB -#[cfg(limb_width_32)] -pub type Limb = u32; - -#[cfg(limb_width_32)] -pub const POW5_LIMB: &[Limb] = &POW5_32; - -#[cfg(limb_width_32)] -pub const POW10_LIMB: &[Limb] = &POW10_32; - -#[cfg(limb_width_32)] -type Wide = u64; - -// 64-BIT LIMB -#[cfg(limb_width_64)] -pub type Limb = u64; - -#[cfg(limb_width_64)] -pub const POW5_LIMB: &[Limb] = &POW5_64; - -#[cfg(limb_width_64)] -pub const POW10_LIMB: &[Limb] = &POW10_64; - -#[cfg(limb_width_64)] -type Wide = u128; - -/// Cast to limb type. -#[inline] -pub(crate) fn as_limb<T: Integer>(t: T) -> Limb { - Limb::as_cast(t) -} - -/// Cast to wide type. -#[inline] -fn as_wide<T: Integer>(t: T) -> Wide { - Wide::as_cast(t) -} - -// SPLIT -// ----- - -/// Split u64 into limbs, in little-endian order. -#[inline] -#[cfg(limb_width_32)] -fn split_u64(x: u64) -> [Limb; 2] { - [as_limb(x), as_limb(x >> 32)] -} - -/// Split u64 into limbs, in little-endian order. -#[inline] -#[cfg(limb_width_64)] -fn split_u64(x: u64) -> [Limb; 1] { - [as_limb(x)] -} - -// HI64 -// ---- - -// NONZERO - -/// Check if any of the remaining bits are non-zero. -#[inline] -pub fn nonzero<T: Integer>(x: &[T], rindex: usize) -> bool { - let len = x.len(); - let slc = &x[..len - rindex]; - slc.iter().rev().any(|&x| x != T::ZERO) -} - -/// Shift 64-bit integer to high 64-bits. -#[inline] -fn u64_to_hi64_1(r0: u64) -> (u64, bool) { - debug_assert!(r0 != 0); - let ls = r0.leading_zeros(); - (r0 << ls, false) -} - -/// Shift 2 64-bit integers to high 64-bits. -#[inline] -fn u64_to_hi64_2(r0: u64, r1: u64) -> (u64, bool) { - debug_assert!(r0 != 0); - let ls = r0.leading_zeros(); - let rs = 64 - ls; - let v = match ls { - 0 => r0, - _ => (r0 << ls) | (r1 >> rs), - }; - let n = r1 << ls != 0; - (v, n) -} - -/// Trait to export the high 64-bits from a little-endian slice. -trait Hi64<T>: AsRef<[T]> { - /// Get the hi64 bits from a 1-limb slice. - fn hi64_1(&self) -> (u64, bool); - - /// Get the hi64 bits from a 2-limb slice. - fn hi64_2(&self) -> (u64, bool); - - /// Get the hi64 bits from a 3-limb slice. - fn hi64_3(&self) -> (u64, bool); - - /// High-level exporter to extract the high 64 bits from a little-endian slice. - #[inline] - fn hi64(&self) -> (u64, bool) { - match self.as_ref().len() { - 0 => (0, false), - 1 => self.hi64_1(), - 2 => self.hi64_2(), - _ => self.hi64_3(), - } - } -} - -impl Hi64<u32> for [u32] { - #[inline] - fn hi64_1(&self) -> (u64, bool) { - debug_assert!(self.len() == 1); - let r0 = self[0] as u64; - u64_to_hi64_1(r0) - } - - #[inline] - fn hi64_2(&self) -> (u64, bool) { - debug_assert!(self.len() == 2); - let r0 = (self[1] as u64) << 32; - let r1 = self[0] as u64; - u64_to_hi64_1(r0 | r1) - } - - #[inline] - fn hi64_3(&self) -> (u64, bool) { - debug_assert!(self.len() >= 3); - let r0 = self[self.len() - 1] as u64; - let r1 = (self[self.len() - 2] as u64) << 32; - let r2 = self[self.len() - 3] as u64; - let (v, n) = u64_to_hi64_2(r0, r1 | r2); - (v, n || nonzero(self, 3)) - } -} - -impl Hi64<u64> for [u64] { - #[inline] - fn hi64_1(&self) -> (u64, bool) { - debug_assert!(self.len() == 1); - let r0 = self[0]; - u64_to_hi64_1(r0) - } - - #[inline] - fn hi64_2(&self) -> (u64, bool) { - debug_assert!(self.len() >= 2); - let r0 = self[self.len() - 1]; - let r1 = self[self.len() - 2]; - let (v, n) = u64_to_hi64_2(r0, r1); - (v, n || nonzero(self, 2)) - } - - #[inline] - fn hi64_3(&self) -> (u64, bool) { - self.hi64_2() - } -} - -// SCALAR -// ------ - -// Scalar-to-scalar operations, for building-blocks for arbitrary-precision -// operations. - -mod scalar { - use super::*; - - // ADDITION - - /// Add two small integers and return the resulting value and if overflow happens. - #[inline] - pub fn add(x: Limb, y: Limb) -> (Limb, bool) { - x.overflowing_add(y) - } - - /// AddAssign two small integers and return if overflow happens. - #[inline] - pub fn iadd(x: &mut Limb, y: Limb) -> bool { - let t = add(*x, y); - *x = t.0; - t.1 - } - - // SUBTRACTION - - /// Subtract two small integers and return the resulting value and if overflow happens. - #[inline] - pub fn sub(x: Limb, y: Limb) -> (Limb, bool) { - x.overflowing_sub(y) - } - - /// SubAssign two small integers and return if overflow happens. - #[inline] - pub fn isub(x: &mut Limb, y: Limb) -> bool { - let t = sub(*x, y); - *x = t.0; - t.1 - } - - // MULTIPLICATION - - /// Multiply two small integers (with carry) (and return the overflow contribution). - /// - /// Returns the (low, high) components. - #[inline] - pub fn mul(x: Limb, y: Limb, carry: Limb) -> (Limb, Limb) { - // Cannot overflow, as long as wide is 2x as wide. This is because - // the following is always true: - // `Wide::max_value() - (Narrow::max_value() * Narrow::max_value()) >= Narrow::max_value()` - let z: Wide = as_wide(x) * as_wide(y) + as_wide(carry); - let bits = mem::size_of::<Limb>() * 8; - (as_limb(z), as_limb(z >> bits)) - } - - /// Multiply two small integers (with carry) (and return if overflow happens). - #[inline] - pub fn imul(x: &mut Limb, y: Limb, carry: Limb) -> Limb { - let t = mul(*x, y, carry); - *x = t.0; - t.1 - } -} // scalar - -// SMALL -// ----- - -// Large-to-small operations, to modify a big integer from a native scalar. - -mod small { - use super::*; - - // MULTIPLICATIION - - /// ADDITION - - /// Implied AddAssign implementation for adding a small integer to bigint. - /// - /// Allows us to choose a start-index in x to store, to allow incrementing - /// from a non-zero start. - #[inline] - pub fn iadd_impl(x: &mut Vec<Limb>, y: Limb, xstart: usize) { - if x.len() <= xstart { - x.push(y); - } else { - // Initial add - let mut carry = scalar::iadd(&mut x[xstart], y); - - // Increment until overflow stops occurring. - let mut size = xstart + 1; - while carry && size < x.len() { - carry = scalar::iadd(&mut x[size], 1); - size += 1; - } - - // If we overflowed the buffer entirely, need to add 1 to the end - // of the buffer. - if carry { - x.push(1); - } - } - } - - /// AddAssign small integer to bigint. - #[inline] - pub fn iadd(x: &mut Vec<Limb>, y: Limb) { - iadd_impl(x, y, 0); - } - - // SUBTRACTION - - /// SubAssign small integer to bigint. - /// Does not do overflowing subtraction. - #[inline] - pub fn isub_impl(x: &mut Vec<Limb>, y: Limb, xstart: usize) { - debug_assert!(x.len() > xstart && (x[xstart] >= y || x.len() > xstart + 1)); - - // Initial subtraction - let mut carry = scalar::isub(&mut x[xstart], y); - - // Increment until overflow stops occurring. - let mut size = xstart + 1; - while carry && size < x.len() { - carry = scalar::isub(&mut x[size], 1); - size += 1; - } - normalize(x); - } - - // MULTIPLICATION - - /// MulAssign small integer to bigint. - #[inline] - pub fn imul(x: &mut Vec<Limb>, y: Limb) { - // Multiply iteratively over all elements, adding the carry each time. - let mut carry: Limb = 0; - for xi in &mut *x { - carry = scalar::imul(xi, y, carry); - } - - // Overflow of value, add to end. - if carry != 0 { - x.push(carry); - } - } - - /// Mul small integer to bigint. - #[inline] - pub fn mul(x: &[Limb], y: Limb) -> Vec<Limb> { - let mut z = Vec::<Limb>::default(); - z.extend_from_slice(x); - imul(&mut z, y); - z - } - - /// MulAssign by a power. - /// - /// Theoretically... - /// - /// Use an exponentiation by squaring method, since it reduces the time - /// complexity of the multiplication to ~`O(log(n))` for the squaring, - /// and `O(n*m)` for the result. Since `m` is typically a lower-order - /// factor, this significantly reduces the number of multiplications - /// we need to do. Iteratively multiplying by small powers follows - /// the nth triangular number series, which scales as `O(p^2)`, but - /// where `p` is `n+m`. In short, it scales very poorly. - /// - /// Practically.... - /// - /// Exponentiation by Squaring: - /// running 2 tests - /// test bigcomp_f32_lexical ... bench: 1,018 ns/iter (+/- 78) - /// test bigcomp_f64_lexical ... bench: 3,639 ns/iter (+/- 1,007) - /// - /// Exponentiation by Iterative Small Powers: - /// running 2 tests - /// test bigcomp_f32_lexical ... bench: 518 ns/iter (+/- 31) - /// test bigcomp_f64_lexical ... bench: 583 ns/iter (+/- 47) - /// - /// Exponentiation by Iterative Large Powers (of 2): - /// running 2 tests - /// test bigcomp_f32_lexical ... bench: 671 ns/iter (+/- 31) - /// test bigcomp_f64_lexical ... bench: 1,394 ns/iter (+/- 47) - /// - /// Even using worst-case scenarios, exponentiation by squaring is - /// significantly slower for our workloads. Just multiply by small powers, - /// in simple cases, and use precalculated large powers in other cases. - pub fn imul_pow5(x: &mut Vec<Limb>, n: u32) { - use super::large::KARATSUBA_CUTOFF; - - let small_powers = POW5_LIMB; - let large_powers = large_powers::POW5; - - if n == 0 { - // No exponent, just return. - // The 0-index of the large powers is `2^0`, which is 1, so we want - // to make sure we don't take that path with a literal 0. - return; - } - - // We want to use the asymptotically faster algorithm if we're going - // to be using Karabatsu multiplication sometime during the result, - // otherwise, just use exponentiation by squaring. - let bit_length = 32 - n.leading_zeros() as usize; - debug_assert!(bit_length != 0 && bit_length <= large_powers.len()); - if x.len() + large_powers[bit_length - 1].len() < 2 * KARATSUBA_CUTOFF { - // We can use iterative small powers to make this faster for the - // easy cases. - - // Multiply by the largest small power until n < step. - let step = small_powers.len() - 1; - let power = small_powers[step]; - let mut n = n as usize; - while n >= step { - imul(x, power); - n -= step; - } - - // Multiply by the remainder. - imul(x, small_powers[n]); - } else { - // In theory, this code should be asymptotically a lot faster, - // in practice, our small::imul seems to be the limiting step, - // and large imul is slow as well. - - // Multiply by higher order powers. - let mut idx: usize = 0; - let mut bit: usize = 1; - let mut n = n as usize; - while n != 0 { - if n & bit != 0 { - debug_assert!(idx < large_powers.len()); - large::imul(x, large_powers[idx]); - n ^= bit; - } - idx += 1; - bit <<= 1; - } - } - } - - // BIT LENGTH - - /// Get number of leading zero bits in the storage. - #[inline] - pub fn leading_zeros(x: &[Limb]) -> usize { - x.last().map_or(0, |x| x.leading_zeros() as usize) - } - - /// Calculate the bit-length of the big-integer. - #[inline] - pub fn bit_length(x: &[Limb]) -> usize { - let bits = mem::size_of::<Limb>() * 8; - // Avoid overflowing, calculate via total number of bits - // minus leading zero bits. - let nlz = leading_zeros(x); - bits.checked_mul(x.len()) - .map_or_else(usize::max_value, |v| v - nlz) - } - - // SHL - - /// Shift-left bits inside a buffer. - /// - /// Assumes `n < Limb::BITS`, IE, internally shifting bits. - #[inline] - pub fn ishl_bits(x: &mut Vec<Limb>, n: usize) { - // Need to shift by the number of `bits % Limb::BITS)`. - let bits = mem::size_of::<Limb>() * 8; - debug_assert!(n < bits); - if n == 0 { - return; - } - - // Internally, for each item, we shift left by n, and add the previous - // right shifted limb-bits. - // For example, we transform (for u8) shifted left 2, to: - // b10100100 b01000010 - // b10 b10010001 b00001000 - let rshift = bits - n; - let lshift = n; - let mut prev: Limb = 0; - for xi in &mut *x { - let tmp = *xi; - *xi <<= lshift; - *xi |= prev >> rshift; - prev = tmp; - } - - // Always push the carry, even if it creates a non-normal result. - let carry = prev >> rshift; - if carry != 0 { - x.push(carry); - } - } - - /// Shift-left `n` digits inside a buffer. - /// - /// Assumes `n` is not 0. - #[inline] - pub fn ishl_limbs(x: &mut Vec<Limb>, n: usize) { - debug_assert!(n != 0); - if !x.is_empty() { - x.reserve(n); - x.splice(..0, iter::repeat(0).take(n)); - } - } - - /// Shift-left buffer by n bits. - #[inline] - pub fn ishl(x: &mut Vec<Limb>, n: usize) { - let bits = mem::size_of::<Limb>() * 8; - // Need to pad with zeros for the number of `bits / Limb::BITS`, - // and shift-left with carry for `bits % Limb::BITS`. - let rem = n % bits; - let div = n / bits; - ishl_bits(x, rem); - if div != 0 { - ishl_limbs(x, div); - } - } - - // NORMALIZE - - /// Normalize the container by popping any leading zeros. - #[inline] - pub fn normalize(x: &mut Vec<Limb>) { - // Remove leading zero if we cause underflow. Since we're dividing - // by a small power, we have at max 1 int removed. - while x.last() == Some(&0) { - x.pop(); - } - } -} // small - -// LARGE -// ----- - -// Large-to-large operations, to modify a big integer from a native scalar. - -mod large { - use super::*; - - // RELATIVE OPERATORS - - /// Compare `x` to `y`, in little-endian order. - #[inline] - pub fn compare(x: &[Limb], y: &[Limb]) -> cmp::Ordering { - if x.len() > y.len() { - cmp::Ordering::Greater - } else if x.len() < y.len() { - cmp::Ordering::Less - } else { - let iter = x.iter().rev().zip(y.iter().rev()); - for (&xi, &yi) in iter { - if xi > yi { - return cmp::Ordering::Greater; - } else if xi < yi { - return cmp::Ordering::Less; - } - } - // Equal case. - cmp::Ordering::Equal - } - } - - /// Check if x is less than y. - #[inline] - pub fn less(x: &[Limb], y: &[Limb]) -> bool { - compare(x, y) == cmp::Ordering::Less - } - - /// Check if x is greater than or equal to y. - #[inline] - pub fn greater_equal(x: &[Limb], y: &[Limb]) -> bool { - !less(x, y) - } - - // ADDITION - - /// Implied AddAssign implementation for bigints. - /// - /// Allows us to choose a start-index in x to store, so we can avoid - /// padding the buffer with zeros when not needed, optimized for vectors. - pub fn iadd_impl(x: &mut Vec<Limb>, y: &[Limb], xstart: usize) { - // The effective x buffer is from `xstart..x.len()`, so we need to treat - // that as the current range. If the effective y buffer is longer, need - // to resize to that, + the start index. - if y.len() > x.len() - xstart { - x.resize(y.len() + xstart, 0); - } - - // Iteratively add elements from y to x. - let mut carry = false; - for (xi, yi) in x[xstart..].iter_mut().zip(y.iter()) { - // Only one op of the two can overflow, since we added at max - // Limb::max_value() + Limb::max_value(). Add the previous carry, - // and store the current carry for the next. - let mut tmp = scalar::iadd(xi, *yi); - if carry { - tmp |= scalar::iadd(xi, 1); - } - carry = tmp; - } - - // Overflow from the previous bit. - if carry { - small::iadd_impl(x, 1, y.len() + xstart); - } - } - - /// AddAssign bigint to bigint. - #[inline] - pub fn iadd(x: &mut Vec<Limb>, y: &[Limb]) { - iadd_impl(x, y, 0); - } - - /// Add bigint to bigint. - #[inline] - pub fn add(x: &[Limb], y: &[Limb]) -> Vec<Limb> { - let mut z = Vec::<Limb>::default(); - z.extend_from_slice(x); - iadd(&mut z, y); - z - } - - // SUBTRACTION - - /// SubAssign bigint to bigint. - pub fn isub(x: &mut Vec<Limb>, y: &[Limb]) { - // Basic underflow checks. - debug_assert!(greater_equal(x, y)); - - // Iteratively add elements from y to x. - let mut carry = false; - for (xi, yi) in x.iter_mut().zip(y.iter()) { - // Only one op of the two can overflow, since we added at max - // Limb::max_value() + Limb::max_value(). Add the previous carry, - // and store the current carry for the next. - let mut tmp = scalar::isub(xi, *yi); - if carry { - tmp |= scalar::isub(xi, 1); - } - carry = tmp; - } - - if carry { - small::isub_impl(x, 1, y.len()); - } else { - small::normalize(x); - } - } - - // MULTIPLICATION - - /// Number of digits to bottom-out to asymptotically slow algorithms. - /// - /// Karatsuba tends to out-perform long-multiplication at ~320-640 bits, - /// so we go halfway, while Newton division tends to out-perform - /// Algorithm D at ~1024 bits. We can toggle this for optimal performance. - pub const KARATSUBA_CUTOFF: usize = 32; - - /// Grade-school multiplication algorithm. - /// - /// Slow, naive algorithm, using limb-bit bases and just shifting left for - /// each iteration. This could be optimized with numerous other algorithms, - /// but it's extremely simple, and works in O(n*m) time, which is fine - /// by me. Each iteration, of which there are `m` iterations, requires - /// `n` multiplications, and `n` additions, or grade-school multiplication. - fn long_mul(x: &[Limb], y: &[Limb]) -> Vec<Limb> { - // Using the immutable value, multiply by all the scalars in y, using - // the algorithm defined above. Use a single buffer to avoid - // frequent reallocations. Handle the first case to avoid a redundant - // addition, since we know y.len() >= 1. - let mut z: Vec<Limb> = small::mul(x, y[0]); - z.resize(x.len() + y.len(), 0); - - // Handle the iterative cases. - for (i, &yi) in y[1..].iter().enumerate() { - let zi: Vec<Limb> = small::mul(x, yi); - iadd_impl(&mut z, &zi, i + 1); - } - - small::normalize(&mut z); - - z - } - - /// Split two buffers into halfway, into (lo, hi). - #[inline] - pub fn karatsuba_split(z: &[Limb], m: usize) -> (&[Limb], &[Limb]) { - (&z[..m], &z[m..]) - } - - /// Karatsuba multiplication algorithm with roughly equal input sizes. - /// - /// Assumes `y.len() >= x.len()`. - fn karatsuba_mul(x: &[Limb], y: &[Limb]) -> Vec<Limb> { - if y.len() <= KARATSUBA_CUTOFF { - // Bottom-out to long division for small cases. - long_mul(x, y) - } else if x.len() < y.len() / 2 { - karatsuba_uneven_mul(x, y) - } else { - // Do our 3 multiplications. - let m = y.len() / 2; - let (xl, xh) = karatsuba_split(x, m); - let (yl, yh) = karatsuba_split(y, m); - let sumx = add(xl, xh); - let sumy = add(yl, yh); - let z0 = karatsuba_mul(xl, yl); - let mut z1 = karatsuba_mul(&sumx, &sumy); - let z2 = karatsuba_mul(xh, yh); - // Properly scale z1, which is `z1 - z2 - zo`. - isub(&mut z1, &z2); - isub(&mut z1, &z0); - - // Create our result, which is equal to, in little-endian order: - // [z0, z1 - z2 - z0, z2] - // z1 must be shifted m digits (2^(32m)) over. - // z2 must be shifted 2*m digits (2^(64m)) over. - let len = z0.len().max(m + z1.len()).max(2 * m + z2.len()); - let mut result = z0; - result.reserve_exact(len - result.len()); - iadd_impl(&mut result, &z1, m); - iadd_impl(&mut result, &z2, 2 * m); - - result - } - } - - /// Karatsuba multiplication algorithm where y is substantially larger than x. - /// - /// Assumes `y.len() >= x.len()`. - fn karatsuba_uneven_mul(x: &[Limb], mut y: &[Limb]) -> Vec<Limb> { - let mut result = Vec::<Limb>::default(); - result.resize(x.len() + y.len(), 0); - - // This effectively is like grade-school multiplication between - // two numbers, except we're using splits on `y`, and the intermediate - // step is a Karatsuba multiplication. - let mut start = 0; - while !y.is_empty() { - let m = x.len().min(y.len()); - let (yl, yh) = karatsuba_split(y, m); - let prod = karatsuba_mul(x, yl); - iadd_impl(&mut result, &prod, start); - y = yh; - start += m; - } - small::normalize(&mut result); - - result - } - - /// Forwarder to the proper Karatsuba algorithm. - #[inline] - fn karatsuba_mul_fwd(x: &[Limb], y: &[Limb]) -> Vec<Limb> { - if x.len() < y.len() { - karatsuba_mul(x, y) - } else { - karatsuba_mul(y, x) - } - } - - /// MulAssign bigint to bigint. - #[inline] - pub fn imul(x: &mut Vec<Limb>, y: &[Limb]) { - if y.len() == 1 { - small::imul(x, y[0]); - } else { - // We're not really in a condition where using Karatsuba - // multiplication makes sense, so we're just going to use long - // division. ~20% speedup compared to: - // *x = karatsuba_mul_fwd(x, y); - *x = karatsuba_mul_fwd(x, y); - } - } -} // large - -// TRAITS -// ------ - -/// Traits for shared operations for big integers. -/// -/// None of these are implemented using normal traits, since these -/// are very expensive operations, and we want to deliberately -/// and explicitly use these functions. -pub(crate) trait Math: Clone + Sized + Default { - // DATA - - /// Get access to the underlying data - fn data(&self) -> &Vec<Limb>; - - /// Get access to the underlying data - fn data_mut(&mut self) -> &mut Vec<Limb>; - - // RELATIVE OPERATIONS - - /// Compare self to y. - #[inline] - fn compare(&self, y: &Self) -> cmp::Ordering { - large::compare(self.data(), y.data()) - } - - // PROPERTIES - - /// Get the high 64-bits from the bigint and if there are remaining bits. - #[inline] - fn hi64(&self) -> (u64, bool) { - self.data().as_slice().hi64() - } - - /// Calculate the bit-length of the big-integer. - /// Returns usize::max_value() if the value overflows, - /// IE, if `self.data().len() > usize::max_value() / 8`. - #[inline] - fn bit_length(&self) -> usize { - small::bit_length(self.data()) - } - - // INTEGER CONVERSIONS - - /// Create new big integer from u64. - #[inline] - fn from_u64(x: u64) -> Self { - let mut v = Self::default(); - let slc = split_u64(x); - v.data_mut().extend_from_slice(&slc); - v.normalize(); - v - } - - // NORMALIZE - - /// Normalize the integer, so any leading zero values are removed. - #[inline] - fn normalize(&mut self) { - small::normalize(self.data_mut()); - } - - // ADDITION - - /// AddAssign small integer. - #[inline] - fn iadd_small(&mut self, y: Limb) { - small::iadd(self.data_mut(), y); - } - - // MULTIPLICATION - - /// MulAssign small integer. - #[inline] - fn imul_small(&mut self, y: Limb) { - small::imul(self.data_mut(), y); - } - - /// Multiply by a power of 2. - #[inline] - fn imul_pow2(&mut self, n: u32) { - self.ishl(n as usize); - } - - /// Multiply by a power of 5. - #[inline] - fn imul_pow5(&mut self, n: u32) { - small::imul_pow5(self.data_mut(), n); - } - - /// MulAssign by a power of 10. - #[inline] - fn imul_pow10(&mut self, n: u32) { - self.imul_pow5(n); - self.imul_pow2(n); - } - - // SHIFTS - - /// Shift-left the entire buffer n bits. - #[inline] - fn ishl(&mut self, n: usize) { - small::ishl(self.data_mut(), n); - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/mod.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/mod.rs deleted file mode 100644 index b1a45e21..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/mod.rs +++ /dev/null
@@ -1,38 +0,0 @@ -// The code in this module is derived from the `lexical` crate by @Alexhuszagh -// which the author condensed into this minimal subset for use in serde_json. -// For the serde_json use case we care more about reliably round tripping all -// possible floating point values than about parsing any arbitrarily long string -// of digits with perfect accuracy, as the latter would take a high cost in -// compile time and performance. -// -// Dual licensed as MIT and Apache 2.0 just like the rest of serde_json, but -// copyright Alexander Huszagh. - -//! Fast, minimal float-parsing algorithm. - -// MODULES -pub(crate) mod algorithm; -mod bhcomp; -mod bignum; -mod cached; -mod cached_float80; -mod digit; -mod errors; -pub(crate) mod exponent; -pub(crate) mod float; -mod large_powers; -pub(crate) mod math; -pub(crate) mod num; -pub(crate) mod parse; -pub(crate) mod rounding; -mod shift; -mod small_powers; - -#[cfg(limb_width_32)] -mod large_powers32; - -#[cfg(limb_width_64)] -mod large_powers64; - -// API -pub use self::parse::{parse_concise_float, parse_truncated_float};
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/num.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/num.rs deleted file mode 100644 index e47e003..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/num.rs +++ /dev/null
@@ -1,440 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Utilities for Rust numbers. - -use core::ops; - -/// Precalculated values of radix**i for i in range [0, arr.len()-1]. -/// Each value can be **exactly** represented as that type. -const F32_POW10: [f32; 11] = [ - 1.0, - 10.0, - 100.0, - 1000.0, - 10000.0, - 100000.0, - 1000000.0, - 10000000.0, - 100000000.0, - 1000000000.0, - 10000000000.0, -]; - -/// Precalculated values of radix**i for i in range [0, arr.len()-1]. -/// Each value can be **exactly** represented as that type. -const F64_POW10: [f64; 23] = [ - 1.0, - 10.0, - 100.0, - 1000.0, - 10000.0, - 100000.0, - 1000000.0, - 10000000.0, - 100000000.0, - 1000000000.0, - 10000000000.0, - 100000000000.0, - 1000000000000.0, - 10000000000000.0, - 100000000000000.0, - 1000000000000000.0, - 10000000000000000.0, - 100000000000000000.0, - 1000000000000000000.0, - 10000000000000000000.0, - 100000000000000000000.0, - 1000000000000000000000.0, - 10000000000000000000000.0, -]; - -/// Type that can be converted to primitive with `as`. -pub trait AsPrimitive: Sized + Copy + PartialOrd { - fn as_u32(self) -> u32; - fn as_u64(self) -> u64; - fn as_u128(self) -> u128; - fn as_usize(self) -> usize; - fn as_f32(self) -> f32; - fn as_f64(self) -> f64; -} - -macro_rules! as_primitive_impl { - ($($ty:ident)*) => { - $( - impl AsPrimitive for $ty { - #[inline] - fn as_u32(self) -> u32 { - self as u32 - } - - #[inline] - fn as_u64(self) -> u64 { - self as u64 - } - - #[inline] - fn as_u128(self) -> u128 { - self as u128 - } - - #[inline] - fn as_usize(self) -> usize { - self as usize - } - - #[inline] - fn as_f32(self) -> f32 { - self as f32 - } - - #[inline] - fn as_f64(self) -> f64 { - self as f64 - } - } - )* - }; -} - -as_primitive_impl! { u32 u64 u128 usize f32 f64 } - -/// An interface for casting between machine scalars. -pub trait AsCast: AsPrimitive { - /// Creates a number from another value that can be converted into - /// a primitive via the `AsPrimitive` trait. - fn as_cast<N: AsPrimitive>(n: N) -> Self; -} - -macro_rules! as_cast_impl { - ($ty:ident, $method:ident) => { - impl AsCast for $ty { - #[inline] - fn as_cast<N: AsPrimitive>(n: N) -> Self { - n.$method() - } - } - }; -} - -as_cast_impl!(u32, as_u32); -as_cast_impl!(u64, as_u64); -as_cast_impl!(u128, as_u128); -as_cast_impl!(usize, as_usize); -as_cast_impl!(f32, as_f32); -as_cast_impl!(f64, as_f64); - -/// Numerical type trait. -pub trait Number: AsCast + ops::Add<Output = Self> {} - -macro_rules! number_impl { - ($($ty:ident)*) => { - $( - impl Number for $ty {} - )* - }; -} - -number_impl! { u32 u64 u128 usize f32 f64 } - -/// Defines a trait that supports integral operations. -pub trait Integer: Number + ops::BitAnd<Output = Self> + ops::Shr<i32, Output = Self> { - const ZERO: Self; -} - -macro_rules! integer_impl { - ($($ty:tt)*) => { - $( - impl Integer for $ty { - const ZERO: Self = 0; - } - )* - }; -} - -integer_impl! { u32 u64 u128 usize } - -/// Type trait for the mantissa type. -pub trait Mantissa: Integer { - /// Mask to extract the high bits from the integer. - const HIMASK: Self; - /// Mask to extract the low bits from the integer. - const LOMASK: Self; - /// Full size of the integer, in bits. - const FULL: i32; - /// Half size of the integer, in bits. - const HALF: i32 = Self::FULL / 2; -} - -impl Mantissa for u64 { - const HIMASK: u64 = 0xFFFFFFFF00000000; - const LOMASK: u64 = 0x00000000FFFFFFFF; - const FULL: i32 = 64; -} - -/// Get exact exponent limit for radix. -pub trait Float: Number { - /// Unsigned type of the same size. - type Unsigned: Integer; - - /// Literal zero. - const ZERO: Self; - /// Maximum number of digits that can contribute in the mantissa. - /// - /// We can exactly represent a float in radix `b` from radix 2 if - /// `b` is divisible by 2. This function calculates the exact number of - /// digits required to exactly represent that float. - /// - /// According to the "Handbook of Floating Point Arithmetic", - /// for IEEE754, with emin being the min exponent, p2 being the - /// precision, and b being the radix, the number of digits follows as: - /// - /// `−emin + p2 + ⌊(emin + 1) log(2, b) − log(1 − 2^(−p2), b)⌋` - /// - /// For f32, this follows as: - /// emin = -126 - /// p2 = 24 - /// - /// For f64, this follows as: - /// emin = -1022 - /// p2 = 53 - /// - /// In Python: - /// `-emin + p2 + math.floor((emin+1)*math.log(2, b) - math.log(1-2**(-p2), b))` - /// - /// This was used to calculate the maximum number of digits for [2, 36]. - const MAX_DIGITS: usize; - - // MASKS - - /// Bitmask for the sign bit. - const SIGN_MASK: Self::Unsigned; - /// Bitmask for the exponent, including the hidden bit. - const EXPONENT_MASK: Self::Unsigned; - /// Bitmask for the hidden bit in exponent, which is an implicit 1 in the fraction. - const HIDDEN_BIT_MASK: Self::Unsigned; - /// Bitmask for the mantissa (fraction), excluding the hidden bit. - const MANTISSA_MASK: Self::Unsigned; - - // PROPERTIES - - /// Positive infinity as bits. - const INFINITY_BITS: Self::Unsigned; - /// Positive infinity as bits. - const NEGATIVE_INFINITY_BITS: Self::Unsigned; - /// Size of the significand (mantissa) without hidden bit. - const MANTISSA_SIZE: i32; - /// Bias of the exponet - const EXPONENT_BIAS: i32; - /// Exponent portion of a denormal float. - const DENORMAL_EXPONENT: i32; - /// Maximum exponent value in float. - const MAX_EXPONENT: i32; - - // ROUNDING - - /// Default number of bits to shift (or 64 - mantissa size - 1). - const DEFAULT_SHIFT: i32; - /// Mask to determine if a full-carry occurred (1 in bit above hidden bit). - const CARRY_MASK: u64; - - /// Get min and max exponent limits (exact) from radix. - fn exponent_limit() -> (i32, i32); - - /// Get the number of digits that can be shifted from exponent to mantissa. - fn mantissa_limit() -> i32; - - // Re-exported methods from std. - fn pow10(self, n: i32) -> Self; - fn from_bits(u: Self::Unsigned) -> Self; - fn to_bits(self) -> Self::Unsigned; - fn is_sign_positive(self) -> bool; - fn is_sign_negative(self) -> bool; - - /// Returns true if the float is a denormal. - #[inline] - fn is_denormal(self) -> bool { - self.to_bits() & Self::EXPONENT_MASK == Self::Unsigned::ZERO - } - - /// Returns true if the float is a NaN or Infinite. - #[inline] - fn is_special(self) -> bool { - self.to_bits() & Self::EXPONENT_MASK == Self::EXPONENT_MASK - } - - /// Returns true if the float is infinite. - #[inline] - fn is_inf(self) -> bool { - self.is_special() && (self.to_bits() & Self::MANTISSA_MASK) == Self::Unsigned::ZERO - } - - /// Get exponent component from the float. - #[inline] - fn exponent(self) -> i32 { - if self.is_denormal() { - return Self::DENORMAL_EXPONENT; - } - - let bits = self.to_bits(); - let biased_e = ((bits & Self::EXPONENT_MASK) >> Self::MANTISSA_SIZE).as_u32(); - biased_e as i32 - Self::EXPONENT_BIAS - } - - /// Get mantissa (significand) component from float. - #[inline] - fn mantissa(self) -> Self::Unsigned { - let bits = self.to_bits(); - let s = bits & Self::MANTISSA_MASK; - if !self.is_denormal() { - s + Self::HIDDEN_BIT_MASK - } else { - s - } - } - - /// Get next greater float for a positive float. - /// Value must be >= 0.0 and < INFINITY. - #[inline] - fn next_positive(self) -> Self { - debug_assert!(self.is_sign_positive() && !self.is_inf()); - Self::from_bits(self.to_bits() + Self::Unsigned::as_cast(1u32)) - } - - /// Round a positive number to even. - #[inline] - fn round_positive_even(self) -> Self { - if self.mantissa() & Self::Unsigned::as_cast(1u32) == Self::Unsigned::as_cast(1u32) { - self.next_positive() - } else { - self - } - } -} - -impl Float for f32 { - type Unsigned = u32; - - const ZERO: f32 = 0.0; - const MAX_DIGITS: usize = 114; - const SIGN_MASK: u32 = 0x80000000; - const EXPONENT_MASK: u32 = 0x7F800000; - const HIDDEN_BIT_MASK: u32 = 0x00800000; - const MANTISSA_MASK: u32 = 0x007FFFFF; - const INFINITY_BITS: u32 = 0x7F800000; - const NEGATIVE_INFINITY_BITS: u32 = Self::INFINITY_BITS | Self::SIGN_MASK; - const MANTISSA_SIZE: i32 = 23; - const EXPONENT_BIAS: i32 = 127 + Self::MANTISSA_SIZE; - const DENORMAL_EXPONENT: i32 = 1 - Self::EXPONENT_BIAS; - const MAX_EXPONENT: i32 = 0xFF - Self::EXPONENT_BIAS; - const DEFAULT_SHIFT: i32 = u64::FULL - f32::MANTISSA_SIZE - 1; - const CARRY_MASK: u64 = 0x1000000; - - #[inline] - fn exponent_limit() -> (i32, i32) { - (-10, 10) - } - - #[inline] - fn mantissa_limit() -> i32 { - 7 - } - - #[inline] - fn pow10(self, n: i32) -> f32 { - // Check the exponent is within bounds in debug builds. - debug_assert!({ - let (min, max) = Self::exponent_limit(); - n >= min && n <= max - }); - - if n > 0 { - self * F32_POW10[n as usize] - } else { - self / F32_POW10[-n as usize] - } - } - - #[inline] - fn from_bits(u: u32) -> f32 { - f32::from_bits(u) - } - - #[inline] - fn to_bits(self) -> u32 { - f32::to_bits(self) - } - - #[inline] - fn is_sign_positive(self) -> bool { - f32::is_sign_positive(self) - } - - #[inline] - fn is_sign_negative(self) -> bool { - f32::is_sign_negative(self) - } -} - -impl Float for f64 { - type Unsigned = u64; - - const ZERO: f64 = 0.0; - const MAX_DIGITS: usize = 769; - const SIGN_MASK: u64 = 0x8000000000000000; - const EXPONENT_MASK: u64 = 0x7FF0000000000000; - const HIDDEN_BIT_MASK: u64 = 0x0010000000000000; - const MANTISSA_MASK: u64 = 0x000FFFFFFFFFFFFF; - const INFINITY_BITS: u64 = 0x7FF0000000000000; - const NEGATIVE_INFINITY_BITS: u64 = Self::INFINITY_BITS | Self::SIGN_MASK; - const MANTISSA_SIZE: i32 = 52; - const EXPONENT_BIAS: i32 = 1023 + Self::MANTISSA_SIZE; - const DENORMAL_EXPONENT: i32 = 1 - Self::EXPONENT_BIAS; - const MAX_EXPONENT: i32 = 0x7FF - Self::EXPONENT_BIAS; - const DEFAULT_SHIFT: i32 = u64::FULL - f64::MANTISSA_SIZE - 1; - const CARRY_MASK: u64 = 0x20000000000000; - - #[inline] - fn exponent_limit() -> (i32, i32) { - (-22, 22) - } - - #[inline] - fn mantissa_limit() -> i32 { - 15 - } - - #[inline] - fn pow10(self, n: i32) -> f64 { - // Check the exponent is within bounds in debug builds. - debug_assert!({ - let (min, max) = Self::exponent_limit(); - n >= min && n <= max - }); - - if n > 0 { - self * F64_POW10[n as usize] - } else { - self / F64_POW10[-n as usize] - } - } - - #[inline] - fn from_bits(u: u64) -> f64 { - f64::from_bits(u) - } - - #[inline] - fn to_bits(self) -> u64 { - f64::to_bits(self) - } - - #[inline] - fn is_sign_positive(self) -> bool { - f64::is_sign_positive(self) - } - - #[inline] - fn is_sign_negative(self) -> bool { - f64::is_sign_negative(self) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/parse.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/parse.rs deleted file mode 100644 index e3d7f1e..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/parse.rs +++ /dev/null
@@ -1,83 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -use super::algorithm::*; -use super::bhcomp::*; -use super::digit::*; -use super::exponent::*; -use super::num::*; - -// PARSERS -// ------- - -/// Parse float for which the entire integer and fraction parts fit into a 64 -/// bit mantissa. -pub fn parse_concise_float<F>(mantissa: u64, mant_exp: i32) -> F -where - F: Float, -{ - if let Some(float) = fast_path(mantissa, mant_exp) { - return float; - } - - // Moderate path (use an extended 80-bit representation). - let truncated = false; - let (fp, valid) = moderate_path::<F>(mantissa, mant_exp, truncated); - if valid { - return fp.into_float::<F>(); - } - - let b = fp.into_downward_float::<F>(); - if b.is_special() { - // We have a non-finite number, we get to leave early. - return b; - } - - // Slow path, fast path didn't work. - let mut buffer = itoa::Buffer::new(); - let integer = buffer.format(mantissa).as_bytes(); - let fraction = &[]; - bhcomp(b, integer, fraction, mant_exp) -} - -/// Parse float from extracted float components. -/// -/// * `integer` - Slice containing the integer digits. -/// * `fraction` - Slice containing the fraction digits. -/// * `exponent` - Parsed, 32-bit exponent. -/// -/// Precondition: The integer must not have leading zeros. -pub fn parse_truncated_float<F>(integer: &[u8], mut fraction: &[u8], exponent: i32) -> F -where - F: Float, -{ - // Trim trailing zeroes from the fraction part. - while fraction.last() == Some(&b'0') { - fraction = &fraction[..fraction.len() - 1]; - } - - // Calculate the number of truncated digits. - let mut truncated = 0; - let mut mantissa: u64 = 0; - let mut iter = integer.iter().chain(fraction); - for &c in &mut iter { - mantissa = match add_digit(mantissa, to_digit(c).unwrap()) { - Some(v) => v, - None => { - truncated = 1 + iter.count(); - break; - } - }; - } - - let mant_exp = mantissa_exponent(exponent, fraction.len(), truncated); - let is_truncated = true; - - fallback_path( - integer, - fraction, - mantissa, - exponent, - mant_exp, - is_truncated, - ) -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/rounding.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/rounding.rs deleted file mode 100644 index 6ec1292..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/rounding.rs +++ /dev/null
@@ -1,231 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Defines rounding schemes for floating-point numbers. - -use super::float::ExtendedFloat; -use super::num::*; -use super::shift::*; -use core::mem; - -// MASKS - -/// Calculate a scalar factor of 2 above the halfway point. -#[inline] -pub(crate) fn nth_bit(n: u64) -> u64 { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!(n < bits, "nth_bit() overflow in shl."); - - 1 << n -} - -/// Generate a bitwise mask for the lower `n` bits. -#[inline] -pub(crate) fn lower_n_mask(n: u64) -> u64 { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!(n <= bits, "lower_n_mask() overflow in shl."); - - if n == bits { - u64::max_value() - } else { - (1 << n) - 1 - } -} - -/// Calculate the halfway point for the lower `n` bits. -#[inline] -pub(crate) fn lower_n_halfway(n: u64) -> u64 { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!(n <= bits, "lower_n_halfway() overflow in shl."); - - if n == 0 { - 0 - } else { - nth_bit(n - 1) - } -} - -/// Calculate a bitwise mask with `n` 1 bits starting at the `bit` position. -#[inline] -pub(crate) fn internal_n_mask(bit: u64, n: u64) -> u64 { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!(bit <= bits, "internal_n_halfway() overflow in shl."); - debug_assert!(n <= bits, "internal_n_halfway() overflow in shl."); - debug_assert!(bit >= n, "internal_n_halfway() overflow in sub."); - - lower_n_mask(bit) ^ lower_n_mask(bit - n) -} - -// NEAREST ROUNDING - -// Shift right N-bytes and round to the nearest. -// -// Return if we are above halfway and if we are halfway. -#[inline] -pub(crate) fn round_nearest(fp: &mut ExtendedFloat, shift: i32) -> (bool, bool) { - // Extract the truncated bits using mask. - // Calculate if the value of the truncated bits are either above - // the mid-way point, or equal to it. - // - // For example, for 4 truncated bytes, the mask would be b1111 - // and the midway point would be b1000. - let mask: u64 = lower_n_mask(shift as u64); - let halfway: u64 = lower_n_halfway(shift as u64); - - let truncated_bits = fp.mant & mask; - let is_above = truncated_bits > halfway; - let is_halfway = truncated_bits == halfway; - - // Bit shift so the leading bit is in the hidden bit. - overflowing_shr(fp, shift); - - (is_above, is_halfway) -} - -// Tie rounded floating point to event. -#[inline] -pub(crate) fn tie_even(fp: &mut ExtendedFloat, is_above: bool, is_halfway: bool) { - // Extract the last bit after shifting (and determine if it is odd). - let is_odd = fp.mant & 1 == 1; - - // Calculate if we need to roundup. - // We need to roundup if we are above halfway, or if we are odd - // and at half-way (need to tie-to-even). - if is_above || (is_odd && is_halfway) { - fp.mant += 1; - } -} - -// Shift right N-bytes and round nearest, tie-to-even. -// -// Floating-point arithmetic uses round to nearest, ties to even, -// which rounds to the nearest value, if the value is halfway in between, -// round to an even value. -#[inline] -pub(crate) fn round_nearest_tie_even(fp: &mut ExtendedFloat, shift: i32) { - let (is_above, is_halfway) = round_nearest(fp, shift); - tie_even(fp, is_above, is_halfway); -} - -// DIRECTED ROUNDING - -// Shift right N-bytes and round towards a direction. -// -// Return if we have any truncated bytes. -#[inline] -fn round_toward(fp: &mut ExtendedFloat, shift: i32) -> bool { - let mask: u64 = lower_n_mask(shift as u64); - let truncated_bits = fp.mant & mask; - - // Bit shift so the leading bit is in the hidden bit. - overflowing_shr(fp, shift); - - truncated_bits != 0 -} - -// Round down. -#[inline] -fn downard(_: &mut ExtendedFloat, _: bool) {} - -// Shift right N-bytes and round toward zero. -// -// Floating-point arithmetic defines round toward zero, which rounds -// towards positive zero. -#[inline] -pub(crate) fn round_downward(fp: &mut ExtendedFloat, shift: i32) { - // Bit shift so the leading bit is in the hidden bit. - // No rounding schemes, so we just ignore everything else. - let is_truncated = round_toward(fp, shift); - downard(fp, is_truncated); -} - -// ROUND TO FLOAT - -// Shift the ExtendedFloat fraction to the fraction bits in a native float. -// -// Floating-point arithmetic uses round to nearest, ties to even, -// which rounds to the nearest value, if the value is halfway in between, -// round to an even value. -#[inline] -pub(crate) fn round_to_float<F, Algorithm>(fp: &mut ExtendedFloat, algorithm: Algorithm) -where - F: Float, - Algorithm: FnOnce(&mut ExtendedFloat, i32), -{ - // Calculate the difference to allow a single calculation - // rather than a loop, to minimize the number of ops required. - // This does underflow detection. - let final_exp = fp.exp + F::DEFAULT_SHIFT; - if final_exp < F::DENORMAL_EXPONENT { - // We would end up with a denormal exponent, try to round to more - // digits. Only shift right if we can avoid zeroing out the value, - // which requires the exponent diff to be < M::BITS. The value - // is already normalized, so we shouldn't have any issue zeroing - // out the value. - let diff = F::DENORMAL_EXPONENT - fp.exp; - if diff <= u64::FULL { - // We can avoid underflow, can get a valid representation. - algorithm(fp, diff); - } else { - // Certain underflow, assign literal 0s. - fp.mant = 0; - fp.exp = 0; - } - } else { - algorithm(fp, F::DEFAULT_SHIFT); - } - - if fp.mant & F::CARRY_MASK == F::CARRY_MASK { - // Roundup carried over to 1 past the hidden bit. - shr(fp, 1); - } -} - -// AVOID OVERFLOW/UNDERFLOW - -// Avoid overflow for large values, shift left as needed. -// -// Shift until a 1-bit is in the hidden bit, if the mantissa is not 0. -#[inline] -pub(crate) fn avoid_overflow<F>(fp: &mut ExtendedFloat) -where - F: Float, -{ - // Calculate the difference to allow a single calculation - // rather than a loop, minimizing the number of ops required. - if fp.exp >= F::MAX_EXPONENT { - let diff = fp.exp - F::MAX_EXPONENT; - if diff <= F::MANTISSA_SIZE { - // Our overflow mask needs to start at the hidden bit, or at - // `F::MANTISSA_SIZE+1`, and needs to have `diff+1` bits set, - // to see if our value overflows. - let bit = (F::MANTISSA_SIZE + 1) as u64; - let n = (diff + 1) as u64; - let mask = internal_n_mask(bit, n); - if (fp.mant & mask) == 0 { - // If we have no 1-bit in the hidden-bit position, - // which is index 0, we need to shift 1. - let shift = diff + 1; - shl(fp, shift); - } - } - } -} - -// ROUND TO NATIVE - -// Round an extended-precision float to a native float representation. -#[inline] -pub(crate) fn round_to_native<F, Algorithm>(fp: &mut ExtendedFloat, algorithm: Algorithm) -where - F: Float, - Algorithm: FnOnce(&mut ExtendedFloat, i32), -{ - // Shift all the way left, to ensure a consistent representation. - // The following right-shifts do not work for a non-normalized number. - fp.normalize(); - - // Round so the fraction is in a native mantissa representation, - // and avoid overflow/underflow. - round_to_float::<F, _>(fp, algorithm); - avoid_overflow::<F>(fp); -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/shift.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/shift.rs deleted file mode 100644 index a0bae01..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/shift.rs +++ /dev/null
@@ -1,46 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Bit-shift helpers. - -use super::float::ExtendedFloat; -use core::mem; - -// Shift extended-precision float right `shift` bytes. -#[inline] -pub(crate) fn shr(fp: &mut ExtendedFloat, shift: i32) { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!((shift as u64) < bits, "shr() overflow in shift right."); - - fp.mant >>= shift; - fp.exp += shift; -} - -// Shift extended-precision float right `shift` bytes. -// -// Accepts when the shift is the same as the type size, and -// sets the value to 0. -#[inline] -pub(crate) fn overflowing_shr(fp: &mut ExtendedFloat, shift: i32) { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!( - (shift as u64) <= bits, - "overflowing_shr() overflow in shift right." - ); - - fp.mant = if shift as u64 == bits { - 0 - } else { - fp.mant >> shift - }; - fp.exp += shift; -} - -// Shift extended-precision float left `shift` bytes. -#[inline] -pub(crate) fn shl(fp: &mut ExtendedFloat, shift: i32) { - let bits: u64 = mem::size_of::<u64>() as u64 * 8; - debug_assert!((shift as u64) < bits, "shl() overflow in shift left."); - - fp.mant <<= shift; - fp.exp -= shift; -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/small_powers.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/small_powers.rs deleted file mode 100644 index 219d8261..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/small_powers.rs +++ /dev/null
@@ -1,70 +0,0 @@ -// Adapted from https://github.com/Alexhuszagh/rust-lexical. - -//! Pre-computed small powers. - -// 32 BIT -#[cfg(limb_width_32)] -pub(crate) const POW5_32: [u32; 14] = [ - 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, - 1220703125, -]; - -#[cfg(limb_width_32)] -pub(crate) const POW10_32: [u32; 10] = [ - 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, -]; - -// 64 BIT -#[cfg(limb_width_64)] -pub(crate) const POW5_64: [u64; 28] = [ - 1, - 5, - 25, - 125, - 625, - 3125, - 15625, - 78125, - 390625, - 1953125, - 9765625, - 48828125, - 244140625, - 1220703125, - 6103515625, - 30517578125, - 152587890625, - 762939453125, - 3814697265625, - 19073486328125, - 95367431640625, - 476837158203125, - 2384185791015625, - 11920928955078125, - 59604644775390625, - 298023223876953125, - 1490116119384765625, - 7450580596923828125, -]; -pub(crate) const POW10_64: [u64; 20] = [ - 1, - 10, - 100, - 1000, - 10000, - 100000, - 1000000, - 10000000, - 100000000, - 1000000000, - 10000000000, - 100000000000, - 1000000000000, - 10000000000000, - 100000000000000, - 1000000000000000, - 10000000000000000, - 100000000000000000, - 1000000000000000000, - 10000000000000000000, -];
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lib.rs deleted file mode 100644 index af4ab22..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lib.rs +++ /dev/null
@@ -1,427 +0,0 @@ -//! # Serde jsonrc -//! -//! **This crate is a fork of [Serde JSON](https://github.com/serde-rs/json)** -//! that accepts a more lenient form of JSON. Specifically, it allows: -//! -//! - `/*` and `//` style comments. -//! - Trailing commas for object and array literals. -//! -//! This is designed to make it easier to use JSON files that are maintained -//! by hand, such as configuration files. -//! -//! JSON is a ubiquitous open-standard format that uses human-readable text to -//! transmit data objects consisting of key-value pairs. -//! -//! ```json -//! { -//! "name": "John Doe", -//! "age": 43, -//! "address": { -//! "street": "10 Downing Street", -//! "city": "London" -//! }, -//! "phones": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! } -//! ``` -//! -//! There are three common ways that you might find yourself needing to work -//! with JSON data in Rust. -//! -//! - **As text data.** An unprocessed string of JSON data that you receive on -//! an HTTP endpoint, read from a file, or prepare to send to a remote -//! server. -//! - **As an untyped or loosely typed representation.** Maybe you want to -//! check that some JSON data is valid before passing it on, but without -//! knowing the structure of what it contains. Or you want to do very basic -//! manipulations like insert a key in a particular spot. -//! - **As a strongly typed Rust data structure.** When you expect all or most -//! of your data to conform to a particular structure and want to get real -//! work done without JSON's loosey-goosey nature tripping you up. -//! -//! Serde jsonrc provides efficient, flexible, safe ways of converting data -//! between each of these representations. -//! -//! # Operating on untyped JSON values -//! -//! Any valid JSON data can be manipulated in the following recursive enum -//! representation. This data structure is [`serde_json_lenient::Value`][value]. -//! -//! ``` -//! # use serde_json_lenient::{Number, Map}; -//! # -//! # #[allow(dead_code)] -//! enum Value { -//! Null, -//! Bool(bool), -//! Number(Number), -//! String(String), -//! Array(Vec<Value>), -//! Object(Map<String, Value>), -//! } -//! ``` -//! -//! A string of JSON data can be parsed into a `serde_json_lenient::Value` by the -//! [`serde_json_lenient::from_str`][from_str] function. There is also -//! [`from_slice`][from_slice] for parsing from a byte slice &[u8] and -//! [`from_reader`][from_reader] for parsing from any `io::Read` like a File or -//! a TCP stream. -//! -//! ``` -//! use serde_json_lenient::{Result, Value}; -//! -//! fn untyped_example() -> Result<()> { -//! // Some JSON input data as a &str. Maybe this comes from the user. -//! let data = r#" -//! { -//! "name": "John Doe", -//! "age": 43, -//! "phones": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! }"#; -//! -//! // Parse the string of data into serde_json_lenient::Value. -//! let v: Value = serde_json_lenient::from_str(data)?; -//! -//! // Access parts of the data by indexing with square brackets. -//! println!("Please call {} at the number {}", v["name"], v["phones"][0]); -//! -//! Ok(()) -//! } -//! # -//! # fn main() { -//! # untyped_example().unwrap(); -//! # } -//! ``` -//! -//! The result of square bracket indexing like `v["name"]` is a borrow of the -//! data at that index, so the type is `&Value`. A JSON map can be indexed with -//! string keys, while a JSON array can be indexed with integer keys. If the -//! type of the data is not right for the type with which it is being indexed, -//! or if a map does not contain the key being indexed, or if the index into a -//! vector is out of bounds, the returned element is `Value::Null`. -//! -//! When a `Value` is printed, it is printed as a JSON string. So in the code -//! above, the output looks like `Please call "John Doe" at the number "+44 -//! 1234567"`. The quotation marks appear because `v["name"]` is a `&Value` -//! containing a JSON string and its JSON representation is `"John Doe"`. -//! Printing as a plain string without quotation marks involves converting from -//! a JSON string to a Rust string with [`as_str()`] or avoiding the use of -//! `Value` as described in the following section. -//! -//! [`as_str()`]: crate::Value::as_str -//! -//! The `Value` representation is sufficient for very basic tasks but can be -//! tedious to work with for anything more significant. Error handling is -//! verbose to implement correctly, for example imagine trying to detect the -//! presence of unrecognized fields in the input data. The compiler is powerless -//! to help you when you make a mistake, for example imagine typoing `v["name"]` -//! as `v["nmae"]` in one of the dozens of places it is used in your code. -//! -//! # Parsing JSON as strongly typed data structures -//! -//! Serde provides a powerful way of mapping JSON data into Rust data structures -//! largely automatically. -//! -//! ``` -//! use serde::{Deserialize, Serialize}; -//! use serde_json_lenient::Result; -//! -//! #[derive(Serialize, Deserialize)] -//! struct Person { -//! name: String, -//! age: u8, -//! phones: Vec<String>, -//! } -//! -//! fn typed_example() -> Result<()> { -//! // Some JSON input data as a &str. Maybe this comes from the user. -//! let data = r#" -//! { -//! "name": "John Doe", -//! "age": 43, -//! "phones": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! }"#; -//! -//! // Parse the string of data into a Person object. This is exactly the -//! // same function as the one that produced serde_json_lenient::Value above, but -//! // now we are asking it for a Person as output. -//! let p: Person = serde_json_lenient::from_str(data)?; -//! -//! // Do things just like with any other Rust data structure. -//! println!("Please call {} at the number {}", p.name, p.phones[0]); -//! -//! Ok(()) -//! } -//! # -//! # fn main() { -//! # typed_example().unwrap(); -//! # } -//! ``` -//! -//! This is the same `serde_json_lenient::from_str` function as before, but this time we -//! assign the return value to a variable of type `Person` so Serde will -//! automatically interpret the input data as a `Person` and produce informative -//! error messages if the layout does not conform to what a `Person` is expected -//! to look like. -//! -//! Any type that implements Serde's `Deserialize` trait can be deserialized -//! this way. This includes built-in Rust standard library types like `Vec<T>` -//! and `HashMap<K, V>`, as well as any structs or enums annotated with -//! `#[derive(Deserialize)]`. -//! -//! Once we have `p` of type `Person`, our IDE and the Rust compiler can help us -//! use it correctly like they do for any other Rust code. The IDE can -//! autocomplete field names to prevent typos, which was impossible in the -//! `serde_json_lenient::Value` representation. And the Rust compiler can check that -//! when we write `p.phones[0]`, then `p.phones` is guaranteed to be a -//! `Vec<String>` so indexing into it makes sense and produces a `String`. -//! -//! # Constructing JSON values -//! -//! Serde jsonrc provides a [`json!` macro][macro] to build `serde_json_lenient::Value` -//! objects with very natural JSON syntax. -//! -//! ``` -//! use serde_json_lenient::json; -//! -//! fn main() { -//! // The type of `john` is `serde_json_lenient::Value` -//! let john = json!({ -//! "name": "John Doe", -//! "age": 43, -//! "phones": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! }); -//! -//! println!("first phone number: {}", john["phones"][0]); -//! -//! // Convert to a string of JSON and print it out -//! println!("{}", john.to_string()); -//! } -//! ``` -//! -//! The `Value::to_string()` function converts a `serde_json_lenient::Value` into a -//! `String` of JSON text. -//! -//! One neat thing about the `json!` macro is that variables and expressions can -//! be interpolated directly into the JSON value as you are building it. Serde -//! will check at compile time that the value you are interpolating is able to -//! be represented as JSON. -//! -//! ``` -//! # use serde_json_lenient::json; -//! # -//! # fn random_phone() -> u16 { 0 } -//! # -//! let full_name = "John Doe"; -//! let age_last_year = 42; -//! -//! // The type of `john` is `serde_json_lenient::Value` -//! let john = json!({ -//! "name": full_name, -//! "age": age_last_year + 1, -//! "phones": [ -//! format!("+44 {}", random_phone()) -//! ] -//! }); -//! ``` -//! -//! This is amazingly convenient, but we have the problem we had before with -//! `Value`: the IDE and Rust compiler cannot help us if we get it wrong. Serde -//! JSON provides a better way of serializing strongly-typed data structures -//! into JSON text. -//! -//! # Creating JSON by serializing data structures -//! -//! A data structure can be converted to a JSON string by -//! [`serde_json_lenient::to_string`][to_string]. There is also -//! [`serde_json_lenient::to_vec`][to_vec] which serializes to a `Vec<u8>` and -//! [`serde_json_lenient::to_writer`][to_writer] which serializes to any `io::Write` -//! such as a File or a TCP stream. -//! -//! ``` -//! use serde::{Deserialize, Serialize}; -//! use serde_json_lenient::Result; -//! -//! #[derive(Serialize, Deserialize)] -//! struct Address { -//! street: String, -//! city: String, -//! } -//! -//! fn print_an_address() -> Result<()> { -//! // Some data structure. -//! let address = Address { -//! street: "10 Downing Street".to_owned(), -//! city: "London".to_owned(), -//! }; -//! -//! // Serialize it to a JSON string. -//! let j = serde_json_lenient::to_string(&address)?; -//! -//! // Print, write to a file, or send to an HTTP server. -//! println!("{}", j); -//! -//! Ok(()) -//! } -//! # -//! # fn main() { -//! # print_an_address().unwrap(); -//! # } -//! ``` -//! -//! Any type that implements Serde's `Serialize` trait can be serialized this -//! way. This includes built-in Rust standard library types like `Vec<T>` and -//! `HashMap<K, V>`, as well as any structs or enums annotated with -//! `#[derive(Serialize)]`. -//! -//! # No-std support -//! -//! As long as there is a memory allocator, it is possible to use serde_json -//! without the rest of the Rust standard library. Disable the default "std" -//! feature and enable the "alloc" feature: -//! -//! ```toml -//! [dependencies] -//! serde_json_lenient = { version = "1.0", default-features = false, features = ["alloc"] } -//! ``` -//! -//! For JSON support in Serde without a memory allocator, please see the -//! [`serde-json-core`] crate. -//! -//! [value]: crate::value::Value -//! [from_str]: crate::de::from_str -//! [from_slice]: crate::de::from_slice -//! [from_reader]: crate::de::from_reader -//! [to_string]: crate::ser::to_string -//! [to_vec]: crate::ser::to_vec -//! [to_writer]: crate::ser::to_writer -//! [macro]: crate::json -//! [`serde-json-core`]: https://github.com/rust-embedded-community/serde-json-core - -#![doc(html_root_url = "https://docs.rs/serde_json_lenient/0.1.8")] -// Ignored clippy lints -#![allow( - clippy::collapsible_else_if, - clippy::comparison_chain, - clippy::deprecated_cfg_attr, - clippy::doc_markdown, - clippy::excessive_precision, - clippy::explicit_auto_deref, - clippy::float_cmp, - clippy::manual_range_contains, - clippy::match_like_matches_macro, - clippy::match_single_binding, - clippy::needless_doctest_main, - clippy::needless_late_init, - clippy::return_self_not_must_use, - clippy::transmute_ptr_to_ptr, - clippy::unnecessary_wraps -)] -// Ignored clippy_pedantic lints -#![allow( - // Deserializer::from_str, into_iter - clippy::should_implement_trait, - // integer and float ser/de requires these sorts of casts - clippy::cast_possible_truncation, - clippy::cast_possible_wrap, - clippy::cast_precision_loss, - clippy::cast_sign_loss, - // correctly used - clippy::enum_glob_use, - clippy::if_not_else, - clippy::integer_division, - clippy::let_underscore_untyped, - clippy::map_err_ignore, - clippy::match_same_arms, - clippy::similar_names, - clippy::unused_self, - clippy::wildcard_imports, - // things are often more readable this way - clippy::cast_lossless, - clippy::module_name_repetitions, - clippy::redundant_else, - clippy::shadow_unrelated, - clippy::single_match_else, - clippy::too_many_lines, - clippy::unreadable_literal, - clippy::unseparated_literal_suffix, - clippy::use_self, - clippy::zero_prefixed_literal, - // we support older compilers - clippy::checked_conversions, - clippy::mem_replace_with_default, - // noisy - clippy::missing_errors_doc, - clippy::must_use_candidate, -)] -// Restrictions -#![deny(clippy::question_mark_used)] -#![allow(non_upper_case_globals)] -#![deny(missing_docs)] -#![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(docsrs, feature(doc_cfg))] - -extern crate alloc; - -#[cfg(feature = "std")] -#[doc(inline)] -pub use crate::de::from_reader; -#[doc(inline)] -pub use crate::de::{from_slice, from_str, from_str_lenient, Deserializer, StreamDeserializer}; -#[doc(inline)] -pub use crate::error::{Error, Result}; -#[doc(inline)] -pub use crate::ser::{to_string, to_string_pretty, to_vec, to_vec_pretty}; -#[cfg(feature = "std")] -#[doc(inline)] -pub use crate::ser::{to_writer, to_writer_pretty, Serializer}; -#[doc(inline)] -pub use crate::value::{from_value, to_value, Map, Number, Value}; - -// We only use our own error type; no need for From conversions provided by the -// standard library's try! macro. This reduces lines of LLVM IR by 4%. -macro_rules! tri { - ($e:expr $(,)?) => { - match $e { - core::result::Result::Ok(val) => val, - core::result::Result::Err(err) => return core::result::Result::Err(err), - } - }; -} - -#[macro_use] -mod macros; - -pub mod de; -pub mod error; -pub mod map; -#[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -pub mod ser; -#[cfg(not(feature = "std"))] -mod ser; -pub mod value; - -mod features_check; - -mod io; -#[cfg(feature = "std")] -mod iter; -#[cfg(feature = "float_roundtrip")] -mod lexical; -mod number; -mod read; - -#[cfg(feature = "raw_value")] -mod raw;
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/macros.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/macros.rs deleted file mode 100644 index 7ab556d..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/macros.rs +++ /dev/null
@@ -1,304 +0,0 @@ -/// Construct a `serde_json_lenient::Value` from a JSON literal. -/// -/// ``` -/// # use serde_json_lenient::json; -/// # -/// let value = json!({ -/// "code": 200, -/// "success": true, -/// "payload": { -/// "features": [ -/// "serde", -/// "json" -/// ], -/// "homepage": null -/// } -/// }); -/// ``` -/// -/// Variables or expressions can be interpolated into the JSON literal. Any type -/// interpolated into an array element or object value must implement Serde's -/// `Serialize` trait, while any type interpolated into a object key must -/// implement `Into<String>`. If the `Serialize` implementation of the -/// interpolated type decides to fail, or if the interpolated type contains a -/// map with non-string keys, the `json!` macro will panic. -/// -/// ``` -/// # use serde_json_lenient::json; -/// # -/// let code = 200; -/// let features = vec!["serde", "json"]; -/// -/// let value = json!({ -/// "code": code, -/// "success": code == 200, -/// "payload": { -/// features[0]: features[1] -/// } -/// }); -/// ``` -/// -/// Trailing commas are allowed inside both arrays and objects. -/// -/// ``` -/// # use serde_json_lenient::json; -/// # -/// let value = json!([ -/// "notice", -/// "the", -/// "trailing", -/// "comma -->", -/// ]); -/// ``` -#[macro_export(local_inner_macros)] -macro_rules! json { - // Hide distracting implementation details from the generated rustdoc. - ($($json:tt)+) => { - json_internal!($($json)+) - }; -} - -// Rocket relies on this because they export their own `json!` with a different -// doc comment than ours, and various Rust bugs prevent them from calling our -// `json!` from their `json!` so they call `json_internal!` directly. Check with -// @SergioBenitez before making breaking changes to this macro. -// -// Changes are fine as long as `json_internal!` does not call any new helper -// macros and can still be invoked as `json_internal!($($json)+)`. -#[macro_export(local_inner_macros)] -#[doc(hidden)] -macro_rules! json_internal { - ////////////////////////////////////////////////////////////////////////// - // TT muncher for parsing the inside of an array [...]. Produces a vec![...] - // of the elements. - // - // Must be invoked as: json_internal!(@array [] $($tt)*) - ////////////////////////////////////////////////////////////////////////// - - // Done with trailing comma. - (@array [$($elems:expr,)*]) => { - json_internal_vec![$($elems,)*] - }; - - // Done without trailing comma. - (@array [$($elems:expr),*]) => { - json_internal_vec![$($elems),*] - }; - - // Next element is `null`. - (@array [$($elems:expr,)*] null $($rest:tt)*) => { - json_internal!(@array [$($elems,)* json_internal!(null)] $($rest)*) - }; - - // Next element is `true`. - (@array [$($elems:expr,)*] true $($rest:tt)*) => { - json_internal!(@array [$($elems,)* json_internal!(true)] $($rest)*) - }; - - // Next element is `false`. - (@array [$($elems:expr,)*] false $($rest:tt)*) => { - json_internal!(@array [$($elems,)* json_internal!(false)] $($rest)*) - }; - - // Next element is an array. - (@array [$($elems:expr,)*] [$($array:tt)*] $($rest:tt)*) => { - json_internal!(@array [$($elems,)* json_internal!([$($array)*])] $($rest)*) - }; - - // Next element is a map. - (@array [$($elems:expr,)*] {$($map:tt)*} $($rest:tt)*) => { - json_internal!(@array [$($elems,)* json_internal!({$($map)*})] $($rest)*) - }; - - // Next element is an expression followed by comma. - (@array [$($elems:expr,)*] $next:expr, $($rest:tt)*) => { - json_internal!(@array [$($elems,)* json_internal!($next),] $($rest)*) - }; - - // Last element is an expression with no trailing comma. - (@array [$($elems:expr,)*] $last:expr) => { - json_internal!(@array [$($elems,)* json_internal!($last)]) - }; - - // Comma after the most recent element. - (@array [$($elems:expr),*] , $($rest:tt)*) => { - json_internal!(@array [$($elems,)*] $($rest)*) - }; - - // Unexpected token after most recent element. - (@array [$($elems:expr),*] $unexpected:tt $($rest:tt)*) => { - json_unexpected!($unexpected) - }; - - ////////////////////////////////////////////////////////////////////////// - // TT muncher for parsing the inside of an object {...}. Each entry is - // inserted into the given map variable. - // - // Must be invoked as: json_internal!(@object $map () ($($tt)*) ($($tt)*)) - // - // We require two copies of the input tokens so that we can match on one - // copy and trigger errors on the other copy. - ////////////////////////////////////////////////////////////////////////// - - // Done. - (@object $object:ident () () ()) => {}; - - // Insert the current entry followed by trailing comma. - (@object $object:ident [$($key:tt)+] ($value:expr) , $($rest:tt)*) => { - let _ = $object.insert(($($key)+).into(), $value); - json_internal!(@object $object () ($($rest)*) ($($rest)*)); - }; - - // Current entry followed by unexpected token. - (@object $object:ident [$($key:tt)+] ($value:expr) $unexpected:tt $($rest:tt)*) => { - json_unexpected!($unexpected); - }; - - // Insert the last entry without trailing comma. - (@object $object:ident [$($key:tt)+] ($value:expr)) => { - let _ = $object.insert(($($key)+).into(), $value); - }; - - // Next value is `null`. - (@object $object:ident ($($key:tt)+) (: null $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!(null)) $($rest)*); - }; - - // Next value is `true`. - (@object $object:ident ($($key:tt)+) (: true $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!(true)) $($rest)*); - }; - - // Next value is `false`. - (@object $object:ident ($($key:tt)+) (: false $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!(false)) $($rest)*); - }; - - // Next value is an array. - (@object $object:ident ($($key:tt)+) (: [$($array:tt)*] $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!([$($array)*])) $($rest)*); - }; - - // Next value is a map. - (@object $object:ident ($($key:tt)+) (: {$($map:tt)*} $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!({$($map)*})) $($rest)*); - }; - - // Next value is an expression followed by comma. - (@object $object:ident ($($key:tt)+) (: $value:expr , $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!($value)) , $($rest)*); - }; - - // Last value is an expression with no trailing comma. - (@object $object:ident ($($key:tt)+) (: $value:expr) $copy:tt) => { - json_internal!(@object $object [$($key)+] (json_internal!($value))); - }; - - // Missing value for last entry. Trigger a reasonable error message. - (@object $object:ident ($($key:tt)+) (:) $copy:tt) => { - // "unexpected end of macro invocation" - json_internal!(); - }; - - // Missing colon and value for last entry. Trigger a reasonable error - // message. - (@object $object:ident ($($key:tt)+) () $copy:tt) => { - // "unexpected end of macro invocation" - json_internal!(); - }; - - // Misplaced colon. Trigger a reasonable error message. - (@object $object:ident () (: $($rest:tt)*) ($colon:tt $($copy:tt)*)) => { - // Takes no arguments so "no rules expected the token `:`". - json_unexpected!($colon); - }; - - // Found a comma inside a key. Trigger a reasonable error message. - (@object $object:ident ($($key:tt)*) (, $($rest:tt)*) ($comma:tt $($copy:tt)*)) => { - // Takes no arguments so "no rules expected the token `,`". - json_unexpected!($comma); - }; - - // Key is fully parenthesized. This avoids clippy double_parens false - // positives because the parenthesization may be necessary here. - (@object $object:ident () (($key:expr) : $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object ($key) (: $($rest)*) (: $($rest)*)); - }; - - // Refuse to absorb colon token into key expression. - (@object $object:ident ($($key:tt)*) (: $($unexpected:tt)+) $copy:tt) => { - json_expect_expr_comma!($($unexpected)+); - }; - - // Munch a token into the current key. - (@object $object:ident ($($key:tt)*) ($tt:tt $($rest:tt)*) $copy:tt) => { - json_internal!(@object $object ($($key)* $tt) ($($rest)*) ($($rest)*)); - }; - - ////////////////////////////////////////////////////////////////////////// - // The main implementation. - // - // Must be invoked as: json_internal!($($json)+) - ////////////////////////////////////////////////////////////////////////// - - (null) => { - $crate::Value::Null - }; - - (true) => { - $crate::Value::Bool(true) - }; - - (false) => { - $crate::Value::Bool(false) - }; - - ([]) => { - $crate::Value::Array(json_internal_vec![]) - }; - - ([ $($tt:tt)+ ]) => { - $crate::Value::Array(json_internal!(@array [] $($tt)+)) - }; - - ({}) => { - $crate::Value::Object($crate::Map::new()) - }; - - ({ $($tt:tt)+ }) => { - $crate::Value::Object({ - let mut object = $crate::Map::new(); - json_internal!(@object object () ($($tt)+) ($($tt)+)); - object - }) - }; - - // Any Serialize type: numbers, strings, struct literals, variables etc. - // Must be below every other rule. - ($other:expr) => { - $crate::to_value(&$other).unwrap() - }; -} - -// The json_internal macro above cannot invoke vec directly because it uses -// local_inner_macros. A vec invocation there would resolve to $crate::vec. -// Instead invoke vec here outside of local_inner_macros. -#[macro_export] -#[doc(hidden)] -macro_rules! json_internal_vec { - ($($content:tt)*) => { - vec![$($content)*] - }; -} - -#[macro_export] -#[doc(hidden)] -macro_rules! json_unexpected { - () => {}; -} - -#[macro_export] -#[doc(hidden)] -macro_rules! json_expect_expr_comma { - ($e:expr , $($tt:tt)*) => {}; -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/map.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/map.rs deleted file mode 100644 index f4ffcca..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/map.rs +++ /dev/null
@@ -1,940 +0,0 @@ -//! A map of String to serde_json_lenient::Value. -//! -//! By default the map is backed by a [`BTreeMap`]. Enable the `preserve_order` -//! feature of serde_json_lenient to use [`IndexMap`] instead. -//! -//! [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html -//! [`IndexMap`]: https://docs.rs/indexmap/*/indexmap/map/struct.IndexMap.html - -use crate::value::Value; -use alloc::string::String; -use core::borrow::Borrow; -use core::fmt::{self, Debug}; -use core::hash::Hash; -use core::iter::FusedIterator; -#[cfg(feature = "preserve_order")] -use core::mem; -use core::ops; -use serde::de; - -#[cfg(not(feature = "preserve_order"))] -use alloc::collections::{btree_map, BTreeMap}; -#[cfg(feature = "preserve_order")] -use indexmap::{self, IndexMap}; - -/// Represents a JSON key/value type. -pub struct Map<K, V> { - map: MapImpl<K, V>, -} - -#[cfg(not(feature = "preserve_order"))] -type MapImpl<K, V> = BTreeMap<K, V>; -#[cfg(feature = "preserve_order")] -type MapImpl<K, V> = IndexMap<K, V>; - -impl Map<String, Value> { - /// Makes a new empty Map. - #[inline] - pub fn new() -> Self { - Map { - map: MapImpl::new(), - } - } - - /// Makes a new empty Map with the given initial capacity. - #[inline] - pub fn with_capacity(capacity: usize) -> Self { - Map { - #[cfg(not(feature = "preserve_order"))] - map: { - // does not support with_capacity - let _ = capacity; - BTreeMap::new() - }, - #[cfg(feature = "preserve_order")] - map: IndexMap::with_capacity(capacity), - } - } - - /// Clears the map, removing all values. - #[inline] - pub fn clear(&mut self) { - self.map.clear(); - } - - /// Returns a reference to the value corresponding to the key. - /// - /// The key may be any borrowed form of the map's key type, but the ordering - /// on the borrowed form *must* match the ordering on the key type. - #[inline] - pub fn get<Q>(&self, key: &Q) -> Option<&Value> - where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, - { - self.map.get(key) - } - - /// Returns true if the map contains a value for the specified key. - /// - /// The key may be any borrowed form of the map's key type, but the ordering - /// on the borrowed form *must* match the ordering on the key type. - #[inline] - pub fn contains_key<Q>(&self, key: &Q) -> bool - where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, - { - self.map.contains_key(key) - } - - /// Returns a mutable reference to the value corresponding to the key. - /// - /// The key may be any borrowed form of the map's key type, but the ordering - /// on the borrowed form *must* match the ordering on the key type. - #[inline] - pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value> - where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, - { - self.map.get_mut(key) - } - - /// Returns the key-value pair matching the given key. - /// - /// The key may be any borrowed form of the map's key type, but the ordering - /// on the borrowed form *must* match the ordering on the key type. - #[inline] - #[cfg(any(feature = "preserve_order", not(no_btreemap_get_key_value)))] - pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&String, &Value)> - where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, - { - self.map.get_key_value(key) - } - - /// Inserts a key-value pair into the map. - /// - /// If the map did not have this key present, `None` is returned. - /// - /// If the map did have this key present, the value is updated, and the old - /// value is returned. - #[inline] - pub fn insert(&mut self, k: String, v: Value) -> Option<Value> { - self.map.insert(k, v) - } - - /// Removes a key from the map, returning the value at the key if the key - /// was previously in the map. - /// - /// The key may be any borrowed form of the map's key type, but the ordering - /// on the borrowed form *must* match the ordering on the key type. - #[inline] - pub fn remove<Q>(&mut self, key: &Q) -> Option<Value> - where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, - { - #[cfg(feature = "preserve_order")] - return self.map.swap_remove(key); - #[cfg(not(feature = "preserve_order"))] - return self.map.remove(key); - } - - /// Removes a key from the map, returning the stored key and value if the - /// key was previously in the map. - /// - /// The key may be any borrowed form of the map's key type, but the ordering - /// on the borrowed form *must* match the ordering on the key type. - pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(String, Value)> - where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, - { - #[cfg(any(feature = "preserve_order", not(no_btreemap_remove_entry)))] - return self.map.remove_entry(key); - #[cfg(all( - not(feature = "preserve_order"), - no_btreemap_remove_entry, - not(no_btreemap_get_key_value), - ))] - { - let (key, _value) = self.map.get_key_value(key)?; - let key = key.clone(); - let value = self.map.remove::<String>(&key)?; - Some((key, value)) - } - #[cfg(all( - not(feature = "preserve_order"), - no_btreemap_remove_entry, - no_btreemap_get_key_value, - ))] - { - use core::ops::{Bound, RangeBounds}; - - struct Key<'a, Q: ?Sized>(&'a Q); - - impl<'a, Q: ?Sized> RangeBounds<Q> for Key<'a, Q> { - fn start_bound(&self) -> Bound<&Q> { - Bound::Included(self.0) - } - fn end_bound(&self) -> Bound<&Q> { - Bound::Included(self.0) - } - } - - let mut range = self.map.range(Key(key)); - let (key, _value) = range.next()?; - let key = key.clone(); - let value = self.map.remove::<String>(&key)?; - Some((key, value)) - } - } - - /// Moves all elements from other into self, leaving other empty. - #[inline] - pub fn append(&mut self, other: &mut Self) { - #[cfg(feature = "preserve_order")] - self.map - .extend(mem::replace(&mut other.map, MapImpl::default())); - #[cfg(not(feature = "preserve_order"))] - self.map.append(&mut other.map); - } - - /// Gets the given key's corresponding entry in the map for in-place - /// manipulation. - pub fn entry<S>(&mut self, key: S) -> Entry - where - S: Into<String>, - { - #[cfg(not(feature = "preserve_order"))] - use alloc::collections::btree_map::Entry as EntryImpl; - #[cfg(feature = "preserve_order")] - use indexmap::map::Entry as EntryImpl; - - match self.map.entry(key.into()) { - EntryImpl::Vacant(vacant) => Entry::Vacant(VacantEntry { vacant }), - EntryImpl::Occupied(occupied) => Entry::Occupied(OccupiedEntry { occupied }), - } - } - - /// Returns the number of elements in the map. - #[inline] - pub fn len(&self) -> usize { - self.map.len() - } - - /// Returns true if the map contains no elements. - #[inline] - pub fn is_empty(&self) -> bool { - self.map.is_empty() - } - - /// Gets an iterator over the entries of the map. - #[inline] - pub fn iter(&self) -> Iter { - Iter { - iter: self.map.iter(), - } - } - - /// Gets a mutable iterator over the entries of the map. - #[inline] - pub fn iter_mut(&mut self) -> IterMut { - IterMut { - iter: self.map.iter_mut(), - } - } - - /// Gets an iterator over the keys of the map. - #[inline] - pub fn keys(&self) -> Keys { - Keys { - iter: self.map.keys(), - } - } - - /// Gets an iterator over the values of the map. - #[inline] - pub fn values(&self) -> Values { - Values { - iter: self.map.values(), - } - } - - /// Gets an iterator over mutable values of the map. - #[inline] - pub fn values_mut(&mut self) -> ValuesMut { - ValuesMut { - iter: self.map.values_mut(), - } - } - - /// Retains only the elements specified by the predicate. - /// - /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` - /// returns `false`. - #[cfg(not(no_btreemap_retain))] - #[inline] - pub fn retain<F>(&mut self, f: F) - where - F: FnMut(&String, &mut Value) -> bool, - { - self.map.retain(f); - } -} - -#[allow(clippy::derivable_impls)] // clippy bug: https://github.com/rust-lang/rust-clippy/issues/7655 -impl Default for Map<String, Value> { - #[inline] - fn default() -> Self { - Map { - map: MapImpl::new(), - } - } -} - -impl Clone for Map<String, Value> { - #[inline] - fn clone(&self) -> Self { - Map { - map: self.map.clone(), - } - } - - #[inline] - fn clone_from(&mut self, source: &Self) { - self.map.clone_from(&source.map); - } -} - -impl PartialEq for Map<String, Value> { - #[inline] - fn eq(&self, other: &Self) -> bool { - self.map.eq(&other.map) - } -} - -impl Eq for Map<String, Value> {} - -/// Access an element of this map. Panics if the given key is not present in the -/// map. -/// -/// ``` -/// # use serde_json_lenient::Value; -/// # -/// # let val = &Value::String("".to_owned()); -/// # let _ = -/// match val { -/// Value::String(s) => Some(s.as_str()), -/// Value::Array(arr) => arr[0].as_str(), -/// Value::Object(map) => map["type"].as_str(), -/// _ => None, -/// } -/// # ; -/// ``` -impl<'a, Q> ops::Index<&'a Q> for Map<String, Value> -where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, -{ - type Output = Value; - - fn index(&self, index: &Q) -> &Value { - self.map.index(index) - } -} - -/// Mutably access an element of this map. Panics if the given key is not -/// present in the map. -/// -/// ``` -/// # use serde_json_lenient::json; -/// # -/// # let mut map = serde_json_lenient::Map::new(); -/// # map.insert("key".to_owned(), serde_json_lenient::Value::Null); -/// # -/// map["key"] = json!("value"); -/// ``` -impl<'a, Q> ops::IndexMut<&'a Q> for Map<String, Value> -where - String: Borrow<Q>, - Q: ?Sized + Ord + Eq + Hash, -{ - fn index_mut(&mut self, index: &Q) -> &mut Value { - self.map.get_mut(index).expect("no entry found for key") - } -} - -impl Debug for Map<String, Value> { - #[inline] - fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> { - self.map.fmt(formatter) - } -} - -#[cfg(any(feature = "std", feature = "alloc"))] -impl serde::ser::Serialize for Map<String, Value> { - #[inline] - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: serde::ser::Serializer, - { - use serde::ser::SerializeMap; - let mut map = tri!(serializer.serialize_map(Some(self.len()))); - for (k, v) in self { - tri!(map.serialize_entry(k, v)); - } - map.end() - } -} - -impl<'de> de::Deserialize<'de> for Map<String, Value> { - #[inline] - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: de::Deserializer<'de>, - { - struct Visitor; - - impl<'de> de::Visitor<'de> for Visitor { - type Value = Map<String, Value>; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("a map") - } - - #[inline] - fn visit_unit<E>(self) -> Result<Self::Value, E> - where - E: de::Error, - { - Ok(Map::new()) - } - - #[cfg(any(feature = "std", feature = "alloc"))] - #[inline] - fn visit_map<V>(self, mut visitor: V) -> Result<Self::Value, V::Error> - where - V: de::MapAccess<'de>, - { - let mut values = Map::new(); - - while let Some((key, value)) = tri!(visitor.next_entry()) { - values.insert(key, value); - } - - Ok(values) - } - } - - deserializer.deserialize_map(Visitor) - } -} - -impl FromIterator<(String, Value)> for Map<String, Value> { - fn from_iter<T>(iter: T) -> Self - where - T: IntoIterator<Item = (String, Value)>, - { - Map { - map: FromIterator::from_iter(iter), - } - } -} - -impl Extend<(String, Value)> for Map<String, Value> { - fn extend<T>(&mut self, iter: T) - where - T: IntoIterator<Item = (String, Value)>, - { - self.map.extend(iter); - } -} - -macro_rules! delegate_iterator { - (($name:ident $($generics:tt)*) => $item:ty) => { - impl $($generics)* Iterator for $name $($generics)* { - type Item = $item; - #[inline] - fn next(&mut self) -> Option<Self::Item> { - self.iter.next() - } - #[inline] - fn size_hint(&self) -> (usize, Option<usize>) { - self.iter.size_hint() - } - } - - impl $($generics)* DoubleEndedIterator for $name $($generics)* { - #[inline] - fn next_back(&mut self) -> Option<Self::Item> { - self.iter.next_back() - } - } - - impl $($generics)* ExactSizeIterator for $name $($generics)* { - #[inline] - fn len(&self) -> usize { - self.iter.len() - } - } - - impl $($generics)* FusedIterator for $name $($generics)* {} - } -} - -////////////////////////////////////////////////////////////////////////////// - -/// A view into a single entry in a map, which may either be vacant or occupied. -/// This enum is constructed from the [`entry`] method on [`Map`]. -/// -/// [`entry`]: struct.Map.html#method.entry -/// [`Map`]: struct.Map.html -pub enum Entry<'a> { - /// A vacant Entry. - Vacant(VacantEntry<'a>), - /// An occupied Entry. - Occupied(OccupiedEntry<'a>), -} - -/// A vacant Entry. It is part of the [`Entry`] enum. -/// -/// [`Entry`]: enum.Entry.html -pub struct VacantEntry<'a> { - vacant: VacantEntryImpl<'a>, -} - -/// An occupied Entry. It is part of the [`Entry`] enum. -/// -/// [`Entry`]: enum.Entry.html -pub struct OccupiedEntry<'a> { - occupied: OccupiedEntryImpl<'a>, -} - -#[cfg(not(feature = "preserve_order"))] -type VacantEntryImpl<'a> = btree_map::VacantEntry<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type VacantEntryImpl<'a> = indexmap::map::VacantEntry<'a, String, Value>; - -#[cfg(not(feature = "preserve_order"))] -type OccupiedEntryImpl<'a> = btree_map::OccupiedEntry<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type OccupiedEntryImpl<'a> = indexmap::map::OccupiedEntry<'a, String, Value>; - -impl<'a> Entry<'a> { - /// Returns a reference to this entry's key. - /// - /// # Examples - /// - /// ``` - /// let mut map = serde_json_lenient::Map::new(); - /// assert_eq!(map.entry("serde").key(), &"serde"); - /// ``` - pub fn key(&self) -> &String { - match self { - Entry::Vacant(e) => e.key(), - Entry::Occupied(e) => e.key(), - } - } - - /// Ensures a value is in the entry by inserting the default if empty, and - /// returns a mutable reference to the value in the entry. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut map = serde_json_lenient::Map::new(); - /// map.entry("serde").or_insert(json!(12)); - /// - /// assert_eq!(map["serde"], 12); - /// ``` - pub fn or_insert(self, default: Value) -> &'a mut Value { - match self { - Entry::Vacant(entry) => entry.insert(default), - Entry::Occupied(entry) => entry.into_mut(), - } - } - - /// Ensures a value is in the entry by inserting the result of the default - /// function if empty, and returns a mutable reference to the value in the - /// entry. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut map = serde_json_lenient::Map::new(); - /// map.entry("serde").or_insert_with(|| json!("hoho")); - /// - /// assert_eq!(map["serde"], "hoho".to_owned()); - /// ``` - pub fn or_insert_with<F>(self, default: F) -> &'a mut Value - where - F: FnOnce() -> Value, - { - match self { - Entry::Vacant(entry) => entry.insert(default()), - Entry::Occupied(entry) => entry.into_mut(), - } - } - - /// Provides in-place mutable access to an occupied entry before any - /// potential inserts into the map. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut map = serde_json_lenient::Map::new(); - /// map.entry("serde") - /// .and_modify(|e| *e = json!("rust")) - /// .or_insert(json!("cpp")); - /// - /// assert_eq!(map["serde"], "cpp"); - /// - /// map.entry("serde") - /// .and_modify(|e| *e = json!("rust")) - /// .or_insert(json!("cpp")); - /// - /// assert_eq!(map["serde"], "rust"); - /// ``` - pub fn and_modify<F>(self, f: F) -> Self - where - F: FnOnce(&mut Value), - { - match self { - Entry::Occupied(mut entry) => { - f(entry.get_mut()); - Entry::Occupied(entry) - } - Entry::Vacant(entry) => Entry::Vacant(entry), - } - } -} - -impl<'a> VacantEntry<'a> { - /// Gets a reference to the key that would be used when inserting a value - /// through the VacantEntry. - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// - /// match map.entry("serde") { - /// Entry::Vacant(vacant) => { - /// assert_eq!(vacant.key(), &"serde"); - /// } - /// Entry::Occupied(_) => unimplemented!(), - /// } - /// ``` - #[inline] - pub fn key(&self) -> &String { - self.vacant.key() - } - - /// Sets the value of the entry with the VacantEntry's key, and returns a - /// mutable reference to it. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// - /// match map.entry("serde") { - /// Entry::Vacant(vacant) => { - /// vacant.insert(json!("hoho")); - /// } - /// Entry::Occupied(_) => unimplemented!(), - /// } - /// ``` - #[inline] - pub fn insert(self, value: Value) -> &'a mut Value { - self.vacant.insert(value) - } -} - -impl<'a> OccupiedEntry<'a> { - /// Gets a reference to the key in the entry. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// map.insert("serde".to_owned(), json!(12)); - /// - /// match map.entry("serde") { - /// Entry::Occupied(occupied) => { - /// assert_eq!(occupied.key(), &"serde"); - /// } - /// Entry::Vacant(_) => unimplemented!(), - /// } - /// ``` - #[inline] - pub fn key(&self) -> &String { - self.occupied.key() - } - - /// Gets a reference to the value in the entry. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// map.insert("serde".to_owned(), json!(12)); - /// - /// match map.entry("serde") { - /// Entry::Occupied(occupied) => { - /// assert_eq!(occupied.get(), 12); - /// } - /// Entry::Vacant(_) => unimplemented!(), - /// } - /// ``` - #[inline] - pub fn get(&self) -> &Value { - self.occupied.get() - } - - /// Gets a mutable reference to the value in the entry. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// map.insert("serde".to_owned(), json!([1, 2, 3])); - /// - /// match map.entry("serde") { - /// Entry::Occupied(mut occupied) => { - /// occupied.get_mut().as_array_mut().unwrap().push(json!(4)); - /// } - /// Entry::Vacant(_) => unimplemented!(), - /// } - /// - /// assert_eq!(map["serde"].as_array().unwrap().len(), 4); - /// ``` - #[inline] - pub fn get_mut(&mut self) -> &mut Value { - self.occupied.get_mut() - } - - /// Converts the entry into a mutable reference to its value. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// map.insert("serde".to_owned(), json!([1, 2, 3])); - /// - /// match map.entry("serde") { - /// Entry::Occupied(mut occupied) => { - /// occupied.into_mut().as_array_mut().unwrap().push(json!(4)); - /// } - /// Entry::Vacant(_) => unimplemented!(), - /// } - /// - /// assert_eq!(map["serde"].as_array().unwrap().len(), 4); - /// ``` - #[inline] - pub fn into_mut(self) -> &'a mut Value { - self.occupied.into_mut() - } - - /// Sets the value of the entry with the `OccupiedEntry`'s key, and returns - /// the entry's old value. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// map.insert("serde".to_owned(), json!(12)); - /// - /// match map.entry("serde") { - /// Entry::Occupied(mut occupied) => { - /// assert_eq!(occupied.insert(json!(13)), 12); - /// assert_eq!(occupied.get(), 13); - /// } - /// Entry::Vacant(_) => unimplemented!(), - /// } - /// ``` - #[inline] - pub fn insert(&mut self, value: Value) -> Value { - self.occupied.insert(value) - } - - /// Takes the value of the entry out of the map, and returns it. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// use serde_json_lenient::map::Entry; - /// - /// let mut map = serde_json_lenient::Map::new(); - /// map.insert("serde".to_owned(), json!(12)); - /// - /// match map.entry("serde") { - /// Entry::Occupied(occupied) => { - /// assert_eq!(occupied.remove(), 12); - /// } - /// Entry::Vacant(_) => unimplemented!(), - /// } - /// ``` - #[inline] - pub fn remove(self) -> Value { - #[cfg(feature = "preserve_order")] - return self.occupied.swap_remove(); - #[cfg(not(feature = "preserve_order"))] - return self.occupied.remove(); - } -} - -////////////////////////////////////////////////////////////////////////////// - -impl<'a> IntoIterator for &'a Map<String, Value> { - type Item = (&'a String, &'a Value); - type IntoIter = Iter<'a>; - #[inline] - fn into_iter(self) -> Self::IntoIter { - Iter { - iter: self.map.iter(), - } - } -} - -/// An iterator over a serde_json_lenient::Map's entries. -pub struct Iter<'a> { - iter: IterImpl<'a>, -} - -#[cfg(not(feature = "preserve_order"))] -type IterImpl<'a> = btree_map::Iter<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type IterImpl<'a> = indexmap::map::Iter<'a, String, Value>; - -delegate_iterator!((Iter<'a>) => (&'a String, &'a Value)); - -////////////////////////////////////////////////////////////////////////////// - -impl<'a> IntoIterator for &'a mut Map<String, Value> { - type Item = (&'a String, &'a mut Value); - type IntoIter = IterMut<'a>; - #[inline] - fn into_iter(self) -> Self::IntoIter { - IterMut { - iter: self.map.iter_mut(), - } - } -} - -/// A mutable iterator over a serde_json_lenient::Map's entries. -pub struct IterMut<'a> { - iter: IterMutImpl<'a>, -} - -#[cfg(not(feature = "preserve_order"))] -type IterMutImpl<'a> = btree_map::IterMut<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type IterMutImpl<'a> = indexmap::map::IterMut<'a, String, Value>; - -delegate_iterator!((IterMut<'a>) => (&'a String, &'a mut Value)); - -////////////////////////////////////////////////////////////////////////////// - -impl IntoIterator for Map<String, Value> { - type Item = (String, Value); - type IntoIter = IntoIter; - #[inline] - fn into_iter(self) -> Self::IntoIter { - IntoIter { - iter: self.map.into_iter(), - } - } -} - -/// An owning iterator over a serde_json_lenient::Map's entries. -pub struct IntoIter { - iter: IntoIterImpl, -} - -#[cfg(not(feature = "preserve_order"))] -type IntoIterImpl = btree_map::IntoIter<String, Value>; -#[cfg(feature = "preserve_order")] -type IntoIterImpl = indexmap::map::IntoIter<String, Value>; - -delegate_iterator!((IntoIter) => (String, Value)); - -////////////////////////////////////////////////////////////////////////////// - -/// An iterator over a serde_json_lenient::Map's keys. -pub struct Keys<'a> { - iter: KeysImpl<'a>, -} - -#[cfg(not(feature = "preserve_order"))] -type KeysImpl<'a> = btree_map::Keys<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type KeysImpl<'a> = indexmap::map::Keys<'a, String, Value>; - -delegate_iterator!((Keys<'a>) => &'a String); - -////////////////////////////////////////////////////////////////////////////// - -/// An iterator over a serde_json_lenient::Map's values. -pub struct Values<'a> { - iter: ValuesImpl<'a>, -} - -#[cfg(not(feature = "preserve_order"))] -type ValuesImpl<'a> = btree_map::Values<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type ValuesImpl<'a> = indexmap::map::Values<'a, String, Value>; - -delegate_iterator!((Values<'a>) => &'a Value); - -////////////////////////////////////////////////////////////////////////////// - -/// A mutable iterator over a serde_json_lenient::Map's values. -pub struct ValuesMut<'a> { - iter: ValuesMutImpl<'a>, -} - -#[cfg(not(feature = "preserve_order"))] -type ValuesMutImpl<'a> = btree_map::ValuesMut<'a, String, Value>; -#[cfg(feature = "preserve_order")] -type ValuesMutImpl<'a> = indexmap::map::ValuesMut<'a, String, Value>; - -delegate_iterator!((ValuesMut<'a>) => &'a mut Value);
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/number.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/number.rs deleted file mode 100644 index 617f4771..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/number.rs +++ /dev/null
@@ -1,774 +0,0 @@ -use crate::de::ParserNumber; -use crate::error::Error; -#[cfg(feature = "arbitrary_precision")] -use crate::error::ErrorCode; -#[cfg(feature = "arbitrary_precision")] -use alloc::borrow::ToOwned; -#[cfg(feature = "arbitrary_precision")] -use alloc::string::{String, ToString}; -use core::fmt::{self, Debug, Display}; -#[cfg(not(feature = "arbitrary_precision"))] -use core::hash::{Hash, Hasher}; -use serde::de::{self, Unexpected, Visitor}; -#[cfg(feature = "arbitrary_precision")] -use serde::de::{IntoDeserializer, MapAccess}; -use serde::{forward_to_deserialize_any, Deserialize, Deserializer, Serialize, Serializer}; - -#[cfg(feature = "arbitrary_precision")] -pub(crate) const TOKEN: &str = "$serde_json_lenient::private::Number"; - -/// Represents a JSON number, whether integer or floating point. -#[derive(Clone, PartialEq, Eq, Hash)] -pub struct Number { - n: N, -} - -#[cfg(not(feature = "arbitrary_precision"))] -#[derive(Copy, Clone)] -enum N { - PosInt(u64), - /// Always less than zero. - NegInt(i64), - /// Always finite. - Float(f64), -} - -#[cfg(not(feature = "arbitrary_precision"))] -impl PartialEq for N { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (N::PosInt(a), N::PosInt(b)) => a == b, - (N::NegInt(a), N::NegInt(b)) => a == b, - (N::Float(a), N::Float(b)) => a == b, - _ => false, - } - } -} - -// Implementing Eq is fine since any float values are always finite. -#[cfg(not(feature = "arbitrary_precision"))] -impl Eq for N {} - -#[cfg(not(feature = "arbitrary_precision"))] -impl Hash for N { - fn hash<H: Hasher>(&self, h: &mut H) { - match *self { - N::PosInt(i) => i.hash(h), - N::NegInt(i) => i.hash(h), - N::Float(f) => { - if f == 0.0f64 { - // There are 2 zero representations, +0 and -0, which - // compare equal but have different bits. We use the +0 hash - // for both so that hash(+0) == hash(-0). - 0.0f64.to_bits().hash(h); - } else { - f.to_bits().hash(h); - } - } - } - } -} - -#[cfg(feature = "arbitrary_precision")] -type N = String; - -impl Number { - /// Returns true if the `Number` is an integer between `i64::MIN` and - /// `i64::MAX`. - /// - /// For any Number on which `is_i64` returns true, `as_i64` is guaranteed to - /// return the integer value. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let big = i64::max_value() as u64 + 10; - /// let v = json!({ "a": 64, "b": big, "c": 256.0 }); - /// - /// assert!(v["a"].is_i64()); - /// - /// // Greater than i64::MAX. - /// assert!(!v["b"].is_i64()); - /// - /// // Numbers with a decimal point are not considered integers. - /// assert!(!v["c"].is_i64()); - /// ``` - #[inline] - pub fn is_i64(&self) -> bool { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::PosInt(v) => v <= i64::max_value() as u64, - N::NegInt(_) => true, - N::Float(_) => false, - } - #[cfg(feature = "arbitrary_precision")] - self.as_i64().is_some() - } - - /// Returns true if the `Number` is an integer between zero and `u64::MAX`. - /// - /// For any Number on which `is_u64` returns true, `as_u64` is guaranteed to - /// return the integer value. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 64, "b": -64, "c": 256.0 }); - /// - /// assert!(v["a"].is_u64()); - /// - /// // Negative integer. - /// assert!(!v["b"].is_u64()); - /// - /// // Numbers with a decimal point are not considered integers. - /// assert!(!v["c"].is_u64()); - /// ``` - #[inline] - pub fn is_u64(&self) -> bool { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::PosInt(_) => true, - N::NegInt(_) | N::Float(_) => false, - } - #[cfg(feature = "arbitrary_precision")] - self.as_u64().is_some() - } - - /// Returns true if the `Number` can be represented by f64. - /// - /// For any Number on which `is_f64` returns true, `as_f64` is guaranteed to - /// return the floating point value. - /// - /// Currently this function returns true if and only if both `is_i64` and - /// `is_u64` return false but this is not a guarantee in the future. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 256.0, "b": 64, "c": -64 }); - /// - /// assert!(v["a"].is_f64()); - /// - /// // Integers. - /// assert!(!v["b"].is_f64()); - /// assert!(!v["c"].is_f64()); - /// ``` - #[inline] - pub fn is_f64(&self) -> bool { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::Float(_) => true, - N::PosInt(_) | N::NegInt(_) => false, - } - #[cfg(feature = "arbitrary_precision")] - { - for c in self.n.chars() { - if c == '.' || c == 'e' || c == 'E' { - return self.n.parse::<f64>().ok().map_or(false, f64::is_finite); - } - } - false - } - } - - /// If the `Number` is an integer, represent it as i64 if possible. Returns - /// None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let big = i64::max_value() as u64 + 10; - /// let v = json!({ "a": 64, "b": big, "c": 256.0 }); - /// - /// assert_eq!(v["a"].as_i64(), Some(64)); - /// assert_eq!(v["b"].as_i64(), None); - /// assert_eq!(v["c"].as_i64(), None); - /// ``` - #[inline] - pub fn as_i64(&self) -> Option<i64> { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::PosInt(n) => { - if n <= i64::max_value() as u64 { - Some(n as i64) - } else { - None - } - } - N::NegInt(n) => Some(n), - N::Float(_) => None, - } - #[cfg(feature = "arbitrary_precision")] - self.n.parse().ok() - } - - /// If the `Number` is an integer, represent it as u64 if possible. Returns - /// None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 64, "b": -64, "c": 256.0 }); - /// - /// assert_eq!(v["a"].as_u64(), Some(64)); - /// assert_eq!(v["b"].as_u64(), None); - /// assert_eq!(v["c"].as_u64(), None); - /// ``` - #[inline] - pub fn as_u64(&self) -> Option<u64> { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::PosInt(n) => Some(n), - N::NegInt(_) | N::Float(_) => None, - } - #[cfg(feature = "arbitrary_precision")] - self.n.parse().ok() - } - - /// Represents the number as f64 if possible. Returns None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 256.0, "b": 64, "c": -64 }); - /// - /// assert_eq!(v["a"].as_f64(), Some(256.0)); - /// assert_eq!(v["b"].as_f64(), Some(64.0)); - /// assert_eq!(v["c"].as_f64(), Some(-64.0)); - /// ``` - #[inline] - pub fn as_f64(&self) -> Option<f64> { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::PosInt(n) => Some(n as f64), - N::NegInt(n) => Some(n as f64), - N::Float(n) => Some(n), - } - #[cfg(feature = "arbitrary_precision")] - self.n.parse::<f64>().ok().filter(|float| float.is_finite()) - } - - /// Converts a finite `f64` to a `Number`. Infinite or NaN values are not JSON - /// numbers. - /// - /// ``` - /// # use std::f64; - /// # - /// # use serde_json_lenient::Number; - /// # - /// assert!(Number::from_f64(256.0).is_some()); - /// - /// assert!(Number::from_f64(f64::NAN).is_none()); - /// ``` - #[inline] - pub fn from_f64(f: f64) -> Option<Number> { - if f.is_finite() { - let n = { - #[cfg(not(feature = "arbitrary_precision"))] - { - N::Float(f) - } - #[cfg(feature = "arbitrary_precision")] - { - ryu::Buffer::new().format_finite(f).to_owned() - } - }; - Some(Number { n }) - } else { - None - } - } - - pub(crate) fn as_f32(&self) -> Option<f32> { - #[cfg(not(feature = "arbitrary_precision"))] - match self.n { - N::PosInt(n) => Some(n as f32), - N::NegInt(n) => Some(n as f32), - N::Float(n) => Some(n as f32), - } - #[cfg(feature = "arbitrary_precision")] - self.n.parse::<f32>().ok().filter(|float| float.is_finite()) - } - - pub(crate) fn from_f32(f: f32) -> Option<Number> { - if f.is_finite() { - let n = { - #[cfg(not(feature = "arbitrary_precision"))] - { - N::Float(f as f64) - } - #[cfg(feature = "arbitrary_precision")] - { - ryu::Buffer::new().format_finite(f).to_owned() - } - }; - Some(Number { n }) - } else { - None - } - } - - #[cfg(feature = "arbitrary_precision")] - /// Not public API. Only tests use this. - #[doc(hidden)] - #[inline] - pub fn from_string_unchecked(n: String) -> Self { - Number { n } - } -} - -impl Display for Number { - #[cfg(not(feature = "arbitrary_precision"))] - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - match self.n { - N::PosInt(u) => formatter.write_str(itoa::Buffer::new().format(u)), - N::NegInt(i) => formatter.write_str(itoa::Buffer::new().format(i)), - N::Float(f) => formatter.write_str(ryu::Buffer::new().format_finite(f)), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - Display::fmt(&self.n, formatter) - } -} - -impl Debug for Number { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "Number({})", self) - } -} - -impl Serialize for Number { - #[cfg(not(feature = "arbitrary_precision"))] - #[inline] - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: Serializer, - { - match self.n { - N::PosInt(u) => serializer.serialize_u64(u), - N::NegInt(i) => serializer.serialize_i64(i), - N::Float(f) => serializer.serialize_f64(f), - } - } - - #[cfg(feature = "arbitrary_precision")] - #[inline] - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: Serializer, - { - use serde::ser::SerializeStruct; - - let mut s = tri!(serializer.serialize_struct(TOKEN, 1)); - tri!(s.serialize_field(TOKEN, &self.n)); - s.end() - } -} - -impl<'de> Deserialize<'de> for Number { - #[inline] - fn deserialize<D>(deserializer: D) -> Result<Number, D::Error> - where - D: Deserializer<'de>, - { - struct NumberVisitor; - - impl<'de> Visitor<'de> for NumberVisitor { - type Value = Number; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("a JSON number") - } - - #[inline] - fn visit_i64<E>(self, value: i64) -> Result<Number, E> { - Ok(value.into()) - } - - #[inline] - fn visit_u64<E>(self, value: u64) -> Result<Number, E> { - Ok(value.into()) - } - - #[inline] - fn visit_f64<E>(self, value: f64) -> Result<Number, E> - where - E: de::Error, - { - Number::from_f64(value).ok_or_else(|| de::Error::custom("not a JSON number")) - } - - #[cfg(feature = "arbitrary_precision")] - #[inline] - fn visit_map<V>(self, mut visitor: V) -> Result<Number, V::Error> - where - V: de::MapAccess<'de>, - { - let value = tri!(visitor.next_key::<NumberKey>()); - if value.is_none() { - return Err(de::Error::invalid_type(Unexpected::Map, &self)); - } - let v: NumberFromString = tri!(visitor.next_value()); - Ok(v.value) - } - } - - deserializer.deserialize_any(NumberVisitor) - } -} - -#[cfg(feature = "arbitrary_precision")] -struct NumberKey; - -#[cfg(feature = "arbitrary_precision")] -impl<'de> de::Deserialize<'de> for NumberKey { - fn deserialize<D>(deserializer: D) -> Result<NumberKey, D::Error> - where - D: de::Deserializer<'de>, - { - struct FieldVisitor; - - impl<'de> de::Visitor<'de> for FieldVisitor { - type Value = (); - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("a valid number field") - } - - fn visit_str<E>(self, s: &str) -> Result<(), E> - where - E: de::Error, - { - if s == TOKEN { - Ok(()) - } else { - Err(de::Error::custom("expected field with custom name")) - } - } - } - - tri!(deserializer.deserialize_identifier(FieldVisitor)); - Ok(NumberKey) - } -} - -#[cfg(feature = "arbitrary_precision")] -pub struct NumberFromString { - pub value: Number, -} - -#[cfg(feature = "arbitrary_precision")] -impl<'de> de::Deserialize<'de> for NumberFromString { - fn deserialize<D>(deserializer: D) -> Result<NumberFromString, D::Error> - where - D: de::Deserializer<'de>, - { - struct Visitor; - - impl<'de> de::Visitor<'de> for Visitor { - type Value = NumberFromString; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("string containing a number") - } - - fn visit_str<E>(self, s: &str) -> Result<NumberFromString, E> - where - E: de::Error, - { - let n = tri!(s.parse().map_err(de::Error::custom)); - Ok(NumberFromString { value: n }) - } - } - - deserializer.deserialize_str(Visitor) - } -} - -#[cfg(feature = "arbitrary_precision")] -fn invalid_number() -> Error { - Error::syntax(ErrorCode::InvalidNumber, 0, 0) -} - -macro_rules! deserialize_any { - (@expand [$($num_string:tt)*]) => { - #[cfg(not(feature = "arbitrary_precision"))] - #[inline] - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self.n { - N::PosInt(u) => visitor.visit_u64(u), - N::NegInt(i) => visitor.visit_i64(i), - N::Float(f) => visitor.visit_f64(f), - } - } - - #[cfg(feature = "arbitrary_precision")] - #[inline] - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where V: Visitor<'de> - { - if let Some(u) = self.as_u64() { - return visitor.visit_u64(u); - } else if let Some(i) = self.as_i64() { - return visitor.visit_i64(i); - } else if let Some(f) = self.as_f64() { - if ryu::Buffer::new().format_finite(f) == self.n || f.to_string() == self.n { - return visitor.visit_f64(f); - } - } - - visitor.visit_map(NumberDeserializer { - number: Some(self.$($num_string)*), - }) - } - }; - - (owned) => { - deserialize_any!(@expand [n]); - }; - - (ref) => { - deserialize_any!(@expand [n.clone()]); - }; -} - -macro_rules! deserialize_number { - ($deserialize:ident => $visit:ident) => { - #[cfg(not(feature = "arbitrary_precision"))] - fn $deserialize<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_any(visitor) - } - - #[cfg(feature = "arbitrary_precision")] - fn $deserialize<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - visitor.$visit(tri!(self.n.parse().map_err(|_| invalid_number()))) - } - }; -} - -impl<'de> Deserializer<'de> for Number { - type Error = Error; - - deserialize_any!(owned); - - deserialize_number!(deserialize_i8 => visit_i8); - deserialize_number!(deserialize_i16 => visit_i16); - deserialize_number!(deserialize_i32 => visit_i32); - deserialize_number!(deserialize_i64 => visit_i64); - deserialize_number!(deserialize_i128 => visit_i128); - deserialize_number!(deserialize_u8 => visit_u8); - deserialize_number!(deserialize_u16 => visit_u16); - deserialize_number!(deserialize_u32 => visit_u32); - deserialize_number!(deserialize_u64 => visit_u64); - deserialize_number!(deserialize_u128 => visit_u128); - deserialize_number!(deserialize_f32 => visit_f32); - deserialize_number!(deserialize_f64 => visit_f64); - - forward_to_deserialize_any! { - bool char str string bytes byte_buf option unit unit_struct - newtype_struct seq tuple tuple_struct map struct enum identifier - ignored_any - } -} - -impl<'de, 'a> Deserializer<'de> for &'a Number { - type Error = Error; - - deserialize_any!(ref); - - deserialize_number!(deserialize_i8 => visit_i8); - deserialize_number!(deserialize_i16 => visit_i16); - deserialize_number!(deserialize_i32 => visit_i32); - deserialize_number!(deserialize_i64 => visit_i64); - deserialize_number!(deserialize_i128 => visit_i128); - deserialize_number!(deserialize_u8 => visit_u8); - deserialize_number!(deserialize_u16 => visit_u16); - deserialize_number!(deserialize_u32 => visit_u32); - deserialize_number!(deserialize_u64 => visit_u64); - deserialize_number!(deserialize_u128 => visit_u128); - deserialize_number!(deserialize_f32 => visit_f32); - deserialize_number!(deserialize_f64 => visit_f64); - - forward_to_deserialize_any! { - bool char str string bytes byte_buf option unit unit_struct - newtype_struct seq tuple tuple_struct map struct enum identifier - ignored_any - } -} - -#[cfg(feature = "arbitrary_precision")] -pub(crate) struct NumberDeserializer { - pub number: Option<String>, -} - -#[cfg(feature = "arbitrary_precision")] -impl<'de> MapAccess<'de> for NumberDeserializer { - type Error = Error; - - fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> - where - K: de::DeserializeSeed<'de>, - { - if self.number.is_none() { - return Ok(None); - } - seed.deserialize(NumberFieldDeserializer).map(Some) - } - - fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error> - where - V: de::DeserializeSeed<'de>, - { - seed.deserialize(self.number.take().unwrap().into_deserializer()) - } -} - -#[cfg(feature = "arbitrary_precision")] -struct NumberFieldDeserializer; - -#[cfg(feature = "arbitrary_precision")] -impl<'de> Deserializer<'de> for NumberFieldDeserializer { - type Error = Error; - - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - visitor.visit_borrowed_str(TOKEN) - } - - forward_to_deserialize_any! { - bool u8 u16 u32 u64 u128 i8 i16 i32 i64 i128 f32 f64 char str string seq - bytes byte_buf map struct option unit newtype_struct ignored_any - unit_struct tuple_struct tuple enum identifier - } -} - -impl From<ParserNumber> for Number { - fn from(value: ParserNumber) -> Self { - let n = match value { - ParserNumber::F64(f) => { - #[cfg(not(feature = "arbitrary_precision"))] - { - N::Float(f) - } - #[cfg(feature = "arbitrary_precision")] - { - f.to_string() - } - } - ParserNumber::U64(u) => { - #[cfg(not(feature = "arbitrary_precision"))] - { - N::PosInt(u) - } - #[cfg(feature = "arbitrary_precision")] - { - u.to_string() - } - } - ParserNumber::I64(i) => { - #[cfg(not(feature = "arbitrary_precision"))] - { - N::NegInt(i) - } - #[cfg(feature = "arbitrary_precision")] - { - i.to_string() - } - } - #[cfg(feature = "arbitrary_precision")] - ParserNumber::String(s) => s, - }; - Number { n } - } -} - -macro_rules! impl_from_unsigned { - ( - $($ty:ty),* - ) => { - $( - impl From<$ty> for Number { - #[inline] - fn from(u: $ty) -> Self { - let n = { - #[cfg(not(feature = "arbitrary_precision"))] - { N::PosInt(u as u64) } - #[cfg(feature = "arbitrary_precision")] - { - itoa::Buffer::new().format(u).to_owned() - } - }; - Number { n } - } - } - )* - }; -} - -macro_rules! impl_from_signed { - ( - $($ty:ty),* - ) => { - $( - impl From<$ty> for Number { - #[inline] - fn from(i: $ty) -> Self { - let n = { - #[cfg(not(feature = "arbitrary_precision"))] - { - if i < 0 { - N::NegInt(i as i64) - } else { - N::PosInt(i as u64) - } - } - #[cfg(feature = "arbitrary_precision")] - { - itoa::Buffer::new().format(i).to_owned() - } - }; - Number { n } - } - } - )* - }; -} - -impl_from_unsigned!(u8, u16, u32, u64, usize); -impl_from_signed!(i8, i16, i32, i64, isize); - -#[cfg(feature = "arbitrary_precision")] -impl_from_unsigned!(u128); -#[cfg(feature = "arbitrary_precision")] -impl_from_signed!(i128); - -impl Number { - #[cfg(not(feature = "arbitrary_precision"))] - #[cold] - pub(crate) fn unexpected(&self) -> Unexpected { - match self.n { - N::PosInt(u) => Unexpected::Unsigned(u), - N::NegInt(i) => Unexpected::Signed(i), - N::Float(f) => Unexpected::Float(f), - } - } - - #[cfg(feature = "arbitrary_precision")] - #[cold] - pub(crate) fn unexpected(&self) -> Unexpected { - Unexpected::Other("number") - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/raw.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/raw.rs deleted file mode 100644 index 0943744..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/raw.rs +++ /dev/null
@@ -1,529 +0,0 @@ -use crate::error::Error; -use alloc::borrow::ToOwned; -use alloc::boxed::Box; -use alloc::string::String; -use core::fmt::{self, Debug, Display}; -use core::mem; -use serde::de::value::BorrowedStrDeserializer; -use serde::de::{ - self, Deserialize, DeserializeSeed, Deserializer, IntoDeserializer, MapAccess, Unexpected, - Visitor, -}; -use serde::forward_to_deserialize_any; -use serde::ser::{Serialize, SerializeStruct, Serializer}; - -/// Reference to a range of bytes encompassing a single valid JSON value in the -/// input data. -/// -/// A `RawValue` can be used to defer parsing parts of a payload until later, -/// or to avoid parsing it at all in the case that part of the payload just -/// needs to be transferred verbatim into a different output object. -/// -/// When serializing, a value of this type will retain its original formatting -/// and will not be minified or pretty-printed. -/// -/// # Note -/// -/// `RawValue` is only available if serde\_json is built with the `"raw_value"` -/// feature. -/// -/// ```toml -/// [dependencies] -/// serde_json = { version = "1.0", features = ["raw_value"] } -/// ``` -/// -/// # Example -/// -/// ``` -/// use serde::{Deserialize, Serialize}; -/// use serde_json_lenient::{Result, value::RawValue}; -/// -/// #[derive(Deserialize)] -/// struct Input<'a> { -/// code: u32, -/// #[serde(borrow)] -/// payload: &'a RawValue, -/// } -/// -/// #[derive(Serialize)] -/// struct Output<'a> { -/// info: (u32, &'a RawValue), -/// } -/// -/// // Efficiently rearrange JSON input containing separate "code" and "payload" -/// // keys into a single "info" key holding an array of code and payload. -/// // -/// // This could be done equivalently using serde_json_lenient::Value as the type for -/// // payload, but &RawValue will perform better because it does not require -/// // memory allocation. The correct range of bytes is borrowed from the input -/// // data and pasted verbatim into the output. -/// fn rearrange(input: &str) -> Result<String> { -/// let input: Input = serde_json_lenient::from_str(input)?; -/// -/// let output = Output { -/// info: (input.code, input.payload), -/// }; -/// -/// serde_json_lenient::to_string(&output) -/// } -/// -/// fn main() -> Result<()> { -/// let out = rearrange(r#" {"code": 200, "payload": {}} "#)?; -/// -/// assert_eq!(out, r#"{"info":[200,{}]}"#); -/// -/// Ok(()) -/// } -/// ``` -/// -/// # Ownership -/// -/// The typical usage of `RawValue` will be in the borrowed form: -/// -/// ``` -/// # use serde::Deserialize; -/// # use serde_json_lenient::value::RawValue; -/// # -/// #[derive(Deserialize)] -/// struct SomeStruct<'a> { -/// #[serde(borrow)] -/// raw_value: &'a RawValue, -/// } -/// ``` -/// -/// The borrowed form is suitable when deserializing through -/// [`serde_json_lenient::from_str`] and [`serde_json_lenient::from_slice`] which support -/// borrowing from the input data without memory allocation. -/// -/// When deserializing through [`serde_json_lenient::from_reader`] you will need to use -/// the boxed form of `RawValue` instead. This is almost as efficient but -/// involves buffering the raw value from the I/O stream into memory. -/// -/// [`serde_json_lenient::from_str`]: ../fn.from_str.html -/// [`serde_json_lenient::from_slice`]: ../fn.from_slice.html -/// [`serde_json_lenient::from_reader`]: ../fn.from_reader.html -/// -/// ``` -/// # use serde::Deserialize; -/// # use serde_json_lenient::value::RawValue; -/// # -/// #[derive(Deserialize)] -/// struct SomeStruct { -/// raw_value: Box<RawValue>, -/// } -/// ``` -#[cfg_attr(not(doc), repr(transparent))] -#[cfg_attr(docsrs, doc(cfg(feature = "raw_value")))] -pub struct RawValue { - json: str, -} - -impl RawValue { - fn from_borrowed(json: &str) -> &Self { - unsafe { mem::transmute::<&str, &RawValue>(json) } - } - - fn from_owned(json: Box<str>) -> Box<Self> { - unsafe { mem::transmute::<Box<str>, Box<RawValue>>(json) } - } - - fn into_owned(raw_value: Box<Self>) -> Box<str> { - unsafe { mem::transmute::<Box<RawValue>, Box<str>>(raw_value) } - } -} - -impl Clone for Box<RawValue> { - fn clone(&self) -> Self { - (**self).to_owned() - } -} - -impl ToOwned for RawValue { - type Owned = Box<RawValue>; - - fn to_owned(&self) -> Self::Owned { - RawValue::from_owned(self.json.to_owned().into_boxed_str()) - } -} - -impl Default for Box<RawValue> { - fn default() -> Self { - RawValue::from_borrowed("null").to_owned() - } -} - -impl Debug for RawValue { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter - .debug_tuple("RawValue") - .field(&format_args!("{}", &self.json)) - .finish() - } -} - -impl Display for RawValue { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&self.json) - } -} - -impl RawValue { - /// Convert an owned `String` of JSON data to an owned `RawValue`. - /// - /// This function is equivalent to `serde_json_lenient::from_str::<Box<RawValue>>` - /// except that we avoid an allocation and memcpy if both of the following - /// are true: - /// - /// - the input has no leading or trailing whitespace, and - /// - the input has capacity equal to its length. - pub fn from_string(json: String) -> Result<Box<Self>, Error> { - let borrowed = tri!(crate::from_str::<&Self>(&json)); - if borrowed.json.len() < json.len() { - return Ok(borrowed.to_owned()); - } - Ok(Self::from_owned(json.into_boxed_str())) - } - - /// Access the JSON text underlying a raw value. - /// - /// # Example - /// - /// ``` - /// use serde::Deserialize; - /// use serde_json_lenient::{Result, value::RawValue}; - /// - /// #[derive(Deserialize)] - /// struct Response<'a> { - /// code: u32, - /// #[serde(borrow)] - /// payload: &'a RawValue, - /// } - /// - /// fn process(input: &str) -> Result<()> { - /// let response: Response = serde_json_lenient::from_str(input)?; - /// - /// let payload = response.payload.get(); - /// if payload.starts_with('{') { - /// // handle a payload which is a JSON map - /// } else { - /// // handle any other type - /// } - /// - /// Ok(()) - /// } - /// - /// fn main() -> Result<()> { - /// process(r#" {"code": 200, "payload": {}} "#)?; - /// Ok(()) - /// } - /// ``` - pub fn get(&self) -> &str { - &self.json - } -} - -impl From<Box<RawValue>> for Box<str> { - fn from(raw_value: Box<RawValue>) -> Self { - RawValue::into_owned(raw_value) - } -} - -/// Convert a `T` into a boxed `RawValue`. -/// -/// # Example -/// -/// ``` -/// // Upstream crate -/// # #[derive(Serialize)] -/// pub struct Thing { -/// foo: String, -/// bar: Option<String>, -/// extra_data: Box<RawValue>, -/// } -/// -/// // Local crate -/// use serde::Serialize; -/// use serde_json_lenient::value::{to_raw_value, RawValue}; -/// -/// #[derive(Serialize)] -/// struct MyExtraData { -/// a: u32, -/// b: u32, -/// } -/// -/// let my_thing = Thing { -/// foo: "FooVal".into(), -/// bar: None, -/// extra_data: to_raw_value(&MyExtraData { a: 1, b: 2 }).unwrap(), -/// }; -/// # assert_eq!( -/// # serde_json_lenient::to_value(my_thing).unwrap(), -/// # serde_json_lenient::json!({ -/// # "foo": "FooVal", -/// # "bar": null, -/// # "extra_data": { "a": 1, "b": 2 } -/// # }) -/// # ); -/// ``` -/// -/// # Errors -/// -/// This conversion can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -/// -/// ``` -/// use std::collections::BTreeMap; -/// -/// // The keys in this map are vectors, not strings. -/// let mut map = BTreeMap::new(); -/// map.insert(vec![32, 64], "x86"); -/// -/// println!("{}", serde_json_lenient::value::to_raw_value(&map).unwrap_err()); -/// ``` -#[cfg_attr(docsrs, doc(cfg(feature = "raw_value")))] -pub fn to_raw_value<T>(value: &T) -> Result<Box<RawValue>, Error> -where - T: ?Sized + Serialize, -{ - let json_string = tri!(crate::to_string(value)); - Ok(RawValue::from_owned(json_string.into_boxed_str())) -} - -pub const TOKEN: &str = "$serde_json_lenient::private::RawValue"; - -impl Serialize for RawValue { - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: Serializer, - { - let mut s = tri!(serializer.serialize_struct(TOKEN, 1)); - tri!(s.serialize_field(TOKEN, &self.json)); - s.end() - } -} - -impl<'de: 'a, 'a> Deserialize<'de> for &'a RawValue { - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: Deserializer<'de>, - { - struct ReferenceVisitor; - - impl<'de> Visitor<'de> for ReferenceVisitor { - type Value = &'de RawValue; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "any valid JSON value") - } - - fn visit_map<V>(self, mut visitor: V) -> Result<Self::Value, V::Error> - where - V: MapAccess<'de>, - { - let value = tri!(visitor.next_key::<RawKey>()); - if value.is_none() { - return Err(de::Error::invalid_type(Unexpected::Map, &self)); - } - visitor.next_value_seed(ReferenceFromString) - } - } - - deserializer.deserialize_newtype_struct(TOKEN, ReferenceVisitor) - } -} - -impl<'de> Deserialize<'de> for Box<RawValue> { - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: Deserializer<'de>, - { - struct BoxedVisitor; - - impl<'de> Visitor<'de> for BoxedVisitor { - type Value = Box<RawValue>; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "any valid JSON value") - } - - fn visit_map<V>(self, mut visitor: V) -> Result<Self::Value, V::Error> - where - V: MapAccess<'de>, - { - let value = tri!(visitor.next_key::<RawKey>()); - if value.is_none() { - return Err(de::Error::invalid_type(Unexpected::Map, &self)); - } - visitor.next_value_seed(BoxedFromString) - } - } - - deserializer.deserialize_newtype_struct(TOKEN, BoxedVisitor) - } -} - -struct RawKey; - -impl<'de> Deserialize<'de> for RawKey { - fn deserialize<D>(deserializer: D) -> Result<RawKey, D::Error> - where - D: Deserializer<'de>, - { - struct FieldVisitor; - - impl<'de> Visitor<'de> for FieldVisitor { - type Value = (); - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("raw value") - } - - fn visit_str<E>(self, s: &str) -> Result<(), E> - where - E: de::Error, - { - if s == TOKEN { - Ok(()) - } else { - Err(de::Error::custom("unexpected raw value")) - } - } - } - - tri!(deserializer.deserialize_identifier(FieldVisitor)); - Ok(RawKey) - } -} - -pub struct ReferenceFromString; - -impl<'de> DeserializeSeed<'de> for ReferenceFromString { - type Value = &'de RawValue; - - fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error> - where - D: Deserializer<'de>, - { - deserializer.deserialize_str(self) - } -} - -impl<'de> Visitor<'de> for ReferenceFromString { - type Value = &'de RawValue; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("raw value") - } - - fn visit_borrowed_str<E>(self, s: &'de str) -> Result<Self::Value, E> - where - E: de::Error, - { - Ok(RawValue::from_borrowed(s)) - } -} - -pub struct BoxedFromString; - -impl<'de> DeserializeSeed<'de> for BoxedFromString { - type Value = Box<RawValue>; - - fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error> - where - D: Deserializer<'de>, - { - deserializer.deserialize_str(self) - } -} - -impl<'de> Visitor<'de> for BoxedFromString { - type Value = Box<RawValue>; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("raw value") - } - - fn visit_str<E>(self, s: &str) -> Result<Self::Value, E> - where - E: de::Error, - { - Ok(RawValue::from_owned(s.to_owned().into_boxed_str())) - } - - #[cfg(any(feature = "std", feature = "alloc"))] - fn visit_string<E>(self, s: String) -> Result<Self::Value, E> - where - E: de::Error, - { - Ok(RawValue::from_owned(s.into_boxed_str())) - } -} - -struct RawKeyDeserializer; - -impl<'de> Deserializer<'de> for RawKeyDeserializer { - type Error = Error; - - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - visitor.visit_borrowed_str(TOKEN) - } - - forward_to_deserialize_any! { - bool u8 u16 u32 u64 u128 i8 i16 i32 i64 i128 f32 f64 char str string seq - bytes byte_buf map struct option unit newtype_struct ignored_any - unit_struct tuple_struct tuple enum identifier - } -} - -pub struct OwnedRawDeserializer { - pub raw_value: Option<String>, -} - -impl<'de> MapAccess<'de> for OwnedRawDeserializer { - type Error = Error; - - fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> - where - K: de::DeserializeSeed<'de>, - { - if self.raw_value.is_none() { - return Ok(None); - } - seed.deserialize(RawKeyDeserializer).map(Some) - } - - fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error> - where - V: de::DeserializeSeed<'de>, - { - seed.deserialize(self.raw_value.take().unwrap().into_deserializer()) - } -} - -pub struct BorrowedRawDeserializer<'de> { - pub raw_value: Option<&'de str>, -} - -impl<'de> MapAccess<'de> for BorrowedRawDeserializer<'de> { - type Error = Error; - - fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> - where - K: de::DeserializeSeed<'de>, - { - if self.raw_value.is_none() { - return Ok(None); - } - seed.deserialize(RawKeyDeserializer).map(Some) - } - - fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error> - where - V: de::DeserializeSeed<'de>, - { - seed.deserialize(BorrowedStrDeserializer::new(self.raw_value.take().unwrap())) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/read.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/read.rs deleted file mode 100644 index 3b81f9f..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/read.rs +++ /dev/null
@@ -1,1274 +0,0 @@ -use crate::error::{Error, ErrorCode, Result}; -use alloc::vec::Vec; -use core::char; -use core::cmp; -use core::ops::Deref; -use core::str; - -#[cfg(feature = "std")] -use crate::io; -#[cfg(feature = "std")] -use crate::iter::LineColIterator; - -#[cfg(feature = "raw_value")] -use crate::raw::BorrowedRawDeserializer; -#[cfg(all(feature = "raw_value", feature = "std"))] -use crate::raw::OwnedRawDeserializer; -#[cfg(feature = "raw_value")] -use serde::de::Visitor; - -/// Trait used by the deserializer for iterating over input. This is manually -/// "specialized" for iterating over &[u8]. Once feature(specialization) is -/// stable we can use actual specialization. -/// -/// This trait is sealed and cannot be implemented for types outside of -/// `serde_json_lenient`. -pub trait Read<'de>: private::Sealed { - #[doc(hidden)] - fn next(&mut self) -> Result<Option<u8>>; - #[doc(hidden)] - fn peek(&mut self) -> Result<Option<u8>>; - - /// Only valid after a call to peek(). Discards the peeked byte. - #[doc(hidden)] - fn discard(&mut self); - - /// Position of the most recent call to next(). - /// - /// The most recent call was probably next() and not peek(), but this method - /// should try to return a sensible result if the most recent call was - /// actually peek() because we don't always know. - /// - /// Only called in case of an error, so performance is not important. - #[doc(hidden)] - fn position(&self) -> Position; - - /// Position of the most recent call to peek(). - /// - /// The most recent call was probably peek() and not next(), but this method - /// should try to return a sensible result if the most recent call was - /// actually next() because we don't always know. - /// - /// Only called in case of an error, so performance is not important. - #[doc(hidden)] - fn peek_position(&self) -> Position; - - /// Offset from the beginning of the input to the next byte that would be - /// returned by next() or peek(). - #[doc(hidden)] - fn byte_offset(&self) -> usize; - - /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped - /// string until the next quotation mark using the given scratch space if - /// necessary. The scratch space is initially empty. - #[doc(hidden)] - fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>>; - - /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped - /// string until the next quotation mark using the given scratch space if - /// necessary. The scratch space is initially empty. - /// - /// This function returns the raw bytes in the string with escape sequences - /// expanded but without performing unicode validation. - #[doc(hidden)] - fn parse_str_raw<'s>( - &'s mut self, - scratch: &'s mut Vec<u8>, - ) -> Result<Reference<'de, 's, [u8]>>; - - /// Assumes the previous byte was a quotation mark. Parses a JSON-escaped - /// string until the next quotation mark but discards the data. - #[doc(hidden)] - fn ignore_str(&mut self) -> Result<()>; - - /// Assumes the previous byte was a hex escape sequnce ('\u') in a string. - /// Parses next hexadecimal sequence. - #[doc(hidden)] - fn decode_hex_escape(&mut self, num_digits: usize) -> Result<u16>; - - /// Switch raw buffering mode on. - /// - /// This is used when deserializing `RawValue`. - #[cfg(feature = "raw_value")] - #[doc(hidden)] - fn begin_raw_buffering(&mut self); - - /// Switch raw buffering mode off and provides the raw buffered data to the - /// given visitor. - #[cfg(feature = "raw_value")] - #[doc(hidden)] - fn end_raw_buffering<V>(&mut self, visitor: V) -> Result<V::Value> - where - V: Visitor<'de>; - - /// Whether we should replace invalid unicode characters with \u{fffd}. - fn replace_invalid_unicode(&self) -> bool; - - /// Allow \v escapes - fn allow_v_escapes(&self) -> bool; - - /// Allow \x escapes - fn allow_x_escapes(&self) -> bool; - - /// Whether StreamDeserializer::next needs to check the failed flag. True - /// for IoRead, false for StrRead and SliceRead which can track failure by - /// truncating their input slice to avoid the extra check on every next - /// call. - #[doc(hidden)] - const should_early_return_if_failed: bool; - - /// Mark a persistent failure of StreamDeserializer, either by setting the - /// flag or by truncating the input data. - #[doc(hidden)] - fn set_failed(&mut self, failed: &mut bool); -} - -pub struct Position { - pub line: usize, - pub column: usize, -} - -pub enum Reference<'b, 'c, T> -where - T: ?Sized + 'static, -{ - Borrowed(&'b T), - Copied(&'c T), -} - -impl<'b, 'c, T> Deref for Reference<'b, 'c, T> -where - T: ?Sized + 'static, -{ - type Target = T; - - fn deref(&self) -> &Self::Target { - match *self { - Reference::Borrowed(b) => b, - Reference::Copied(c) => c, - } - } -} - -/// Trait used by parse_str_bytes to convert the resulting bytes -/// into a string-like thing. Depending on the original caller, this may - -/// be a &str or a &[u8]. -trait UtfOutputStrategy<T: ?Sized> { - fn to_result_simple<'de, 's, R: Read<'de>>(&self, read: &R, slice: &'s [u8]) -> Result<&'s T>; - - fn to_result_direct<'de, 's, R: Read<'de>>( - &self, - read: &R, - slice: &'s [u8], - _: &'de mut Vec<u8>, - ) -> Result<Reference<'s, 'de, T>> { - self.to_result_simple(read, slice) - .map(|r| Reference::Borrowed(r)) - } - - fn to_result_from_scratch<'de, 's, R: Read<'de>>( - &self, - read: &R, - slice: &'s [u8], - ) -> Result<&'s T> { - self.to_result_simple(read, slice) - } - fn extend_scratch(&self, scratch: &mut Vec<u8>, slice: &[u8]) { - scratch.extend(slice); - } -} - -fn convert_or_error<'de, 's, R: Read<'de>>(read: &R, slice: &'s [u8]) -> Result<&'s str> { - str::from_utf8(slice).or_else(|_| error(read, ErrorCode::InvalidUnicodeCodePoint)) -} - -struct StrUtfOutputStrategy; - -impl UtfOutputStrategy<str> for StrUtfOutputStrategy { - fn to_result_simple<'de, 's, R: Read<'de>>( - &self, - read: &R, - slice: &'s [u8], - ) -> Result<&'s str> { - convert_or_error(read, slice) - } - - fn to_result_from_scratch<'de, 's, R: Read<'de>>( - &self, - read: &R, - slice: &'s [u8], - ) -> Result<&'s str> { - match str::from_utf8(slice) { - Ok(s) => Ok(s), - Err(_) => error(read, ErrorCode::InvalidUnicodeCodePoint), - } - } -} - -struct SubstitutingStrUtfOutputStrategy; - -impl SubstitutingStrUtfOutputStrategy { - /// Returns whether conversion occurred. If not, output is unchanged - /// and the caller should just directly use the input slice. - fn convert_from_utf8_lossy(&self, output: &mut Vec<u8>, mut input: &[u8]) -> bool { - let mut first = true; - loop { - match core::str::from_utf8(input) { - Ok(valid) => { - if first { - return false; - } - output.extend(valid.as_bytes()); - break; - } - Err(error) => { - let (valid, after_valid) = input.split_at(error.valid_up_to()); - output.extend(valid); - output.extend("\u{fffd}".bytes()); - - if let Some(invalid_sequence_length) = error.error_len() { - input = &after_valid[invalid_sequence_length..]; - } else { - break; - } - } - } - first = false; - } - true - } - - fn convert_unchecked<'a>(&self, slice: &'a [u8]) -> &'a str { - unsafe { str::from_utf8_unchecked(slice) } - } -} - -impl UtfOutputStrategy<str> for SubstitutingStrUtfOutputStrategy { - fn to_result_simple<'de, 's, R: Read<'de>>( - &self, - read: &R, - slice: &'s [u8], - ) -> Result<&'s str> { - convert_or_error(read, slice) - } - - fn to_result_direct<'de, 's, R: Read<'de>>( - &self, - _: &R, - slice: &'s [u8], - scratch: &'de mut Vec<u8>, - ) -> Result<Reference<'s, 'de, str>> { - let r = self.convert_from_utf8_lossy(scratch, slice); - Ok(if r { - Reference::Copied(self.convert_unchecked(scratch)) - } else { - Reference::Borrowed(self.convert_unchecked(slice)) - }) - } - - fn to_result_from_scratch<'de, 's, R: Read<'de>>( - &self, - _: &R, - slice: &'s [u8], - ) -> Result<&'s str> { - // We checked it on the way into the scratch buffer, so no need for further checks now - Ok(self.convert_unchecked(slice)) - } - - fn extend_scratch(&self, scratch: &mut Vec<u8>, slice: &[u8]) { - if !self.convert_from_utf8_lossy(scratch, slice) { - scratch.extend(slice); - } - } -} - -struct UncheckedStrUtfOutputStrategy; - -impl UtfOutputStrategy<str> for UncheckedStrUtfOutputStrategy { - fn to_result_simple<'de, 's, R: Read<'de>>(&self, _: &R, slice: &'s [u8]) -> Result<&'s str> { - // The input is assumed to be valid UTF-8 and the \u-escapes are - // checked along the way, so don't need to check here. - Ok(unsafe { str::from_utf8_unchecked(slice) }) - } -} - -struct SliceUtfOutputStrategy; - -impl UtfOutputStrategy<[u8]> for SliceUtfOutputStrategy { - fn to_result_simple<'de, 's, R: Read<'de>>(&self, _: &R, slice: &'s [u8]) -> Result<&'s [u8]> { - Ok(slice) - } -} - -/// JSON input source that reads from a std::io input stream. -#[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -pub struct IoRead<R> -where - R: io::Read, -{ - iter: LineColIterator<io::Bytes<R>>, - /// Temporary storage of peeked byte. - ch: Option<u8>, - #[cfg(feature = "raw_value")] - raw_buffer: Option<Vec<u8>>, -} - -/// JSON input source that reads from a slice of bytes. -// -// This is more efficient than other iterators because peek() can be read-only -// and we can compute line/col position only if an error happens. -#[allow(clippy::struct_excessive_bools)] -pub struct SliceRead<'a> { - slice: &'a [u8], - /// Index of the *next* byte that will be returned by next() or peek(). - index: usize, - replace_invalid_characters: bool, - allow_control_characters_in_string: bool, - allow_x_escapes: bool, - allow_v_escapes: bool, - #[cfg(feature = "raw_value")] - raw_buffering_start_index: usize, -} - -/// JSON input source that reads from a UTF-8 string. -// -// Able to elide UTF-8 checks by assuming that the input is valid UTF-8. -pub struct StrRead<'a> { - delegate: SliceRead<'a>, - #[cfg(feature = "raw_value")] - data: &'a str, -} - -// Prevent users from implementing the Read trait. -mod private { - pub trait Sealed {} -} - -////////////////////////////////////////////////////////////////////////////// - -#[cfg(feature = "std")] -impl<R> IoRead<R> -where - R: io::Read, -{ - /// Create a JSON input source to read from a std::io input stream. - pub fn new(reader: R) -> Self { - IoRead { - iter: LineColIterator::new(reader.bytes()), - ch: None, - #[cfg(feature = "raw_value")] - raw_buffer: None, - } - } -} - -#[cfg(feature = "std")] -impl<R> private::Sealed for IoRead<R> where R: io::Read {} - -#[cfg(feature = "std")] -impl<R> IoRead<R> -where - R: io::Read, -{ - #[allow(clippy::needless_pass_by_value)] - fn parse_str_bytes<'s, T, S>( - &'s mut self, - scratch: &'s mut Vec<u8>, - validate: bool, - utf_strategy: S, - ) -> Result<&'s T> - where - T: ?Sized, - S: UtfOutputStrategy<T>, - { - loop { - let ch = tri!(next_or_eof(self)); - if !ESCAPE[ch as usize] { - scratch.push(ch); - continue; - } - match ch { - b'"' => { - return utf_strategy.to_result_simple(self, scratch); - } - b'\\' => { - tri!(parse_escape(self, validate, scratch)); - } - _ => { - if validate { - return error(self, ErrorCode::ControlCharacterWhileParsingString); - } - scratch.push(ch); - } - } - } - } -} - -#[cfg(feature = "std")] -impl<'de, R> Read<'de> for IoRead<R> -where - R: io::Read, -{ - fn replace_invalid_unicode(&self) -> bool { - false - } - - fn allow_x_escapes(&self) -> bool { - false - } - - fn allow_v_escapes(&self) -> bool { - false - } - - #[inline] - fn next(&mut self) -> Result<Option<u8>> { - match self.ch.take() { - Some(ch) => { - #[cfg(feature = "raw_value")] - { - if let Some(buf) = &mut self.raw_buffer { - buf.push(ch); - } - } - Ok(Some(ch)) - } - None => match self.iter.next() { - Some(Err(err)) => Err(Error::io(err)), - Some(Ok(ch)) => { - #[cfg(feature = "raw_value")] - { - if let Some(buf) = &mut self.raw_buffer { - buf.push(ch); - } - } - Ok(Some(ch)) - } - None => Ok(None), - }, - } - } - - #[inline] - fn peek(&mut self) -> Result<Option<u8>> { - match self.ch { - Some(ch) => Ok(Some(ch)), - None => match self.iter.next() { - Some(Err(err)) => Err(Error::io(err)), - Some(Ok(ch)) => { - self.ch = Some(ch); - Ok(self.ch) - } - None => Ok(None), - }, - } - } - - #[cfg(not(feature = "raw_value"))] - #[inline] - fn discard(&mut self) { - self.ch = None; - } - - #[cfg(feature = "raw_value")] - fn discard(&mut self) { - if let Some(ch) = self.ch.take() { - if let Some(buf) = &mut self.raw_buffer { - buf.push(ch); - } - } - } - - fn position(&self) -> Position { - Position { - line: self.iter.line(), - column: self.iter.col(), - } - } - - fn peek_position(&self) -> Position { - // The LineColIterator updates its position during peek() so it has the - // right one here. - self.position() - } - - fn byte_offset(&self) -> usize { - match self.ch { - Some(_) => self.iter.byte_offset() - 1, - None => self.iter.byte_offset(), - } - } - - fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>> { - self.parse_str_bytes(scratch, true, StrUtfOutputStrategy) - .map(Reference::Copied) - } - - fn parse_str_raw<'s>( - &'s mut self, - scratch: &'s mut Vec<u8>, - ) -> Result<Reference<'de, 's, [u8]>> { - self.parse_str_bytes(scratch, false, SliceUtfOutputStrategy) - .map(Reference::Copied) - } - - fn ignore_str(&mut self) -> Result<()> { - loop { - let ch = tri!(next_or_eof(self)); - if !ESCAPE[ch as usize] { - continue; - } - match ch { - b'"' => { - return Ok(()); - } - b'\\' => { - tri!(ignore_escape(self)); - } - _ => { - return error(self, ErrorCode::ControlCharacterWhileParsingString); - } - } - } - } - - fn decode_hex_escape(&mut self, num_digits: usize) -> Result<u16> { - let mut n = 0; - for _ in 0..num_digits { - match decode_hex_val(tri!(next_or_eof(self))) { - None => return error(self, ErrorCode::InvalidEscape), - Some(val) => { - n = (n << 4) + val; - } - } - } - Ok(n) - } - - #[cfg(feature = "raw_value")] - fn begin_raw_buffering(&mut self) { - self.raw_buffer = Some(Vec::new()); - } - - #[cfg(feature = "raw_value")] - fn end_raw_buffering<V>(&mut self, visitor: V) -> Result<V::Value> - where - V: Visitor<'de>, - { - let raw = self.raw_buffer.take().unwrap(); - let raw = match String::from_utf8(raw) { - Ok(raw) => raw, - Err(_) => return error(self, ErrorCode::InvalidUnicodeCodePoint), - }; - visitor.visit_map(OwnedRawDeserializer { - raw_value: Some(raw), - }) - } - - const should_early_return_if_failed: bool = true; - - #[inline] - #[cold] - fn set_failed(&mut self, failed: &mut bool) { - *failed = true; - } -} - -////////////////////////////////////////////////////////////////////////////// - -impl<'a> SliceRead<'a> { - /// Create a JSON input source to read from a slice of bytes. - #[allow(clippy::fn_params_excessive_bools)] - pub fn new( - slice: &'a [u8], - replace_invalid_characters: bool, - allow_control_characters_in_string: bool, - allow_v_escapes: bool, - allow_x_escapes: bool, - ) -> Self { - SliceRead { - slice, - index: 0, - replace_invalid_characters, - allow_control_characters_in_string, - allow_v_escapes, - allow_x_escapes, - #[cfg(feature = "raw_value")] - raw_buffering_start_index: 0, - } - } - - fn escapes(&self) -> &[bool; 256] { - if self.allow_control_characters_in_string { - return &NO_ESCAPE; - } - &ESCAPE - } - - fn position_of_index(&self, i: usize) -> Position { - let mut position = Position { line: 1, column: 0 }; - for ch in &self.slice[..i] { - match *ch { - b'\n' => { - position.line += 1; - position.column = 0; - } - _ => { - position.column += 1; - } - } - } - position - } - - /// The big optimization here over IoRead is that if the string contains no - /// backslash escape sequences, the returned &str is a slice of the raw JSON - /// data so we avoid copying into the scratch space. - #[allow(clippy::needless_pass_by_value)] - fn parse_str_bytes<'s, T, S>( - &'s mut self, - scratch: &'s mut Vec<u8>, - validate: bool, - utf_strategy: S, - ) -> Result<Reference<'a, 's, T>> - where - T: ?Sized + 's, - S: UtfOutputStrategy<T>, - { - // Index of the first byte not yet copied into the scratch space. - let mut start = self.index; - - loop { - while self.index < self.slice.len() && !self.escapes()[self.slice[self.index] as usize] - { - self.index += 1; - } - if self.index == self.slice.len() { - return error(self, ErrorCode::EofWhileParsingString); - } - match self.slice[self.index] { - b'"' => { - if scratch.is_empty() { - // Fast path: return a slice of the raw JSON without any - // copying. - let borrowed = &self.slice[start..self.index]; - self.index += 1; - return utf_strategy.to_result_direct(self, borrowed, scratch); - } else { - utf_strategy.extend_scratch(scratch, &self.slice[start..self.index]); - self.index += 1; - return utf_strategy - .to_result_from_scratch(self, scratch) - .map(|r| Reference::Copied(r)); - } - } - b'\\' => { - utf_strategy.extend_scratch(scratch, &self.slice[start..self.index]); - self.index += 1; - tri!(parse_escape(self, validate, scratch)); - start = self.index; - } - _ => { - self.index += 1; - if validate { - return error(self, ErrorCode::ControlCharacterWhileParsingString); - } - } - } - } - } -} - -impl<'a> private::Sealed for SliceRead<'a> {} - -impl<'a> Read<'a> for SliceRead<'a> { - fn replace_invalid_unicode(&self) -> bool { - self.replace_invalid_characters - } - - fn allow_x_escapes(&self) -> bool { - self.allow_x_escapes - } - - fn allow_v_escapes(&self) -> bool { - self.allow_v_escapes - } - - #[inline] - fn next(&mut self) -> Result<Option<u8>> { - // `Ok(self.slice.get(self.index).map(|ch| { self.index += 1; *ch }))` - // is about 10% slower. - Ok(if self.index < self.slice.len() { - let ch = self.slice[self.index]; - self.index += 1; - Some(ch) - } else { - None - }) - } - - #[inline] - fn peek(&mut self) -> Result<Option<u8>> { - // `Ok(self.slice.get(self.index).map(|ch| *ch))` is about 10% slower - // for some reason. - Ok(if self.index < self.slice.len() { - Some(self.slice[self.index]) - } else { - None - }) - } - - #[inline] - fn discard(&mut self) { - self.index += 1; - } - - fn position(&self) -> Position { - self.position_of_index(self.index) - } - - fn peek_position(&self) -> Position { - // Cap it at slice.len() just in case the most recent call was next() - // and it returned the last byte. - self.position_of_index(cmp::min(self.slice.len(), self.index + 1)) - } - - fn byte_offset(&self) -> usize { - self.index - } - - fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'a, 's, str>> { - if self.replace_invalid_characters { - self.parse_str_bytes(scratch, true, SubstitutingStrUtfOutputStrategy) - } else { - self.parse_str_bytes(scratch, true, StrUtfOutputStrategy) - } - } - - fn parse_str_raw<'s>( - &'s mut self, - scratch: &'s mut Vec<u8>, - ) -> Result<Reference<'a, 's, [u8]>> { - self.parse_str_bytes(scratch, false, SliceUtfOutputStrategy) - } - - fn ignore_str(&mut self) -> Result<()> { - loop { - while self.index < self.slice.len() && !self.escapes()[self.slice[self.index] as usize] - { - self.index += 1; - } - if self.index == self.slice.len() { - return error(self, ErrorCode::EofWhileParsingString); - } - match self.slice[self.index] { - b'"' => { - self.index += 1; - return Ok(()); - } - b'\\' => { - self.index += 1; - tri!(ignore_escape(self)); - } - _ => { - return error(self, ErrorCode::ControlCharacterWhileParsingString); - } - } - } - } - - fn decode_hex_escape(&mut self, num_digits: usize) -> Result<u16> { - if self.index + num_digits > self.slice.len() { - self.index = self.slice.len(); - return error(self, ErrorCode::EofWhileParsingString); - } - - let mut n = 0; - for _ in 0..num_digits { - let ch = decode_hex_val(self.slice[self.index]); - self.index += 1; - match ch { - None => return error(self, ErrorCode::InvalidEscape), - Some(val) => { - n = (n << 4) + val; - } - } - } - Ok(n) - } - - #[cfg(feature = "raw_value")] - fn begin_raw_buffering(&mut self) { - self.raw_buffering_start_index = self.index; - } - - #[cfg(feature = "raw_value")] - fn end_raw_buffering<V>(&mut self, visitor: V) -> Result<V::Value> - where - V: Visitor<'a>, - { - let raw = &self.slice[self.raw_buffering_start_index..self.index]; - let raw = match str::from_utf8(raw) { - Ok(raw) => raw, - Err(_) => return error(self, ErrorCode::InvalidUnicodeCodePoint), - }; - visitor.visit_map(BorrowedRawDeserializer { - raw_value: Some(raw), - }) - } - - const should_early_return_if_failed: bool = false; - - #[inline] - #[cold] - fn set_failed(&mut self, _failed: &mut bool) { - self.slice = &self.slice[..self.index]; - } -} - -////////////////////////////////////////////////////////////////////////////// - -impl<'a> StrRead<'a> { - /// Create a JSON input source to read from a UTF-8 string. - pub fn new(s: &'a str) -> Self { - StrRead { - delegate: SliceRead::new(s.as_bytes(), false, false, false, false), - #[cfg(feature = "raw_value")] - data: s, - } - } -} - -impl<'a> private::Sealed for StrRead<'a> {} - -impl<'a> Read<'a> for StrRead<'a> { - fn replace_invalid_unicode(&self) -> bool { - false - } - - fn allow_x_escapes(&self) -> bool { - false - } - - fn allow_v_escapes(&self) -> bool { - false - } - - #[inline] - fn next(&mut self) -> Result<Option<u8>> { - self.delegate.next() - } - - #[inline] - fn peek(&mut self) -> Result<Option<u8>> { - self.delegate.peek() - } - - #[inline] - fn discard(&mut self) { - self.delegate.discard(); - } - - fn position(&self) -> Position { - self.delegate.position() - } - - fn peek_position(&self) -> Position { - self.delegate.peek_position() - } - - fn byte_offset(&self) -> usize { - self.delegate.byte_offset() - } - - fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'a, 's, str>> { - self.delegate - .parse_str_bytes(scratch, true, UncheckedStrUtfOutputStrategy) - } - - fn parse_str_raw<'s>( - &'s mut self, - scratch: &'s mut Vec<u8>, - ) -> Result<Reference<'a, 's, [u8]>> { - self.delegate.parse_str_raw(scratch) - } - - fn ignore_str(&mut self) -> Result<()> { - self.delegate.ignore_str() - } - - fn decode_hex_escape(&mut self, num_digits: usize) -> Result<u16> { - self.delegate.decode_hex_escape(num_digits) - } - - #[cfg(feature = "raw_value")] - fn begin_raw_buffering(&mut self) { - self.delegate.begin_raw_buffering(); - } - - #[cfg(feature = "raw_value")] - fn end_raw_buffering<V>(&mut self, visitor: V) -> Result<V::Value> - where - V: Visitor<'a>, - { - let raw = &self.data[self.delegate.raw_buffering_start_index..self.delegate.index]; - visitor.visit_map(BorrowedRawDeserializer { - raw_value: Some(raw), - }) - } - - const should_early_return_if_failed: bool = false; - - #[inline] - #[cold] - fn set_failed(&mut self, failed: &mut bool) { - self.delegate.set_failed(failed); - } -} - -////////////////////////////////////////////////////////////////////////////// - -impl<'a, 'de, R> private::Sealed for &'a mut R where R: Read<'de> {} - -impl<'a, 'de, R> Read<'de> for &'a mut R -where - R: Read<'de>, -{ - fn next(&mut self) -> Result<Option<u8>> { - R::next(self) - } - - fn peek(&mut self) -> Result<Option<u8>> { - R::peek(self) - } - - fn discard(&mut self) { - R::discard(self); - } - - fn position(&self) -> Position { - R::position(self) - } - - fn peek_position(&self) -> Position { - R::peek_position(self) - } - - fn byte_offset(&self) -> usize { - R::byte_offset(self) - } - - fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>> { - R::parse_str(self, scratch) - } - - fn parse_str_raw<'s>( - &'s mut self, - scratch: &'s mut Vec<u8>, - ) -> Result<Reference<'de, 's, [u8]>> { - R::parse_str_raw(self, scratch) - } - - fn ignore_str(&mut self) -> Result<()> { - R::ignore_str(self) - } - - fn decode_hex_escape(&mut self, num_digits: usize) -> Result<u16> { - R::decode_hex_escape(self, num_digits) - } - - #[cfg(feature = "raw_value")] - fn begin_raw_buffering(&mut self) { - R::begin_raw_buffering(self); - } - - #[cfg(feature = "raw_value")] - fn end_raw_buffering<V>(&mut self, visitor: V) -> Result<V::Value> - where - V: Visitor<'de>, - { - R::end_raw_buffering(self, visitor) - } - - const should_early_return_if_failed: bool = R::should_early_return_if_failed; - - fn set_failed(&mut self, failed: &mut bool) { - R::set_failed(self, failed); - } - - fn replace_invalid_unicode(&self) -> bool { - R::replace_invalid_unicode(self) - } - - fn allow_x_escapes(&self) -> bool { - R::allow_x_escapes(self) - } - - fn allow_v_escapes(&self) -> bool { - R::allow_v_escapes(self) - } -} - -////////////////////////////////////////////////////////////////////////////// - -/// Marker for whether StreamDeserializer can implement FusedIterator. -pub trait Fused: private::Sealed {} -impl<'a> Fused for SliceRead<'a> {} -impl<'a> Fused for StrRead<'a> {} - -const ESCAPE: [bool; 256] = get_escapes(false); -const NO_ESCAPE: [bool; 256] = get_escapes(true); - -// Lookup table of bytes that must be escaped. A value of true at index i means -// that byte i requires an escape sequence in the input. -const fn get_escapes(allow_control_characters_in_string: bool) -> [bool; 256] { - const QU: bool = true; // quote \x22 - const BS: bool = true; // backslash \x5C - const __: bool = false; // allow unescaped - #[allow(non_snake_case)] - let CT: bool = !allow_control_characters_in_string; // control character \x00..=\x1F - [ - // 1 2 3 4 5 6 7 8 9 A B C D E F - CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, // 0 - CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, CT, // 1 - __, __, QU, __, __, __, __, __, __, __, __, __, __, __, __, __, // 2 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 3 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 4 - __, __, __, __, __, __, __, __, __, __, __, __, BS, __, __, __, // 5 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 6 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 7 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 8 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 9 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // A - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // B - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // C - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // D - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // E - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // F - ] -} - -fn next_or_eof<'de, R>(read: &mut R) -> Result<u8> -where - R: ?Sized + Read<'de>, -{ - match tri!(read.next()) { - Some(b) => Ok(b), - None => error(read, ErrorCode::EofWhileParsingString), - } -} - -fn peek_or_eof<'de, R>(read: &mut R) -> Result<u8> -where - R: ?Sized + Read<'de>, -{ - match tri!(read.peek()) { - Some(b) => Ok(b), - None => error(read, ErrorCode::EofWhileParsingString), - } -} - -fn error<'de, R, T>(read: &R, reason: ErrorCode) -> Result<T> -where - R: ?Sized + Read<'de>, -{ - let position = read.position(); - Err(Error::syntax(reason, position.line, position.column)) -} - -/// Parses a JSON escape sequence and appends it into the scratch space. Assumes -/// the previous byte read was a backslash. -fn parse_escape<'de, R: Read<'de>>( - read: &mut R, - validate: bool, - scratch: &mut Vec<u8>, -) -> Result<()> { - let ch = tri!(next_or_eof(read)); - - // In the event of an error, if replacing invalid unicode, just return REPLACEMENT CHARACTER. - // Otherwise, discard the peeked byte representing the error if necessary and fall back to - // error(). - let mut error_or_replace = |read: &mut R, need_discard, reason| { - if read.replace_invalid_unicode() { - scratch.extend("\u{fffd}".as_bytes()); - Ok(()) - } else { - if need_discard { - read.discard(); - } - error(read, reason) - } - }; - - match ch { - b'"' => scratch.push(b'"'), - b'\\' => scratch.push(b'\\'), - b'/' => scratch.push(b'/'), - b'b' => scratch.push(b'\x08'), - b'f' => scratch.push(b'\x0c'), - b'n' => scratch.push(b'\n'), - b'r' => scratch.push(b'\r'), - b't' => scratch.push(b'\t'), - b'v' if read.allow_v_escapes() => scratch.push(b'\x0b'), - b'x' if read.allow_x_escapes() => { - let c: u32 = tri!(read.decode_hex_escape(2)).into(); - let c = match char::from_u32(c) { - Some(c) => c, - None => { - return error_or_replace(read, false, ErrorCode::InvalidUnicodeCodePoint); - } - }; - scratch.extend_from_slice(c.encode_utf8(&mut [0_u8; 4]).as_bytes()); - } - b'u' => { - fn encode_surrogate(scratch: &mut Vec<u8>, n: u16) { - scratch.extend_from_slice(&[ - (n >> 12 & 0b0000_1111) as u8 | 0b1110_0000, - (n >> 6 & 0b0011_1111) as u8 | 0b1000_0000, - (n & 0b0011_1111) as u8 | 0b1000_0000, - ]); - } - - let c = match tri!(read.decode_hex_escape(4)) { - n @ 0xDC00..=0xDFFF => { - return if validate { - error_or_replace(read, false, ErrorCode::LoneLeadingSurrogateInHexEscape) - } else { - encode_surrogate(scratch, n); - Ok(()) - }; - } - - // Non-BMP characters are encoded as a sequence of two hex - // escapes, representing UTF-16 surrogates. If deserializing a - // utf-8 string the surrogates are required to be paired, - // whereas deserializing a byte string accepts lone surrogates. - n1 @ 0xD800..=0xDBFF => { - if tri!(peek_or_eof(read)) == b'\\' { - read.discard(); - } else { - return if validate { - error_or_replace(read, true, ErrorCode::UnexpectedEndOfHexEscape) - } else { - encode_surrogate(scratch, n1); - Ok(()) - }; - } - - if tri!(peek_or_eof(read)) == b'u' { - read.discard(); - } else { - return if validate { - error_or_replace(read, true, ErrorCode::UnexpectedEndOfHexEscape) - } else { - encode_surrogate(scratch, n1); - // The \ prior to this byte started an escape sequence, - // so we need to parse that now. This recursive call - // does not blow the stack on malicious input because - // the escape is not \u, so it will be handled by one - // of the easy nonrecursive cases. - parse_escape(read, validate, scratch) - }; - } - - let n2 = tri!(read.decode_hex_escape(4)); - - if n2 < 0xDC00 || n2 > 0xDFFF { - return error_or_replace(read, false, ErrorCode::LoneLeadingSurrogateInHexEscape); - } - - let n = (((n1 - 0xD800) as u32) << 10 | (n2 - 0xDC00) as u32) + 0x1_0000; - - match char::from_u32(n) { - Some(c) => c, - None => { - return error_or_replace(read, false, ErrorCode::InvalidUnicodeCodePoint); - } - } - } - - // Every u16 outside of the surrogate ranges above is guaranteed - // to be a legal char. - n => char::from_u32(n as u32).unwrap(), - }; - - scratch.extend_from_slice(c.encode_utf8(&mut [0_u8; 4]).as_bytes()); - } - _ => { - return error(read, ErrorCode::InvalidEscape); - } - } - - Ok(()) -} - -/// Parses a JSON escape sequence and discards the value. Assumes the previous -/// byte read was a backslash. -fn ignore_escape<'de, R>(read: &mut R) -> Result<()> -where - R: ?Sized + Read<'de>, -{ - let ch = tri!(next_or_eof(read)); - - match ch { - b'"' | b'\\' | b'/' | b'b' | b'f' | b'n' | b'r' | b't' | b'v' => {} - b'u' => { - // At this point we don't care if the codepoint is valid. We just - // want to consume it. We don't actually know what is valid or not - // at this point, because that depends on if this string will - // ultimately be parsed into a string or a byte buffer in the "real" - // parse. - - tri!(read.decode_hex_escape(4)); - } - b'x' => { - let c: u32 = tri!(read.decode_hex_escape(2)).into(); - match char::from_u32(c) { - Some(_) => {} - None => { - return error(read, ErrorCode::InvalidUnicodeCodePoint); - } - }; - } - _ => { - return error(read, ErrorCode::InvalidEscape); - } - } - - Ok(()) -} - -static HEX: [u8; 256] = { - const __: u8 = 255; // not a hex digit - [ - // 1 2 3 4 5 6 7 8 9 A B C D E F - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 0 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 1 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 2 - 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, __, __, __, __, __, __, // 3 - __, 10, 11, 12, 13, 14, 15, __, __, __, __, __, __, __, __, __, // 4 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 5 - __, 10, 11, 12, 13, 14, 15, __, __, __, __, __, __, __, __, __, // 6 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 7 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 8 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 9 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // A - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // B - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // C - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // D - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // E - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // F - ] -}; - -fn decode_hex_val(val: u8) -> Option<u16> { - let n = HEX[val as usize] as u16; - if n == 255 { - None - } else { - Some(n) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/ser.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/ser.rs deleted file mode 100644 index 6bb6fd7..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/ser.rs +++ /dev/null
@@ -1,2234 +0,0 @@ -//! Serialize a Rust data structure into JSON data. - -use crate::error::{Error, ErrorCode, Result}; -use crate::io; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::fmt::{self, Display}; -use core::num::FpCategory; -use serde::ser::{self, Impossible, Serialize}; - -/// A structure for serializing Rust values into JSON. -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -pub struct Serializer<W, F = CompactFormatter> { - writer: W, - formatter: F, -} - -impl<W> Serializer<W> -where - W: io::Write, -{ - /// Creates a new JSON serializer. - #[inline] - pub fn new(writer: W) -> Self { - Serializer::with_formatter(writer, CompactFormatter) - } -} - -impl<'a, W> Serializer<W, PrettyFormatter<'a>> -where - W: io::Write, -{ - /// Creates a new JSON pretty print serializer. - #[inline] - pub fn pretty(writer: W) -> Self { - Serializer::with_formatter(writer, PrettyFormatter::new()) - } -} - -impl<W, F> Serializer<W, F> -where - W: io::Write, - F: Formatter, -{ - /// Creates a new JSON visitor whose output will be written to the writer - /// specified. - #[inline] - pub fn with_formatter(writer: W, formatter: F) -> Self { - Serializer { writer, formatter } - } - - /// Unwrap the `Writer` from the `Serializer`. - #[inline] - pub fn into_inner(self) -> W { - self.writer - } -} - -impl<'a, W, F> ser::Serializer for &'a mut Serializer<W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - type SerializeSeq = Compound<'a, W, F>; - type SerializeTuple = Compound<'a, W, F>; - type SerializeTupleStruct = Compound<'a, W, F>; - type SerializeTupleVariant = Compound<'a, W, F>; - type SerializeMap = Compound<'a, W, F>; - type SerializeStruct = Compound<'a, W, F>; - type SerializeStructVariant = Compound<'a, W, F>; - - #[inline] - fn serialize_bool(self, value: bool) -> Result<()> { - self.formatter - .write_bool(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_i8(self, value: i8) -> Result<()> { - self.formatter - .write_i8(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_i16(self, value: i16) -> Result<()> { - self.formatter - .write_i16(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_i32(self, value: i32) -> Result<()> { - self.formatter - .write_i32(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_i64(self, value: i64) -> Result<()> { - self.formatter - .write_i64(&mut self.writer, value) - .map_err(Error::io) - } - - fn serialize_i128(self, value: i128) -> Result<()> { - self.formatter - .write_i128(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_u8(self, value: u8) -> Result<()> { - self.formatter - .write_u8(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_u16(self, value: u16) -> Result<()> { - self.formatter - .write_u16(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_u32(self, value: u32) -> Result<()> { - self.formatter - .write_u32(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_u64(self, value: u64) -> Result<()> { - self.formatter - .write_u64(&mut self.writer, value) - .map_err(Error::io) - } - - fn serialize_u128(self, value: u128) -> Result<()> { - self.formatter - .write_u128(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_f32(self, value: f32) -> Result<()> { - match value.classify() { - FpCategory::Nan | FpCategory::Infinite => self - .formatter - .write_null(&mut self.writer) - .map_err(Error::io), - _ => self - .formatter - .write_f32(&mut self.writer, value) - .map_err(Error::io), - } - } - - #[inline] - fn serialize_f64(self, value: f64) -> Result<()> { - match value.classify() { - FpCategory::Nan | FpCategory::Infinite => self - .formatter - .write_null(&mut self.writer) - .map_err(Error::io), - _ => self - .formatter - .write_f64(&mut self.writer, value) - .map_err(Error::io), - } - } - - #[inline] - fn serialize_char(self, value: char) -> Result<()> { - // A char encoded as UTF-8 takes 4 bytes at most. - let mut buf = [0; 4]; - self.serialize_str(value.encode_utf8(&mut buf)) - } - - #[inline] - fn serialize_str(self, value: &str) -> Result<()> { - format_escaped_str(&mut self.writer, &mut self.formatter, value).map_err(Error::io) - } - - #[inline] - fn serialize_bytes(self, value: &[u8]) -> Result<()> { - self.formatter - .write_byte_array(&mut self.writer, value) - .map_err(Error::io) - } - - #[inline] - fn serialize_unit(self) -> Result<()> { - self.formatter - .write_null(&mut self.writer) - .map_err(Error::io) - } - - #[inline] - fn serialize_unit_struct(self, _name: &'static str) -> Result<()> { - self.serialize_unit() - } - - #[inline] - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - ) -> Result<()> { - self.serialize_str(variant) - } - - /// Serialize newtypes without an object wrapper. - #[inline] - fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - #[inline] - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - value: &T, - ) -> Result<()> - where - T: ?Sized + Serialize, - { - tri!(self - .formatter - .begin_object(&mut self.writer) - .map_err(Error::io)); - tri!(self - .formatter - .begin_object_key(&mut self.writer, true) - .map_err(Error::io)); - tri!(self.serialize_str(variant)); - tri!(self - .formatter - .end_object_key(&mut self.writer) - .map_err(Error::io)); - tri!(self - .formatter - .begin_object_value(&mut self.writer) - .map_err(Error::io)); - tri!(value.serialize(&mut *self)); - tri!(self - .formatter - .end_object_value(&mut self.writer) - .map_err(Error::io)); - self.formatter - .end_object(&mut self.writer) - .map_err(Error::io) - } - - #[inline] - fn serialize_none(self) -> Result<()> { - self.serialize_unit() - } - - #[inline] - fn serialize_some<T>(self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - #[inline] - fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq> { - tri!(self - .formatter - .begin_array(&mut self.writer) - .map_err(Error::io)); - if len == Some(0) { - tri!(self - .formatter - .end_array(&mut self.writer) - .map_err(Error::io)); - Ok(Compound::Map { - ser: self, - state: State::Empty, - }) - } else { - Ok(Compound::Map { - ser: self, - state: State::First, - }) - } - } - - #[inline] - fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple> { - self.serialize_seq(Some(len)) - } - - #[inline] - fn serialize_tuple_struct( - self, - _name: &'static str, - len: usize, - ) -> Result<Self::SerializeTupleStruct> { - self.serialize_seq(Some(len)) - } - - #[inline] - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - len: usize, - ) -> Result<Self::SerializeTupleVariant> { - tri!(self - .formatter - .begin_object(&mut self.writer) - .map_err(Error::io)); - tri!(self - .formatter - .begin_object_key(&mut self.writer, true) - .map_err(Error::io)); - tri!(self.serialize_str(variant)); - tri!(self - .formatter - .end_object_key(&mut self.writer) - .map_err(Error::io)); - tri!(self - .formatter - .begin_object_value(&mut self.writer) - .map_err(Error::io)); - self.serialize_seq(Some(len)) - } - - #[inline] - fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap> { - tri!(self - .formatter - .begin_object(&mut self.writer) - .map_err(Error::io)); - if len == Some(0) { - tri!(self - .formatter - .end_object(&mut self.writer) - .map_err(Error::io)); - Ok(Compound::Map { - ser: self, - state: State::Empty, - }) - } else { - Ok(Compound::Map { - ser: self, - state: State::First, - }) - } - } - - #[inline] - fn serialize_struct(self, name: &'static str, len: usize) -> Result<Self::SerializeStruct> { - match name { - #[cfg(feature = "arbitrary_precision")] - crate::number::TOKEN => Ok(Compound::Number { ser: self }), - #[cfg(feature = "raw_value")] - crate::raw::TOKEN => Ok(Compound::RawValue { ser: self }), - _ => self.serialize_map(Some(len)), - } - } - - #[inline] - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - len: usize, - ) -> Result<Self::SerializeStructVariant> { - tri!(self - .formatter - .begin_object(&mut self.writer) - .map_err(Error::io)); - tri!(self - .formatter - .begin_object_key(&mut self.writer, true) - .map_err(Error::io)); - tri!(self.serialize_str(variant)); - tri!(self - .formatter - .end_object_key(&mut self.writer) - .map_err(Error::io)); - tri!(self - .formatter - .begin_object_value(&mut self.writer) - .map_err(Error::io)); - self.serialize_map(Some(len)) - } - - fn collect_str<T>(self, value: &T) -> Result<()> - where - T: ?Sized + Display, - { - use self::fmt::Write; - - struct Adapter<'ser, W: 'ser, F: 'ser> { - writer: &'ser mut W, - formatter: &'ser mut F, - error: Option<io::Error>, - } - - impl<'ser, W, F> Write for Adapter<'ser, W, F> - where - W: io::Write, - F: Formatter, - { - fn write_str(&mut self, s: &str) -> fmt::Result { - debug_assert!(self.error.is_none()); - match format_escaped_str_contents(self.writer, self.formatter, s) { - Ok(()) => Ok(()), - Err(err) => { - self.error = Some(err); - Err(fmt::Error) - } - } - } - } - - tri!(self - .formatter - .begin_string(&mut self.writer) - .map_err(Error::io)); - let mut adapter = Adapter { - writer: &mut self.writer, - formatter: &mut self.formatter, - error: None, - }; - match write!(adapter, "{}", value) { - Ok(()) => debug_assert!(adapter.error.is_none()), - Err(fmt::Error) => { - return Err(Error::io(adapter.error.expect("there should be an error"))); - } - } - self.formatter - .end_string(&mut self.writer) - .map_err(Error::io) - } -} - -// Not public API. Should be pub(crate). -#[doc(hidden)] -#[derive(Eq, PartialEq)] -pub enum State { - Empty, - First, - Rest, -} - -// Not public API. Should be pub(crate). -#[doc(hidden)] -pub enum Compound<'a, W: 'a, F: 'a> { - Map { - ser: &'a mut Serializer<W, F>, - state: State, - }, - #[cfg(feature = "arbitrary_precision")] - Number { ser: &'a mut Serializer<W, F> }, - #[cfg(feature = "raw_value")] - RawValue { ser: &'a mut Serializer<W, F> }, -} - -impl<'a, W, F> ser::SerializeSeq for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_element<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - Compound::Map { ser, state } => { - tri!(ser - .formatter - .begin_array_value(&mut ser.writer, *state == State::First) - .map_err(Error::io)); - *state = State::Rest; - tri!(value.serialize(&mut **ser)); - ser.formatter - .end_array_value(&mut ser.writer) - .map_err(Error::io) - } - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } - - #[inline] - fn end(self) -> Result<()> { - match self { - Compound::Map { ser, state } => match state { - State::Empty => Ok(()), - _ => ser.formatter.end_array(&mut ser.writer).map_err(Error::io), - }, - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } -} - -impl<'a, W, F> ser::SerializeTuple for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_element<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - ser::SerializeSeq::serialize_element(self, value) - } - - #[inline] - fn end(self) -> Result<()> { - ser::SerializeSeq::end(self) - } -} - -impl<'a, W, F> ser::SerializeTupleStruct for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_field<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - ser::SerializeSeq::serialize_element(self, value) - } - - #[inline] - fn end(self) -> Result<()> { - ser::SerializeSeq::end(self) - } -} - -impl<'a, W, F> ser::SerializeTupleVariant for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_field<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - ser::SerializeSeq::serialize_element(self, value) - } - - #[inline] - fn end(self) -> Result<()> { - match self { - Compound::Map { ser, state } => { - match state { - State::Empty => {} - _ => tri!(ser.formatter.end_array(&mut ser.writer).map_err(Error::io)), - } - tri!(ser - .formatter - .end_object_value(&mut ser.writer) - .map_err(Error::io)); - ser.formatter.end_object(&mut ser.writer).map_err(Error::io) - } - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } -} - -impl<'a, W, F> ser::SerializeMap for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_key<T>(&mut self, key: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - Compound::Map { ser, state } => { - tri!(ser - .formatter - .begin_object_key(&mut ser.writer, *state == State::First) - .map_err(Error::io)); - *state = State::Rest; - - tri!(key.serialize(MapKeySerializer { ser: *ser })); - - ser.formatter - .end_object_key(&mut ser.writer) - .map_err(Error::io) - } - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } - - #[inline] - fn serialize_value<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - Compound::Map { ser, .. } => { - tri!(ser - .formatter - .begin_object_value(&mut ser.writer) - .map_err(Error::io)); - tri!(value.serialize(&mut **ser)); - ser.formatter - .end_object_value(&mut ser.writer) - .map_err(Error::io) - } - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } - - #[inline] - fn end(self) -> Result<()> { - match self { - Compound::Map { ser, state } => match state { - State::Empty => Ok(()), - _ => ser.formatter.end_object(&mut ser.writer).map_err(Error::io), - }, - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } -} - -impl<'a, W, F> ser::SerializeStruct for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - Compound::Map { .. } => ser::SerializeMap::serialize_entry(self, key, value), - #[cfg(feature = "arbitrary_precision")] - Compound::Number { ser, .. } => { - if key == crate::number::TOKEN { - value.serialize(NumberStrEmitter(ser)) - } else { - Err(invalid_number()) - } - } - #[cfg(feature = "raw_value")] - Compound::RawValue { ser, .. } => { - if key == crate::raw::TOKEN { - value.serialize(RawValueStrEmitter(ser)) - } else { - Err(invalid_raw_value()) - } - } - } - } - - #[inline] - fn end(self) -> Result<()> { - match self { - Compound::Map { .. } => ser::SerializeMap::end(self), - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => Ok(()), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => Ok(()), - } - } -} - -impl<'a, W, F> ser::SerializeStructVariant for Compound<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match *self { - Compound::Map { .. } => ser::SerializeStruct::serialize_field(self, key, value), - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } - - #[inline] - fn end(self) -> Result<()> { - match self { - Compound::Map { ser, state } => { - match state { - State::Empty => {} - _ => tri!(ser.formatter.end_object(&mut ser.writer).map_err(Error::io)), - } - tri!(ser - .formatter - .end_object_value(&mut ser.writer) - .map_err(Error::io)); - ser.formatter.end_object(&mut ser.writer).map_err(Error::io) - } - #[cfg(feature = "arbitrary_precision")] - Compound::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - Compound::RawValue { .. } => unreachable!(), - } - } -} - -struct MapKeySerializer<'a, W: 'a, F: 'a> { - ser: &'a mut Serializer<W, F>, -} - -#[cfg(feature = "arbitrary_precision")] -fn invalid_number() -> Error { - Error::syntax(ErrorCode::InvalidNumber, 0, 0) -} - -#[cfg(feature = "raw_value")] -fn invalid_raw_value() -> Error { - Error::syntax(ErrorCode::ExpectedSomeValue, 0, 0) -} - -fn key_must_be_a_string() -> Error { - Error::syntax(ErrorCode::KeyMustBeAString, 0, 0) -} - -fn float_key_must_be_finite() -> Error { - Error::syntax(ErrorCode::FloatKeyMustBeFinite, 0, 0) -} - -impl<'a, W, F> ser::Serializer for MapKeySerializer<'a, W, F> -where - W: io::Write, - F: Formatter, -{ - type Ok = (); - type Error = Error; - - #[inline] - fn serialize_str(self, value: &str) -> Result<()> { - self.ser.serialize_str(value) - } - - #[inline] - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - ) -> Result<()> { - self.ser.serialize_str(variant) - } - - #[inline] - fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - type SerializeSeq = Impossible<(), Error>; - type SerializeTuple = Impossible<(), Error>; - type SerializeTupleStruct = Impossible<(), Error>; - type SerializeTupleVariant = Impossible<(), Error>; - type SerializeMap = Impossible<(), Error>; - type SerializeStruct = Impossible<(), Error>; - type SerializeStructVariant = Impossible<(), Error>; - - fn serialize_bool(self, _value: bool) -> Result<()> { - Err(key_must_be_a_string()) - } - - fn serialize_i8(self, value: i8) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_i8(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_i16(self, value: i16) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_i16(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_i32(self, value: i32) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_i32(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_i64(self, value: i64) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_i64(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_i128(self, value: i128) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_i128(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_u8(self, value: u8) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_u8(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_u16(self, value: u16) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_u16(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_u32(self, value: u32) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_u32(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_u64(self, value: u64) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_u64(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_u128(self, value: u128) -> Result<()> { - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_u128(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_f32(self, value: f32) -> Result<()> { - if !value.is_finite() { - return Err(float_key_must_be_finite()); - } - - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_f32(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_f64(self, value: f64) -> Result<()> { - if !value.is_finite() { - return Err(float_key_must_be_finite()); - } - - tri!(self - .ser - .formatter - .begin_string(&mut self.ser.writer) - .map_err(Error::io)); - tri!(self - .ser - .formatter - .write_f64(&mut self.ser.writer, value) - .map_err(Error::io)); - self.ser - .formatter - .end_string(&mut self.ser.writer) - .map_err(Error::io) - } - - fn serialize_char(self, value: char) -> Result<()> { - self.ser.serialize_str(&value.to_string()) - } - - fn serialize_bytes(self, _value: &[u8]) -> Result<()> { - Err(key_must_be_a_string()) - } - - fn serialize_unit(self) -> Result<()> { - Err(key_must_be_a_string()) - } - - fn serialize_unit_struct(self, _name: &'static str) -> Result<()> { - Err(key_must_be_a_string()) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T, - ) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(key_must_be_a_string()) - } - - fn serialize_none(self) -> Result<()> { - Err(key_must_be_a_string()) - } - - fn serialize_some<T>(self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> { - Err(key_must_be_a_string()) - } - - fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple> { - Err(key_must_be_a_string()) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleStruct> { - Err(key_must_be_a_string()) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Err(key_must_be_a_string()) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Err(key_must_be_a_string()) - } - - fn serialize_struct(self, _name: &'static str, _len: usize) -> Result<Self::SerializeStruct> { - Err(key_must_be_a_string()) - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Err(key_must_be_a_string()) - } - - fn collect_str<T>(self, value: &T) -> Result<()> - where - T: ?Sized + Display, - { - self.ser.collect_str(value) - } -} - -#[cfg(feature = "arbitrary_precision")] -struct NumberStrEmitter<'a, W: 'a + io::Write, F: 'a + Formatter>(&'a mut Serializer<W, F>); - -#[cfg(feature = "arbitrary_precision")] -impl<'a, W: io::Write, F: Formatter> ser::Serializer for NumberStrEmitter<'a, W, F> { - type Ok = (); - type Error = Error; - - type SerializeSeq = Impossible<(), Error>; - type SerializeTuple = Impossible<(), Error>; - type SerializeTupleStruct = Impossible<(), Error>; - type SerializeTupleVariant = Impossible<(), Error>; - type SerializeMap = Impossible<(), Error>; - type SerializeStruct = Impossible<(), Error>; - type SerializeStructVariant = Impossible<(), Error>; - - fn serialize_bool(self, _v: bool) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_i8(self, _v: i8) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_i16(self, _v: i16) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_i32(self, _v: i32) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_i64(self, _v: i64) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_i128(self, _v: i128) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_u8(self, _v: u8) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_u16(self, _v: u16) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_u32(self, _v: u32) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_u64(self, _v: u64) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_u128(self, _v: u128) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_f32(self, _v: f32) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_f64(self, _v: f64) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_char(self, _v: char) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_str(self, value: &str) -> Result<()> { - let NumberStrEmitter(serializer) = self; - serializer - .formatter - .write_number_str(&mut serializer.writer, value) - .map_err(Error::io) - } - - fn serialize_bytes(self, _value: &[u8]) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_none(self) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_some<T>(self, _value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(invalid_number()) - } - - fn serialize_unit(self) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_unit_struct(self, _name: &'static str) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - ) -> Result<()> { - Err(invalid_number()) - } - - fn serialize_newtype_struct<T>(self, _name: &'static str, _value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(invalid_number()) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T, - ) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(invalid_number()) - } - - fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> { - Err(invalid_number()) - } - - fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple> { - Err(invalid_number()) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleStruct> { - Err(invalid_number()) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Err(invalid_number()) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Err(invalid_number()) - } - - fn serialize_struct(self, _name: &'static str, _len: usize) -> Result<Self::SerializeStruct> { - Err(invalid_number()) - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Err(invalid_number()) - } -} - -#[cfg(feature = "raw_value")] -struct RawValueStrEmitter<'a, W: 'a + io::Write, F: 'a + Formatter>(&'a mut Serializer<W, F>); - -#[cfg(feature = "raw_value")] -impl<'a, W: io::Write, F: Formatter> ser::Serializer for RawValueStrEmitter<'a, W, F> { - type Ok = (); - type Error = Error; - - type SerializeSeq = Impossible<(), Error>; - type SerializeTuple = Impossible<(), Error>; - type SerializeTupleStruct = Impossible<(), Error>; - type SerializeTupleVariant = Impossible<(), Error>; - type SerializeMap = Impossible<(), Error>; - type SerializeStruct = Impossible<(), Error>; - type SerializeStructVariant = Impossible<(), Error>; - - fn serialize_bool(self, _v: bool) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_i8(self, _v: i8) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_i16(self, _v: i16) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_i32(self, _v: i32) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_i64(self, _v: i64) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_i128(self, _v: i128) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_u8(self, _v: u8) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_u16(self, _v: u16) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_u32(self, _v: u32) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_u64(self, _v: u64) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_u128(self, _v: u128) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_f32(self, _v: f32) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_f64(self, _v: f64) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_char(self, _v: char) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_str(self, value: &str) -> Result<()> { - let RawValueStrEmitter(serializer) = self; - serializer - .formatter - .write_raw_fragment(&mut serializer.writer, value) - .map_err(Error::io) - } - - fn serialize_bytes(self, _value: &[u8]) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_none(self) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_some<T>(self, _value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_unit(self) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_unit_struct(self, _name: &'static str) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - ) -> Result<()> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_newtype_struct<T>(self, _name: &'static str, _value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T, - ) -> Result<()> - where - T: ?Sized + Serialize, - { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleStruct> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_struct(self, _name: &'static str, _len: usize) -> Result<Self::SerializeStruct> { - Err(ser::Error::custom("expected RawValue")) - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Err(ser::Error::custom("expected RawValue")) - } - - fn collect_str<T>(self, value: &T) -> Result<Self::Ok> - where - T: ?Sized + Display, - { - self.serialize_str(&value.to_string()) - } -} - -/// Represents a character escape code in a type-safe manner. -pub enum CharEscape { - /// An escaped quote `"` - Quote, - /// An escaped reverse solidus `\` - ReverseSolidus, - /// An escaped solidus `/` - Solidus, - /// An escaped backspace character (usually escaped as `\b`) - Backspace, - /// An escaped form feed character (usually escaped as `\f`) - FormFeed, - /// An escaped line feed character (usually escaped as `\n`) - LineFeed, - /// An escaped carriage return character (usually escaped as `\r`) - CarriageReturn, - /// An escaped tab character (usually escaped as `\t`) - Tab, - /// An escaped ASCII plane control character (usually escaped as - /// `\u00XX` where `XX` are two hex characters) - AsciiControl(u8), -} - -impl CharEscape { - #[inline] - fn from_escape_table(escape: u8, byte: u8) -> CharEscape { - match escape { - self::BB => CharEscape::Backspace, - self::TT => CharEscape::Tab, - self::NN => CharEscape::LineFeed, - self::FF => CharEscape::FormFeed, - self::RR => CharEscape::CarriageReturn, - self::QU => CharEscape::Quote, - self::BS => CharEscape::ReverseSolidus, - self::UU => CharEscape::AsciiControl(byte), - _ => unreachable!(), - } - } -} - -/// This trait abstracts away serializing the JSON control characters, which allows the user to -/// optionally pretty print the JSON output. -pub trait Formatter { - /// Writes a `null` value to the specified writer. - #[inline] - fn write_null<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"null") - } - - /// Writes a `true` or `false` value to the specified writer. - #[inline] - fn write_bool<W>(&mut self, writer: &mut W, value: bool) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let s = if value { - b"true" as &[u8] - } else { - b"false" as &[u8] - }; - writer.write_all(s) - } - - /// Writes an integer value like `-123` to the specified writer. - #[inline] - fn write_i8<W>(&mut self, writer: &mut W, value: i8) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `-123` to the specified writer. - #[inline] - fn write_i16<W>(&mut self, writer: &mut W, value: i16) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `-123` to the specified writer. - #[inline] - fn write_i32<W>(&mut self, writer: &mut W, value: i32) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `-123` to the specified writer. - #[inline] - fn write_i64<W>(&mut self, writer: &mut W, value: i64) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `-123` to the specified writer. - #[inline] - fn write_i128<W>(&mut self, writer: &mut W, value: i128) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `123` to the specified writer. - #[inline] - fn write_u8<W>(&mut self, writer: &mut W, value: u8) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `123` to the specified writer. - #[inline] - fn write_u16<W>(&mut self, writer: &mut W, value: u16) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `123` to the specified writer. - #[inline] - fn write_u32<W>(&mut self, writer: &mut W, value: u32) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `123` to the specified writer. - #[inline] - fn write_u64<W>(&mut self, writer: &mut W, value: u64) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes an integer value like `123` to the specified writer. - #[inline] - fn write_u128<W>(&mut self, writer: &mut W, value: u128) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = itoa::Buffer::new(); - let s = buffer.format(value); - writer.write_all(s.as_bytes()) - } - - /// Writes a floating point value like `-31.26e+12` to the specified writer. - #[inline] - fn write_f32<W>(&mut self, writer: &mut W, value: f32) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = ryu::Buffer::new(); - let s = buffer.format_finite(value); - writer.write_all(s.as_bytes()) - } - - /// Writes a floating point value like `-31.26e+12` to the specified writer. - #[inline] - fn write_f64<W>(&mut self, writer: &mut W, value: f64) -> io::Result<()> - where - W: ?Sized + io::Write, - { - let mut buffer = ryu::Buffer::new(); - let s = buffer.format_finite(value); - writer.write_all(s.as_bytes()) - } - - /// Writes a number that has already been rendered to a string. - #[inline] - fn write_number_str<W>(&mut self, writer: &mut W, value: &str) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(value.as_bytes()) - } - - /// Called before each series of `write_string_fragment` and - /// `write_char_escape`. Writes a `"` to the specified writer. - #[inline] - fn begin_string<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"\"") - } - - /// Called after each series of `write_string_fragment` and - /// `write_char_escape`. Writes a `"` to the specified writer. - #[inline] - fn end_string<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"\"") - } - - /// Writes a string fragment that doesn't need any escaping to the - /// specified writer. - #[inline] - fn write_string_fragment<W>(&mut self, writer: &mut W, fragment: &str) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(fragment.as_bytes()) - } - - /// Writes a character escape code to the specified writer. - #[inline] - fn write_char_escape<W>(&mut self, writer: &mut W, char_escape: CharEscape) -> io::Result<()> - where - W: ?Sized + io::Write, - { - use self::CharEscape::*; - - let s = match char_escape { - Quote => b"\\\"", - ReverseSolidus => b"\\\\", - Solidus => b"\\/", - Backspace => b"\\b", - FormFeed => b"\\f", - LineFeed => b"\\n", - CarriageReturn => b"\\r", - Tab => b"\\t", - AsciiControl(byte) => { - static HEX_DIGITS: [u8; 16] = *b"0123456789abcdef"; - let bytes = &[ - b'\\', - b'u', - b'0', - b'0', - HEX_DIGITS[(byte >> 4) as usize], - HEX_DIGITS[(byte & 0xF) as usize], - ]; - return writer.write_all(bytes); - } - }; - - writer.write_all(s) - } - - /// Writes the representation of a byte array. Formatters can choose whether - /// to represent bytes as a JSON array of integers (the default), or some - /// JSON string encoding like hex or base64. - fn write_byte_array<W>(&mut self, writer: &mut W, value: &[u8]) -> io::Result<()> - where - W: ?Sized + io::Write, - { - tri!(self.begin_array(writer)); - let mut first = true; - for byte in value { - tri!(self.begin_array_value(writer, first)); - tri!(self.write_u8(writer, *byte)); - tri!(self.end_array_value(writer)); - first = false; - } - self.end_array(writer) - } - - /// Called before every array. Writes a `[` to the specified - /// writer. - #[inline] - fn begin_array<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"[") - } - - /// Called after every array. Writes a `]` to the specified - /// writer. - #[inline] - fn end_array<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"]") - } - - /// Called before every array value. Writes a `,` if needed to - /// the specified writer. - #[inline] - fn begin_array_value<W>(&mut self, writer: &mut W, first: bool) -> io::Result<()> - where - W: ?Sized + io::Write, - { - if first { - Ok(()) - } else { - writer.write_all(b",") - } - } - - /// Called after every array value. - #[inline] - fn end_array_value<W>(&mut self, _writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - Ok(()) - } - - /// Called before every object. Writes a `{` to the specified - /// writer. - #[inline] - fn begin_object<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"{") - } - - /// Called after every object. Writes a `}` to the specified - /// writer. - #[inline] - fn end_object<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b"}") - } - - /// Called before every object key. - #[inline] - fn begin_object_key<W>(&mut self, writer: &mut W, first: bool) -> io::Result<()> - where - W: ?Sized + io::Write, - { - if first { - Ok(()) - } else { - writer.write_all(b",") - } - } - - /// Called after every object key. A `:` should be written to the - /// specified writer by either this method or - /// `begin_object_value`. - #[inline] - fn end_object_key<W>(&mut self, _writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - Ok(()) - } - - /// Called before every object value. A `:` should be written to - /// the specified writer by either this method or - /// `end_object_key`. - #[inline] - fn begin_object_value<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b":") - } - - /// Called after every object value. - #[inline] - fn end_object_value<W>(&mut self, _writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - Ok(()) - } - - /// Writes a raw JSON fragment that doesn't need any escaping to the - /// specified writer. - #[inline] - fn write_raw_fragment<W>(&mut self, writer: &mut W, fragment: &str) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(fragment.as_bytes()) - } -} - -/// This structure compacts a JSON value with no extra whitespace. -#[derive(Clone, Debug)] -pub struct CompactFormatter; - -impl Formatter for CompactFormatter {} - -/// This structure pretty prints a JSON value to make it human readable. -#[derive(Clone, Debug)] -pub struct PrettyFormatter<'a> { - current_indent: usize, - has_value: bool, - indent: &'a [u8], -} - -impl<'a> PrettyFormatter<'a> { - /// Construct a pretty printer formatter that defaults to using two spaces for indentation. - pub fn new() -> Self { - PrettyFormatter::with_indent(b" ") - } - - /// Construct a pretty printer formatter that uses the `indent` string for indentation. - pub fn with_indent(indent: &'a [u8]) -> Self { - PrettyFormatter { - current_indent: 0, - has_value: false, - indent, - } - } -} - -impl<'a> Default for PrettyFormatter<'a> { - fn default() -> Self { - PrettyFormatter::new() - } -} - -impl<'a> Formatter for PrettyFormatter<'a> { - #[inline] - fn begin_array<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - self.current_indent += 1; - self.has_value = false; - writer.write_all(b"[") - } - - #[inline] - fn end_array<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - self.current_indent -= 1; - - if self.has_value { - tri!(writer.write_all(b"\n")); - tri!(indent(writer, self.current_indent, self.indent)); - } - - writer.write_all(b"]") - } - - #[inline] - fn begin_array_value<W>(&mut self, writer: &mut W, first: bool) -> io::Result<()> - where - W: ?Sized + io::Write, - { - tri!(writer.write_all(if first { b"\n" } else { b",\n" })); - indent(writer, self.current_indent, self.indent) - } - - #[inline] - fn end_array_value<W>(&mut self, _writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - self.has_value = true; - Ok(()) - } - - #[inline] - fn begin_object<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - self.current_indent += 1; - self.has_value = false; - writer.write_all(b"{") - } - - #[inline] - fn end_object<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - self.current_indent -= 1; - - if self.has_value { - tri!(writer.write_all(b"\n")); - tri!(indent(writer, self.current_indent, self.indent)); - } - - writer.write_all(b"}") - } - - #[inline] - fn begin_object_key<W>(&mut self, writer: &mut W, first: bool) -> io::Result<()> - where - W: ?Sized + io::Write, - { - tri!(writer.write_all(if first { b"\n" } else { b",\n" })); - indent(writer, self.current_indent, self.indent) - } - - #[inline] - fn begin_object_value<W>(&mut self, writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - writer.write_all(b": ") - } - - #[inline] - fn end_object_value<W>(&mut self, _writer: &mut W) -> io::Result<()> - where - W: ?Sized + io::Write, - { - self.has_value = true; - Ok(()) - } -} - -fn format_escaped_str<W, F>(writer: &mut W, formatter: &mut F, value: &str) -> io::Result<()> -where - W: ?Sized + io::Write, - F: ?Sized + Formatter, -{ - tri!(formatter.begin_string(writer)); - tri!(format_escaped_str_contents(writer, formatter, value)); - formatter.end_string(writer) -} - -fn format_escaped_str_contents<W, F>( - writer: &mut W, - formatter: &mut F, - value: &str, -) -> io::Result<()> -where - W: ?Sized + io::Write, - F: ?Sized + Formatter, -{ - let bytes = value.as_bytes(); - - let mut start = 0; - - for (i, &byte) in bytes.iter().enumerate() { - let escape = ESCAPE[byte as usize]; - if escape == 0 { - continue; - } - - if start < i { - tri!(formatter.write_string_fragment(writer, &value[start..i])); - } - - let char_escape = CharEscape::from_escape_table(escape, byte); - tri!(formatter.write_char_escape(writer, char_escape)); - - start = i + 1; - } - - if start == bytes.len() { - return Ok(()); - } - - formatter.write_string_fragment(writer, &value[start..]) -} - -const BB: u8 = b'b'; // \x08 -const TT: u8 = b't'; // \x09 -const NN: u8 = b'n'; // \x0A -const FF: u8 = b'f'; // \x0C -const RR: u8 = b'r'; // \x0D -const QU: u8 = b'"'; // \x22 -const BS: u8 = b'\\'; // \x5C -const UU: u8 = b'u'; // \x00...\x1F except the ones above -const __: u8 = 0; - -// Lookup table of escape sequences. A value of b'x' at index i means that byte -// i is escaped as "\x" in JSON. A value of 0 means that byte i is not escaped. -static ESCAPE: [u8; 256] = [ - // 1 2 3 4 5 6 7 8 9 A B C D E F - UU, UU, UU, UU, UU, UU, UU, UU, BB, TT, NN, UU, FF, RR, UU, UU, // 0 - UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, UU, // 1 - __, __, QU, __, __, __, __, __, __, __, __, __, __, __, __, __, // 2 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 3 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 4 - __, __, __, __, __, __, __, __, __, __, __, __, BS, __, __, __, // 5 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 6 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 7 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 8 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // 9 - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // A - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // B - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // C - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // D - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // E - __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, // F -]; - -/// Serialize the given data structure as JSON into the I/O stream. -/// -/// Serialization guarantees it only feeds valid UTF-8 sequences to the writer. -/// -/// # Errors -/// -/// Serialization can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -#[inline] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -pub fn to_writer<W, T>(writer: W, value: &T) -> Result<()> -where - W: io::Write, - T: ?Sized + Serialize, -{ - let mut ser = Serializer::new(writer); - value.serialize(&mut ser) -} - -/// Serialize the given data structure as pretty-printed JSON into the I/O -/// stream. -/// -/// Serialization guarantees it only feeds valid UTF-8 sequences to the writer. -/// -/// # Errors -/// -/// Serialization can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -#[inline] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -pub fn to_writer_pretty<W, T>(writer: W, value: &T) -> Result<()> -where - W: io::Write, - T: ?Sized + Serialize, -{ - let mut ser = Serializer::pretty(writer); - value.serialize(&mut ser) -} - -/// Serialize the given data structure as a JSON byte vector. -/// -/// # Errors -/// -/// Serialization can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -#[inline] -pub fn to_vec<T>(value: &T) -> Result<Vec<u8>> -where - T: ?Sized + Serialize, -{ - let mut writer = Vec::with_capacity(128); - tri!(to_writer(&mut writer, value)); - Ok(writer) -} - -/// Serialize the given data structure as a pretty-printed JSON byte vector. -/// -/// # Errors -/// -/// Serialization can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -#[inline] -pub fn to_vec_pretty<T>(value: &T) -> Result<Vec<u8>> -where - T: ?Sized + Serialize, -{ - let mut writer = Vec::with_capacity(128); - tri!(to_writer_pretty(&mut writer, value)); - Ok(writer) -} - -/// Serialize the given data structure as a String of JSON. -/// -/// # Errors -/// -/// Serialization can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -#[inline] -pub fn to_string<T>(value: &T) -> Result<String> -where - T: ?Sized + Serialize, -{ - let vec = tri!(to_vec(value)); - let string = unsafe { - // We do not emit invalid UTF-8. - String::from_utf8_unchecked(vec) - }; - Ok(string) -} - -/// Serialize the given data structure as a pretty-printed String of JSON. -/// -/// # Errors -/// -/// Serialization can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -#[inline] -pub fn to_string_pretty<T>(value: &T) -> Result<String> -where - T: ?Sized + Serialize, -{ - let vec = tri!(to_vec_pretty(value)); - let string = unsafe { - // We do not emit invalid UTF-8. - String::from_utf8_unchecked(vec) - }; - Ok(string) -} - -fn indent<W>(wr: &mut W, n: usize, s: &[u8]) -> io::Result<()> -where - W: ?Sized + io::Write, -{ - for _ in 0..n { - tri!(wr.write_all(s)); - } - - Ok(()) -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/de.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/de.rs deleted file mode 100644 index 2090dd0..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/de.rs +++ /dev/null
@@ -1,1403 +0,0 @@ -use crate::error::{Error, ErrorCode}; -use crate::map::Map; -use crate::number::Number; -use crate::value::Value; -use alloc::borrow::{Cow, ToOwned}; -use alloc::string::String; -#[cfg(feature = "raw_value")] -use alloc::string::ToString; -use alloc::vec::{self, Vec}; -use core::fmt; -use core::slice; -use core::str::FromStr; -use serde::de::{ - self, Deserialize, DeserializeSeed, EnumAccess, Expected, IntoDeserializer, MapAccess, - SeqAccess, Unexpected, VariantAccess, Visitor, -}; -use serde::forward_to_deserialize_any; - -#[cfg(feature = "arbitrary_precision")] -use crate::number::NumberFromString; - -impl<'de> Deserialize<'de> for Value { - #[inline] - fn deserialize<D>(deserializer: D) -> Result<Value, D::Error> - where - D: serde::Deserializer<'de>, - { - struct ValueVisitor; - - impl<'de> Visitor<'de> for ValueVisitor { - type Value = Value; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("any valid JSON value") - } - - #[inline] - fn visit_bool<E>(self, value: bool) -> Result<Value, E> { - Ok(Value::Bool(value)) - } - - #[inline] - fn visit_i64<E>(self, value: i64) -> Result<Value, E> { - Ok(Value::Number(value.into())) - } - - #[inline] - fn visit_u64<E>(self, value: u64) -> Result<Value, E> { - Ok(Value::Number(value.into())) - } - - #[inline] - fn visit_f64<E>(self, value: f64) -> Result<Value, E> { - Ok(Number::from_f64(value).map_or(Value::Null, Value::Number)) - } - - #[cfg(any(feature = "std", feature = "alloc"))] - #[inline] - fn visit_str<E>(self, value: &str) -> Result<Value, E> - where - E: serde::de::Error, - { - self.visit_string(String::from(value)) - } - - #[cfg(any(feature = "std", feature = "alloc"))] - #[inline] - fn visit_string<E>(self, value: String) -> Result<Value, E> { - Ok(Value::String(value)) - } - - #[inline] - fn visit_none<E>(self) -> Result<Value, E> { - Ok(Value::Null) - } - - #[inline] - fn visit_some<D>(self, deserializer: D) -> Result<Value, D::Error> - where - D: serde::Deserializer<'de>, - { - Deserialize::deserialize(deserializer) - } - - #[inline] - fn visit_unit<E>(self) -> Result<Value, E> { - Ok(Value::Null) - } - - #[inline] - fn visit_seq<V>(self, mut visitor: V) -> Result<Value, V::Error> - where - V: SeqAccess<'de>, - { - let mut vec = Vec::new(); - - while let Some(elem) = tri!(visitor.next_element()) { - vec.push(elem); - } - - Ok(Value::Array(vec)) - } - - #[cfg(any(feature = "std", feature = "alloc"))] - fn visit_map<V>(self, mut visitor: V) -> Result<Value, V::Error> - where - V: MapAccess<'de>, - { - match tri!(visitor.next_key_seed(KeyClassifier)) { - #[cfg(feature = "arbitrary_precision")] - Some(KeyClass::Number) => { - let number: NumberFromString = tri!(visitor.next_value()); - Ok(Value::Number(number.value)) - } - #[cfg(feature = "raw_value")] - Some(KeyClass::RawValue) => { - let value = tri!(visitor.next_value_seed(crate::raw::BoxedFromString)); - crate::from_str(value.get()).map_err(de::Error::custom) - } - Some(KeyClass::Map(first_key)) => { - let mut values = Map::new(); - - values.insert(first_key, tri!(visitor.next_value())); - while let Some((key, value)) = tri!(visitor.next_entry()) { - values.insert(key, value); - } - - Ok(Value::Object(values)) - } - None => Ok(Value::Object(Map::new())), - } - } - } - - deserializer.deserialize_any(ValueVisitor) - } -} - -impl FromStr for Value { - type Err = Error; - fn from_str(s: &str) -> Result<Value, Error> { - super::super::de::from_str(s) - } -} - -macro_rules! deserialize_number { - ($method:ident) => { - #[cfg(not(feature = "arbitrary_precision"))] - fn $method<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Number(n) => n.deserialize_any(visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn $method<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Number(n) => n.$method(visitor), - _ => self.deserialize_any(visitor), - } - } - }; -} - -fn visit_array<'de, V>(array: Vec<Value>, visitor: V) -> Result<V::Value, Error> -where - V: Visitor<'de>, -{ - let len = array.len(); - let mut deserializer = SeqDeserializer::new(array); - let seq = tri!(visitor.visit_seq(&mut deserializer)); - let remaining = deserializer.iter.len(); - if remaining == 0 { - Ok(seq) - } else { - Err(serde::de::Error::invalid_length( - len, - &"fewer elements in array", - )) - } -} - -fn visit_object<'de, V>(object: Map<String, Value>, visitor: V) -> Result<V::Value, Error> -where - V: Visitor<'de>, -{ - let len = object.len(); - let mut deserializer = MapDeserializer::new(object); - let map = tri!(visitor.visit_map(&mut deserializer)); - let remaining = deserializer.iter.len(); - if remaining == 0 { - Ok(map) - } else { - Err(serde::de::Error::invalid_length( - len, - &"fewer elements in map", - )) - } -} - -impl<'de> serde::Deserializer<'de> for Value { - type Error = Error; - - #[inline] - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Null => visitor.visit_unit(), - Value::Bool(v) => visitor.visit_bool(v), - Value::Number(n) => n.deserialize_any(visitor), - #[cfg(any(feature = "std", feature = "alloc"))] - Value::String(v) => visitor.visit_string(v), - Value::Array(v) => visit_array(v, visitor), - Value::Object(v) => visit_object(v, visitor), - } - } - - deserialize_number!(deserialize_i8); - deserialize_number!(deserialize_i16); - deserialize_number!(deserialize_i32); - deserialize_number!(deserialize_i64); - deserialize_number!(deserialize_i128); - deserialize_number!(deserialize_u8); - deserialize_number!(deserialize_u16); - deserialize_number!(deserialize_u32); - deserialize_number!(deserialize_u64); - deserialize_number!(deserialize_u128); - deserialize_number!(deserialize_f32); - deserialize_number!(deserialize_f64); - - #[inline] - fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Null => visitor.visit_none(), - _ => visitor.visit_some(self), - } - } - - #[inline] - fn deserialize_enum<V>( - self, - _name: &str, - _variants: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - let (variant, value) = match self { - Value::Object(value) => { - let mut iter = value.into_iter(); - let (variant, value) = match iter.next() { - Some(v) => v, - None => { - return Err(serde::de::Error::invalid_value( - Unexpected::Map, - &"map with a single key", - )); - } - }; - // enums are encoded in json as maps with a single key:value pair - if iter.next().is_some() { - return Err(serde::de::Error::invalid_value( - Unexpected::Map, - &"map with a single key", - )); - } - (variant, Some(value)) - } - Value::String(variant) => (variant, None), - other => { - return Err(serde::de::Error::invalid_type( - other.unexpected(), - &"string or map", - )); - } - }; - - visitor.visit_enum(EnumDeserializer { variant, value }) - } - - #[inline] - fn deserialize_newtype_struct<V>( - self, - name: &'static str, - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - #[cfg(feature = "raw_value")] - { - if name == crate::raw::TOKEN { - return visitor.visit_map(crate::raw::OwnedRawDeserializer { - raw_value: Some(self.to_string()), - }); - } - } - - let _ = name; - visitor.visit_newtype_struct(self) - } - - fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Bool(v) => visitor.visit_bool(v), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_string(visitor) - } - - fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_string(visitor) - } - - fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - #[cfg(any(feature = "std", feature = "alloc"))] - Value::String(v) => visitor.visit_string(v), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_byte_buf(visitor) - } - - fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - #[cfg(any(feature = "std", feature = "alloc"))] - Value::String(v) => visitor.visit_string(v), - Value::Array(v) => visit_array(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Null => visitor.visit_unit(), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_unit_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_unit(visitor) - } - - fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Array(v) => visit_array(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_seq(visitor) - } - - fn deserialize_tuple_struct<V>( - self, - _name: &'static str, - _len: usize, - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_seq(visitor) - } - - fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Object(v) => visit_object(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_struct<V>( - self, - _name: &'static str, - _fields: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Array(v) => visit_array(v, visitor), - Value::Object(v) => visit_object(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_string(visitor) - } - - fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - drop(self); - visitor.visit_unit() - } -} - -struct EnumDeserializer { - variant: String, - value: Option<Value>, -} - -impl<'de> EnumAccess<'de> for EnumDeserializer { - type Error = Error; - type Variant = VariantDeserializer; - - fn variant_seed<V>(self, seed: V) -> Result<(V::Value, VariantDeserializer), Error> - where - V: DeserializeSeed<'de>, - { - let variant = self.variant.into_deserializer(); - let visitor = VariantDeserializer { value: self.value }; - seed.deserialize(variant).map(|v| (v, visitor)) - } -} - -impl<'de> IntoDeserializer<'de, Error> for Value { - type Deserializer = Self; - - fn into_deserializer(self) -> Self::Deserializer { - self - } -} - -impl<'de> IntoDeserializer<'de, Error> for &'de Value { - type Deserializer = Self; - - fn into_deserializer(self) -> Self::Deserializer { - self - } -} - -struct VariantDeserializer { - value: Option<Value>, -} - -impl<'de> VariantAccess<'de> for VariantDeserializer { - type Error = Error; - - fn unit_variant(self) -> Result<(), Error> { - match self.value { - Some(value) => Deserialize::deserialize(value), - None => Ok(()), - } - } - - fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Error> - where - T: DeserializeSeed<'de>, - { - match self.value { - Some(value) => seed.deserialize(value), - None => Err(serde::de::Error::invalid_type( - Unexpected::UnitVariant, - &"newtype variant", - )), - } - } - - fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self.value { - Some(Value::Array(v)) => { - if v.is_empty() { - visitor.visit_unit() - } else { - visit_array(v, visitor) - } - } - Some(other) => Err(serde::de::Error::invalid_type( - other.unexpected(), - &"tuple variant", - )), - None => Err(serde::de::Error::invalid_type( - Unexpected::UnitVariant, - &"tuple variant", - )), - } - } - - fn struct_variant<V>( - self, - _fields: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self.value { - Some(Value::Object(v)) => visit_object(v, visitor), - Some(other) => Err(serde::de::Error::invalid_type( - other.unexpected(), - &"struct variant", - )), - None => Err(serde::de::Error::invalid_type( - Unexpected::UnitVariant, - &"struct variant", - )), - } - } -} - -struct SeqDeserializer { - iter: vec::IntoIter<Value>, -} - -impl SeqDeserializer { - fn new(vec: Vec<Value>) -> Self { - SeqDeserializer { - iter: vec.into_iter(), - } - } -} - -impl<'de> SeqAccess<'de> for SeqDeserializer { - type Error = Error; - - fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Error> - where - T: DeserializeSeed<'de>, - { - match self.iter.next() { - Some(value) => seed.deserialize(value).map(Some), - None => Ok(None), - } - } - - fn size_hint(&self) -> Option<usize> { - match self.iter.size_hint() { - (lower, Some(upper)) if lower == upper => Some(upper), - _ => None, - } - } -} - -struct MapDeserializer { - iter: <Map<String, Value> as IntoIterator>::IntoIter, - value: Option<Value>, -} - -impl MapDeserializer { - fn new(map: Map<String, Value>) -> Self { - MapDeserializer { - iter: map.into_iter(), - value: None, - } - } -} - -impl<'de> MapAccess<'de> for MapDeserializer { - type Error = Error; - - fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Error> - where - T: DeserializeSeed<'de>, - { - match self.iter.next() { - Some((key, value)) => { - self.value = Some(value); - let key_de = MapKeyDeserializer { - key: Cow::Owned(key), - }; - seed.deserialize(key_de).map(Some) - } - None => Ok(None), - } - } - - fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Error> - where - T: DeserializeSeed<'de>, - { - match self.value.take() { - Some(value) => seed.deserialize(value), - None => Err(serde::de::Error::custom("value is missing")), - } - } - - fn size_hint(&self) -> Option<usize> { - match self.iter.size_hint() { - (lower, Some(upper)) if lower == upper => Some(upper), - _ => None, - } - } -} - -macro_rules! deserialize_value_ref_number { - ($method:ident) => { - #[cfg(not(feature = "arbitrary_precision"))] - fn $method<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Number(n) => n.deserialize_any(visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - #[cfg(feature = "arbitrary_precision")] - fn $method<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Number(n) => n.$method(visitor), - _ => self.deserialize_any(visitor), - } - } - }; -} - -fn visit_array_ref<'de, V>(array: &'de [Value], visitor: V) -> Result<V::Value, Error> -where - V: Visitor<'de>, -{ - let len = array.len(); - let mut deserializer = SeqRefDeserializer::new(array); - let seq = tri!(visitor.visit_seq(&mut deserializer)); - let remaining = deserializer.iter.len(); - if remaining == 0 { - Ok(seq) - } else { - Err(serde::de::Error::invalid_length( - len, - &"fewer elements in array", - )) - } -} - -fn visit_object_ref<'de, V>(object: &'de Map<String, Value>, visitor: V) -> Result<V::Value, Error> -where - V: Visitor<'de>, -{ - let len = object.len(); - let mut deserializer = MapRefDeserializer::new(object); - let map = tri!(visitor.visit_map(&mut deserializer)); - let remaining = deserializer.iter.len(); - if remaining == 0 { - Ok(map) - } else { - Err(serde::de::Error::invalid_length( - len, - &"fewer elements in map", - )) - } -} - -impl<'de> serde::Deserializer<'de> for &'de Value { - type Error = Error; - - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Null => visitor.visit_unit(), - Value::Bool(v) => visitor.visit_bool(*v), - Value::Number(n) => n.deserialize_any(visitor), - Value::String(v) => visitor.visit_borrowed_str(v), - Value::Array(v) => visit_array_ref(v, visitor), - Value::Object(v) => visit_object_ref(v, visitor), - } - } - - deserialize_value_ref_number!(deserialize_i8); - deserialize_value_ref_number!(deserialize_i16); - deserialize_value_ref_number!(deserialize_i32); - deserialize_value_ref_number!(deserialize_i64); - deserialize_number!(deserialize_i128); - deserialize_value_ref_number!(deserialize_u8); - deserialize_value_ref_number!(deserialize_u16); - deserialize_value_ref_number!(deserialize_u32); - deserialize_value_ref_number!(deserialize_u64); - deserialize_number!(deserialize_u128); - deserialize_value_ref_number!(deserialize_f32); - deserialize_value_ref_number!(deserialize_f64); - - fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match *self { - Value::Null => visitor.visit_none(), - _ => visitor.visit_some(self), - } - } - - fn deserialize_enum<V>( - self, - _name: &str, - _variants: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - let (variant, value) = match self { - Value::Object(value) => { - let mut iter = value.into_iter(); - let (variant, value) = match iter.next() { - Some(v) => v, - None => { - return Err(serde::de::Error::invalid_value( - Unexpected::Map, - &"map with a single key", - )); - } - }; - // enums are encoded in json as maps with a single key:value pair - if iter.next().is_some() { - return Err(serde::de::Error::invalid_value( - Unexpected::Map, - &"map with a single key", - )); - } - (variant, Some(value)) - } - Value::String(variant) => (variant, None), - other => { - return Err(serde::de::Error::invalid_type( - other.unexpected(), - &"string or map", - )); - } - }; - - visitor.visit_enum(EnumRefDeserializer { variant, value }) - } - - #[inline] - fn deserialize_newtype_struct<V>( - self, - name: &'static str, - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - #[cfg(feature = "raw_value")] - { - if name == crate::raw::TOKEN { - return visitor.visit_map(crate::raw::OwnedRawDeserializer { - raw_value: Some(self.to_string()), - }); - } - } - - let _ = name; - visitor.visit_newtype_struct(self) - } - - fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match *self { - Value::Bool(v) => visitor.visit_bool(v), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_str(visitor) - } - - fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::String(v) => visitor.visit_borrowed_str(v), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_str(visitor) - } - - fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::String(v) => visitor.visit_borrowed_str(v), - Value::Array(v) => visit_array_ref(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_bytes(visitor) - } - - fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match *self { - Value::Null => visitor.visit_unit(), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_unit_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_unit(visitor) - } - - fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Array(v) => visit_array_ref(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_seq(visitor) - } - - fn deserialize_tuple_struct<V>( - self, - _name: &'static str, - _len: usize, - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_seq(visitor) - } - - fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Object(v) => visit_object_ref(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_struct<V>( - self, - _name: &'static str, - _fields: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self { - Value::Array(v) => visit_array_ref(v, visitor), - Value::Object(v) => visit_object_ref(v, visitor), - _ => Err(self.invalid_type(&visitor)), - } - } - - fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.deserialize_str(visitor) - } - - fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - visitor.visit_unit() - } -} - -struct EnumRefDeserializer<'de> { - variant: &'de str, - value: Option<&'de Value>, -} - -impl<'de> EnumAccess<'de> for EnumRefDeserializer<'de> { - type Error = Error; - type Variant = VariantRefDeserializer<'de>; - - fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant), Error> - where - V: DeserializeSeed<'de>, - { - let variant = self.variant.into_deserializer(); - let visitor = VariantRefDeserializer { value: self.value }; - seed.deserialize(variant).map(|v| (v, visitor)) - } -} - -struct VariantRefDeserializer<'de> { - value: Option<&'de Value>, -} - -impl<'de> VariantAccess<'de> for VariantRefDeserializer<'de> { - type Error = Error; - - fn unit_variant(self) -> Result<(), Error> { - match self.value { - Some(value) => Deserialize::deserialize(value), - None => Ok(()), - } - } - - fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Error> - where - T: DeserializeSeed<'de>, - { - match self.value { - Some(value) => seed.deserialize(value), - None => Err(serde::de::Error::invalid_type( - Unexpected::UnitVariant, - &"newtype variant", - )), - } - } - - fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self.value { - Some(Value::Array(v)) => { - if v.is_empty() { - visitor.visit_unit() - } else { - visit_array_ref(v, visitor) - } - } - Some(other) => Err(serde::de::Error::invalid_type( - other.unexpected(), - &"tuple variant", - )), - None => Err(serde::de::Error::invalid_type( - Unexpected::UnitVariant, - &"tuple variant", - )), - } - } - - fn struct_variant<V>( - self, - _fields: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - match self.value { - Some(Value::Object(v)) => visit_object_ref(v, visitor), - Some(other) => Err(serde::de::Error::invalid_type( - other.unexpected(), - &"struct variant", - )), - None => Err(serde::de::Error::invalid_type( - Unexpected::UnitVariant, - &"struct variant", - )), - } - } -} - -struct SeqRefDeserializer<'de> { - iter: slice::Iter<'de, Value>, -} - -impl<'de> SeqRefDeserializer<'de> { - fn new(slice: &'de [Value]) -> Self { - SeqRefDeserializer { iter: slice.iter() } - } -} - -impl<'de> SeqAccess<'de> for SeqRefDeserializer<'de> { - type Error = Error; - - fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Error> - where - T: DeserializeSeed<'de>, - { - match self.iter.next() { - Some(value) => seed.deserialize(value).map(Some), - None => Ok(None), - } - } - - fn size_hint(&self) -> Option<usize> { - match self.iter.size_hint() { - (lower, Some(upper)) if lower == upper => Some(upper), - _ => None, - } - } -} - -struct MapRefDeserializer<'de> { - iter: <&'de Map<String, Value> as IntoIterator>::IntoIter, - value: Option<&'de Value>, -} - -impl<'de> MapRefDeserializer<'de> { - fn new(map: &'de Map<String, Value>) -> Self { - MapRefDeserializer { - iter: map.into_iter(), - value: None, - } - } -} - -impl<'de> MapAccess<'de> for MapRefDeserializer<'de> { - type Error = Error; - - fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Error> - where - T: DeserializeSeed<'de>, - { - match self.iter.next() { - Some((key, value)) => { - self.value = Some(value); - let key_de = MapKeyDeserializer { - key: Cow::Borrowed(&**key), - }; - seed.deserialize(key_de).map(Some) - } - None => Ok(None), - } - } - - fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Error> - where - T: DeserializeSeed<'de>, - { - match self.value.take() { - Some(value) => seed.deserialize(value), - None => Err(serde::de::Error::custom("value is missing")), - } - } - - fn size_hint(&self) -> Option<usize> { - match self.iter.size_hint() { - (lower, Some(upper)) if lower == upper => Some(upper), - _ => None, - } - } -} - -struct MapKeyDeserializer<'de> { - key: Cow<'de, str>, -} - -macro_rules! deserialize_numeric_key { - ($method:ident) => { - deserialize_numeric_key!($method, deserialize_number); - }; - - ($method:ident, $using:ident) => { - fn $method<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - let mut de = crate::Deserializer::from_str(&self.key); - - match tri!(de.peek()) { - Some(b'0'..=b'9' | b'-') => {} - _ => return Err(Error::syntax(ErrorCode::ExpectedNumericKey, 0, 0)), - } - - let number = tri!(de.$using(visitor)); - - if tri!(de.peek()).is_some() { - return Err(Error::syntax(ErrorCode::ExpectedNumericKey, 0, 0)); - } - - Ok(number) - } - }; -} - -impl<'de> serde::Deserializer<'de> for MapKeyDeserializer<'de> { - type Error = Error; - - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - BorrowedCowStrDeserializer::new(self.key).deserialize_any(visitor) - } - - deserialize_numeric_key!(deserialize_i8); - deserialize_numeric_key!(deserialize_i16); - deserialize_numeric_key!(deserialize_i32); - deserialize_numeric_key!(deserialize_i64); - deserialize_numeric_key!(deserialize_u8); - deserialize_numeric_key!(deserialize_u16); - deserialize_numeric_key!(deserialize_u32); - deserialize_numeric_key!(deserialize_u64); - #[cfg(not(feature = "float_roundtrip"))] - deserialize_numeric_key!(deserialize_f32); - deserialize_numeric_key!(deserialize_f64); - - #[cfg(feature = "float_roundtrip")] - deserialize_numeric_key!(deserialize_f32, do_deserialize_f32); - deserialize_numeric_key!(deserialize_i128, do_deserialize_i128); - deserialize_numeric_key!(deserialize_u128, do_deserialize_u128); - - #[inline] - fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - // Map keys cannot be null. - visitor.visit_some(self) - } - - #[inline] - fn deserialize_newtype_struct<V>( - self, - _name: &'static str, - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - visitor.visit_newtype_struct(self) - } - - fn deserialize_enum<V>( - self, - name: &'static str, - variants: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: Visitor<'de>, - { - self.key - .into_deserializer() - .deserialize_enum(name, variants, visitor) - } - - forward_to_deserialize_any! { - bool char str string bytes byte_buf unit unit_struct seq tuple - tuple_struct map struct identifier ignored_any - } -} - -struct KeyClassifier; - -enum KeyClass { - Map(String), - #[cfg(feature = "arbitrary_precision")] - Number, - #[cfg(feature = "raw_value")] - RawValue, -} - -impl<'de> DeserializeSeed<'de> for KeyClassifier { - type Value = KeyClass; - - fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error> - where - D: serde::Deserializer<'de>, - { - deserializer.deserialize_str(self) - } -} - -impl<'de> Visitor<'de> for KeyClassifier { - type Value = KeyClass; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("a string key") - } - - fn visit_str<E>(self, s: &str) -> Result<Self::Value, E> - where - E: de::Error, - { - match s { - #[cfg(feature = "arbitrary_precision")] - crate::number::TOKEN => Ok(KeyClass::Number), - #[cfg(feature = "raw_value")] - crate::raw::TOKEN => Ok(KeyClass::RawValue), - _ => Ok(KeyClass::Map(s.to_owned())), - } - } - - #[cfg(any(feature = "std", feature = "alloc"))] - fn visit_string<E>(self, s: String) -> Result<Self::Value, E> - where - E: de::Error, - { - match s.as_str() { - #[cfg(feature = "arbitrary_precision")] - crate::number::TOKEN => Ok(KeyClass::Number), - #[cfg(feature = "raw_value")] - crate::raw::TOKEN => Ok(KeyClass::RawValue), - _ => Ok(KeyClass::Map(s)), - } - } -} - -impl Value { - #[cold] - fn invalid_type<E>(&self, exp: &dyn Expected) -> E - where - E: serde::de::Error, - { - serde::de::Error::invalid_type(self.unexpected(), exp) - } - - #[cold] - fn unexpected(&self) -> Unexpected { - match self { - Value::Null => Unexpected::Unit, - Value::Bool(b) => Unexpected::Bool(*b), - Value::Number(n) => n.unexpected(), - Value::String(s) => Unexpected::Str(s), - Value::Array(_) => Unexpected::Seq, - Value::Object(_) => Unexpected::Map, - } - } -} - -struct BorrowedCowStrDeserializer<'de> { - value: Cow<'de, str>, -} - -impl<'de> BorrowedCowStrDeserializer<'de> { - fn new(value: Cow<'de, str>) -> Self { - BorrowedCowStrDeserializer { value } - } -} - -impl<'de> de::Deserializer<'de> for BorrowedCowStrDeserializer<'de> { - type Error = Error; - - fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - match self.value { - Cow::Borrowed(string) => visitor.visit_borrowed_str(string), - #[cfg(any(feature = "std", feature = "alloc"))] - Cow::Owned(string) => visitor.visit_string(string), - } - } - - fn deserialize_enum<V>( - self, - _name: &str, - _variants: &'static [&'static str], - visitor: V, - ) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - visitor.visit_enum(self) - } - - forward_to_deserialize_any! { - bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str string - bytes byte_buf option unit unit_struct newtype_struct seq tuple - tuple_struct map struct identifier ignored_any - } -} - -impl<'de> de::EnumAccess<'de> for BorrowedCowStrDeserializer<'de> { - type Error = Error; - type Variant = UnitOnly; - - fn variant_seed<T>(self, seed: T) -> Result<(T::Value, Self::Variant), Error> - where - T: de::DeserializeSeed<'de>, - { - let value = tri!(seed.deserialize(self)); - Ok((value, UnitOnly)) - } -} - -struct UnitOnly; - -impl<'de> de::VariantAccess<'de> for UnitOnly { - type Error = Error; - - fn unit_variant(self) -> Result<(), Error> { - Ok(()) - } - - fn newtype_variant_seed<T>(self, _seed: T) -> Result<T::Value, Error> - where - T: de::DeserializeSeed<'de>, - { - Err(de::Error::invalid_type( - Unexpected::UnitVariant, - &"newtype variant", - )) - } - - fn tuple_variant<V>(self, _len: usize, _visitor: V) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - Err(de::Error::invalid_type( - Unexpected::UnitVariant, - &"tuple variant", - )) - } - - fn struct_variant<V>( - self, - _fields: &'static [&'static str], - _visitor: V, - ) -> Result<V::Value, Error> - where - V: de::Visitor<'de>, - { - Err(de::Error::invalid_type( - Unexpected::UnitVariant, - &"struct variant", - )) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/from.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/from.rs deleted file mode 100644 index 33a3938..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/from.rs +++ /dev/null
@@ -1,276 +0,0 @@ -use super::Value; -use crate::map::Map; -use crate::number::Number; -use alloc::borrow::Cow; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; - -macro_rules! from_integer { - ($($ty:ident)*) => { - $( - impl From<$ty> for Value { - fn from(n: $ty) -> Self { - Value::Number(n.into()) - } - } - )* - }; -} - -from_integer! { - i8 i16 i32 i64 isize - u8 u16 u32 u64 usize -} - -#[cfg(feature = "arbitrary_precision")] -from_integer! { - i128 u128 -} - -impl From<f32> for Value { - /// Convert 32-bit floating point number to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let f: f32 = 13.37; - /// let x: Value = f.into(); - /// ``` - fn from(f: f32) -> Self { - Number::from_f32(f).map_or(Value::Null, Value::Number) - } -} - -impl From<f64> for Value { - /// Convert 64-bit floating point number to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let f: f64 = 13.37; - /// let x: Value = f.into(); - /// ``` - fn from(f: f64) -> Self { - Number::from_f64(f).map_or(Value::Null, Value::Number) - } -} - -impl From<bool> for Value { - /// Convert boolean to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let b = false; - /// let x: Value = b.into(); - /// ``` - fn from(f: bool) -> Self { - Value::Bool(f) - } -} - -impl From<String> for Value { - /// Convert `String` to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let s: String = "lorem".to_string(); - /// let x: Value = s.into(); - /// ``` - fn from(f: String) -> Self { - Value::String(f) - } -} - -impl<'a> From<&'a str> for Value { - /// Convert string slice to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let s: &str = "lorem"; - /// let x: Value = s.into(); - /// ``` - fn from(f: &str) -> Self { - Value::String(f.to_string()) - } -} - -impl<'a> From<Cow<'a, str>> for Value { - /// Convert copy-on-write string to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// use std::borrow::Cow; - /// - /// let s: Cow<str> = Cow::Borrowed("lorem"); - /// let x: Value = s.into(); - /// ``` - /// - /// ``` - /// use serde_json_lenient::Value; - /// use std::borrow::Cow; - /// - /// let s: Cow<str> = Cow::Owned("lorem".to_string()); - /// let x: Value = s.into(); - /// ``` - fn from(f: Cow<'a, str>) -> Self { - Value::String(f.into_owned()) - } -} - -impl From<Number> for Value { - /// Convert `Number` to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::{Number, Value}; - /// - /// let n = Number::from(7); - /// let x: Value = n.into(); - /// ``` - fn from(f: Number) -> Self { - Value::Number(f) - } -} - -impl From<Map<String, Value>> for Value { - /// Convert map (with string keys) to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::{Map, Value}; - /// - /// let mut m = Map::new(); - /// m.insert("Lorem".to_string(), "ipsum".into()); - /// let x: Value = m.into(); - /// ``` - fn from(f: Map<String, Value>) -> Self { - Value::Object(f) - } -} - -impl<T: Into<Value>> From<Vec<T>> for Value { - /// Convert a `Vec` to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let v = vec!["lorem", "ipsum", "dolor"]; - /// let x: Value = v.into(); - /// ``` - fn from(f: Vec<T>) -> Self { - Value::Array(f.into_iter().map(Into::into).collect()) - } -} - -impl<'a, T: Clone + Into<Value>> From<&'a [T]> for Value { - /// Convert a slice to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let v: &[&str] = &["lorem", "ipsum", "dolor"]; - /// let x: Value = v.into(); - /// ``` - fn from(f: &'a [T]) -> Self { - Value::Array(f.iter().cloned().map(Into::into).collect()) - } -} - -impl<T: Into<Value>> FromIterator<T> for Value { - /// Convert an iteratable type to a `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let v = std::iter::repeat(42).take(5); - /// let x: Value = v.collect(); - /// ``` - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let v: Vec<_> = vec!["lorem", "ipsum", "dolor"]; - /// let x: Value = v.into_iter().collect(); - /// ``` - /// - /// ``` - /// use std::iter::FromIterator; - /// use serde_json_lenient::Value; - /// - /// let x: Value = Value::from_iter(vec!["lorem", "ipsum", "dolor"]); - /// ``` - fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self { - Value::Array(iter.into_iter().map(Into::into).collect()) - } -} - -impl<K: Into<String>, V: Into<Value>> FromIterator<(K, V)> for Value { - /// Convert an iteratable type to a `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let v: Vec<_> = vec![("lorem", 40), ("ipsum", 2)]; - /// let x: Value = v.into_iter().collect(); - /// ``` - fn from_iter<I: IntoIterator<Item = (K, V)>>(iter: I) -> Self { - Value::Object( - iter.into_iter() - .map(|(k, v)| (k.into(), v.into())) - .collect(), - ) - } -} - -impl From<()> for Value { - /// Convert `()` to `Value` - /// - /// # Examples - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// let u = (); - /// let x: Value = u.into(); - /// ``` - fn from((): ()) -> Self { - Value::Null - } -} - -impl<T> From<Option<T>> for Value -where - T: Into<Value>, -{ - fn from(opt: Option<T>) -> Self { - match opt { - None => Value::Null, - Some(value) => Into::into(value), - } - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/index.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/index.rs deleted file mode 100644 index 93be685..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/index.rs +++ /dev/null
@@ -1,258 +0,0 @@ -use super::Value; -use crate::map::Map; -use alloc::borrow::ToOwned; -use alloc::string::String; -use core::fmt::{self, Display}; -use core::ops; - -/// A type that can be used to index into a `serde_json_lenient::Value`. -/// -/// The [`get`] and [`get_mut`] methods of `Value` accept any type that -/// implements `Index`, as does the [square-bracket indexing operator]. This -/// trait is implemented for strings which are used as the index into a JSON -/// map, and for `usize` which is used as the index into a JSON array. -/// -/// [`get`]: ../enum.Value.html#method.get -/// [`get_mut`]: ../enum.Value.html#method.get_mut -/// [square-bracket indexing operator]: ../enum.Value.html#impl-Index%3CI%3E -/// -/// This trait is sealed and cannot be implemented for types outside of -/// `serde_json_lenient`. -/// -/// # Examples -/// -/// ``` -/// # use serde_json_lenient::json; -/// # -/// let data = json!({ "inner": [1, 2, 3] }); -/// -/// // Data is a JSON map so it can be indexed with a string. -/// let inner = &data["inner"]; -/// -/// // Inner is a JSON array so it can be indexed with an integer. -/// let first = &inner[0]; -/// -/// assert_eq!(first, 1); -/// ``` -pub trait Index: private::Sealed { - /// Return None if the key is not already in the array or object. - #[doc(hidden)] - fn index_into<'v>(&self, v: &'v Value) -> Option<&'v Value>; - - /// Return None if the key is not already in the array or object. - #[doc(hidden)] - fn index_into_mut<'v>(&self, v: &'v mut Value) -> Option<&'v mut Value>; - - /// Panic if array index out of bounds. If key is not already in the object, - /// insert it with a value of null. Panic if Value is a type that cannot be - /// indexed into, except if Value is null then it can be treated as an empty - /// object. - #[doc(hidden)] - fn index_or_insert<'v>(&self, v: &'v mut Value) -> &'v mut Value; -} - -impl Index for usize { - fn index_into<'v>(&self, v: &'v Value) -> Option<&'v Value> { - match v { - Value::Array(vec) => vec.get(*self), - _ => None, - } - } - fn index_into_mut<'v>(&self, v: &'v mut Value) -> Option<&'v mut Value> { - match v { - Value::Array(vec) => vec.get_mut(*self), - _ => None, - } - } - fn index_or_insert<'v>(&self, v: &'v mut Value) -> &'v mut Value { - match v { - Value::Array(vec) => { - let len = vec.len(); - vec.get_mut(*self).unwrap_or_else(|| { - panic!( - "cannot access index {} of JSON array of length {}", - self, len - ) - }) - } - _ => panic!("cannot access index {} of JSON {}", self, Type(v)), - } - } -} - -impl Index for str { - fn index_into<'v>(&self, v: &'v Value) -> Option<&'v Value> { - match v { - Value::Object(map) => map.get(self), - _ => None, - } - } - fn index_into_mut<'v>(&self, v: &'v mut Value) -> Option<&'v mut Value> { - match v { - Value::Object(map) => map.get_mut(self), - _ => None, - } - } - fn index_or_insert<'v>(&self, v: &'v mut Value) -> &'v mut Value { - if let Value::Null = v { - *v = Value::Object(Map::new()); - } - match v { - Value::Object(map) => map.entry(self.to_owned()).or_insert(Value::Null), - _ => panic!("cannot access key {:?} in JSON {}", self, Type(v)), - } - } -} - -impl Index for String { - fn index_into<'v>(&self, v: &'v Value) -> Option<&'v Value> { - self[..].index_into(v) - } - fn index_into_mut<'v>(&self, v: &'v mut Value) -> Option<&'v mut Value> { - self[..].index_into_mut(v) - } - fn index_or_insert<'v>(&self, v: &'v mut Value) -> &'v mut Value { - self[..].index_or_insert(v) - } -} - -impl<'a, T> Index for &'a T -where - T: ?Sized + Index, -{ - fn index_into<'v>(&self, v: &'v Value) -> Option<&'v Value> { - (**self).index_into(v) - } - fn index_into_mut<'v>(&self, v: &'v mut Value) -> Option<&'v mut Value> { - (**self).index_into_mut(v) - } - fn index_or_insert<'v>(&self, v: &'v mut Value) -> &'v mut Value { - (**self).index_or_insert(v) - } -} - -// Prevent users from implementing the Index trait. -mod private { - pub trait Sealed {} - impl Sealed for usize {} - impl Sealed for str {} - impl Sealed for alloc::string::String {} - impl<'a, T> Sealed for &'a T where T: ?Sized + Sealed {} -} - -/// Used in panic messages. -struct Type<'a>(&'a Value); - -impl<'a> Display for Type<'a> { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - match *self.0 { - Value::Null => formatter.write_str("null"), - Value::Bool(_) => formatter.write_str("boolean"), - Value::Number(_) => formatter.write_str("number"), - Value::String(_) => formatter.write_str("string"), - Value::Array(_) => formatter.write_str("array"), - Value::Object(_) => formatter.write_str("object"), - } - } -} - -// The usual semantics of Index is to panic on invalid indexing. -// -// That said, the usual semantics are for things like Vec and BTreeMap which -// have different use cases than Value. If you are working with a Vec, you know -// that you are working with a Vec and you can get the len of the Vec and make -// sure your indices are within bounds. The Value use cases are more -// loosey-goosey. You got some JSON from an endpoint and you want to pull values -// out of it. Outside of this Index impl, you already have the option of using -// value.as_array() and working with the Vec directly, or matching on -// Value::Array and getting the Vec directly. The Index impl means you can skip -// that and index directly into the thing using a concise syntax. You don't have -// to check the type, you don't have to check the len, it is all about what you -// expect the Value to look like. -// -// Basically the use cases that would be well served by panicking here are -// better served by using one of the other approaches: get and get_mut, -// as_array, or match. The value of this impl is that it adds a way of working -// with Value that is not well served by the existing approaches: concise and -// careless and sometimes that is exactly what you want. -impl<I> ops::Index<I> for Value -where - I: Index, -{ - type Output = Value; - - /// Index into a `serde_json_lenient::Value` using the syntax `value[0]` or - /// `value["k"]`. - /// - /// Returns `Value::Null` if the type of `self` does not match the type of - /// the index, for example if the index is a string and `self` is an array - /// or a number. Also returns `Value::Null` if the given key does not exist - /// in the map or the given index is not within the bounds of the array. - /// - /// For retrieving deeply nested values, you should have a look at the - /// `Value::pointer` method. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let data = json!({ - /// "x": { - /// "y": ["z", "zz"] - /// } - /// }); - /// - /// assert_eq!(data["x"]["y"], json!(["z", "zz"])); - /// assert_eq!(data["x"]["y"][0], json!("z")); - /// - /// assert_eq!(data["a"], json!(null)); // returns null for undefined values - /// assert_eq!(data["a"]["b"], json!(null)); // does not panic - /// ``` - fn index(&self, index: I) -> &Value { - static NULL: Value = Value::Null; - index.index_into(self).unwrap_or(&NULL) - } -} - -impl<I> ops::IndexMut<I> for Value -where - I: Index, -{ - /// Write into a `serde_json_lenient::Value` using the syntax `value[0] = ...` or - /// `value["k"] = ...`. - /// - /// If the index is a number, the value must be an array of length bigger - /// than the index. Indexing into a value that is not an array or an array - /// that is too small will panic. - /// - /// If the index is a string, the value must be an object or null which is - /// treated like an empty object. If the key is not already present in the - /// object, it will be inserted with a value of null. Indexing into a value - /// that is neither an object nor null will panic. - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut data = json!({ "x": 0 }); - /// - /// // replace an existing key - /// data["x"] = json!(1); - /// - /// // insert a new key - /// data["y"] = json!([false, false, false]); - /// - /// // replace an array value - /// data["y"][0] = json!(true); - /// - /// // inserted a deeply nested key - /// data["a"]["b"]["c"]["d"] = json!(true); - /// - /// println!("{}", data); - /// ``` - fn index_mut(&mut self, index: I) -> &mut Value { - index.index_or_insert(self) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/mod.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/mod.rs deleted file mode 100644 index 3682008a..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/mod.rs +++ /dev/null
@@ -1,986 +0,0 @@ -//! The Value enum, a loosely typed way of representing any valid JSON value. -//! -//! # Constructing JSON -//! -//! Serde jsonrc provides a [`json!` macro][macro] to build `serde_json_lenient::Value` -//! objects with very natural JSON syntax. -//! -//! ``` -//! use serde_json_lenient::json; -//! -//! fn main() { -//! // The type of `john` is `serde_json_lenient::Value` -//! let john = json!({ -//! "name": "John Doe", -//! "age": 43, -//! "phones": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! }); -//! -//! println!("first phone number: {}", john["phones"][0]); -//! -//! // Convert to a string of JSON and print it out -//! println!("{}", john.to_string()); -//! } -//! ``` -//! -//! The `Value::to_string()` function converts a `serde_json_lenient::Value` into a -//! `String` of JSON text. -//! -//! One neat thing about the `json!` macro is that variables and expressions can -//! be interpolated directly into the JSON value as you are building it. Serde -//! will check at compile time that the value you are interpolating is able to -//! be represented as JSON. -//! -//! ``` -//! # use serde_json_lenient::json; -//! # -//! # fn random_phone() -> u16 { 0 } -//! # -//! let full_name = "John Doe"; -//! let age_last_year = 42; -//! -//! // The type of `john` is `serde_json_lenient::Value` -//! let john = json!({ -//! "name": full_name, -//! "age": age_last_year + 1, -//! "phones": [ -//! format!("+44 {}", random_phone()) -//! ] -//! }); -//! ``` -//! -//! A string of JSON data can be parsed into a `serde_json_lenient::Value` by the -//! [`serde_json_lenient::from_str`][from_str] function. There is also -//! [`from_slice`][from_slice] for parsing from a byte slice `&[u8]` and -//! [`from_reader`][from_reader] for parsing from any `io::Read` like a File or -//! a TCP stream. -//! -//! ``` -//! use serde_json_lenient::{json, Value, Error}; -//! -//! fn untyped_example() -> Result<(), Error> { -//! // Some JSON input data as a &str. Maybe this comes from the user. -//! let data = r#" -//! { -//! "name": "John Doe", -//! "age": 43, -//! "phones": [ -//! "+44 1234567", -//! "+44 2345678" -//! ] -//! }"#; -//! -//! // Parse the string of data into serde_json_lenient::Value. -//! let v: Value = serde_json_lenient::from_str(data)?; -//! -//! // Access parts of the data by indexing with square brackets. -//! println!("Please call {} at the number {}", v["name"], v["phones"][0]); -//! -//! Ok(()) -//! } -//! # -//! # untyped_example().unwrap(); -//! ``` -//! -//! [macro]: crate::json -//! [from_str]: crate::de::from_str -//! [from_slice]: crate::de::from_slice -//! [from_reader]: crate::de::from_reader - -use crate::error::Error; -use crate::io; -use alloc::string::String; -use alloc::vec::Vec; -use core::fmt::{self, Debug, Display}; -use core::mem; -use core::str; -use serde::de::DeserializeOwned; -use serde::ser::Serialize; - -pub use self::index::Index; -pub use self::ser::Serializer; -pub use crate::map::Map; -pub use crate::number::Number; - -#[cfg(feature = "raw_value")] -pub use crate::raw::{to_raw_value, RawValue}; - -/// Represents any valid JSON value. -/// -/// See the [`serde_json_lenient::value` module documentation](self) for usage examples. -#[derive(Clone, Eq, PartialEq)] -pub enum Value { - /// Represents a JSON null value. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!(null); - /// ``` - Null, - - /// Represents a JSON boolean. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!(true); - /// ``` - Bool(bool), - - /// Represents a JSON number, whether integer or floating point. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!(12.5); - /// ``` - Number(Number), - - /// Represents a JSON string. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!("a string"); - /// ``` - String(String), - - /// Represents a JSON array. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!(["an", "array"]); - /// ``` - Array(Vec<Value>), - - /// Represents a JSON object. - /// - /// By default the map is backed by a BTreeMap. Enable the `preserve_order` - /// feature of serde_json_lenient to use IndexMap instead, which preserves - /// entries in the order they are inserted into the map. In particular, this - /// allows JSON data to be deserialized into a Value and serialized to a - /// string while retaining the order of map keys in the input. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "an": "object" }); - /// ``` - Object(Map<String, Value>), -} - -impl Debug for Value { - fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - match self { - Value::Null => formatter.write_str("Null"), - Value::Bool(boolean) => write!(formatter, "Bool({})", boolean), - Value::Number(number) => Debug::fmt(number, formatter), - Value::String(string) => write!(formatter, "String({:?})", string), - Value::Array(vec) => { - tri!(formatter.write_str("Array ")); - Debug::fmt(vec, formatter) - } - Value::Object(map) => { - tri!(formatter.write_str("Object ")); - Debug::fmt(map, formatter) - } - } - } -} - -impl Display for Value { - /// Display a JSON value as a string. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let json = json!({ "city": "London", "street": "10 Downing Street" }); - /// - /// // Compact format: - /// // - /// // {"city":"London","street":"10 Downing Street"} - /// let compact = format!("{}", json); - /// assert_eq!(compact, - /// "{\"city\":\"London\",\"street\":\"10 Downing Street\"}"); - /// - /// // Pretty format: - /// // - /// // { - /// // "city": "London", - /// // "street": "10 Downing Street" - /// // } - /// let pretty = format!("{:#}", json); - /// assert_eq!(pretty, - /// "{\n \"city\": \"London\",\n \"street\": \"10 Downing Street\"\n}"); - /// ``` - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - struct WriterFormatter<'a, 'b: 'a> { - inner: &'a mut fmt::Formatter<'b>, - } - - impl<'a, 'b> io::Write for WriterFormatter<'a, 'b> { - fn write(&mut self, buf: &[u8]) -> io::Result<usize> { - // Safety: the serializer below only emits valid utf8 when using - // the default formatter. - let s = unsafe { str::from_utf8_unchecked(buf) }; - tri!(self.inner.write_str(s).map_err(io_error)); - Ok(buf.len()) - } - - fn flush(&mut self) -> io::Result<()> { - Ok(()) - } - } - - fn io_error(_: fmt::Error) -> io::Error { - // Error value does not matter because Display impl just maps it - // back to fmt::Error. - io::Error::new(io::ErrorKind::Other, "fmt error") - } - - let alternate = f.alternate(); - let mut wr = WriterFormatter { inner: f }; - if alternate { - // {:#} - super::ser::to_writer_pretty(&mut wr, self).map_err(|_| fmt::Error) - } else { - // {} - super::ser::to_writer(&mut wr, self).map_err(|_| fmt::Error) - } - } -} - -fn parse_index(s: &str) -> Option<usize> { - if s.starts_with('+') || (s.starts_with('0') && s.len() != 1) { - return None; - } - s.parse().ok() -} - -impl Value { - /// Index into a JSON array or map. A string index can be used to access a - /// value in a map, and a usize index can be used to access an element of an - /// array. - /// - /// Returns `None` if the type of `self` does not match the type of the - /// index, for example if the index is a string and `self` is an array or a - /// number. Also returns `None` if the given key does not exist in the map - /// or the given index is not within the bounds of the array. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let object = json!({ "A": 65, "B": 66, "C": 67 }); - /// assert_eq!(*object.get("A").unwrap(), json!(65)); - /// - /// let array = json!([ "A", "B", "C" ]); - /// assert_eq!(*array.get(2).unwrap(), json!("C")); - /// - /// assert_eq!(array.get("A"), None); - /// ``` - /// - /// Square brackets can also be used to index into a value in a more concise - /// way. This returns `Value::Null` in cases where `get` would have returned - /// `None`. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let object = json!({ - /// "A": ["a", "á", "à"], - /// "B": ["b", "b́"], - /// "C": ["c", "ć", "ć̣", "ḉ"], - /// }); - /// assert_eq!(object["B"][0], json!("b")); - /// - /// assert_eq!(object["D"], json!(null)); - /// assert_eq!(object[0]["x"]["y"]["z"], json!(null)); - /// ``` - pub fn get<I: Index>(&self, index: I) -> Option<&Value> { - index.index_into(self) - } - - /// Mutably index into a JSON array or map. A string index can be used to - /// access a value in a map, and a usize index can be used to access an - /// element of an array. - /// - /// Returns `None` if the type of `self` does not match the type of the - /// index, for example if the index is a string and `self` is an array or a - /// number. Also returns `None` if the given key does not exist in the map - /// or the given index is not within the bounds of the array. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut object = json!({ "A": 65, "B": 66, "C": 67 }); - /// *object.get_mut("A").unwrap() = json!(69); - /// - /// let mut array = json!([ "A", "B", "C" ]); - /// *array.get_mut(2).unwrap() = json!("D"); - /// ``` - pub fn get_mut<I: Index>(&mut self, index: I) -> Option<&mut Value> { - index.index_into_mut(self) - } - - /// Returns true if the `Value` is an Object. Returns false otherwise. - /// - /// For any Value on which `is_object` returns true, `as_object` and - /// `as_object_mut` are guaranteed to return the map representation of the - /// object. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let obj = json!({ "a": { "nested": true }, "b": ["an", "array"] }); - /// - /// assert!(obj.is_object()); - /// assert!(obj["a"].is_object()); - /// - /// // array, not an object - /// assert!(!obj["b"].is_object()); - /// ``` - pub fn is_object(&self) -> bool { - self.as_object().is_some() - } - - /// If the `Value` is an Object, returns the associated Map. Returns None - /// otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": { "nested": true }, "b": ["an", "array"] }); - /// - /// // The length of `{"nested": true}` is 1 entry. - /// assert_eq!(v["a"].as_object().unwrap().len(), 1); - /// - /// // The array `["an", "array"]` is not an object. - /// assert_eq!(v["b"].as_object(), None); - /// ``` - pub fn as_object(&self) -> Option<&Map<String, Value>> { - match self { - Value::Object(map) => Some(map), - _ => None, - } - } - - /// If the `Value` is an Object, returns the associated mutable Map. - /// Returns None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut v = json!({ "a": { "nested": true } }); - /// - /// v["a"].as_object_mut().unwrap().clear(); - /// assert_eq!(v, json!({ "a": {} })); - /// ``` - pub fn as_object_mut(&mut self) -> Option<&mut Map<String, Value>> { - match self { - Value::Object(map) => Some(map), - _ => None, - } - } - - /// Returns true if the `Value` is an Array. Returns false otherwise. - /// - /// For any Value on which `is_array` returns true, `as_array` and - /// `as_array_mut` are guaranteed to return the vector representing the - /// array. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let obj = json!({ "a": ["an", "array"], "b": { "an": "object" } }); - /// - /// assert!(obj["a"].is_array()); - /// - /// // an object, not an array - /// assert!(!obj["b"].is_array()); - /// ``` - pub fn is_array(&self) -> bool { - self.as_array().is_some() - } - - /// If the `Value` is an Array, returns the associated vector. Returns None - /// otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": ["an", "array"], "b": { "an": "object" } }); - /// - /// // The length of `["an", "array"]` is 2 elements. - /// assert_eq!(v["a"].as_array().unwrap().len(), 2); - /// - /// // The object `{"an": "object"}` is not an array. - /// assert_eq!(v["b"].as_array(), None); - /// ``` - pub fn as_array(&self) -> Option<&Vec<Value>> { - match self { - Value::Array(array) => Some(array), - _ => None, - } - } - - /// If the `Value` is an Array, returns the associated mutable vector. - /// Returns None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut v = json!({ "a": ["an", "array"] }); - /// - /// v["a"].as_array_mut().unwrap().clear(); - /// assert_eq!(v, json!({ "a": [] })); - /// ``` - pub fn as_array_mut(&mut self) -> Option<&mut Vec<Value>> { - match self { - Value::Array(list) => Some(list), - _ => None, - } - } - - /// Returns true if the `Value` is a String. Returns false otherwise. - /// - /// For any Value on which `is_string` returns true, `as_str` is guaranteed - /// to return the string slice. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": "some string", "b": false }); - /// - /// assert!(v["a"].is_string()); - /// - /// // The boolean `false` is not a string. - /// assert!(!v["b"].is_string()); - /// ``` - pub fn is_string(&self) -> bool { - self.as_str().is_some() - } - - /// If the `Value` is a String, returns the associated str. Returns None - /// otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": "some string", "b": false }); - /// - /// assert_eq!(v["a"].as_str(), Some("some string")); - /// - /// // The boolean `false` is not a string. - /// assert_eq!(v["b"].as_str(), None); - /// - /// // JSON values are printed in JSON representation, so strings are in quotes. - /// // - /// // The value is: "some string" - /// println!("The value is: {}", v["a"]); - /// - /// // Rust strings are printed without quotes. - /// // - /// // The value is: some string - /// println!("The value is: {}", v["a"].as_str().unwrap()); - /// ``` - pub fn as_str(&self) -> Option<&str> { - match self { - Value::String(s) => Some(s), - _ => None, - } - } - - /// Returns true if the `Value` is a Number. Returns false otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 1, "b": "2" }); - /// - /// assert!(v["a"].is_number()); - /// - /// // The string `"2"` is a string, not a number. - /// assert!(!v["b"].is_number()); - /// ``` - pub fn is_number(&self) -> bool { - match *self { - Value::Number(_) => true, - _ => false, - } - } - - /// Returns true if the `Value` is an integer between `i64::MIN` and - /// `i64::MAX`. - /// - /// For any Value on which `is_i64` returns true, `as_i64` is guaranteed to - /// return the integer value. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let big = i64::max_value() as u64 + 10; - /// let v = json!({ "a": 64, "b": big, "c": 256.0 }); - /// - /// assert!(v["a"].is_i64()); - /// - /// // Greater than i64::MAX. - /// assert!(!v["b"].is_i64()); - /// - /// // Numbers with a decimal point are not considered integers. - /// assert!(!v["c"].is_i64()); - /// ``` - pub fn is_i64(&self) -> bool { - match self { - Value::Number(n) => n.is_i64(), - _ => false, - } - } - - /// Returns true if the `Value` is an integer between zero and `u64::MAX`. - /// - /// For any Value on which `is_u64` returns true, `as_u64` is guaranteed to - /// return the integer value. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 64, "b": -64, "c": 256.0 }); - /// - /// assert!(v["a"].is_u64()); - /// - /// // Negative integer. - /// assert!(!v["b"].is_u64()); - /// - /// // Numbers with a decimal point are not considered integers. - /// assert!(!v["c"].is_u64()); - /// ``` - pub fn is_u64(&self) -> bool { - match self { - Value::Number(n) => n.is_u64(), - _ => false, - } - } - - /// Returns true if the `Value` is a number that can be represented by f64. - /// - /// For any Value on which `is_f64` returns true, `as_f64` is guaranteed to - /// return the floating point value. - /// - /// Currently this function returns true if and only if both `is_i64` and - /// `is_u64` return false but this is not a guarantee in the future. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 256.0, "b": 64, "c": -64 }); - /// - /// assert!(v["a"].is_f64()); - /// - /// // Integers. - /// assert!(!v["b"].is_f64()); - /// assert!(!v["c"].is_f64()); - /// ``` - pub fn is_f64(&self) -> bool { - match self { - Value::Number(n) => n.is_f64(), - _ => false, - } - } - - /// If the `Value` is an integer, represent it as i64 if possible. Returns - /// None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let big = i64::max_value() as u64 + 10; - /// let v = json!({ "a": 64, "b": big, "c": 256.0 }); - /// - /// assert_eq!(v["a"].as_i64(), Some(64)); - /// assert_eq!(v["b"].as_i64(), None); - /// assert_eq!(v["c"].as_i64(), None); - /// ``` - pub fn as_i64(&self) -> Option<i64> { - match self { - Value::Number(n) => n.as_i64(), - _ => None, - } - } - - /// If the `Value` is an integer, represent it as u64 if possible. Returns - /// None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 64, "b": -64, "c": 256.0 }); - /// - /// assert_eq!(v["a"].as_u64(), Some(64)); - /// assert_eq!(v["b"].as_u64(), None); - /// assert_eq!(v["c"].as_u64(), None); - /// ``` - pub fn as_u64(&self) -> Option<u64> { - match self { - Value::Number(n) => n.as_u64(), - _ => None, - } - } - - /// If the `Value` is a number, represent it as f64 if possible. Returns - /// None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": 256.0, "b": 64, "c": -64 }); - /// - /// assert_eq!(v["a"].as_f64(), Some(256.0)); - /// assert_eq!(v["b"].as_f64(), Some(64.0)); - /// assert_eq!(v["c"].as_f64(), Some(-64.0)); - /// ``` - pub fn as_f64(&self) -> Option<f64> { - match self { - Value::Number(n) => n.as_f64(), - _ => None, - } - } - - /// Returns true if the `Value` is a Boolean. Returns false otherwise. - /// - /// For any Value on which `is_boolean` returns true, `as_bool` is - /// guaranteed to return the boolean value. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": false, "b": "false" }); - /// - /// assert!(v["a"].is_boolean()); - /// - /// // The string `"false"` is a string, not a boolean. - /// assert!(!v["b"].is_boolean()); - /// ``` - pub fn is_boolean(&self) -> bool { - self.as_bool().is_some() - } - - /// If the `Value` is a Boolean, returns the associated bool. Returns None - /// otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": false, "b": "false" }); - /// - /// assert_eq!(v["a"].as_bool(), Some(false)); - /// - /// // The string `"false"` is a string, not a boolean. - /// assert_eq!(v["b"].as_bool(), None); - /// ``` - pub fn as_bool(&self) -> Option<bool> { - match *self { - Value::Bool(b) => Some(b), - _ => None, - } - } - - /// Returns true if the `Value` is a Null. Returns false otherwise. - /// - /// For any Value on which `is_null` returns true, `as_null` is guaranteed - /// to return `Some(())`. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": null, "b": false }); - /// - /// assert!(v["a"].is_null()); - /// - /// // The boolean `false` is not null. - /// assert!(!v["b"].is_null()); - /// ``` - pub fn is_null(&self) -> bool { - self.as_null().is_some() - } - - /// If the `Value` is a Null, returns (). Returns None otherwise. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let v = json!({ "a": null, "b": false }); - /// - /// assert_eq!(v["a"].as_null(), Some(())); - /// - /// // The boolean `false` is not null. - /// assert_eq!(v["b"].as_null(), None); - /// ``` - pub fn as_null(&self) -> Option<()> { - match *self { - Value::Null => Some(()), - _ => None, - } - } - - /// Looks up a value by a JSON Pointer. - /// - /// JSON Pointer defines a string syntax for identifying a specific value - /// within a JavaScript Object Notation (JSON) document. - /// - /// A Pointer is a Unicode string with the reference tokens separated by `/`. - /// Inside tokens `/` is replaced by `~1` and `~` is replaced by `~0`. The - /// addressed value is returned and if there is no such value `None` is - /// returned. - /// - /// For more information read [RFC6901](https://tools.ietf.org/html/rfc6901). - /// - /// # Examples - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let data = json!({ - /// "x": { - /// "y": ["z", "zz"] - /// } - /// }); - /// - /// assert_eq!(data.pointer("/x/y/1").unwrap(), &json!("zz")); - /// assert_eq!(data.pointer("/a/b/c"), None); - /// ``` - pub fn pointer(&self, pointer: &str) -> Option<&Value> { - if pointer.is_empty() { - return Some(self); - } - if !pointer.starts_with('/') { - return None; - } - pointer - .split('/') - .skip(1) - .map(|x| x.replace("~1", "/").replace("~0", "~")) - .try_fold(self, |target, token| match target { - Value::Object(map) => map.get(&token), - Value::Array(list) => parse_index(&token).and_then(|x| list.get(x)), - _ => None, - }) - } - - /// Looks up a value by a JSON Pointer and returns a mutable reference to - /// that value. - /// - /// JSON Pointer defines a string syntax for identifying a specific value - /// within a JavaScript Object Notation (JSON) document. - /// - /// A Pointer is a Unicode string with the reference tokens separated by `/`. - /// Inside tokens `/` is replaced by `~1` and `~` is replaced by `~0`. The - /// addressed value is returned and if there is no such value `None` is - /// returned. - /// - /// For more information read [RFC6901](https://tools.ietf.org/html/rfc6901). - /// - /// # Example of Use - /// - /// ``` - /// use serde_json_lenient::Value; - /// - /// fn main() { - /// let s = r#"{"x": 1.0, "y": 2.0}"#; - /// let mut value: Value = serde_json_lenient::from_str(s).unwrap(); - /// - /// // Check value using read-only pointer - /// assert_eq!(value.pointer("/x"), Some(&1.0.into())); - /// // Change value with direct assignment - /// *value.pointer_mut("/x").unwrap() = 1.5.into(); - /// // Check that new value was written - /// assert_eq!(value.pointer("/x"), Some(&1.5.into())); - /// // Or change the value only if it exists - /// value.pointer_mut("/x").map(|v| *v = 1.5.into()); - /// - /// // "Steal" ownership of a value. Can replace with any valid Value. - /// let old_x = value.pointer_mut("/x").map(Value::take).unwrap(); - /// assert_eq!(old_x, 1.5); - /// assert_eq!(value.pointer("/x").unwrap(), &Value::Null); - /// } - /// ``` - pub fn pointer_mut(&mut self, pointer: &str) -> Option<&mut Value> { - if pointer.is_empty() { - return Some(self); - } - if !pointer.starts_with('/') { - return None; - } - pointer - .split('/') - .skip(1) - .map(|x| x.replace("~1", "/").replace("~0", "~")) - .try_fold(self, |target, token| match target { - Value::Object(map) => map.get_mut(&token), - Value::Array(list) => parse_index(&token).and_then(move |x| list.get_mut(x)), - _ => None, - }) - } - - /// Takes the value out of the `Value`, leaving a `Null` in its place. - /// - /// ``` - /// # use serde_json_lenient::json; - /// # - /// let mut v = json!({ "x": "y" }); - /// assert_eq!(v["x"].take(), json!("y")); - /// assert_eq!(v, json!({ "x": null })); - /// ``` - pub fn take(&mut self) -> Value { - mem::replace(self, Value::Null) - } -} - -/// The default value is `Value::Null`. -/// -/// This is useful for handling omitted `Value` fields when deserializing. -/// -/// # Examples -/// -/// ``` -/// # use serde::Deserialize; -/// use serde_json_lenient::Value; -/// -/// #[derive(Deserialize)] -/// struct Settings { -/// level: i32, -/// #[serde(default)] -/// extras: Value, -/// } -/// -/// # fn try_main() -> Result<(), serde_json_lenient::Error> { -/// let data = r#" { "level": 42 } "#; -/// let s: Settings = serde_json_lenient::from_str(data)?; -/// -/// assert_eq!(s.level, 42); -/// assert_eq!(s.extras, Value::Null); -/// # -/// # Ok(()) -/// # } -/// # -/// # try_main().unwrap() -/// ``` -impl Default for Value { - fn default() -> Value { - Value::Null - } -} - -mod de; -mod from; -mod index; -mod partial_eq; -mod ser; - -/// Convert a `T` into `serde_json_lenient::Value` which is an enum that can represent -/// any valid JSON data. -/// -/// # Example -/// -/// ``` -/// use serde::Serialize; -/// use serde_json_lenient::json; -/// use std::error::Error; -/// -/// #[derive(Serialize)] -/// struct User { -/// fingerprint: String, -/// location: String, -/// } -/// -/// fn compare_json_values() -> Result<(), Box<dyn Error>> { -/// let u = User { -/// fingerprint: "0xF9BA143B95FF6D82".to_owned(), -/// location: "Menlo Park, CA".to_owned(), -/// }; -/// -/// // The type of `expected` is `serde_json_lenient::Value` -/// let expected = json!({ -/// "fingerprint": "0xF9BA143B95FF6D82", -/// "location": "Menlo Park, CA", -/// }); -/// -/// let v = serde_json_lenient::to_value(u).unwrap(); -/// assert_eq!(v, expected); -/// -/// Ok(()) -/// } -/// # -/// # compare_json_values().unwrap(); -/// ``` -/// -/// # Errors -/// -/// This conversion can fail if `T`'s implementation of `Serialize` decides to -/// fail, or if `T` contains a map with non-string keys. -/// -/// ``` -/// use std::collections::BTreeMap; -/// -/// fn main() { -/// // The keys in this map are vectors, not strings. -/// let mut map = BTreeMap::new(); -/// map.insert(vec![32, 64], "x86"); -/// -/// println!("{}", serde_json_lenient::to_value(map).unwrap_err()); -/// } -/// ``` -// Taking by value is more friendly to iterator adapters, option and result -// consumers, etc. See https://github.com/serde-rs/json/pull/149. -pub fn to_value<T>(value: T) -> Result<Value, Error> -where - T: Serialize, -{ - value.serialize(Serializer) -} - -/// Interpret a `serde_json_lenient::Value` as an instance of type `T`. -/// -/// # Example -/// -/// ``` -/// use serde::Deserialize; -/// use serde_json_lenient::json; -/// -/// #[derive(Deserialize, Debug)] -/// struct User { -/// fingerprint: String, -/// location: String, -/// } -/// -/// fn main() { -/// // The type of `j` is `serde_json_lenient::Value` -/// let j = json!({ -/// "fingerprint": "0xF9BA143B95FF6D82", -/// "location": "Menlo Park, CA" -/// }); -/// -/// let u: User = serde_json_lenient::from_value(j).unwrap(); -/// println!("{:#?}", u); -/// } -/// ``` -/// -/// # Errors -/// -/// This conversion can fail if the structure of the Value does not match the -/// structure expected by `T`, for example if `T` is a struct type but the Value -/// contains something other than a JSON map. It can also fail if the structure -/// is correct but `T`'s implementation of `Deserialize` decides that something -/// is wrong with the data, for example required struct fields are missing from -/// the JSON map or some number is too big to fit in the expected primitive -/// type. -pub fn from_value<T>(value: Value) -> Result<T, Error> -where - T: DeserializeOwned, -{ - T::deserialize(value) -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/partial_eq.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/partial_eq.rs deleted file mode 100644 index 6b2e350..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/partial_eq.rs +++ /dev/null
@@ -1,103 +0,0 @@ -use super::Value; -use alloc::string::String; - -fn eq_i64(value: &Value, other: i64) -> bool { - value.as_i64().map_or(false, |i| i == other) -} - -fn eq_u64(value: &Value, other: u64) -> bool { - value.as_u64().map_or(false, |i| i == other) -} - -fn eq_f32(value: &Value, other: f32) -> bool { - match value { - Value::Number(n) => n.as_f32().map_or(false, |i| i == other), - _ => false, - } -} - -fn eq_f64(value: &Value, other: f64) -> bool { - value.as_f64().map_or(false, |i| i == other) -} - -fn eq_bool(value: &Value, other: bool) -> bool { - value.as_bool().map_or(false, |i| i == other) -} - -fn eq_str(value: &Value, other: &str) -> bool { - value.as_str().map_or(false, |i| i == other) -} - -impl PartialEq<str> for Value { - fn eq(&self, other: &str) -> bool { - eq_str(self, other) - } -} - -impl<'a> PartialEq<&'a str> for Value { - fn eq(&self, other: &&str) -> bool { - eq_str(self, *other) - } -} - -impl PartialEq<Value> for str { - fn eq(&self, other: &Value) -> bool { - eq_str(other, self) - } -} - -impl<'a> PartialEq<Value> for &'a str { - fn eq(&self, other: &Value) -> bool { - eq_str(other, *self) - } -} - -impl PartialEq<String> for Value { - fn eq(&self, other: &String) -> bool { - eq_str(self, other.as_str()) - } -} - -impl PartialEq<Value> for String { - fn eq(&self, other: &Value) -> bool { - eq_str(other, self.as_str()) - } -} - -macro_rules! partialeq_numeric { - ($($eq:ident [$($ty:ty)*])*) => { - $($( - impl PartialEq<$ty> for Value { - fn eq(&self, other: &$ty) -> bool { - $eq(self, *other as _) - } - } - - impl PartialEq<Value> for $ty { - fn eq(&self, other: &Value) -> bool { - $eq(other, *self as _) - } - } - - impl<'a> PartialEq<$ty> for &'a Value { - fn eq(&self, other: &$ty) -> bool { - $eq(*self, *other as _) - } - } - - impl<'a> PartialEq<$ty> for &'a mut Value { - fn eq(&self, other: &$ty) -> bool { - $eq(*self, *other as _) - } - } - )*)* - } -} - -partialeq_numeric! { - eq_i64[i8 i16 i32 i64 isize] - eq_u64[u8 u16 u32 u64 usize] - eq_f32[f32] - eq_f64[f64] - eq_bool[bool] -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/ser.rs b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/ser.rs deleted file mode 100644 index ea6db2fb..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/ser.rs +++ /dev/null
@@ -1,1053 +0,0 @@ -use crate::error::{Error, ErrorCode, Result}; -use crate::map::Map; -use crate::value::{to_value, Value}; -use alloc::borrow::ToOwned; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::fmt::Display; -use core::result; -use serde::ser::{Impossible, Serialize}; - -impl Serialize for Value { - #[inline] - fn serialize<S>(&self, serializer: S) -> result::Result<S::Ok, S::Error> - where - S: ::serde::Serializer, - { - match self { - Value::Null => serializer.serialize_unit(), - Value::Bool(b) => serializer.serialize_bool(*b), - Value::Number(n) => n.serialize(serializer), - Value::String(s) => serializer.serialize_str(s), - Value::Array(v) => v.serialize(serializer), - #[cfg(any(feature = "std", feature = "alloc"))] - Value::Object(m) => { - use serde::ser::SerializeMap; - let mut map = tri!(serializer.serialize_map(Some(m.len()))); - for (k, v) in m { - tri!(map.serialize_entry(k, v)); - } - map.end() - } - } - } -} - -/// Serializer whose output is a `Value`. -/// -/// This is the serializer that backs [`serde_json::to_value`][crate::to_value]. -/// Unlike the main serde_json serializer which goes from some serializable -/// value of type `T` to JSON text, this one goes from `T` to -/// `serde_json::Value`. -/// -/// The `to_value` function is implementable as: -/// -/// ``` -/// use serde::Serialize; -/// use serde_json_lenient::{Error, Value}; -/// -/// pub fn to_value<T>(input: T) -> Result<Value, Error> -/// where -/// T: Serialize, -/// { -/// input.serialize(serde_json_lenient::value::Serializer) -/// } -/// ``` -pub struct Serializer; - -impl serde::Serializer for Serializer { - type Ok = Value; - type Error = Error; - - type SerializeSeq = SerializeVec; - type SerializeTuple = SerializeVec; - type SerializeTupleStruct = SerializeVec; - type SerializeTupleVariant = SerializeTupleVariant; - type SerializeMap = SerializeMap; - type SerializeStruct = SerializeMap; - type SerializeStructVariant = SerializeStructVariant; - - #[inline] - fn serialize_bool(self, value: bool) -> Result<Value> { - Ok(Value::Bool(value)) - } - - #[inline] - fn serialize_i8(self, value: i8) -> Result<Value> { - self.serialize_i64(value as i64) - } - - #[inline] - fn serialize_i16(self, value: i16) -> Result<Value> { - self.serialize_i64(value as i64) - } - - #[inline] - fn serialize_i32(self, value: i32) -> Result<Value> { - self.serialize_i64(value as i64) - } - - fn serialize_i64(self, value: i64) -> Result<Value> { - Ok(Value::Number(value.into())) - } - - fn serialize_i128(self, value: i128) -> Result<Value> { - #[cfg(feature = "arbitrary_precision")] - { - Ok(Value::Number(value.into())) - } - - #[cfg(not(feature = "arbitrary_precision"))] - { - if let Ok(value) = u64::try_from(value) { - Ok(Value::Number(value.into())) - } else if let Ok(value) = i64::try_from(value) { - Ok(Value::Number(value.into())) - } else { - Err(Error::syntax(ErrorCode::NumberOutOfRange, 0, 0)) - } - } - } - - #[inline] - fn serialize_u8(self, value: u8) -> Result<Value> { - self.serialize_u64(value as u64) - } - - #[inline] - fn serialize_u16(self, value: u16) -> Result<Value> { - self.serialize_u64(value as u64) - } - - #[inline] - fn serialize_u32(self, value: u32) -> Result<Value> { - self.serialize_u64(value as u64) - } - - #[inline] - fn serialize_u64(self, value: u64) -> Result<Value> { - Ok(Value::Number(value.into())) - } - - fn serialize_u128(self, value: u128) -> Result<Value> { - #[cfg(feature = "arbitrary_precision")] - { - Ok(Value::Number(value.into())) - } - - #[cfg(not(feature = "arbitrary_precision"))] - { - if let Ok(value) = u64::try_from(value) { - Ok(Value::Number(value.into())) - } else { - Err(Error::syntax(ErrorCode::NumberOutOfRange, 0, 0)) - } - } - } - - #[inline] - fn serialize_f32(self, float: f32) -> Result<Value> { - Ok(Value::from(float)) - } - - #[inline] - fn serialize_f64(self, float: f64) -> Result<Value> { - Ok(Value::from(float)) - } - - #[inline] - fn serialize_char(self, value: char) -> Result<Value> { - let mut s = String::new(); - s.push(value); - Ok(Value::String(s)) - } - - #[inline] - fn serialize_str(self, value: &str) -> Result<Value> { - Ok(Value::String(value.to_owned())) - } - - fn serialize_bytes(self, value: &[u8]) -> Result<Value> { - let vec = value.iter().map(|&b| Value::Number(b.into())).collect(); - Ok(Value::Array(vec)) - } - - #[inline] - fn serialize_unit(self) -> Result<Value> { - Ok(Value::Null) - } - - #[inline] - fn serialize_unit_struct(self, _name: &'static str) -> Result<Value> { - self.serialize_unit() - } - - #[inline] - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - ) -> Result<Value> { - self.serialize_str(variant) - } - - #[inline] - fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<Value> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - value: &T, - ) -> Result<Value> - where - T: ?Sized + Serialize, - { - let mut values = Map::new(); - values.insert(String::from(variant), tri!(to_value(value))); - Ok(Value::Object(values)) - } - - #[inline] - fn serialize_none(self) -> Result<Value> { - self.serialize_unit() - } - - #[inline] - fn serialize_some<T>(self, value: &T) -> Result<Value> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq> { - Ok(SerializeVec { - vec: Vec::with_capacity(len.unwrap_or(0)), - }) - } - - fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple> { - self.serialize_seq(Some(len)) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - len: usize, - ) -> Result<Self::SerializeTupleStruct> { - self.serialize_seq(Some(len)) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Ok(SerializeTupleVariant { - name: String::from(variant), - vec: Vec::with_capacity(len), - }) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Ok(SerializeMap::Map { - map: Map::new(), - next_key: None, - }) - } - - fn serialize_struct(self, name: &'static str, len: usize) -> Result<Self::SerializeStruct> { - match name { - #[cfg(feature = "arbitrary_precision")] - crate::number::TOKEN => Ok(SerializeMap::Number { out_value: None }), - #[cfg(feature = "raw_value")] - crate::raw::TOKEN => Ok(SerializeMap::RawValue { out_value: None }), - _ => self.serialize_map(Some(len)), - } - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Ok(SerializeStructVariant { - name: String::from(variant), - map: Map::new(), - }) - } - - fn collect_str<T>(self, value: &T) -> Result<Value> - where - T: ?Sized + Display, - { - Ok(Value::String(value.to_string())) - } -} - -pub struct SerializeVec { - vec: Vec<Value>, -} - -pub struct SerializeTupleVariant { - name: String, - vec: Vec<Value>, -} - -pub enum SerializeMap { - Map { - map: Map<String, Value>, - next_key: Option<String>, - }, - #[cfg(feature = "arbitrary_precision")] - Number { out_value: Option<Value> }, - #[cfg(feature = "raw_value")] - RawValue { out_value: Option<Value> }, -} - -pub struct SerializeStructVariant { - name: String, - map: Map<String, Value>, -} - -impl serde::ser::SerializeSeq for SerializeVec { - type Ok = Value; - type Error = Error; - - fn serialize_element<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - self.vec.push(tri!(to_value(value))); - Ok(()) - } - - fn end(self) -> Result<Value> { - Ok(Value::Array(self.vec)) - } -} - -impl serde::ser::SerializeTuple for SerializeVec { - type Ok = Value; - type Error = Error; - - fn serialize_element<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - serde::ser::SerializeSeq::serialize_element(self, value) - } - - fn end(self) -> Result<Value> { - serde::ser::SerializeSeq::end(self) - } -} - -impl serde::ser::SerializeTupleStruct for SerializeVec { - type Ok = Value; - type Error = Error; - - fn serialize_field<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - serde::ser::SerializeSeq::serialize_element(self, value) - } - - fn end(self) -> Result<Value> { - serde::ser::SerializeSeq::end(self) - } -} - -impl serde::ser::SerializeTupleVariant for SerializeTupleVariant { - type Ok = Value; - type Error = Error; - - fn serialize_field<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - self.vec.push(tri!(to_value(value))); - Ok(()) - } - - fn end(self) -> Result<Value> { - let mut object = Map::new(); - - object.insert(self.name, Value::Array(self.vec)); - - Ok(Value::Object(object)) - } -} - -impl serde::ser::SerializeMap for SerializeMap { - type Ok = Value; - type Error = Error; - - fn serialize_key<T>(&mut self, key: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - SerializeMap::Map { next_key, .. } => { - *next_key = Some(tri!(key.serialize(MapKeySerializer))); - Ok(()) - } - #[cfg(feature = "arbitrary_precision")] - SerializeMap::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - SerializeMap::RawValue { .. } => unreachable!(), - } - } - - fn serialize_value<T>(&mut self, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - SerializeMap::Map { map, next_key } => { - let key = next_key.take(); - // Panic because this indicates a bug in the program rather than an - // expected failure. - let key = key.expect("serialize_value called before serialize_key"); - map.insert(key, tri!(to_value(value))); - Ok(()) - } - #[cfg(feature = "arbitrary_precision")] - SerializeMap::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - SerializeMap::RawValue { .. } => unreachable!(), - } - } - - fn end(self) -> Result<Value> { - match self { - SerializeMap::Map { map, .. } => Ok(Value::Object(map)), - #[cfg(feature = "arbitrary_precision")] - SerializeMap::Number { .. } => unreachable!(), - #[cfg(feature = "raw_value")] - SerializeMap::RawValue { .. } => unreachable!(), - } - } -} - -struct MapKeySerializer; - -fn key_must_be_a_string() -> Error { - Error::syntax(ErrorCode::KeyMustBeAString, 0, 0) -} - -fn float_key_must_be_finite() -> Error { - Error::syntax(ErrorCode::FloatKeyMustBeFinite, 0, 0) -} - -impl serde::Serializer for MapKeySerializer { - type Ok = String; - type Error = Error; - - type SerializeSeq = Impossible<String, Error>; - type SerializeTuple = Impossible<String, Error>; - type SerializeTupleStruct = Impossible<String, Error>; - type SerializeTupleVariant = Impossible<String, Error>; - type SerializeMap = Impossible<String, Error>; - type SerializeStruct = Impossible<String, Error>; - type SerializeStructVariant = Impossible<String, Error>; - - #[inline] - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - variant: &'static str, - ) -> Result<String> { - Ok(variant.to_owned()) - } - - #[inline] - fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<String> - where - T: ?Sized + Serialize, - { - value.serialize(self) - } - - fn serialize_bool(self, _value: bool) -> Result<String> { - Err(key_must_be_a_string()) - } - - fn serialize_i8(self, value: i8) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_i16(self, value: i16) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_i32(self, value: i32) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_i64(self, value: i64) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_u8(self, value: u8) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_u16(self, value: u16) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_u32(self, value: u32) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_u64(self, value: u64) -> Result<String> { - Ok(value.to_string()) - } - - fn serialize_f32(self, value: f32) -> Result<String> { - if value.is_finite() { - Ok(ryu::Buffer::new().format_finite(value).to_owned()) - } else { - Err(float_key_must_be_finite()) - } - } - - fn serialize_f64(self, value: f64) -> Result<String> { - if value.is_finite() { - Ok(ryu::Buffer::new().format_finite(value).to_owned()) - } else { - Err(float_key_must_be_finite()) - } - } - - #[inline] - fn serialize_char(self, value: char) -> Result<String> { - Ok({ - let mut s = String::new(); - s.push(value); - s - }) - } - - #[inline] - fn serialize_str(self, value: &str) -> Result<String> { - Ok(value.to_owned()) - } - - fn serialize_bytes(self, _value: &[u8]) -> Result<String> { - Err(key_must_be_a_string()) - } - - fn serialize_unit(self) -> Result<String> { - Err(key_must_be_a_string()) - } - - fn serialize_unit_struct(self, _name: &'static str) -> Result<String> { - Err(key_must_be_a_string()) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T, - ) -> Result<String> - where - T: ?Sized + Serialize, - { - Err(key_must_be_a_string()) - } - - fn serialize_none(self) -> Result<String> { - Err(key_must_be_a_string()) - } - - fn serialize_some<T>(self, _value: &T) -> Result<String> - where - T: ?Sized + Serialize, - { - Err(key_must_be_a_string()) - } - - fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> { - Err(key_must_be_a_string()) - } - - fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple> { - Err(key_must_be_a_string()) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleStruct> { - Err(key_must_be_a_string()) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Err(key_must_be_a_string()) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Err(key_must_be_a_string()) - } - - fn serialize_struct(self, _name: &'static str, _len: usize) -> Result<Self::SerializeStruct> { - Err(key_must_be_a_string()) - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Err(key_must_be_a_string()) - } - - fn collect_str<T>(self, value: &T) -> Result<String> - where - T: ?Sized + Display, - { - Ok(value.to_string()) - } -} - -impl serde::ser::SerializeStruct for SerializeMap { - type Ok = Value; - type Error = Error; - - fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - match self { - SerializeMap::Map { .. } => serde::ser::SerializeMap::serialize_entry(self, key, value), - #[cfg(feature = "arbitrary_precision")] - SerializeMap::Number { out_value } => { - if key == crate::number::TOKEN { - *out_value = Some(tri!(value.serialize(NumberValueEmitter))); - Ok(()) - } else { - Err(invalid_number()) - } - } - #[cfg(feature = "raw_value")] - SerializeMap::RawValue { out_value } => { - if key == crate::raw::TOKEN { - *out_value = Some(tri!(value.serialize(RawValueEmitter))); - Ok(()) - } else { - Err(invalid_raw_value()) - } - } - } - } - - fn end(self) -> Result<Value> { - match self { - SerializeMap::Map { .. } => serde::ser::SerializeMap::end(self), - #[cfg(feature = "arbitrary_precision")] - SerializeMap::Number { out_value, .. } => { - Ok(out_value.expect("number value was not emitted")) - } - #[cfg(feature = "raw_value")] - SerializeMap::RawValue { out_value, .. } => { - Ok(out_value.expect("raw value was not emitted")) - } - } - } -} - -impl serde::ser::SerializeStructVariant for SerializeStructVariant { - type Ok = Value; - type Error = Error; - - fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()> - where - T: ?Sized + Serialize, - { - self.map.insert(String::from(key), tri!(to_value(value))); - Ok(()) - } - - fn end(self) -> Result<Value> { - let mut object = Map::new(); - - object.insert(self.name, Value::Object(self.map)); - - Ok(Value::Object(object)) - } -} - -#[cfg(feature = "arbitrary_precision")] -struct NumberValueEmitter; - -#[cfg(feature = "arbitrary_precision")] -fn invalid_number() -> Error { - Error::syntax(ErrorCode::InvalidNumber, 0, 0) -} - -#[cfg(feature = "arbitrary_precision")] -impl serde::ser::Serializer for NumberValueEmitter { - type Ok = Value; - type Error = Error; - - type SerializeSeq = Impossible<Value, Error>; - type SerializeTuple = Impossible<Value, Error>; - type SerializeTupleStruct = Impossible<Value, Error>; - type SerializeTupleVariant = Impossible<Value, Error>; - type SerializeMap = Impossible<Value, Error>; - type SerializeStruct = Impossible<Value, Error>; - type SerializeStructVariant = Impossible<Value, Error>; - - fn serialize_bool(self, _v: bool) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_i8(self, _v: i8) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_i16(self, _v: i16) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_i32(self, _v: i32) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_i64(self, _v: i64) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_u8(self, _v: u8) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_u16(self, _v: u16) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_u32(self, _v: u32) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_u64(self, _v: u64) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_f32(self, _v: f32) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_f64(self, _v: f64) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_char(self, _v: char) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_str(self, value: &str) -> Result<Value> { - let n = tri!(value.to_owned().parse()); - Ok(Value::Number(n)) - } - - fn serialize_bytes(self, _value: &[u8]) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_none(self) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_some<T>(self, _value: &T) -> Result<Value> - where - T: ?Sized + Serialize, - { - Err(invalid_number()) - } - - fn serialize_unit(self) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_unit_struct(self, _name: &'static str) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - ) -> Result<Value> { - Err(invalid_number()) - } - - fn serialize_newtype_struct<T>(self, _name: &'static str, _value: &T) -> Result<Value> - where - T: ?Sized + Serialize, - { - Err(invalid_number()) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T, - ) -> Result<Value> - where - T: ?Sized + Serialize, - { - Err(invalid_number()) - } - - fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> { - Err(invalid_number()) - } - - fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple> { - Err(invalid_number()) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleStruct> { - Err(invalid_number()) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Err(invalid_number()) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Err(invalid_number()) - } - - fn serialize_struct(self, _name: &'static str, _len: usize) -> Result<Self::SerializeStruct> { - Err(invalid_number()) - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Err(invalid_number()) - } -} - -#[cfg(feature = "raw_value")] -struct RawValueEmitter; - -#[cfg(feature = "raw_value")] -fn invalid_raw_value() -> Error { - Error::syntax(ErrorCode::ExpectedSomeValue, 0, 0) -} - -#[cfg(feature = "raw_value")] -impl serde::ser::Serializer for RawValueEmitter { - type Ok = Value; - type Error = Error; - - type SerializeSeq = Impossible<Value, Error>; - type SerializeTuple = Impossible<Value, Error>; - type SerializeTupleStruct = Impossible<Value, Error>; - type SerializeTupleVariant = Impossible<Value, Error>; - type SerializeMap = Impossible<Value, Error>; - type SerializeStruct = Impossible<Value, Error>; - type SerializeStructVariant = Impossible<Value, Error>; - - fn serialize_bool(self, _v: bool) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_i8(self, _v: i8) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_i16(self, _v: i16) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_i32(self, _v: i32) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_i64(self, _v: i64) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_u8(self, _v: u8) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_u16(self, _v: u16) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_u32(self, _v: u32) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_u64(self, _v: u64) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_f32(self, _v: f32) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_f64(self, _v: f64) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_char(self, _v: char) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_str(self, value: &str) -> Result<Value> { - crate::from_str(value) - } - - fn serialize_bytes(self, _value: &[u8]) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_none(self) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_some<T>(self, _value: &T) -> Result<Value> - where - T: ?Sized + Serialize, - { - Err(invalid_raw_value()) - } - - fn serialize_unit(self) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_unit_struct(self, _name: &'static str) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_unit_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - ) -> Result<Value> { - Err(invalid_raw_value()) - } - - fn serialize_newtype_struct<T>(self, _name: &'static str, _value: &T) -> Result<Value> - where - T: ?Sized + Serialize, - { - Err(invalid_raw_value()) - } - - fn serialize_newtype_variant<T>( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _value: &T, - ) -> Result<Value> - where - T: ?Sized + Serialize, - { - Err(invalid_raw_value()) - } - - fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> { - Err(invalid_raw_value()) - } - - fn serialize_tuple(self, _len: usize) -> Result<Self::SerializeTuple> { - Err(invalid_raw_value()) - } - - fn serialize_tuple_struct( - self, - _name: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleStruct> { - Err(invalid_raw_value()) - } - - fn serialize_tuple_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeTupleVariant> { - Err(invalid_raw_value()) - } - - fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> { - Err(invalid_raw_value()) - } - - fn serialize_struct(self, _name: &'static str, _len: usize) -> Result<Self::SerializeStruct> { - Err(invalid_raw_value()) - } - - fn serialize_struct_variant( - self, - _name: &'static str, - _variant_index: u32, - _variant: &'static str, - _len: usize, - ) -> Result<Self::SerializeStructVariant> { - Err(invalid_raw_value()) - } - - fn collect_str<T>(self, value: &T) -> Result<Self::Ok> - where - T: ?Sized + Display, - { - self.serialize_str(&value.to_string()) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/tests/README.md b/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/tests/README.md deleted file mode 100644 index 934a473..0000000 --- a/third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/tests/README.md +++ /dev/null
@@ -1,4 +0,0 @@ -In order to facilitate incorporating changes from upstream serde_json, -all tests for new functionality introduced by serde_jsonc should go -in separate files so that changes to tests from upstream can be merged -seamlessly.
diff --git a/third_party/rust/serde_json_lenient/v0_1/BUILD.gn b/third_party/rust/serde_json_lenient/v0_1/BUILD.gn deleted file mode 100644 index 65af9112..0000000 --- a/third_party/rust/serde_json_lenient/v0_1/BUILD.gn +++ /dev/null
@@ -1,83 +0,0 @@ -# Copyright 2023 The Chromium Authors -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# @generated from third_party/rust/chromium_crates_io/BUILD.gn.hbs by -# tools/crates/gnrt. -# Do not edit! - -import("//build/rust/cargo_crate.gni") - -cargo_crate("lib") { - crate_name = "serde_json_lenient" - epoch = "0.1" - crate_type = "rlib" - crate_root = "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lib.rs" - sources = [ - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/de.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/error.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/error.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/features_check/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/core.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/io/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/iter.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/algorithm.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bhcomp.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/bignum.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/cached_float80.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/digit.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/errors.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/exponent.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/float.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers32.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/large_powers64.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/math.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/num.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/parse.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/rounding.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/shift.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lexical/small_powers.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/lib.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/macros.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/map.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/number.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/raw.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/read.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/ser.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/de.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/from.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/index.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/partial_eq.rs", - "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/src/value/ser.rs", - ] - inputs = [] - - build_native_rust_unit_tests = false - edition = "2021" - cargo_pkg_version = "0.1.8" - cargo_pkg_authors = "Adrian Taylor <adetaylor@chromium.org>, Michael Bolin <bolinfest@gmail.com>, Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>" - cargo_pkg_name = "serde_json_lenient" - cargo_pkg_description = "A lenient JSON serialization file format" - library_configs -= [ "//build/config/compiler:chromium_code" ] - library_configs += [ "//build/config/compiler:no_chromium_code" ] - executable_configs -= [ "//build/config/compiler:chromium_code" ] - executable_configs += [ "//build/config/compiler:no_chromium_code" ] - proc_macro_configs -= [ "//build/config/compiler:chromium_code" ] - proc_macro_configs += [ "//build/config/compiler:no_chromium_code" ] - deps = [ - "//third_party/rust/itoa/v1:lib", - "//third_party/rust/ryu/v1:lib", - "//third_party/rust/serde/v1:lib", - ] - features = [ - "float_roundtrip", - "std", - "unbounded_depth", - ] - build_root = "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/build.rs" - build_sources = [ "//third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/build.rs" ] -}
diff --git a/third_party/rust/serde_json_lenient/v0_1/README.chromium b/third_party/rust/serde_json_lenient/v0_1/README.chromium deleted file mode 100644 index 55b28ed8..0000000 --- a/third_party/rust/serde_json_lenient/v0_1/README.chromium +++ /dev/null
@@ -1,9 +0,0 @@ -Name: serde_json_lenient -URL: https://crates.io/crates/serde_json_lenient -Description: A lenient JSON serialization file format -Version: 0.1.8 -Security Critical: yes -Shipped: yes -License: Apache 2.0 -License File: //third_party/rust/chromium_crates_io/vendor/serde_json_lenient-0.1.8/LICENSE-APACHE -Revision: 34fa6dd20359598309633790680f6e3b2e360d84
diff --git a/third_party/rust/serde_json_lenient/v0_1/wrapper/BUILD.gn b/third_party/rust/serde_json_lenient/v0_2/wrapper/BUILD.gn similarity index 91% rename from third_party/rust/serde_json_lenient/v0_1/wrapper/BUILD.gn rename to third_party/rust/serde_json_lenient/v0_2/wrapper/BUILD.gn index dc9e1e1..c1642f6 100644 --- a/third_party/rust/serde_json_lenient/v0_1/wrapper/BUILD.gn +++ b/third_party/rust/serde_json_lenient/v0_2/wrapper/BUILD.gn
@@ -17,7 +17,7 @@ public_deps = [ ":wrapper_functions" ] deps = [ "//third_party/rust/serde/v1:lib", - "//third_party/rust/serde_json_lenient/v0_1:lib", + "//third_party/rust/serde_json_lenient/v0_2:lib", ] }
diff --git a/third_party/rust/serde_json_lenient/v0_1/wrapper/functions.h b/third_party/rust/serde_json_lenient/v0_2/wrapper/functions.h similarity index 94% rename from third_party/rust/serde_json_lenient/v0_1/wrapper/functions.h rename to third_party/rust/serde_json_lenient/v0_2/wrapper/functions.h index 55cf121..79c1902 100644 --- a/third_party/rust/serde_json_lenient/v0_1/wrapper/functions.h +++ b/third_party/rust/serde_json_lenient/v0_2/wrapper/functions.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 THIRD_PARTY_RUST_SERDE_JSON_LENIENT_V0_1_WRAPPER_SERDE_JSON_LENIENT_H_ -#define THIRD_PARTY_RUST_SERDE_JSON_LENIENT_V0_1_WRAPPER_SERDE_JSON_LENIENT_H_ +#ifndef THIRD_PARTY_RUST_SERDE_JSON_LENIENT_V0_2_WRAPPER_SERDE_JSON_LENIENT_H_ +#define THIRD_PARTY_RUST_SERDE_JSON_LENIENT_V0_2_WRAPPER_SERDE_JSON_LENIENT_H_ #include <stdint.h> @@ -95,4 +95,4 @@ } // namespace serde_json_lenient -#endif // THIRD_PARTY_RUST_SERDE_JSON_LENIENT_V0_1_WRAPPER_SERDE_JSON_LENIENT_H_ +#endif // THIRD_PARTY_RUST_SERDE_JSON_LENIENT_V0_2_WRAPPER_SERDE_JSON_LENIENT_H_
diff --git a/third_party/rust/serde_json_lenient/v0_1/wrapper/lib.rs b/third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs similarity index 90% rename from third_party/rust/serde_json_lenient/v0_1/wrapper/lib.rs rename to third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs index d3953fd..0cfb702 100644 --- a/third_party/rust/serde_json_lenient/v0_1/wrapper/lib.rs +++ b/third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs
@@ -18,7 +18,7 @@ mod ffi { // From the `wrapper_functions` target. unsafe extern "C++" { - include!("third_party/rust/serde_json_lenient/v0_1/wrapper/functions.h"); + include!("third_party/rust/serde_json_lenient/v0_2/wrapper/functions.h"); type ContextPointer; @@ -85,8 +85,11 @@ replace_invalid_characters: bool, /// Allows both C (/* */) and C++ (//) style comments. allow_comments: bool, - /// Permits unescaped ASCII control characters (such as unescaped \r and - /// \n) in the range [0x00,0x1F]. + /// Permits unescaped \r and \n in strings. This is a subset of what + /// allow_control_chars allows. + allow_newlines: bool, + /// Permits unescaped ASCII control characters (such as unescaped \b, + /// \r, or \n) in the range [0x00,0x1F]. allow_control_chars: bool, /// Permits \\v vertical tab escapes. allow_vert_tab: bool, @@ -131,6 +134,13 @@ let mut deserializer = serde_json_lenient::Deserializer::new(SliceRead::new( if json.starts_with(&UTF8_BOM) { &json[3..] } else { json }, options.replace_invalid_characters, + + // On the C++ side, allow_control_chars means "allow all control chars, + // including \r and \n", while in serde_json_lenient, + // allow_control_chars means "allow all controls chars, except \r and + // \n". To give the behavior that C++ client code is expecting, enable + // allow_newlines as well when allow_control_chars is supplied. + options.allow_newlines || options.allow_control_chars, options.allow_control_chars, options.allow_vert_tab, options.allow_x_escapes,
diff --git a/third_party/rust/serde_json_lenient/v0_1/wrapper/visitor.rs b/third_party/rust/serde_json_lenient/v0_2/wrapper/visitor.rs similarity index 100% rename from third_party/rust/serde_json_lenient/v0_1/wrapper/visitor.rs rename to third_party/rust/serde_json_lenient/v0_2/wrapper/visitor.rs
diff --git a/third_party/webgpu-cts/src b/third_party/webgpu-cts/src index e5fb882..2874ad1 160000 --- a/third_party/webgpu-cts/src +++ b/third_party/webgpu-cts/src
@@ -1 +1 @@ -Subproject commit e5fb8824ade85fae690f2bb45cc347a1398cca2f +Subproject commit 2874ad1e88a6fbc8b5d8988b82d7cb84496ba20d
diff --git a/third_party/webrtc b/third_party/webrtc index f591f2d..1c35107 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit f591f2dcf1bfb00f25967d214776fee6b675e2ef +Subproject commit 1c35107cdca725ca700f1c8c3ea39d690e4cfc3e
diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni index 58f073ca..8b97b7a 100644 --- a/third_party/widevine/cdm/widevine.gni +++ b/third_party/widevine/cdm/widevine.gni
@@ -39,10 +39,12 @@ enable_widevine && enable_library_cdms && library_widevine_cdm_available # Widevine CDM can be deployed as a component. Currently only supported on -# desktop platforms. The CDM can be bundled regardless whether -# it's a component. See below. +# desktop platforms. Not enabled for lacros (as it is changing to use the +# ash updated version). The CDM can be bundled regardless whether it's a +# component. See below. enable_widevine_cdm_component = - enable_library_widevine_cdm && (is_win || is_mac || is_linux || is_chromeos) + enable_library_widevine_cdm && + (is_win || is_mac || is_linux || is_chromeos_ash) # Enable (Windows) Media Foundation Widevine CDM component. declare_args() {
diff --git a/tools/crates/create_update_cl.md b/tools/crates/create_update_cl.md index 6b4967b..26681d9c 100644 --- a/tools/crates/create_update_cl.md +++ b/tools/crates/create_update_cl.md
@@ -150,14 +150,25 @@ To update: -1. Edit `third_party/rust/chromium_crates_io/Cargo.toml` to change the version - being depended upon. -1. Follow other steps described in - [`docs/rust.md`](../../docs/rust.md#importing-a-crate-from-crates_io) for - importing a new crate (e.g. `gnrt vendor`, `gnrt gen`, etc.) - - TODO(https://crbug.com/330729319): Try to automate some parts of this step -1. Remove the old version's leftover files in `//third_party/rust/<crate>/<old - epoch>` +1. Prepare `Cargo.toml` change: + 1. `git checkout origin/main` + 1. `git checkout -b major-version-update-of-foo` + 1. Edit `third_party/rust/chromium_crates_io/Cargo.toml` to change the major + version of the crate (or crates) you want to update. + **Important**: Do not edit `Cargo.lock` (e.g. don't run `gnrt vendor` + etc.). + 1. `git add third_party/rust/chromium_crates_io/Cargo.toml` + 1. `git commit -m "Manual edit of Cargo.toml"` + 1. `git cl upload -m "Manual edit of Cargo.toml" --bypass-hooks --skip-title --force` +1. Run the helper script as follows: + `tools/crates/create_update_cl.py manual + --title "Roll foo crate to new major version in //third_party/rust."` + - This will fix up the CL description + - To make the review easier, one of the patchsets covers just the path + changes. For example - see [the delta here](https://crrev.com/c/5445719/2..7). +1. Follow the manual steps from the minor version update rotation: + 1. `cargo vet` audit + 1. Review, landing, etc. ### Workflow B: Incremental transition
diff --git a/tools/crates/create_update_cl.py b/tools/crates/create_update_cl.py index a1ef1d3..16be516 100755 --- a/tools/crates/create_update_cl.py +++ b/tools/crates/create_update_cl.py
@@ -11,6 +11,7 @@ import datetime import os import re +import shlex import subprocess import sys import textwrap @@ -24,17 +25,18 @@ # * `crate_name` : "syn" string # * `crate_version`: "2.0.50" string # * `crate_id` : "syn@2.0.50" string (syntax used by `cargo`) -# * `crate_epoch` : "syn@v2" string (made up syntax) +# * `crate_epoch` : "v2" string (syntax used in dir names under +# //third_party/rust/<crate name>/<crate epoch>) # # Note that `crate_name` may not be unique (e.g. if there is both `syn@1.0.109` -# and `syn@2.0.50`). Also note that `crate_epoch` doesn't change during a minor -# version update (such as the one that this script produces in `auto` and -# `single` modes). +# and `syn@2.0.50`). Also note that f`{crate_name}@{crate_epoch}` doesn't +# change during a minor version update (such as the one that this script +# produces in `auto` and `single` modes). THIS_DIR = os.path.dirname(__file__) -CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..')) -CRATES_DIR = os.path.join(CHROMIUM_DIR, "third_party", "rust", - "chromium_crates_io") +CHROMIUM_DIR = os.path.normpath(os.path.join(THIS_DIR, '..', '..')) +THIRD_PARTY_RUST = os.path.join(CHROMIUM_DIR, "third_party", "rust") +CRATES_DIR = os.path.join(THIRD_PARTY_RUST, "chromium_crates_io") VENDOR_DIR = os.path.join(CRATES_DIR, "vendor") CARGO_LOCK = os.path.join(CRATES_DIR, "Cargo.lock") VET_CONFIG = os.path.join(CRATES_DIR, "supply-chain", "config.toml") @@ -46,6 +48,8 @@ UPDATE_RUST_SCRIPT = os.path.join(CHROMIUM_DIR, "tools", "rust", "update_rust.py") +g_is_verbose = False + timestamp = datetime.datetime.now() BRANCH_BASENAME = "rust-crates-update" BRANCH_BASENAME += f"--{timestamp.year}{timestamp.month:02}{timestamp.day:02}" @@ -57,6 +61,11 @@ args = list(args) assert args + if g_is_verbose: + escaped = [shlex.quote(arg) for arg in args] + msg = " ".join(escaped) + print(f" Running: {msg}") + # Needs shell=True on Windows due to git.bat in depot_tools. is_win = sys.platform.startswith('win32') result = subprocess.run(args, @@ -121,6 +130,10 @@ removed_crate_ids: List[str] added_crate_ids: List[str] + def size(self): + return len(self.updates) + len(self.added_crate_ids) + len( + self.removed_crate_ids) + def DiffCrateIds(old_crate_ids: Set[str], new_crate_ids: Set[str], @@ -143,7 +156,8 @@ name = ConvertCrateIdToCrateName(crate_id) version = ConvertCrateIdToCrateVersion(crate_id) if only_minor_updates: - key = GetCrateEpoch(name, version) + epoch = GetEpoch(version) + key = f'{name}@{epoch}' else: key = name if key in result: @@ -189,25 +203,55 @@ return f'v{v[0]}' -def GetCrateEpoch(crate_name: str, crate_version: str) -> str: - epoch = GetEpoch(crate_version) - return f'{crate_name}@{epoch}' - - def ConvertCrateIdToCrateName(crate_id: str) -> str: - """ Converts a `crate_id` (`crate_epoch` also ok) into a `crate_name`.""" + """ Converts a `crate_id` into a `crate_name`.""" return crate_id[:crate_id.find("@")] def ConvertCrateIdToCrateVersion(crate_id: str) -> str: """ Converts a `crate_id` into a `crate_version`.""" - # Unlike ConvertCrateIdToCrateName this func can't work with a `crate_epoch` - assert '@v' not in crate_id - crate_version = crate_id[crate_id.find("@") + 1:] return crate_version +def _ConvertCrateIdToEpochDirRelativeToChromiumRoot(crate_id: str) -> str: + """ Converts a `crate_id` (e.g. "foo@1.2.3") into an epoch dir + (e.g. "third_party/rust/foo/v_1"). The returned dir is relative + to Chromium root. """ + crate_name = ConvertCrateIdToCrateName(crate_id) + crate_name = crate_name.replace("-", "_") + epoch = GetEpoch(ConvertCrateIdToCrateVersion(crate_id)) + target = os.path.join("third_party", "rust", crate_name, epoch) + return target + + +def ConvertCrateIdToEpochDir(crate_id: str) -> str: + """ Converts a `crate_id` (e.g. "foo@1.2.3") into a path to an epoch dir + (e.g. on Windows: "<path to chromium root>\\third_party\\rust\\foo\\v_1"). + """ + return os.path.join( + CHROMIUM_DIR, _ConvertCrateIdToEpochDirRelativeToChromiumRoot(crate_id)) + + +def ConvertCrateIdToVendorDir(crate_id: str) -> str: + """ Converts a `crate_id` (e.g. "foo@1.2.3") into a path to a target dir + (e.g. on Windows: "<path to chromium root>\\third_party\\rust\\foo\\v_1"). + """ + crate_name = ConvertCrateIdToCrateName(crate_id) + crate_version = ConvertCrateIdToCrateVersion(crate_id) + crate_vendor_dir = os.path.join(VENDOR_DIR, f"{crate_name}-{crate_version}") + return crate_vendor_dir + + +def ConvertCrateIdToGnLabel(crate_id: str) -> str: + """ Converts a `crate_id` (e.g. "foo@1.2.3") into + [a GN label](https://gn.googlesource.com/gn/+/main/docs/reference.md#labels) + (e.g. "//third_party/rust/foo/v_1:lib"). """ + dir_name = _ConvertCrateIdToEpochDirRelativeToChromiumRoot(crate_id) + dir_name = dir_name.replace(os.sep, "/") # GN uses `/` as a path separator. + return f"//{dir_name}:lib" + + def FindUpdateableCrates() -> List[str]: """Runs `gnrt update` and returns a `list` of old crate ids (e.g. "syn@2.0.50") that can be updated to a new version. (Idempotent - @@ -238,9 +282,7 @@ new_crate_ids = GetCurrentCrateIds() Git("reset", "--hard") diff = DiffCrateIds(old_crate_ids, new_crate_ids) - update_size = len(diff.updates) + len(diff.added_crate_ids) + len( - diff.removed_crate_ids) - return update_size + return diff.size() def FormatMarkdownItem(item: str) -> str: @@ -299,16 +341,22 @@ return description -def CreateCommitDescription(main_old_crate_id: str, diff: CratesDiff, +def CreateCommitTitle(old_crate_id: str, diff: CratesDiff) -> str: + crate_name = ConvertCrateIdToCrateName(old_crate_id) + old_version = ConvertCrateIdToCrateVersion(old_crate_id) + update = [u for u in diff.updates if u.old_crate_id == old_crate_id][0] + update = next(filter(lambda u: u.old_crate_id == old_crate_id, + diff.updates)) + new_version = ConvertCrateIdToCrateVersion(update.new_crate_id) + roll_summary = f"{crate_name}: " + \ + f"{old_version} => {new_version}" + title = f"Roll {roll_summary} in //third_party/rust." + return title + + +def CreateCommitDescription(title: str, diff: CratesDiff, include_vet_criteria: bool) -> str: - main_crate_name = ConvertCrateIdToCrateName(main_old_crate_id) - main_old_version = ConvertCrateIdToCrateVersion(main_old_crate_id) - main_update = next( - filter(lambda u: u.old_crate_id == main_old_crate_id, diff.updates)) - main_new_version = ConvertCrateIdToCrateVersion(main_update.new_crate_id) - roll_summary = f"{main_crate_name}: " + \ - f"{main_old_version} => {main_new_version}" - description = f"""Roll {roll_summary} in //third_party/rust. + description = f"""{title} This CL has been created semi-automatically. The expected review process and other details can be found at @@ -366,56 +414,55 @@ "maybe other steps will handle this crate...") return upstream_branch diff = DiffCrateIds(old_crate_ids, new_crate_ids) - description = CreateCommitDescription(crate_id, diff, False) + title = CreateCommitTitle(crate_id, diff) + description = CreateCommitDescription(title, diff, False) # Checkout a new git branch + `git cl upload` new_branch = f"{BRANCH_BASENAME}--{crate_id.replace('@', '-')}" Git("checkout", upstream_branch, "-b", new_branch) Git("branch", "--set-upstream-to", upstream_branch) - Git("add", "-f", "third_party/rust") + Git("add", "-f", f"{THIRD_PARTY_RUST}") Git("commit", "-m", description) if args.upload: print(f" Running `git cl upload ...` ...") Git("cl", "upload", "--bypass-hooks", "--force", "--hashtag=cratesio-autoupdate", "--cc=chrome-rust-experiments+autoupdate@google.com") - issue = Git("cl", "issue") + FinishUpdatingCrate(args, title, diff) + return new_branch + + +def FinishUpdatingCrate(args, title: str, diff: CratesDiff): # git mv <vendor/old version> <vendor/new version> - print(f" Running `git mv <vendor/old version> <vendor/new version>`...") + print(f" Running `git mv <old dir> <new dir>` (for better diff)...") for update in diff.updates: - crate_name = ConvertCrateIdToCrateName(update.old_crate_id) - assert crate_name == ConvertCrateIdToCrateName(update.new_crate_id) + old_dir = ConvertCrateIdToVendorDir(update.old_crate_id) + new_dir = ConvertCrateIdToVendorDir(update.new_crate_id) + Git("mv", "--force", f"{old_dir}", f"{new_dir}") - old_version = ConvertCrateIdToCrateVersion(update.old_crate_id) - new_version = ConvertCrateIdToCrateVersion(update.new_crate_id) - old_dir = os.path.join(VENDOR_DIR, f"{crate_name}-{old_version}") - new_dir = os.path.join(VENDOR_DIR, f"{crate_name}-{new_version}") - Git("mv", "--", old_dir, new_dir) - Git("add", "-f", "third_party/rust") - Git("commit", "-m", "git mv <old dir> <new dir> (for better diff)") - if args.upload: - print(f" Running `git cl upload ...` ...") - Git("cl", "upload", "--bypass-hooks", "--force", "-m", - "git mv <old dir> <new dir> (for better diff)") + old_target_dir = ConvertCrateIdToEpochDir(update.old_crate_id) + new_target_dir = ConvertCrateIdToEpochDir(update.new_crate_id) + if old_target_dir != new_target_dir: + Git("mv", "--force", old_target_dir, new_target_dir) + Git("add", "-f", f"{THIRD_PARTY_RUST}") + GitCommit(args, "git mv <old dir> <new dir> (for better diff)") + Git("reset", "--hard", "HEAD^") # Undoing `git mv ...` # gnrt vendor print(f" Running `gnrt vendor`...") - Git("reset", "--hard", "HEAD^") # Undoing `git mv ...` Gnrt("vendor") - Git("add", "-f", "third_party/rust") + Git("add", "-f", f"{THIRD_PARTY_RUST}") # `INCLUSIVE_LANG_SCRIPT` below uses `git grep` and therefore depends on the # earlier `Git("add"...)` above. Please don't reorder/coalesce the `add`. new_content = RunCommandAndCheckForErrors([INCLUSIVE_LANG_SCRIPT], False) with open(INCLUSIVE_LANG_CONFIG, "w") as f: f.write(new_content) Git("add", INCLUSIVE_LANG_CONFIG) - Git("commit", "-m", "gnrt vendor") + GitCommit(args, "gnrt vendor") if args.upload: - print(f" Running `git cl upload ...` ...") - Git("cl", "upload", "--bypass-hooks", "--force", "-m", "gnrt vendor") print(f" Running `git cl description ...` ...") - description = CreateCommitDescription(crate_id, diff, True) + description = CreateCommitDescription(title, diff, True) Git("cl", "description", f"--new-description={description}") # gnrt gen @@ -424,33 +471,38 @@ # Some crates (e.g. ones in the `remove_crates` list of `gnrt_config.toml`) # may result in no changes - this is why we have an `if` below... if Git("status", "--porcelain"): - Git("add", "-f", "third_party/rust") - Git("commit", "-m", "gnrt gen") - if args.upload: - print(f" Running `git cl upload ...` ...") - Git("cl", "upload", "--bypass-hooks", "--force", "-m", "gnrt gen") + Git("add", "-f", f"{THIRD_PARTY_RUST}") + GitCommit(args, "gnrt gen") if args.upload: + issue = Git("cl", "issue") print(f" {issue}") - return new_branch + +def RaiseErrorIfGitIsDirty(): + if Git("status", "--porcelain"): + raise RuntimeError("Dirty `git status` - save you local changes "\ + "before rerunning the script") def CheckoutInitialBranch(branch): print(f"Checking out the `{branch}` branch...") - if Git("status", "--porcelain"): - raise RuntimeError("Dirty `git status` - save you local changes "\ - "before rerunning the script") + RaiseErrorIfGitIsDirty() Git("checkout", branch) - if Git("status", "--porcelain"): - raise RuntimeError("Dirty `git status` - save you local changes "\ - "before rerunning the script") + RaiseErrorIfGitIsDirty() # Ensure the //third_party/rust-toolchain version matches the branch. print("Running //tools/rust/update_rust.py (hopefully a no-op)...") RunCommandAndCheckForErrors([UPDATE_RUST_SCRIPT], False) +def GitCommit(args, title): + Git("commit", "-m", title) + if args.upload: + print(f" Running `git cl upload ...` ...") + Git("cl", "upload", "--bypass-hooks", "--force", "-m", title) + + def ResolveCrateNameToCrateId(crate_name): """Parses `Cargo.toml` to resolve `crate_name` into "crate-name@1.2.3". Throws if `crate_name` can't be resolved. @@ -508,6 +560,54 @@ UpdateCrate(args, crate_id, upstream_branch) +def ManualUpdate(args): + title = args.title + + RaiseErrorIfGitIsDirty() + print(f"Post-processing a manual edit of `Cargo.toml`...") + + print(f" Running `gnrt vendor` to detect `Cargo.lock` changes...") + old_crate_ids = GetCurrentCrateIds() + Gnrt("vendor") + new_crate_ids = GetCurrentCrateIds() + Git("reset", "--hard") + Git("clean", "-d", "--force", "--", f"{THIRD_PARTY_RUST}") + diff = DiffCrateIds(old_crate_ids, new_crate_ids, only_minor_updates=False) + if diff.size() == 0: + raise RuntimeError( + "No changes in `Cargo.lock` after running `gnrt vendor`") + + # This covers most update steps: git mv, gnrt vendor, gnrt gen + FinishUpdatingCrate(args, title, diff) + + # Remove old `//third_party/rust/foo/v<old>` directories + print(f" Removing //third_party/rust/.../<old_epoch> ...") + for update in diff.updates: + old_target_dir = ConvertCrateIdToEpochDir(update.old_crate_id) + new_target_dir = ConvertCrateIdToEpochDir(update.new_crate_id) + if old_target_dir != new_target_dir: # Skip minor crate updates + Git("rm", "-r", "--force", "--", old_target_dir) + GitCommit(args, "Removing //third_party/rust/.../<old_epoch>") + + # Fix up the target names + print(f" Updating the target name in BUILD.gn files...") + for update in diff.updates: + old_target = ConvertCrateIdToGnLabel(update.old_crate_id) + new_target = ConvertCrateIdToGnLabel(update.new_crate_id) + if old_target == new_target: continue + grep = Git("grep", "-l", old_target, "--", "*/BUILD.gn") + for path in grep.splitlines(): + if not path: continue + if "third_party/rust" in path: continue + with open(path, 'r') as file: + file_contents = file.read() + file_contents = file_contents.replace(old_target, new_target) + with open(path, 'w') as file: + file.write(file_contents) + Git("add", "--", path) + GitCommit(args, "Updating the target name in BUILD.gn files") + + def main(): parser = argparse.ArgumentParser(description="Update Rust crates") parser.add_argument("--no-upload", @@ -515,6 +615,7 @@ default=True, action='store_false', help="Avoids uploading CLs to Gerrit") + parser.add_argument("--verbose", action='store_true') subparsers = parser.add_subparsers(required=True) parser_auto = subparsers.add_parser( @@ -537,7 +638,19 @@ default="origin/main", help="The upstream branch on which to base the update CL.") + parser_manual = subparsers.add_parser( + "manual", + description="Generate update CL after manual edit of `Cargo.toml`") + parser_manual.set_defaults(func=ManualUpdate) + parser_manual.add_argument("--title", + required=True, + help="The first line of CL description.") + args = parser.parse_args() + + global g_is_verbose + g_is_verbose = args.verbose + args.func(args) return 0
diff --git a/tools/crates/create_update_cl_unittests.py b/tools/crates/create_update_cl_unittests.py index d222dbf..2cae1a3 100755 --- a/tools/crates/create_update_cl_unittests.py +++ b/tools/crates/create_update_cl_unittests.py
@@ -4,12 +4,22 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import os import unittest -from create_update_cl import DiffCrateIds, GetEpoch, ConvertCrateIdToCrateName,\ - ConvertCrateIdToCrateVersion, SortedMarkdownList,\ - CreateCommitDescription - +from create_update_cl import ( + CHROMIUM_DIR, + ConvertCrateIdToCrateName, + ConvertCrateIdToCrateVersion, + ConvertCrateIdToEpochDir, + ConvertCrateIdToGnLabel, + ConvertCrateIdToVendorDir, + CreateCommitDescription, + CreateCommitTitle, + DiffCrateIds, + GetEpoch, + SortedMarkdownList, +) class DiffCrateIdsTests(unittest.TestCase): @@ -56,15 +66,23 @@ class CommitDescriptionTests(unittest.TestCase): - def testBasics(self): + def testTitle(self): + before = set(["updated_crate@2.0.1", "deleted@3.0.1"]) + after = set(["updated_crate@2.0.2", "added@5.0.1"]) + diff = DiffCrateIds(before, after, only_minor_updates=True) + actual_title = CreateCommitTitle("updated_crate@2.0.1", diff) + expected_title = \ + "Roll updated_crate: 2.0.1 => 2.0.2 in //third_party/rust." + self.assertEqual(actual_title, expected_title) + + def testFullDescription(self): before = set(["updated_crate@2.0.1", "deleted@3.0.1"]) after = set(["updated_crate@2.0.2", "added@5.0.1"]) diff = DiffCrateIds(before, after, only_minor_updates=True) - actual_desc = CreateCommitDescription("updated_crate@2.0.1", diff, - False) + actual_desc = CreateCommitDescription("Commit title.", diff, False) expected_desc = \ -"""Roll updated_crate: 2.0.1 => 2.0.2 in //third_party/rust. +"""Commit title. This CL has been created semi-automatically. The expected review process and other details can be found at @@ -101,6 +119,39 @@ self.assertEqual(GetEpoch("0.1.2"), "v0_1") self.assertEqual(GetEpoch("1.2.3"), "v1") + def testConvertCrateIdToEpochDir(self): + actual_dir = ConvertCrateIdToEpochDir("foo-bar@1.2.3") + expected_suffix = os.path.join("third_party", "rust", "foo_bar", "v1") + self.assertEqual(actual_dir, os.path.join(CHROMIUM_DIR, + expected_suffix)) + + actual_dir = ConvertCrateIdToEpochDir("bar_baz@0.12.3") + expected_suffix = os.path.join("third_party", "rust", "bar_baz", + "v0_12") + self.assertEqual(actual_dir, os.path.join(CHROMIUM_DIR, + expected_suffix)) + + def testConvertCrateIdToGnLabel(self): + self.assertEqual(ConvertCrateIdToGnLabel("foo-bar@1.2.3"), + "//third_party/rust/foo_bar/v1:lib") + self.assertEqual(ConvertCrateIdToGnLabel("bar_baz@0.12.3"), + "//third_party/rust/bar_baz/v0_12:lib") + + def testConvertCrateIdToVendorDir(self): + actual_dir = ConvertCrateIdToVendorDir("foo-bar@1.2.3") + expected_suffix = os.path.join("third_party", "rust", + "chromium_crates_io", "vendor", + "foo-bar-1.2.3") + self.assertEqual(actual_dir, os.path.join(CHROMIUM_DIR, + expected_suffix)) + + actual_dir = ConvertCrateIdToVendorDir("bar_baz@0.12.3") + expected_suffix = os.path.join("third_party", "rust", + "chromium_crates_io", "vendor", + "bar_baz-0.12.3") + self.assertEqual(actual_dir, os.path.join(CHROMIUM_DIR, + expected_suffix)) + def testConvertCrateIdToCrateName(self): self.assertEqual(ConvertCrateIdToCrateName("foo-bar@1.2.3"), "foo-bar")
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 77a4b8d..605468c 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -14293,6 +14293,7 @@ <int value="2" label="UTF-8 \xNN string escape"/> <int value="3" label="Vertical tab string escape (\\v)"/> <int value="4" label="Unescaped ASCII control character [0x00,0x1F]"/> + <int value="5" label="Unescaped newline in string (\\r or \\n)"/> </enum> <enum name="KAnonymityBidMode">
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index c9cb3b2..167eaed 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -4301,6 +4301,18 @@ </summary> </histogram> +<histogram name="Android.TabStrip.TitleBitmapFactory.getTitleBitmap.Length" + units="characters" expires_after="2024-05-10"> + <owner>peilinwang@google.com</owner> + <owner>twellington@chromium.org</owner> + <summary> + The full (untruncated) length of the title to be converted to a bitmap by + TitleBitmapFactory.getTitleBitmap. + + Recorded once per call, if the title is neither null nor empty. + </summary> +</histogram> + <histogram name="Android.TabSwitcher.CreationTime" units="ms" expires_after="2024-06-30"> <owner>skavuluru@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/ash/histograms.xml b/tools/metrics/histograms/metadata/ash/histograms.xml index 8ec46a9..4f793fd 100644 --- a/tools/metrics/histograms/metadata/ash/histograms.xml +++ b/tools/metrics/histograms/metadata/ash/histograms.xml
@@ -290,6 +290,11 @@ <variant name="Wallpaper" summary="Wallpaper App"/> </variants> +<variants name="SeaPenImageSource"> + <variant name="Create" summary="A newly created image"/> + <variant name="Recent" summary="A recent image previously created"/> +</variants> + <variants name="SeaPenTemplateName"> <variant name="Art" summary="Template Classic art"/> <variant name="Characters" summary="Template Characters"/> @@ -6982,6 +6987,17 @@ <token key="AppName" variants="SeaPenAppName"/> </histogram> +<histogram name="Ash.SeaPen.{AppName}.{Source}.ImageSet" enum="BooleanHit" + expires_after="2025-03-30"> + <owner>pzliu@google.com</owner> + <owner>assistive-eng@google.com</owner> + <summary> + Emmitted when the user sets a {Source} SeaPen image as {AppName}. + </summary> + <token key="AppName" variants="SeaPenAppName"/> + <token key="Source" variants="SeaPenImageSource"/> +</histogram> + <histogram name="Ash.SeaPen.{TemplateName}.UserFeedback" enum="Boolean" expires_after="2024-12-31"> <owner>pzliu@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/chromeos/histograms.xml b/tools/metrics/histograms/metadata/chromeos/histograms.xml index aad52a46..b68c3b18 100644 --- a/tools/metrics/histograms/metadata/chromeos/histograms.xml +++ b/tools/metrics/histograms/metadata/chromeos/histograms.xml
@@ -2017,6 +2017,17 @@ </summary> </histogram> +<histogram name="ChromeOS.Keyboard.HasBacklight" enum="Boolean" + expires_after="2025-03-29"> + <owner>longbowei@google.com</owner> + <owner>dpad@google.com</owner> + <owner>cros-peripherals@google.com</owner> + <summary> + Records whether the keyboard has a backlight. This state is determined once + per boot and the metric is also recorded only once per boot. + </summary> +</histogram> + <histogram name="ChromeOS.KeyPermissionsManager.Migration" enum="KeyPermissionsManagerMigrationStatus" expires_after="2024-09-01"> <owner>omorsi@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/compositing/histograms.xml b/tools/metrics/histograms/metadata/compositing/histograms.xml index b393c88..743506df 100644 --- a/tools/metrics/histograms/metadata/compositing/histograms.xml +++ b/tools/metrics/histograms/metadata/compositing/histograms.xml
@@ -718,18 +718,6 @@ </summary> </histogram> -<histogram name="Compositing.SkiaRenderer.DirectlyDrawableRenderPassWithRPDQ" - enum="Boolean" expires_after="2024-09-01"> - <owner>khushalsagar@chromium.org</owner> - <owner>vmpstr@chromium.org</owner> - <owner>graphics-dev@chromium.org</owner> - <summary> - Logged for every nested RenderPass to indicate whether it could have been - drawn directly because it has a single RPDQ and no other effect which would - require producing a render pass. - </summary> -</histogram> - <histogram name="Compositing.SkiaRenderer.DrawTileDrawQuad.UsingRawDraw" enum="Boolean" expires_after="2023-06-11"> <owner>penghuang@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/enterprise/enums.xml b/tools/metrics/histograms/metadata/enterprise/enums.xml index 7a2e1fc..3fed696 100644 --- a/tools/metrics/histograms/metadata/enterprise/enums.xml +++ b/tools/metrics/histograms/metadata/enterprise/enums.xml
@@ -2091,6 +2091,8 @@ label="GenAILocalFoundationalModelEnterprisePolicySettings"/> <int value="1252" label="DeviceExtensionsSystemLogEnabled"/> <int value="1253" label="ChromeDataRegionSetting"/> + <int value="1254" label="ContextualGoogleIntegrationsEnabled"/> + <int value="1255" label="ContextualGoogleIntegrationsConfiguration"/> </enum> <enum name="EnterprisePoliciesSources">
diff --git a/tools/metrics/histograms/metadata/net/histograms.xml b/tools/metrics/histograms/metadata/net/histograms.xml index d73ea971..b35c9b4 100644 --- a/tools/metrics/histograms/metadata/net/histograms.xml +++ b/tools/metrics/histograms/metadata/net/histograms.xml
@@ -3871,6 +3871,18 @@ </summary> </histogram> +<histogram name="Net.QuicSession.PacketsBeforeEcnTransition" units="packets" + expires_after="2024-07-01"> + <owner>martinduke@google.com</owner> + <owner>rch@chromium.org</owner> + <summary> + The number of packets received before the session observes an Explicit + Congestion Notification (ECN) marking different from the first one in the + session. Reported when the session occurs. A value of zero means no + transition occurred. + </summary> +</histogram> + <histogram name="Net.QuicSession.PacketWriteTime" units="units" expires_after="2024-09-06"> <owner>dschinazi@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 3f79646..c11aaa7ae 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -8072,6 +8072,29 @@ </summary> </histogram> +<histogram name="OSCrypt.AsyncInitialization.Result" enum="Boolean" + expires_after="2024-08-04"> + <owner>wfh@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + Whether or not OSCrypt Async manages to fully initialize the keyring during + browser process initialization. Recorded once per browser start, if OSCrypt + Async completes the initialization attempt before the browser shuts down. + </summary> +</histogram> + +<histogram name="OSCrypt.AsyncInitialization.Time" units="ms" + expires_after="2024-08-04"> + <owner>wfh@chromium.org</owner> + <owner>nparker@chromium.org</owner> + <summary> + The amount of time, in ms, that it takes for OSCrypt Async to complete the + attempt to initialize the keyring during browser process initialization. + Recorded once per browser start, if the OSCrypt Async completes the + initialization attempt before the browser shuts down. + </summary> +</histogram> + <histogram name="OSCrypt.BackendUsage" enum="LinuxPasswordStoreUsage" expires_after="2024-09-22"> <owner>cfroussios@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/profile/histograms.xml b/tools/metrics/histograms/metadata/profile/histograms.xml index d86dd36..658ea06 100644 --- a/tools/metrics/histograms/metadata/profile/histograms.xml +++ b/tools/metrics/histograms/metadata/profile/histograms.xml
@@ -533,6 +533,18 @@ <summary>Total size of the profile data (excluding sub-folders).</summary> </histogram> +<histogram name="Profile.TotalSizeRecursive" units="MB" + expires_after="2024-09-25"> + <owner>anthonyvd@chromium.org</owner> + <owner>chrome-catan@google.com</owner> + <summary> + Total size of the profile data (including sub-folders). + + Recorded with some delay after a profile is loaded, excluding off-the-record + profiles. + </summary> +</histogram> + <histogram name="Profile.TriggeredReset" enum="BooleanReset" expires_after="2020-05-03"> <owner>robertshield@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/quickstart/enums.xml b/tools/metrics/histograms/metadata/quickstart/enums.xml index 362df68d..f646e5c 100644 --- a/tools/metrics/histograms/metadata/quickstart/enums.xml +++ b/tools/metrics/histograms/metadata/quickstart/enums.xml
@@ -127,6 +127,7 @@ <int value="17" label="Gaia Info Screen"/> <int value="18" label="QS Screen: Wi-Fi Credentials Received"/> <int value="19" label="QS Screen: Account Picker"/> + <int value="20" label="QS Screen: Creating Account"/> </enum> <enum name="QuickStartWifiTransferResultFailureReason">
diff --git a/tools/metrics/histograms/metadata/quickstart/histograms.xml b/tools/metrics/histograms/metadata/quickstart/histograms.xml index 246cf978..077549a 100644 --- a/tools/metrics/histograms/metadata/quickstart/histograms.xml +++ b/tools/metrics/histograms/metadata/quickstart/histograms.xml
@@ -346,6 +346,40 @@ </summary> </histogram> +<histogram name="QuickStart.ScreenClosed.{ScreenName}.ViewDuration" units="ms" + expires_after="2025-04-09"> + <owner>bhartmire@google.com</owner> + <owner>chromeos-cross-device-eng@google.com</owner> + <summary> + How long a user viewed a screen. This includes all major Quick Start screens + as well as all other OOBE screens that occur in the middle of the Quick + Start flow. Recorded when a screen is closed. + </summary> + <token key="ScreenName"> + <variant name="AddChild"/> + <variant name="CheckingForUpdateAndDeterminingDeviceConfiguration"/> + <variant name="ChooseChromebookSetup"/> + <variant name="ConsumerUpdate"/> + <variant name="GaiaInfoScreen"/> + <variant name="GaiaScreen"/> + <variant name="NetworkScreen"/> + <variant name="None"/> + <variant name="Other"/> + <variant name="QSComplete"/> + <variant name="QSConnectingToWifi"/> + <variant name="QSCreatingAccount"/> + <variant name="QSGettingGoogleAccountInfo"/> + <variant name="QSResumingConnectionAfterUpdate"/> + <variant name="QSSelectGoogleAccount"/> + <variant name="QSSetUpWithAndroidPhone"/> + <variant name="QSWifiCredentialsReceived"/> + <variant name="ReviewPrivacyAndTerms"/> + <variant name="SetupDevicePIN"/> + <variant name="UnifiedSetup"/> + <variant name="WelcomeScreen"/> + </token> +</histogram> + <histogram name="QuickStart.ScreenOpened" enum="QuickStartScreenName" expires_after="2024-12-01"> <owner>bhartmire@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/sync/histograms.xml b/tools/metrics/histograms/metadata/sync/histograms.xml index 3602b5a..0e19310 100644 --- a/tools/metrics/histograms/metadata/sync/histograms.xml +++ b/tools/metrics/histograms/metadata/sync/histograms.xml
@@ -427,7 +427,7 @@ <histogram name="Sync.Crypto.CustomPassphraseKeyDerivationMethodOnSuccessfulDecryption" enum="SyncCustomPassphraseKeyDerivationMethodState" - expires_after="2024-05-12"> + expires_after="2024-11-12"> <owner>mmoskvitin@google.com</owner> <owner>treib@chromium.org</owner> <component>Services>Sync</component>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 7b6c2c72..a45333f 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": "4c686b4e6f03f316649620d29d92dbf50c3ec1c6", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/e6c10fa3af8d5e07b852f0c47f6e0ba902f5c811/trace_processor_shell.exe" + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/1df669be0d5057d754bb8229e431c85d5870040b/trace_processor_shell.exe" }, "linux_arm": { "hash": "d8e27d961be1db97db098c6826017aec0397ecfd", @@ -22,7 +22,7 @@ }, "linux": { "hash": "91585d46eff4f5847c1a58d9739b200c86a3d1bb", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/06a728ee4ad3537fda0ad68abc9dbb7402190dc6/trace_processor_shell" + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/1df669be0d5057d754bb8229e431c85d5870040b/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/accessibility/accessibility_switches.cc b/ui/accessibility/accessibility_switches.cc index 18dfa3f8..25b054ac6 100644 --- a/ui/accessibility/accessibility_switches.cc +++ b/ui/accessibility/accessibility_switches.cc
@@ -68,4 +68,17 @@ const char kGenerateAccessibilityTestExpectations[] = "generate-accessibility-test-expectations"; +// Turns off the accessibility in the renderer. +const char kDisableRendererAccessibility[] = "disable-renderer-accessibility"; + +// Force renderer accessibility to be on instead of enabling it on demand when +// a screen reader is detected. The disable-renderer-accessibility switch +// overrides this if present. +// This switch has an optional parameter that forces an AXMode bundle. The three +// available bundle settings are: 'basic', 'form-controls', and 'complete'. If +// the bundle argument is invalid, then the forced AXMode will default to +// 'complete'. If the bundle argument is missing, then the initial AXMode will +// default to complete but allow changes to the AXMode during execution. +const char kForceRendererAccessibility[] = "force-renderer-accessibility"; + } // namespace switches
diff --git a/ui/accessibility/accessibility_switches.h b/ui/accessibility/accessibility_switches.h index fe39d8a..1712360 100644 --- a/ui/accessibility/accessibility_switches.h +++ b/ui/accessibility/accessibility_switches.h
@@ -47,6 +47,10 @@ // content/test/data/accessibility/, overwriting existing file content. AX_BASE_EXPORT extern const char kGenerateAccessibilityTestExpectations[]; +AX_BASE_EXPORT extern const char kDisableRendererAccessibility[]; + +AX_BASE_EXPORT extern const char kForceRendererAccessibility[]; + } // namespace switches #endif // UI_ACCESSIBILITY_ACCESSIBILITY_SWITCHES_H_
diff --git a/ui/android/java/src/org/chromium/ui/modaldialog/DialogDismissalCause.java b/ui/android/java/src/org/chromium/ui/modaldialog/DialogDismissalCause.java index 014bd0a..b309d85 100644 --- a/ui/android/java/src/org/chromium/ui/modaldialog/DialogDismissalCause.java +++ b/ui/android/java/src/org/chromium/ui/modaldialog/DialogDismissalCause.java
@@ -15,6 +15,8 @@ DialogDismissalCause.NEGATIVE_BUTTON_CLICKED, DialogDismissalCause.ACTION_ON_CONTENT, DialogDismissalCause.DISMISSED_BY_NATIVE, + DialogDismissalCause.NAVIGATE_BACK, + DialogDismissalCause.TOUCH_OUTSIDE, DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE, DialogDismissalCause.TAB_SWITCHED, DialogDismissalCause.TAB_DESTROYED, @@ -47,49 +49,57 @@ /** Controlled by client: Dialog is dismissed by native c++ objects. */ int DISMISSED_BY_NATIVE = 4; - /** User clicks the navigate back button or touches the scrim outside the dialog. */ - int NAVIGATE_BACK_OR_TOUCH_OUTSIDE = 5; + /** User clicks the navigate back button. Tab Modal dialog only. */ + int NAVIGATE_BACK = 5; + + /** User touches the scrim outside the dialog. Tab Modal dialog only. */ + int TOUCH_OUTSIDE = 6; + + /** + * User either clicks the navigate back button or touches the scrim outside the dialog. App + * Modal dialog only. + */ + int NAVIGATE_BACK_OR_TOUCH_OUTSIDE = 7; /** User switches away the tab associated with the dialog. */ - int TAB_SWITCHED = 6; + int TAB_SWITCHED = 8; /** The Tab associated with the dialog is destroyed. */ - int TAB_DESTROYED = 7; + int TAB_DESTROYED = 9; /** The activity associated with the dialog is destroyed. */ - int ACTIVITY_DESTROYED = 8; + int ACTIVITY_DESTROYED = 10; /** The content view of the activity associated with the dialog is not attached to window. */ - int NOT_ATTACHED_TO_WINDOW = 9; + int NOT_ATTACHED_TO_WINDOW = 11; /** User has navigated, e.g. by typing a URL in the location bar. */ - int NAVIGATE = 10; + int NAVIGATE = 12; /** Controlled by client: The web contents associated with the dialog is destroyed. */ - int WEB_CONTENTS_DESTROYED = 11; + int WEB_CONTENTS_DESTROYED = 13; /** - * Controlled by client: The dialog interaction is deferred due to user engaging with other - * UI surfaces outside of dialog or they clicked on a content of the dialog that allows - * to defer. + * Controlled by client: The dialog interaction is deferred due to user engaging with other UI + * surfaces outside of dialog or they clicked on a content of the dialog that allows to defer. * - * Note that deferred would indicate that the dialog would be shown again later on - * unless the user has completed the interaction successfully. + * <p>Note that deferred would indicate that the dialog would be shown again later on unless the + * user has completed the interaction successfully. */ - int DIALOG_INTERACTION_DEFERRED = 12; + int DIALOG_INTERACTION_DEFERRED = 14; /** - * Controlled by client: Action taken on the dialog content that the client - * validates and triggers dismissal, if satisfied. + * Controlled by client: Action taken on the dialog content that the client validates and + * triggers dismissal, if satisfied. */ - int ACTION_ON_DIALOG_COMPLETED = 13; + int ACTION_ON_DIALOG_COMPLETED = 15; /** * Controlled by client: The dialog was dismissed because it's not possible for client to * validate after the action was taken on the dialog content. */ - int ACTION_ON_DIALOG_NOT_POSSIBLE = 14; + int ACTION_ON_DIALOG_NOT_POSSIBLE = 16; /** Controlled by client: The dialog was automatically dismissed after a timeout. */ - int CLIENT_TIMEOUT = 15; + int CLIENT_TIMEOUT = 17; }
diff --git a/ui/android/java/src/org/chromium/ui/modaldialog/ModalDialogManager.java b/ui/android/java/src/org/chromium/ui/modaldialog/ModalDialogManager.java index b4b0cea..54f92c2 100644 --- a/ui/android/java/src/org/chromium/ui/modaldialog/ModalDialogManager.java +++ b/ui/android/java/src/org/chromium/ui/modaldialog/ModalDialogManager.java
@@ -395,12 +395,19 @@ * Dismiss the specified dialog. If the dialog is not currently showing, it will be removed from * the pending dialog list. If the dialog is currently being dismissed this function does * nothing. + * * @param model The dialog model to be dismissed or removed from pending list. * @param dismissalCause The {@link DialogDismissalCause} that describes why the dialog is - * dismissed. + * dismissed. */ public void dismissDialog(PropertyModel model, @DialogDismissalCause int dismissalCause) { if (model == null) return; + if (dismissalCause == DialogDismissalCause.NAVIGATE_BACK_OR_TOUCH_OUTSIDE) { + assert mCurrentType == ModalDialogType.APP; + } else if (dismissalCause == DialogDismissalCause.NAVIGATE_BACK + || dismissalCause == DialogDismissalCause.TOUCH_OUTSIDE) { + assert mCurrentType == ModalDialogType.TAB; + } if (mCurrentPresenter == null || model != mCurrentPresenter.getDialogModel()) { if (mPendingDialogContainer.remove(model)) { model.get(ModalDialogProperties.CONTROLLER).onDismiss(model, dismissalCause);
diff --git a/ui/events/devices/keyboard_device.cc b/ui/events/devices/keyboard_device.cc index de7d9c2..8a09073 100644 --- a/ui/events/devices/keyboard_device.cc +++ b/ui/events/devices/keyboard_device.cc
@@ -29,7 +29,8 @@ bool has_assistant_key, bool has_function_key) : InputDevice(id, type, name, phys, sys_path, vendor, product, version), - has_assistant_key(has_assistant_key) {} + has_assistant_key(has_assistant_key), + has_function_key(has_function_key) {} KeyboardDevice::KeyboardDevice(InputDevice input_device, bool has_assistant_key,
diff --git a/ui/gl/dcomp_presenter.cc b/ui/gl/dcomp_presenter.cc index 9541bae6..5551b40 100644 --- a/ui/gl/dcomp_presenter.cc +++ b/ui/gl/dcomp_presenter.cc
@@ -29,7 +29,6 @@ DCompPresenter::DCompPresenter(const Settings& settings) : task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()), - max_pending_frames_(settings.max_pending_frames), layer_tree_(std::make_unique<DCLayerTree>( settings.disable_nv12_dynamic_textures, settings.disable_vp_auto_hdr, @@ -125,19 +124,6 @@ .Run(gfx::SwapCompletionResult(gfx::SwapResult::SWAP_ACK)); } -bool DCompPresenter::SupportsProtectedVideo() const { - // TODO(magchen): Check the gpu driver date (or a function) which we know this - // new support is enabled. - return DirectCompositionOverlaysSupported(); -} - -bool DCompPresenter::SetDrawRectangle(const gfx::Rect& rect) { - // Do not create query for empty damage so that 3D engine is not used when - // only presenting video in overlay. - create_query_this_frame_ = !rect.IsEmpty(); - return true; -} - bool DCompPresenter::SupportsViewporter() const { return true; }
diff --git a/ui/gl/dcomp_presenter.h b/ui/gl/dcomp_presenter.h index 149228e..67fc85c 100644 --- a/ui/gl/dcomp_presenter.h +++ b/ui/gl/dcomp_presenter.h
@@ -47,8 +47,6 @@ bool disable_vp_scaling = false; bool disable_vp_super_resolution = false; bool force_dcomp_triple_buffer_video_swap_chain = false; - size_t max_pending_frames = 2; - bool use_angle_texture_offset = false; bool no_downscaled_overlay_promotion = false; }; @@ -59,14 +57,12 @@ void Destroy(); gfx::VSyncProvider* GetVSyncProvider(); - bool SupportsProtectedVideo() const; // Presenter implementation. bool Resize(const gfx::Size& size, float scale_factor, const gfx::ColorSpace& color_space, bool has_alpha) override; - bool SetDrawRectangle(const gfx::Rect& rect) override; bool SupportsViewporter() const override; // This schedules an overlay plane to be displayed on the next SwapBuffers // or PostSubBuffer call. Overlay planes must be scheduled before every swap @@ -139,7 +135,6 @@ // Queue of pending presentation callbacks. base::circular_deque<PendingFrame> pending_frames_; - const size_t max_pending_frames_; std::vector<std::unique_ptr<DCLayerOverlayParams>> pending_overlays_;
diff --git a/ui/gl/dcomp_presenter_unittest.cc b/ui/gl/dcomp_presenter_unittest.cc index ef3e4f8b..db67815 100644 --- a/ui/gl/dcomp_presenter_unittest.cc +++ b/ui/gl/dcomp_presenter_unittest.cc
@@ -548,7 +548,6 @@ TEST_F(DCompPresenterTest, NoBackgroundColorSurfaceForNonColorOverlays) { const gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); auto root_surface = CreateParamsFromImage(CreateDCompSurface(window_size, SkColors::kBlack)); @@ -566,7 +565,6 @@ TEST_F(DCompPresenterTest, BackgroundColorSurfaceTrim) { const gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); const DCLayerTree* layer_tree = presenter_->GetLayerTreeForTesting(); @@ -608,7 +606,6 @@ TEST_F(DCompPresenterTest, BackgroundColorSurfaceMultipleReused) { const gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); std::vector<SkColor4f> colors = {SkColors::kRed, SkColors::kGreen}; std::vector<IDCompositionSurface*> surfaces_frame1(2, nullptr); @@ -736,7 +733,6 @@ const gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); InitializeRootAndScheduleRootSurface(window_size, SkColors::kBlack); @@ -812,7 +808,6 @@ EXPECT_TRUE(gfx::Rect(window_size).Contains(root_surface_hole)); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); auto root_surface = CreateParamsFromImage( CreateDCompSurface(window_size, kRootSurfaceInitialColor, @@ -1000,7 +995,6 @@ gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); InitializeRootAndScheduleRootSurface(window_size, SkColors::kBlack); @@ -1148,7 +1142,6 @@ gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); InitializeRootAndScheduleRootSurface(window_size, SkColors::kBlack); @@ -1320,7 +1313,6 @@ gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); InitializeRootAndScheduleRootSurface(window_size, SkColors::kBlack); @@ -1425,7 +1417,6 @@ gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); InitializeRootAndScheduleRootSurface(window_size, SkColors::kBlack); @@ -1567,7 +1558,6 @@ TEST_F(DCompPresenterPixelTest, BackgroundColorSurfaceReuse) { const gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); SkColor4f colors[] = { SkColors::kRed, SkColors::kGreen, SkColors::kBlue, @@ -1646,7 +1636,6 @@ void ResizeWindow(const gfx::Size& window_size) { EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); window_size_ = window_size; } @@ -2219,7 +2208,6 @@ constexpr gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); constexpr gfx::Size texture_size(50, 50);
diff --git a/ui/gl/delegated_ink_point_renderer_gpu_unittest.cc b/ui/gl/delegated_ink_point_renderer_gpu_unittest.cc index 1cbab8d..14cb3d44 100644 --- a/ui/gl/delegated_ink_point_renderer_gpu_unittest.cc +++ b/ui/gl/delegated_ink_point_renderer_gpu_unittest.cc
@@ -121,7 +121,6 @@ // Create the swap chain constexpr gfx::Size window_size(100, 100); EXPECT_TRUE(presenter_->Resize(window_size, 1.0, gfx::ColorSpace(), true)); - EXPECT_TRUE(presenter_->SetDrawRectangle(gfx::Rect(window_size))); } void TearDown() override {
diff --git a/ui/gl/direct_composition_child_surface_win.h b/ui/gl/direct_composition_child_surface_win.h index 59e9980c..bce6f20 100644 --- a/ui/gl/direct_composition_child_surface_win.h +++ b/ui/gl/direct_composition_child_surface_win.h
@@ -39,15 +39,16 @@ gfx::SurfaceOrigin GetOrigin() const override; bool SupportsPostSubBuffer() override; bool OnMakeCurrent(GLContext* context) override; - bool SupportsDCLayers() const override; - bool SetDrawRectangle(const gfx::Rect& rect) override; - gfx::Vector2d GetDrawOffset() const override; void SetVSyncEnabled(bool enabled) override; bool Resize(const gfx::Size& size, float scale_factor, const gfx::ColorSpace& color_space, bool has_alpha) override; - bool SetEnableDCLayers(bool enable) override; + + bool SupportsDCLayers() const; + bool SetDrawRectangle(const gfx::Rect& rect); + bool SetEnableDCLayers(bool enable); + gfx::Vector2d GetDrawOffset() const; // Finish a draw started by |SetDrawRectangle|. Internally, calls presents the // swap chain or calls |EndDraw| on the DComp surface.
diff --git a/ui/gl/direct_composition_surface_win.cc b/ui/gl/direct_composition_surface_win.cc index 0c1092a..95d51b9 100644 --- a/ui/gl/direct_composition_surface_win.cc +++ b/ui/gl/direct_composition_surface_win.cc
@@ -217,12 +217,6 @@ return true; } -bool DirectCompositionSurfaceWin::SupportsProtectedVideo() const { - // TODO(magchen): Check the gpu driver date (or a function) which we know this - // new support is enabled. - return DirectCompositionOverlaysSupported(); -} - bool DirectCompositionSurfaceWin::SetDrawRectangle(const gfx::Rect& rect) { return root_surface_->SetDrawRectangle(rect); }
diff --git a/ui/gl/direct_composition_surface_win.h b/ui/gl/direct_composition_surface_win.h index 9a1b7caa..de183244 100644 --- a/ui/gl/direct_composition_surface_win.h +++ b/ui/gl/direct_composition_surface_win.h
@@ -6,6 +6,7 @@ #define UI_GL_DIRECT_COMPOSITION_SURFACE_WIN_H_ #include <windows.h> + #include <d3d11.h> #include <dcomp.h> #include <wrl/client.h> @@ -19,6 +20,7 @@ #include "ui/gfx/frame_data.h" #include "ui/gfx/geometry/transform.h" #include "ui/gl/child_window_win.h" +#include "ui/gl/dc_layer_overlay_params.h" #include "ui/gl/gl_export.h" #include "ui/gl/gl_surface_egl.h" #include "ui/gl/vsync_thread_win.h" @@ -86,31 +88,30 @@ gfx::FrameData data) override; gfx::VSyncProvider* GetVSyncProvider() override; void SetVSyncEnabled(bool enabled) override; - bool SetEnableDCLayers(bool enable) override; gfx::SurfaceOrigin GetOrigin() const override; bool SupportsPostSubBuffer() override; bool OnMakeCurrent(GLContext* context) override; - bool SupportsDCLayers() const override; - bool SupportsProtectedVideo() const override; - bool SetDrawRectangle(const gfx::Rect& rect) override; - gfx::Vector2d GetDrawOffset() const override; - // This schedules an overlay plane to be displayed on the next SwapBuffers - // or PostSubBuffer call. Overlay planes must be scheduled before every swap - // to remain in the layer tree. This surface's backbuffer doesn't have to be - // scheduled with ScheduleDCLayer, as it's automatically placed in the layer - // tree at z-order 0. - void ScheduleDCLayer(std::unique_ptr<DCLayerOverlayParams> params) override; void SetFrameRate(float frame_rate) override; // VSyncObserver implementation. void OnVSync(base::TimeTicks vsync_time, base::TimeDelta interval) override; - bool SupportsDelegatedInk() override; + bool SetEnableDCLayers(bool enable); + bool SupportsDCLayers() const; + bool SetDrawRectangle(const gfx::Rect& rect); + gfx::Vector2d GetDrawOffset() const; + // This schedules an overlay plane to be displayed on the next SwapBuffers + // or PostSubBuffer call. Overlay planes must be scheduled before every swap + // to remain in the layer tree. This surface's backbuffer doesn't have to be + // scheduled with ScheduleDCLayer, as it's automatically placed in the layer + // tree at z-order 0. + void ScheduleDCLayer(std::unique_ptr<DCLayerOverlayParams> params); + bool SupportsDelegatedInk(); void SetDelegatedInkTrailStartPoint( - std::unique_ptr<gfx::DelegatedInkMetadata> metadata) override; + std::unique_ptr<gfx::DelegatedInkMetadata> metadata); void InitDelegatedInkPointRendererReceiver( mojo::PendingReceiver<gfx::mojom::DelegatedInkPointRenderer> - pending_receiver) override; + pending_receiver); HWND window() const { return child_window_.window(); }
diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc index 51e93d2..2bbe6bb 100644 --- a/ui/gl/gl_surface.cc +++ b/ui/gl/gl_surface.cc
@@ -4,28 +4,12 @@ #include "ui/gl/gl_surface.h" -#include <utility> - #include "base/check.h" -#include "base/command_line.h" -#include "base/lazy_instance.h" #include "base/notreached.h" -#include "base/trace_event/trace_event.h" #include "third_party/abseil-cpp/absl/base/attributes.h" -#include "ui/gfx/gpu_fence.h" #include "ui/gfx/swap_result.h" #include "ui/gl/gl_context.h" -#include "ui/gl/gl_implementation.h" #include "ui/gl/gl_surface_format.h" -#include "ui/gl/gl_switches.h" - -#if BUILDFLAG(IS_WIN) -#include "ui/gl/dc_layer_overlay_params.h" -#else -namespace gl { -struct DCLayerOverlayParams {}; -} // namespace gl -#endif namespace gl { @@ -134,15 +118,6 @@ void GLSurface::SetVSyncEnabled(bool enabled) {} -void GLSurface::ScheduleDCLayer(std::unique_ptr<DCLayerOverlayParams> params) { - NOTIMPLEMENTED(); -} - -bool GLSurface::SetEnableDCLayers(bool enable) { - NOTIMPLEMENTED(); - return false; -} - bool GLSurface::IsSurfaceless() const { return false; } @@ -155,26 +130,10 @@ return false; } -bool GLSurface::SupportsDCLayers() const { - return false; -} - -bool GLSurface::SupportsProtectedVideo() const { - return false; -} - bool GLSurface::SupportsOverridePlatformSize() const { return false; } -bool GLSurface::SetDrawRectangle(const gfx::Rect& rect) { - return false; -} - -gfx::Vector2d GLSurface::GetDrawOffset() const { - return gfx::Vector2d(); -} - bool GLSurface::SupportsSwapTimestamps() const { return false; } @@ -195,16 +154,6 @@ return nullptr; } -bool GLSurface::SupportsDelegatedInk() { - return false; -} - -void GLSurface::InitDelegatedInkPointRendererReceiver( - mojo::PendingReceiver<gfx::mojom::DelegatedInkPointRenderer> - pending_receiver) { - NOTREACHED(); -} - GLSurface* GLSurface::GetCurrent() { return current_surface; }
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h index a60df00..f8109d3f 100644 --- a/ui/gl/gl_surface.h +++ b/ui/gl/gl_surface.h
@@ -5,23 +5,12 @@ #ifndef UI_GL_GL_SURFACE_H_ #define UI_GL_GL_SURFACE_H_ -#include <optional> -#include <vector> - #include "base/functional/callback.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "build/build_config.h" -#include "mojo/public/cpp/bindings/pending_receiver.h" -#include "ui/gfx/delegated_ink_metadata.h" #include "ui/gfx/frame_data.h" -#include "ui/gfx/geometry/rect.h" -#include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/geometry/size.h" -#include "ui/gfx/geometry/vector2d.h" -#include "ui/gfx/native_widget_types.h" -#include "ui/gfx/overlay_priority_hint.h" -#include "ui/gfx/overlay_transform.h" #include "ui/gfx/presentation_feedback.h" #include "ui/gfx/surface_origin.h" #include "ui/gfx/swap_result.h" @@ -44,16 +33,12 @@ #endif namespace gfx { -namespace mojom { -class DelegatedInkPointRenderer; -} // namespace mojom class ColorSpace; class VSyncProvider; } // namespace gfx namespace gl { -struct DCLayerOverlayParams; class GLContext; class EGLTimestampClient; @@ -202,12 +187,6 @@ // default. Does nothing if vsync cannot be changed. virtual void SetVSyncEnabled(bool enabled); - virtual void ScheduleDCLayer(std::unique_ptr<DCLayerOverlayParams> params); - - // Enables or disables DC layers, returning success. If failed, it is possible - // that the context is no longer current. - virtual bool SetEnableDCLayers(bool enable); - virtual bool IsSurfaceless() const; virtual gfx::SurfaceOrigin GetOrigin() const; @@ -216,22 +195,10 @@ // the next buffer may be 2 frames old. virtual bool BuffersFlipped() const; - virtual bool SupportsDCLayers() const; - - virtual bool SupportsProtectedVideo() const; - // Returns true if we are allowed to adopt a size different from the // platform's proposed surface size. virtual bool SupportsOverridePlatformSize() const; - // Set the rectangle that will be drawn into on the surface, returning - // success. If failed, it is possible that the context is no longer current. - virtual bool SetDrawRectangle(const gfx::Rect& rect); - - // This is the amount by which the scissor and viewport rectangles should be - // offset. - virtual gfx::Vector2d GetDrawOffset() const; - // Support for eglGetFrameTimestamps. virtual bool SupportsSwapTimestamps() const; virtual void SetEnableSwapTimestamps(); @@ -254,13 +221,6 @@ static bool ExtensionsContain(const char* extensions, const char* name); - virtual bool SupportsDelegatedInk(); - virtual void SetDelegatedInkTrailStartPoint( - std::unique_ptr<gfx::DelegatedInkMetadata> metadata) {} - virtual void InitDelegatedInkPointRendererReceiver( - mojo::PendingReceiver<gfx::mojom::DelegatedInkPointRenderer> - pending_receiver); - // This should be called at most once at GPU process startup time. static void SetForcedGpuPreference(GpuPreference gpu_preference); // If a gpu preference is forced (by GPU driver bug workaround, etc), return
diff --git a/ui/gl/gl_surface_stub.cc b/ui/gl/gl_surface_stub.cc index d68f172..7e29532 100644 --- a/ui/gl/gl_surface_stub.cc +++ b/ui/gl/gl_surface_stub.cc
@@ -51,14 +51,6 @@ return GLSurfaceFormat(); } -bool GLSurfaceStub::SupportsDCLayers() const { - return supports_draw_rectangle_; -} - -gfx::Vector2d GLSurfaceStub::GetDrawOffset() const { - return supports_draw_rectangle_ ? gfx::Vector2d(100, 200) : gfx::Vector2d(); -} - GLSurfaceStub::~GLSurfaceStub() {} } // namespace gl
diff --git a/ui/gl/gl_surface_stub.h b/ui/gl/gl_surface_stub.h index 77227c05..a957e3c 100644 --- a/ui/gl/gl_surface_stub.h +++ b/ui/gl/gl_surface_stub.h
@@ -17,10 +17,6 @@ void SetSize(const gfx::Size& size) { size_ = size; } void set_buffers_flipped(bool flipped) { buffers_flipped_ = flipped; } - void set_supports_draw_rectangle(bool support) { - supports_draw_rectangle_ = support; - } - // Implement GLSurface. void Destroy() override; bool Resize(const gfx::Size& size, @@ -34,8 +30,6 @@ void* GetHandle() override; bool BuffersFlipped() const override; GLSurfaceFormat GetFormat() override; - bool SupportsDCLayers() const override; - gfx::Vector2d GetDrawOffset() const override; protected: ~GLSurfaceStub() override; @@ -43,7 +37,6 @@ private: gfx::Size size_; bool buffers_flipped_ = false; - bool supports_draw_rectangle_ = false; }; } // namespace gl
diff --git a/ui/gl/presenter.h b/ui/gl/presenter.h index 5f9c471..bc2cc512 100644 --- a/ui/gl/presenter.h +++ b/ui/gl/presenter.h
@@ -145,7 +145,6 @@ virtual void PreserveChildSurfaceControls() {} #if BUILDFLAG(IS_WIN) - virtual bool SetDrawRectangle(const gfx::Rect& rect) = 0; virtual bool SupportsDelegatedInk() = 0; virtual void SetDelegatedInkTrailStartPoint( std::unique_ptr<gfx::DelegatedInkMetadata> metadata) {}
diff --git a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager_unittest.cc b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager_unittest.cc index a1b643d..8f4b62b 100644 --- a/ui/ozone/platform/drm/gpu/drm_gpu_display_manager_unittest.cc +++ b/ui/ozone/platform/drm/gpu/drm_gpu_display_manager_unittest.cc
@@ -528,17 +528,8 @@ } }; -// TODO: b/40263526 - Re-enable for ASan LSan builds after eliminiating circular -// dependency causing the DrmDevice to leak. -#if defined(LEAK_SANITIZER) -#define MAYBE_ConfigureDisplaysAlternateCrtcFallbackSuccess \ - DISABLED_ConfigureDisplaysAlternateCrtcFallbackSuccess -#else -#define MAYBE_ConfigureDisplaysAlternateCrtcFallbackSuccess \ - ConfigureDisplaysAlternateCrtcFallbackSuccess -#endif TEST_F(DrmGpuDisplayManagerMockedDeviceTest, - MAYBE_ConfigureDisplaysAlternateCrtcFallbackSuccess) { + ConfigureDisplaysAlternateCrtcFallbackSuccess) { auto drm_state = FakeDrmDevice::MockDrmState::CreateStateWithAllProperties(); // Create a pool of 3 CRTCs @@ -835,17 +826,8 @@ IsEmpty()); } -// TODO: b/40263526 - Re-enable for ASan LSan builds after eliminiating circular -// dependency causing the DrmDevice to leak. -#if defined(LEAK_SANITIZER) -#define MAYBE_ConfigureDisplaysUseSuccesfulStateForCommit \ - DISABLED_ConfigureDisplaysUseSuccesfulStateForCommit -#else -#define MAYBE_ConfigureDisplaysUseSuccesfulStateForCommit \ - ConfigureDisplaysUseSuccesfulStateForCommit -#endif TEST_F(DrmGpuDisplayManagerMockedDeviceTest, - MAYBE_ConfigureDisplaysUseSuccesfulStateForCommit) { + ConfigureDisplaysUseSuccesfulStateForCommit) { auto drm_state = FakeDrmDevice::MockDrmState::CreateStateWithAllProperties(); // Create a pool of 3 CRTCs
diff --git a/ui/ozone/platform/wayland/host/wayland_buffer_backing_shm.cc b/ui/ozone/platform/wayland/host/wayland_buffer_backing_shm.cc index bbd72c6..696911c 100644 --- a/ui/ozone/platform/wayland/host/wayland_buffer_backing_shm.cc +++ b/ui/ozone/platform/wayland/host/wayland_buffer_backing_shm.cc
@@ -27,20 +27,8 @@ DCHECK(!callback.is_null()); DCHECK(fd_.is_valid()); -// Given that buffers for canvas surfaces are submitted with alpha disabled, -// using a format with alpha channel results in popup surfaces that have black -// background when they are shown with fade in/out animation. Thus, disable -// alpha channel so that exo sets the background of these canvas surface to -// transparent. -// -// TODO(crbug.com/1269044): Revisit once Exo-side Skia Renderer issue is fixed. -#if BUILDFLAG(IS_CHROMEOS_LACROS) - const bool with_alpha_channel = false; -#else - const bool with_alpha_channel = true; -#endif std::move(callback).Run(connection()->buffer_factory()->CreateShmBuffer( - fd_, length_, size(), with_alpha_channel)); + fd_, length_, size(), /*with_alpha_channel=*/true)); if (UseExplicitSyncRelease()) auto close = std::move(fd_); }
diff --git a/ui/views/controls/bulleted_label_list/bulleted_label_list_view.cc b/ui/views/controls/bulleted_label_list/bulleted_label_list_view.cc index 979f9faa..4574b4a 100644 --- a/ui/views/controls/bulleted_label_list/bulleted_label_list_view.cc +++ b/ui/views/controls/bulleted_label_list/bulleted_label_list_view.cc
@@ -61,7 +61,9 @@ : BulletedLabelListView(std::vector<std::u16string>()) {} BulletedLabelListView::BulletedLabelListView( - const std::vector<std::u16string>& texts) { + const std::vector<std::u16string>& texts, + style::TextStyle label_text_style) + : label_text_style_(label_text_style) { const int width = LayoutProvider::Get()->GetDistanceMetric( DISTANCE_UNRELATED_CONTROL_HORIZONTAL); SetLayoutManager(std::make_unique<views::TableLayout>()) @@ -88,6 +90,7 @@ auto* label = AddChildView(std::make_unique<views::Label>(text)); label->SetMultiLine(true); label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + label->SetTextStyle(label_text_style_); } BEGIN_METADATA(BulletedLabelListView)
diff --git a/ui/views/controls/bulleted_label_list/bulleted_label_list_view.h b/ui/views/controls/bulleted_label_list/bulleted_label_list_view.h index 8642784..7bb17dc5 100644 --- a/ui/views/controls/bulleted_label_list/bulleted_label_list_view.h +++ b/ui/views/controls/bulleted_label_list/bulleted_label_list_view.h
@@ -8,9 +8,9 @@ #include <vector> #include "ui/views/metadata/view_factory.h" +#include "ui/views/style/typography.h" #include "ui/views/view.h" - namespace views { class VIEWS_EXPORT BulletedLabelListView : public View { @@ -18,12 +18,17 @@ public: BulletedLabelListView(); - explicit BulletedLabelListView(const std::vector<std::u16string>& texts); + explicit BulletedLabelListView( + const std::vector<std::u16string>& texts, + style::TextStyle label_text_style = style::TextStyle::STYLE_PRIMARY); BulletedLabelListView(const BulletedLabelListView&) = delete; BulletedLabelListView& operator=(const BulletedLabelListView&) = delete; ~BulletedLabelListView() override; void AddLabel(const std::u16string& text); + + private: + style::TextStyle label_text_style_; }; } // namespace views
diff --git a/ui/views/layout/box_layout.cc b/ui/views/layout/box_layout.cc index cc2c6f6..e554595d 100644 --- a/ui/views/layout/box_layout.cc +++ b/ui/views/layout/box_layout.cc
@@ -594,12 +594,6 @@ if (!collapse_margins_spacing_) { data.total_size.Enlarge(child_margins.main_trailing(), 0); } - } else if (!collapse_margins_spacing_) { - // TODO(weidongliu): see crbugs.com/1514004#c4. If a view with a 0 - // preferred size has a margin, it will be considered for main_leading but - // not for main_trailing. - data.total_size.set_main(data.total_size.main() + - child_margins.main_leading()); } int cross_size = box_child.preferred_size.cross();
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.cc index a09b4b8d..aa76286a 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.cc
@@ -144,13 +144,11 @@ } void DesktopWindowTreeHostLacros::OnWindowStateChanged( - ui::PlatformWindowState old_window_show_state, - ui::PlatformWindowState new_window_show_state) { - DesktopWindowTreeHostPlatform::OnWindowStateChanged(old_window_show_state, - new_window_show_state); - GetContentWindow()->SetProperty( - chromeos::kWindowStateTypeKey, - ToChromeosWindowStateType(new_window_show_state)); + ui::PlatformWindowState old_state, + ui::PlatformWindowState new_state) { + DesktopWindowTreeHostPlatform::OnWindowStateChanged(old_state, new_state); + GetContentWindow()->SetProperty(chromeos::kWindowStateTypeKey, + ToChromeosWindowStateType(new_state)); UpdateWindowHints(); }
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.h index cbb09034..b086a36f 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_lacros.h
@@ -61,9 +61,8 @@ // PlatformWindowDelegate: void OnClosed() override; - void OnWindowStateChanged( - ui::PlatformWindowState old_window_show_state, - ui::PlatformWindowState new_window_show_state) override; + void OnWindowStateChanged(ui::PlatformWindowState old_state, + ui::PlatformWindowState new_state) override; void OnFullscreenTypeChanged(ui::PlatformFullscreenType old_type, ui::PlatformFullscreenType new_type) override; void OnOverviewModeChanged(bool in_overview) override;
diff --git a/url/BUILD.gn b/url/BUILD.gn index aedf1bf..9167ecd 100644 --- a/url/BUILD.gn +++ b/url/BUILD.gn
@@ -10,7 +10,7 @@ import("//build/config/cronet/config.gni") import("//third_party/jni_zero/jni_zero.gni") -if (is_android || is_robolectric) { +if (is_android) { import("//build/config/android/rules.gni") }
diff --git a/url/android/gurl_android.cc b/url/android/gurl_android.cc index 4acf6060..4c3ca065 100644 --- a/url/android/gurl_android.cc +++ b/url/android/gurl_android.cc
@@ -83,23 +83,6 @@ return std::make_unique<GURL>(ret); } -// TODO(agrieve): Replace with @JniType("std::vector<GURL>") -void GURLAndroid::JavaGURLArrayToGURLVector( - JNIEnv* env, - const base::android::JavaRef<jobjectArray>& array, - std::vector<GURL>* out) { - DCHECK(out); - DCHECK(out->empty()); - if (!array) - return; - size_t len = SafeGetArrayLength(env, array); - for (size_t i = 0; i < len; ++i) { - ScopedJavaLocalRef<jobject> j_gurl( - env, static_cast<jobject>(env->GetObjectArrayElement(array.obj(), i))); - out->push_back(*ToNativeGURL(env, j_gurl)); - } -} - // static ScopedJavaLocalRef<jobject> GURLAndroid::FromNativeGURL(JNIEnv* env, const GURL& gurl) {
diff --git a/url/android/gurl_android.h b/url/android/gurl_android.h index 98cceaf..186ca748 100644 --- a/url/android/gurl_android.h +++ b/url/android/gurl_android.h
@@ -26,10 +26,6 @@ static base::android::ScopedJavaLocalRef<jobjectArray> ToJavaArrayOfGURLs( JNIEnv* env, base::span<base::android::ScopedJavaLocalRef<jobject>> v); - static void JavaGURLArrayToGURLVector( - JNIEnv* env, - const base::android::JavaRef<jobjectArray>& gurl_array, - std::vector<GURL>* out); }; } // namespace url