Changeset 230850 in webkit
- Timestamp:
- Apr 20, 2018, 1:40:51 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/resources/basic-gestures.js
r230746 r230850 19 19 uiController.singleTapAtPoint(${x}, ${y}, () => { }); 20 20 uiController.singleTapAtPoint(${x}, ${y}, () => { }); 21 })();`, resolve); 22 }); 23 } 24 25 function doubleTapAtPoint(x, y) 26 { 27 return new Promise(resolve => { 28 testRunner.runUIScript(` 29 (function() { 30 uiController.doubleTapAtPoint(${x}, ${y}, function() { 31 uiController.uiScriptComplete(); 32 }); 21 33 })();`, resolve); 22 34 }); -
trunk/Source/WebKit/ChangeLog
r230849 r230850 1 2018-04-20 Megan Gardner <megan_gardner@apple.com> 2 3 Fixes for failing tests associated with switching Text Selection Assistants 4 https://bugs.webkit.org/show_bug.cgi?id=184806 5 <rdar://problem/39367905> 6 7 Reviewed by Beth Dakin and Wenson Hsieh. 8 9 The major fix is the disabling the double tap noneditable text selection gesture. 10 The other fixes are small tweaks that shouldn't even be run into with the fix to 11 the double tap gesture, but they are incorrect, so I am taking the opportunity to 12 fix them now, in case we run into them again. 13 14 * UIProcess/ios/WKContentViewInteraction.mm: 15 (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): 16 We should not be allowing a double tap text gestures in non-editable web content. 17 We didn't have one with the old assistant. Fortunately, this is easily disabled. 18 (-[WKContentView canPerformActionForWebView:withSender:]): 19 We should not allow the lookup action if we do not actually have a selection. 20 It is meaningless without one. 21 (-[WKContentView selectedTextRange]): 22 We should not return a selection to UIKit if all we have is caret selection 23 in non-editable content. We have this for selections on Mac, but UIKit does 24 not know how to properly handle this, and will have incorrect behavior if we 25 return a valid selection. 26 1 27 2018-04-20 Timothy Hatcher <timothy@apple.com> 2 28 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r230766 r230850 1657 1657 if (self.isAssistingNode) 1658 1658 return _positionInformation.nodeAtPositionIsAssistedNode; 1659 1660 // Don't allow double tap text gestures in noneditable content. 1661 if (gesture == UIWKGestureDoubleTap) 1662 return NO; 1659 1663 1660 1664 // If we're selecting something, don't activate highlight. … … 2247 2251 #endif 2248 2252 2249 return YES;2253 return hasWebSelection || _page->editorState().selectionIsRange; 2250 2254 } 2251 2255 … … 3146 3150 if (_page->editorState().selectionIsNone || _page->editorState().isMissingPostLayoutData) 3147 3151 return nil; 3152 // UIKit does not expect caret selections in noneditable content. 3153 if (!_page->editorState().isContentEditable && !_page->editorState().selectionIsRange) 3154 return nil; 3155 3148 3156 auto& postLayoutEditorStateData = _page->editorState().postLayoutData(); 3149 3157 FloatRect startRect = postLayoutEditorStateData.caretRectAtStart;
Note:
See TracChangeset
for help on using the changeset viewer.