Changeset 231967 in webkit
- Timestamp:
- May 18, 2018 11:23:45 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r231965 r231967 1 2018-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [Extra zoom mode] Clearing text fields should dispatch input events of type "deleteContent" 4 https://bugs.webkit.org/show_bug.cgi?id=185769 5 <rdar://problem/40368261> 6 7 Reviewed by Tim Horton. 8 9 Adds a new test to inspect the input events dispatched as a result of inserting and deleting text in a form 10 control. The inputTypes should be "insertText" and "deleteContent", respectively; the data values should be the 11 inserted string and null, respectively. 12 13 * fast/forms/extrazoom/delete-content-in-text-field-expected.txt: Added. 14 * fast/forms/extrazoom/delete-content-in-text-field.html: Added. 15 1 16 2018-05-18 Youenn Fablet <youenn@apple.com> 2 17 -
trunk/Source/WebKit/ChangeLog
r231966 r231967 1 2018-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [Extra zoom mode] Clearing text fields should dispatch input events of type "deleteContent" 4 https://bugs.webkit.org/show_bug.cgi?id=185769 5 <rdar://problem/40368261> 6 7 Reviewed by Tim Horton. 8 9 When setting the text of the currently focused element to the empty string, just delete the text instead of 10 pretending to insert an empty string. This mimics deleting content using the delete key on macOS, and fires an 11 input event with inputType "deleteContent" instead of "insertText". 12 13 Test: fast/forms/extrazoom/delete-content-in-text-field.html 14 15 * WebProcess/WebPage/WebPage.cpp: 16 (WebKit::WebPage::setTextAsync): 17 1 18 2018-05-18 Keith Rollin <krollin@apple.com> 2 19 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r231779 r231967 4620 4620 UserTypingGestureIndicator indicator(frame.get()); 4621 4621 frame->selection().selectAll(); 4622 frame->editor().insertText(text, nullptr, TextEventInputKeyboard); 4622 if (text.isEmpty()) 4623 frame->editor().deleteSelectionWithSmartDelete(false); 4624 else 4625 frame->editor().insertText(text, nullptr, TextEventInputKeyboard); 4623 4626 return; 4624 4627 }
Note: See TracChangeset
for help on using the changeset viewer.