Changeset 240159 in webkit
- Timestamp:
- Jan 18, 2019 11:10:04 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r240156 r240159 1 2019-01-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Remove some last vestiges of assisted node terminology in WebKit 4 https://bugs.webkit.org/show_bug.cgi?id=193572 5 6 Reviewed by Tim Horton. 7 8 * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: 9 * UIProcess/ios/WKContentViewInteraction.mm: 10 (-[WKContentView gestureRecognizerShouldBegin:]): 11 (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): 12 (-[WKContentView _showKeyboard]): 13 (-[WKContentView _hideKeyboard]): 14 15 Add a FIXME about invoking `-reloadInputViews` on watchOS when the focused element is blurred. 16 17 (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]): 18 (-[WKContentView _elementDidBlur]): 19 (-[WKContentView updateCurrentFocusedElementInformation:]): 20 (-[WKContentView _startAssistingKeyboard]): Deleted. 21 (-[WKContentView _stopAssistingKeyboard]): Deleted. 22 * WebProcess/WebPage/ios/WebPageIOS.mm: 23 (WebKit::WebPage::getFocusedElementInformation): 24 1 25 2019-01-18 Youenn Fablet <youenn@apple.com> 2 26 -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h
r238708 r240159 59 59 60 60 /** 61 * The _WKFocusedElementInfo provides basic information about an element 62 * that has been focused (either programmatically or through user interaction)63 * but has not yet been assisted.61 * The _WKFocusedElementInfo provides basic information about an element that 62 * has been focused (either programmatically or through user interaction) but 63 * is not causing any input UI (e.g. keyboard, date picker, etc.) to be shown. 64 64 */ 65 65 @protocol _WKFocusedElementInfo <NSObject> -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r239881 r240159 1737 1737 if (hasFocusedElement(_focusedElementInformation)) { 1738 1738 // Request information about the position with sync message. 1739 // If the assisted nodeis the same, prevent the gesture.1739 // If the focused element is the same, prevent the gesture. 1740 1740 if (![self ensurePositionInformationIsUpToDate:WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(point))]) 1741 1741 return NO; … … 1747 1747 if (gestureRecognizer == _highlightLongPressGestureRecognizer) { 1748 1748 if (hasFocusedElement(_focusedElementInformation)) { 1749 // This is a different node than the assisted one.1749 // This is a different element than the focused one. 1750 1750 // Prevent the gesture if there is no node. 1751 1751 // Allow the gesture if it is a node that wants highlight or if there is an action for it. … … 1886 1886 #endif 1887 1887 1888 // If we're currently editing an assisted node, only allow the selection to move within that assisted node.1888 // If we're currently focusing an editable element, only allow the selection to move within that focused element. 1889 1889 if (self.isFocusingElement) 1890 1890 return _positionInformation.nodeAtPositionIsFocusedElement; … … 4319 4319 } 4320 4320 4321 // FIXME: I want to change the name of these functions, but I'm leaving it for now 4322 // to make it easier to look up the corresponding functions in UIKit. 4323 4324 - (void)_startAssistingKeyboard 4321 - (void)_showKeyboard 4325 4322 { 4326 4323 [self setUpTextSelectionAssistant]; … … 4334 4331 } 4335 4332 4336 - (void)_ stopAssistingKeyboard4333 - (void)_hideKeyboard 4337 4334 { 4338 4335 self.inputDelegate = nil; … … 4340 4337 4341 4338 [_textSelectionAssistant deactivateSelection]; 4339 [_formAccessoryView hideAutoFillButton]; 4340 4341 // FIXME: Does it make sense to call -reloadInputViews on watchOS? 4342 [self reloadInputViews]; 4343 [self _updateAccessory]; 4342 4344 } 4343 4345 … … 4566 4568 break; 4567 4569 default: 4568 [self _s tartAssistingKeyboard];4570 [self _showKeyboard]; 4569 4571 break; 4570 4572 } … … 4616 4618 _focusRequiresStrongPasswordAssistance = NO; 4617 4619 4618 [self _stopAssistingKeyboard]; 4619 [_formAccessoryView hideAutoFillButton]; 4620 [self reloadInputViews]; 4621 [self _updateAccessory]; 4620 [self _hideKeyboard]; 4622 4621 4623 4622 #if PLATFORM(WATCHOS) … … 4672 4671 _page->requestFocusedElementInformation([callback = WTFMove(callback), identifierBeforeUpdate, weakSelf] (auto& info, auto error) { 4673 4672 if (!weakSelf || error != WebKit::CallbackBase::Error::None || info.focusedElementIdentifier != identifierBeforeUpdate) { 4674 // If the assisted node may have changed in the meantime, don't overwrite assisted nodeinformation.4673 // If the focused element may have changed in the meantime, don't overwrite focused element information. 4675 4674 callback(false); 4676 4675 return; -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r240139 r240159 2529 2529 information.elementType = InputType::ContentEditable; 2530 2530 if (is<HTMLElement>(*m_focusedElement)) { 2531 auto& assistedElement = downcast<HTMLElement>(*m_focusedElement);2532 information.isAutocorrect = assistedElement.shouldAutocorrect();2533 information.autocapitalizeType = assistedElement.autocapitalizeType();2534 information.inputMode = assistedElement.canonicalInputMode();2531 auto& focusedElement = downcast<HTMLElement>(*m_focusedElement); 2532 information.isAutocorrect = focusedElement.shouldAutocorrect(); 2533 information.autocapitalizeType = focusedElement.autocapitalizeType(); 2534 information.inputMode = focusedElement.canonicalInputMode(); 2535 2535 } else { 2536 2536 information.isAutocorrect = true;
Note: See TracChangeset
for help on using the changeset viewer.