Right now, given a form of multiple sections, "Clear form" clears the whole form (as the description suggests), which means that it clears all the sections at once. It might be better if we clear sections separately.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5 commit 7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5 Author: Parastoo Geranmayeh <parastoog@google.com> Date: Tue May 15 22:16:25 2018 [Autofill] Clear should only clear a section. When filling forms, we fill section by section. Therefore, when clearing them, we should also clear section by section. Meaning that only the section to which the clicked element belongs should be cleared. Example: If the user fills a shipping address and then a billing address, and then they decide to clear the shipping address, they should be able to clear only that section. Currently, we would clear the whole form. This could also help us for solving the problem of placeholders in the future. We won't change the string "Clear form", bc in everyday language, one form would most likely refer to a logical section. Test added. Bug: 816941 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I61862c9eeff6139d889381fd5de97c0712972572 Reviewed-on: https://chromium-review.googlesource.com/1048408 Commit-Queue: Parastoo Geranmayeh <parastoog@google.com> Reviewed-by: Moe Ahmadi <mahmadi@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Roger McFarlane <rogerm@chromium.org> Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/master@{#558858} [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/chrome/browser/autofill/form_structure_browsertest.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/chrome/renderer/autofill/form_autofill_browsertest.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/browser/content_autofill_driver.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/browser/content_autofill_driver.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/browser/content_autofill_driver_unittest.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/common/autofill_agent.mojom [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/common/autofill_types.mojom [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/common/autofill_types_struct_traits.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/common/autofill_types_struct_traits.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/renderer/autofill_agent.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/renderer/autofill_agent.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/renderer/form_autofill_util.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/renderer/form_cache.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/content/renderer/form_cache.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/autofill_driver.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/autofill_external_delegate.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/autofill_external_delegate_unittest.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/autofill_field.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/autofill_manager.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/autofill_manager_unittest.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/form_data_importer.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/form_structure.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/form_structure_unittest.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/test_autofill_driver.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/browser/test_autofill_driver.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/common/form_field_data.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/core/common/form_field_data.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/ios/browser/autofill_driver_ios.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/ios/browser/autofill_driver_ios.mm [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/components/autofill/ios/browser/resources/autofill_controller.js [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/ios/chrome/browser/autofill/form_structure_browsertest.mm [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/third_party/blink/public/web/web_form_control_element.h [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/third_party/blink/renderer/core/exported/web_form_control_element.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/third_party/blink/renderer/core/html/forms/html_form_control_element.cc [modify] https://crrev.com/7d8ea06c72d4c95e10cee63f1cfde8b8d7db50b5/third_party/blink/renderer/core/html/forms/html_form_control_element.h
It needs to be fixed for iOS as well. Thanks.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0 commit ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0 Author: Moe Ahmadi <mahmadi@chromium.org> Date: Fri Jun 08 18:56:15 2018 [AF][IOS] Only clear fields in the same section as the one initiating clear Bug: 816941 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: I5fae03657bd3e05ed101b4b85c2904aa28b3611d Reviewed-on: https://chromium-review.googlesource.com/1089857 Reviewed-by: Eugene But <eugenebut@chromium.org> Reviewed-by: John Wu <jzw@chromium.org> Reviewed-by: Olivier Robin <olivierrobin@chromium.org> Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/master@{#565705} [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/components/autofill/ios/browser/autofill_agent.mm [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/components/autofill/ios/browser/fake_js_autofill_manager.h [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/components/autofill/ios/browser/fake_js_autofill_manager.mm [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/components/autofill/ios/browser/js_autofill_manager.h [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/components/autofill/ios/browser/js_autofill_manager.mm [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/components/autofill/ios/browser/resources/autofill_controller.js [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/ios/web_view/internal/autofill/cwv_autofill_controller.mm [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/ios/web_view/internal/autofill/cwv_autofill_controller_unittest.mm [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/ios/web_view/public/cwv_autofill_controller.h [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/ios/web_view/shell/shell_autofill_delegate.m [modify] https://crrev.com/ec35d9cbd6f6042ecabdf8da8004b40e0a0297b0/ios/web_view/test/web_view_autofill_inttest.mm
Comment 1 Deleted