Changeset 202578 in webkit
- Timestamp:
- Jun 28, 2016 11:20:42 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r202572 r202578 1 2016-06-28 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a text field is removed 4 https://bugs.webkit.org/show_bug.cgi?id=159199 5 <rdar://problem/26748189> 6 7 Reviewed by Alexey Proskuryakov. 8 9 The bug was caused by HTMLInputElement's endEditing no longer getting called due to the behavior change. 10 Preserve the WebKit2 API semantics by manually calling HTMLInputElement::endEditing in setFocusedElement. 11 12 Tests: WebKit2TextFieldDidBeginAndEndEditing 13 14 * dom/Document.cpp: 15 (WebCore::Document::setFocusedElement): 16 1 17 2016-06-28 Frederic Wang <fwang@igalia.com> 2 18 -
trunk/Source/WebCore/dom/Document.cpp
r202559 r202578 83 83 #include "HTMLIFrameElement.h" 84 84 #include "HTMLImageElement.h" 85 #include "HTMLInputElement.h" 85 86 #include "HTMLLinkElement.h" 86 87 #include "HTMLMediaElement.h" … … 3809 3810 newFocusedElement = nullptr; 3810 3811 } 3811 } else 3812 } else { 3813 if (is<HTMLInputElement>(*oldFocusedElement)) 3814 downcast<HTMLInputElement>(*oldFocusedElement).endEditing(); 3812 3815 ASSERT(!m_focusedElement); 3816 } 3813 3817 3814 3818 if (oldFocusedElement->isRootEditableElement()) -
trunk/Tools/ChangeLog
r202559 r202578 1 2016-06-28 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a text field is removed 4 https://bugs.webkit.org/show_bug.cgi?id=159199 5 6 Reviewed by Alexey Proskuryakov. 7 8 Added a test case for removing a text field. Also fixed the flakiness and re-enabled it on Mac. 9 10 * TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing.cpp: 11 * TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing_Bundle.cpp: 12 * TestWebKitAPI/Tests/WebKit2/input-focus-blur.html: Focus a div upfront to avoid the flakiness from 13 an input element getting automatically focused on Mac. 14 1 15 2016-06-28 Per Arne Vollan <pvollan@apple.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing.cpp
r185692 r202578 26 26 #include "config.h" 27 27 28 #if WK_HAVE_C_SPI && !PLATFORM(MAC)28 #if WK_HAVE_C_SPI 29 29 30 30 #include "PlatformUtilities.h" … … 127 127 } 128 128 129 TEST_F(WebKit2TextFieldBeginAndEditEditingTest, TextFieldDidEndShouldBeDispatchedForRemovedFocusField) 130 { 131 executeJavaScriptAndCheckDidReceiveMessage("focusTextField('input')", "DidReceiveTextFieldDidBeginEditing"); 132 executeJavaScriptAndCheckDidReceiveMessage("removeTextField('input')", "DidReceiveTextFieldDidEndEditing"); 133 } 134 129 135 } // namespace TestWebKitAPI 130 136 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing_Bundle.cpp
r185169 r202578 26 26 #include "config.h" 27 27 28 #if WK_HAVE_C_SPI && !PLATFORM(MAC)28 #if WK_HAVE_C_SPI 29 29 30 30 #include "InjectedBundleTest.h" -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/input-focus-blur.html
r185089 r202578 2 2 <html> 3 3 <body> 4 <div tabindex=0></div> 4 5 <input id="input" type="text"> 5 6 <input id="readonly" type="text" readonly> 6 7 <script> 8 9 document.querySelector('div').focus(); 10 7 11 function focusTextField(id) 8 12 { … … 14 18 document.getElementById(id).blur(); 15 19 } 20 21 function removeTextField(id) 22 { 23 document.getElementById(id).remove(); 24 } 25 16 26 </script> 17 27 </body>
Note: See TracChangeset
for help on using the changeset viewer.