Changeset 263693 in webkit
- Timestamp:
- Jun 29, 2020 2:26:11 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r263688 r263693 1 2020-06-29 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS] editing/selection/ios/select-text-after-changing-focus.html sometimes fails 4 https://bugs.webkit.org/show_bug.cgi?id=213745 5 Work towards <rdar://problem/64808138> 6 7 Reviewed by Tim Horton. 8 9 This test first taps an input field to focus it, taps a button below the input field to focus the button and 10 dismiss the keyboard, and finally long presses to select a word below the button. On recent iOS 14 builds, this 11 test occasionally fails due to recent changes in UIKit that may cause the callout bar appearance callback to 12 fire after focusing the input field. If this happens, we end up showing the callout bar with a single option to 13 "Select All" (despite the field being empty), and the subsequent tap that's intended to hit the button instead 14 hit-tests to this callout bar item. The tests subsequently times out waiting for the keyboard to dismiss, which 15 never happens because the input field remains focused. 16 17 Showing the "Select All" callout bar option in empty text fields is inconsistent with the rest of the platform 18 (iOS), and appears to have been unintentionally introduced in iOS 12 by <https://trac.webkit.org/r231726>. While 19 it's still unknown which exact system changes caused this test to begin timing out, we can at least fix it by 20 addressing this existing regression in behavior. 21 22 * UIProcess/ios/WKContentViewInteraction.mm: 23 (-[WKContentView canPerformActionForWebView:withSender:]): 24 25 Check `-hasContent` here, instead of just checking if the selection is a caret. Note that we don't need to check 26 whether the selection is none separately, since `-hasContent` will always return `NO` if there is no selection. 27 1 28 2020-06-29 Sam Weinig <weinig@apple.com> 2 29 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r263630 r263693 3448 3448 if (action == @selector(select:)) { 3449 3449 // Disable select in password fields so that you can't see word boundaries. 3450 return !editorState.isInPasswordField && [self hasContent] && !editorState.selectionIsNone && !editorState.selectionIsRange;3450 return !editorState.isInPasswordField && !editorState.selectionIsRange && self.hasContent; 3451 3451 } 3452 3452 3453 3453 if (action == @selector(selectAll:)) { 3454 // By platform convention we don't show Select All in the callout menu for a range selection.3455 if ([sender isKindOfClass:UIMenuController.class])3456 return !editorState.selectionIs None && !editorState.selectionIsRange;3457 #if USE(UIKIT_KEYBOARD_ADDITIONS) 3454 if ([sender isKindOfClass:UIMenuController.class]) { 3455 // By platform convention we don't show Select All in the callout menu for a range selection. 3456 return !editorState.selectionIsRange && self.hasContent; 3457 } 3458 3458 return YES; 3459 #else3460 return !editorState.selectionIsNone && self.hasContent;3461 #endif3462 3459 } 3463 3460 -
trunk/Tools/ChangeLog
r263684 r263693 1 2020-06-29 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS] editing/selection/ios/select-text-after-changing-focus.html sometimes fails 4 https://bugs.webkit.org/show_bug.cgi?id=213745 5 Work towards <rdar://problem/64808138> 6 7 Reviewed by Tim Horton. 8 9 See WebKit/ChangeLog for more details. If this test happens to be run after another test that has written 10 something to the pasteboard, it will still fail due to the callout menu showing up with the option to paste. 11 Mitigate this by clearing the contents of the system pasteboard between tests, such that content copied from 12 previous tests doesn't change the behavior of subsequent tests. 13 14 * WebKitTestRunner/ios/TestControllerIOS.mm: 15 (WTR::TestController::platformResetStateToConsistentValues): 16 1 17 2020-06-29 Fujii Hironori <Hironori.Fujii@sony.com> 2 18 -
trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm
r263224 r263693 156 156 cocoaResetStateToConsistentValues(options); 157 157 158 [UIPasteboard generalPasteboard].items = @[ ]; 158 159 [[UIApplication sharedApplication] _cancelAllTouches]; 159 160 [[UIDevice currentDevice] setOrientation:UIDeviceOrientationPortrait animated:NO];
Note: See TracChangeset
for help on using the changeset viewer.