Changeset 240159 in webkit


Ignore:
Timestamp:
Jan 18, 2019 11:10:04 AM (5 years ago)
Author:
Wenson Hsieh
Message:

Remove some last vestiges of assisted node terminology in WebKit
https://bugs.webkit.org/show_bug.cgi?id=193572

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView _showKeyboard]):
(-[WKContentView _hideKeyboard]):

Add a FIXME about invoking -reloadInputViews on watchOS when the focused element is blurred.

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView updateCurrentFocusedElementInformation:]):
(-[WKContentView _startAssistingKeyboard]): Deleted.
(-[WKContentView _stopAssistingKeyboard]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getFocusedElementInformation):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r240156 r240159  
     12019-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
    1252019-01-18  Youenn Fablet  <youenn@apple.com>
    226
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h

    r238708 r240159  
    5959
    6060/**
    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.
    6464 */
    6565@protocol _WKFocusedElementInfo <NSObject>
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r239881 r240159  
    17371737        if (hasFocusedElement(_focusedElementInformation)) {
    17381738            // Request information about the position with sync message.
    1739             // If the assisted node is the same, prevent the gesture.
     1739            // If the focused element is the same, prevent the gesture.
    17401740            if (![self ensurePositionInformationIsUpToDate:WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(point))])
    17411741                return NO;
     
    17471747    if (gestureRecognizer == _highlightLongPressGestureRecognizer) {
    17481748        if (hasFocusedElement(_focusedElementInformation)) {
    1749             // This is a different node than the assisted one.
     1749            // This is a different element than the focused one.
    17501750            // Prevent the gesture if there is no node.
    17511751            // Allow the gesture if it is a node that wants highlight or if there is an action for it.
     
    18861886#endif
    18871887
    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.
    18891889    if (self.isFocusingElement)
    18901890        return _positionInformation.nodeAtPositionIsFocusedElement;
     
    43194319}
    43204320
    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
    43254322{
    43264323    [self setUpTextSelectionAssistant];
     
    43344331}
    43354332
    4336 - (void)_stopAssistingKeyboard
     4333- (void)_hideKeyboard
    43374334{
    43384335    self.inputDelegate = nil;
     
    43404337   
    43414338    [_textSelectionAssistant deactivateSelection];
     4339    [_formAccessoryView hideAutoFillButton];
     4340
     4341    // FIXME: Does it make sense to call -reloadInputViews on watchOS?
     4342    [self reloadInputViews];
     4343    [self _updateAccessory];
    43424344}
    43434345
     
    45664568        break;
    45674569    default:
    4568         [self _startAssistingKeyboard];
     4570        [self _showKeyboard];
    45694571        break;
    45704572    }
     
    46164618    _focusRequiresStrongPasswordAssistance = NO;
    46174619
    4618     [self _stopAssistingKeyboard];
    4619     [_formAccessoryView hideAutoFillButton];
    4620     [self reloadInputViews];
    4621     [self _updateAccessory];
     4620    [self _hideKeyboard];
    46224621
    46234622#if PLATFORM(WATCHOS)
     
    46724671    _page->requestFocusedElementInformation([callback = WTFMove(callback), identifierBeforeUpdate, weakSelf] (auto& info, auto error) {
    46734672        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 node information.
     4673            // If the focused element may have changed in the meantime, don't overwrite focused element information.
    46754674            callback(false);
    46764675            return;
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r240139 r240159  
    25292529        information.elementType = InputType::ContentEditable;
    25302530        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();
    25352535        } else {
    25362536            information.isAutocorrect = true;
Note: See TracChangeset for help on using the changeset viewer.