Bug 233239

Summary: When an "autofilled and viewable" field becomes empty, turn "autofilled and viewable" off
Product: WebKit Reporter: Ricky Mondello <rmondello>
Component: FormsAssignee: Ricky Mondello <rmondello>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, darin, david_quesada, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Ricky Mondello
Reported 2021-11-16 22:22:20 PST
When a “autofilled and viewable” field becomes empty, turn “autofilled and viewable” off
Attachments
Patch (1.54 KB, patch)
2021-11-16 22:26 PST, Ricky Mondello
no flags
Patch (1.51 KB, patch)
2021-11-16 22:30 PST, Ricky Mondello
no flags
Patch (1.45 KB, patch)
2021-11-17 14:13 PST, Ricky Mondello
no flags
Patch (6.82 KB, patch)
2021-11-17 14:53 PST, Ricky Mondello
no flags
Patch (8.51 KB, patch)
2021-11-17 16:20 PST, Ricky Mondello
no flags
Patch (5.43 KB, patch)
2021-11-17 16:58 PST, Ricky Mondello
no flags
Ricky Mondello
Comment 1 2021-11-16 22:26:56 PST
Ricky Mondello
Comment 2 2021-11-16 22:30:48 PST
David Quesada
Comment 3 2021-11-17 11:49:46 PST
Comment on attachment 444481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444481&action=review > Source/WebCore/ChangeLog:3 > + When an âautofilled and viewableâ field becomes empty, turn âautofilled and viewableâ off I think these smart quotes are *too smart* for the ChangeLog.
Darin Adler
Comment 4 2021-11-17 12:34:26 PST
Comment on attachment 444481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444481&action=review We should add a regression test, which is required for bug fixes in WebKit; I believe we have this wired up so we can make such tests > Source/WebCore/html/HTMLInputElement.cpp:1165 > + // Clear AutoFilled and viewable on field becomming empty. This comment doesn’t fit WebKit’s coding style. Comments should answer the question "why" rather than just saying the same thing the code does below. The comment above has a similar problem. Please consider rewording so this does something other than just saying in English what the code just below it does. Also, misspelling of the word "becoming".
Ricky Mondello
Comment 5 2021-11-17 14:13:39 PST
Ricky Mondello
Comment 6 2021-11-17 14:15:12 PST
Fixed up the bug title and the comment. Looking to see how to test.
Ricky Mondello
Comment 7 2021-11-17 14:53:51 PST
Ricky Mondello
Comment 8 2021-11-17 16:20:14 PST
Ricky Mondello
Comment 9 2021-11-17 16:21:12 PST
Ready for review, with a passing test. :)
Darin Adler
Comment 10 2021-11-17 16:35:07 PST
Comment on attachment 444595 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444595&action=review I did not set commit-queue+ yet since you may want to consider a different test, which could change the patch further. But you are also welcome to land this and then refine from here. > Source/WebCore/testing/Internals.idl:413 > + undefined setValueFromRenderer(HTMLInputElement inputElement, DOMString text); I am really happy we added a test, but this should new function should not have been required. We should be able to construct a test that changes the value by selecting the text and then doing a backspace with eventSender.keyDown('\u0008'), or something roughly like that, which would do more end-to-end testing and not require any change to internals.
Ricky Mondello
Comment 11 2021-11-17 16:37:33 PST
Comment on attachment 444595 [details] Patch Wenson pointed out a better way to do the test.
Ricky Mondello
Comment 12 2021-11-17 16:58:38 PST
Ricky Mondello
Comment 13 2021-11-17 16:59:01 PST
Comment on attachment 444610 [details] Patch Okay, one more time!
Darin Adler
Comment 14 2021-11-17 17:16:19 PST
Comment on attachment 444610 [details] Patch EWS hasn’t run enough for me to say commit-queue+
Wenson Hsieh
Comment 15 2021-11-17 22:05:39 PST
Comment on attachment 444610 [details] Patch The Windows test failure (storage/indexeddb/IDBKey-create-array-buffer-view-oom.html) is presumably unrelated.
EWS
Comment 16 2021-11-17 22:26:57 PST
Committed r285982 (244379@main): <https://commits.webkit.org/244379@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 444610 [details].
Radar WebKit Bug Importer
Comment 17 2021-11-17 22:27:27 PST
Note You need to log in before you can comment on or make changes to this bug.