Changeset 228829 in webkit
- Timestamp:
- Feb 20, 2018 12:12:09 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r228828 r228829 1 2018-02-20 Megan Gardner <megan_gardner@apple.com> 2 3 Switch to UIWKTextInteractionAssistant for non-editable text 4 https://bugs.webkit.org/show_bug.cgi?id=182834 5 6 Reviewed by Wenson Hsieh and Tim Horton. 7 8 Switching to only using the UIWKTextInteractionAssistant. Only character granularity is now supported. 9 Also keep the from regressing gating the keyboard bring up on user interaction. The presents of a 10 textInteractionAssistant can no longer be used as proxy for the presence of the keyboard. 11 12 * UIProcess/ios/WKContentViewInteraction.mm: 13 (-[WKContentView useSelectionAssistantWithGranularity:]): 14 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): 15 1 16 2018-02-20 John Wilander <wilander@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r228605 r228829 1868 1868 - (void)useSelectionAssistantWithGranularity:(WKSelectionGranularity)selectionGranularity 1869 1869 { 1870 if (selectionGranularity == WKSelectionGranularityDynamic) { 1871 if (_textSelectionAssistant) { 1872 [_textSelectionAssistant deactivateSelection]; 1873 _textSelectionAssistant = nil; 1874 } 1875 if (!_webSelectionAssistant) 1876 _webSelectionAssistant = adoptNS([[UIWKSelectionAssistant alloc] initWithView:self]); 1877 } else if (selectionGranularity == WKSelectionGranularityCharacter) { 1878 if (_webSelectionAssistant) 1879 _webSelectionAssistant = nil; 1880 1881 if (!_textSelectionAssistant) 1882 _textSelectionAssistant = adoptNS([[UIWKTextInteractionAssistant alloc] initWithView:self]); 1883 else { 1884 // Reset the gesture recognizers in case editibility has changed. 1885 [_textSelectionAssistant setGestureRecognizers]; 1886 } 1887 1888 if (self.isFirstResponder && !self.suppressAssistantSelectionView) 1889 [_textSelectionAssistant activateSelection]; 1890 } 1870 if (_webSelectionAssistant) 1871 _webSelectionAssistant = nil; 1872 1873 if (!_textSelectionAssistant) 1874 _textSelectionAssistant = adoptNS([[UIWKTextInteractionAssistant alloc] initWithView:self]); 1875 else { 1876 // Reset the gesture recognizers in case editibility has changed. 1877 [_textSelectionAssistant setGestureRecognizers]; 1878 } 1879 1880 if (self.isFirstResponder && !self.suppressAssistantSelectionView) 1881 [_textSelectionAssistant activateSelection]; 1891 1882 } 1892 1883 … … 4013 4004 else { 4014 4005 // The default behavior is to allow node assistance if the user is interacting or the keyboard is already active. 4015 shouldShowKeyboard = userIsInteracting || _ textSelectionAssistant|| changingActivityState;4006 shouldShowKeyboard = userIsInteracting || _isChangingFocus || changingActivityState; 4016 4007 #if ENABLE(DATA_INTERACTION) 4017 4008 shouldShowKeyboard |= _dragDropInteractionState.isPerformingDrop();
Note: See TracChangeset
for help on using the changeset viewer.