⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242690 in webkit


Ignore:
Timestamp:
Mar 10, 2019, 4:49:10 PM (7 years ago)
Author:
Wenson Hsieh
Message:

Fix some misleading function and variable names in WKContentViewInteraction.mm
https://bugs.webkit.org/show_bug.cgi?id=195536

Reviewed by Tim Horton.

  • UIProcess/ios/WKContentViewInteraction.mm:

(shouldDeferZoomingToSelectionWhenRevealingFocusedElement):

Rename shouldZoomToRevealSelectionRect to shouldDeferZoomingToSelectionWhenRevealingFocusedElement; this
function is used to determine whether we should zoom to the selection rect when revealing the focused element,
and therefore affects whether we need to defer zooming until we get selection information.

(rectToRevealWhenZoomingToFocusedElement):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):

Rename shouldShowKeyboard to shouldShowInputView; this boolean indicates whether we should show not only the
keyboard, but other UI for user input such as date and select pickers.

(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
(shouldZoomToRevealSelectionRect): Deleted.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r242687 r242690  
     12019-03-10  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Fix some misleading function and variable names in WKContentViewInteraction.mm
     4        https://bugs.webkit.org/show_bug.cgi?id=195536
     5
     6        Reviewed by Tim Horton.
     7
     8        * UIProcess/ios/WKContentViewInteraction.mm:
     9        (shouldDeferZoomingToSelectionWhenRevealingFocusedElement):
     10
     11        Rename shouldZoomToRevealSelectionRect to shouldDeferZoomingToSelectionWhenRevealingFocusedElement; this
     12        function is used to determine whether we should zoom to the selection rect when revealing the focused element,
     13        and therefore affects whether we need to defer zooming until we get selection information.
     14
     15        (rectToRevealWhenZoomingToFocusedElement):
     16        (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
     17
     18        Rename shouldShowKeyboard to shouldShowInputView; this boolean indicates whether we should show not only the
     19        keyboard, but other UI for user input such as date and select pickers.
     20
     21        (-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):
     22        (shouldZoomToRevealSelectionRect): Deleted.
     23
    1242019-03-10  Simon Fraser  <simon.fraser@apple.com>
    225
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r242551 r242690  
    47244724}
    47254725
    4726 static bool shouldZoomToRevealSelectionRect(WebKit::InputType type)
     4726static bool shouldDeferZoomingToSelectionWhenRevealingFocusedElement(WebKit::InputType type)
    47274727{
    47284728    switch (type) {
     
    47494749        elementInteractionRect = { elementInfo.lastInteractionLocation, { 1, 1 } };
    47504750
    4751     if (!shouldZoomToRevealSelectionRect(elementInfo.elementType))
     4751    if (!shouldDeferZoomingToSelectionWhenRevealingFocusedElement(elementInfo.elementType))
    47524752        return elementInteractionRect;
    47534753
     
    48414841        [self _stopSuppressingSelectionAssistantForReason:WebKit::FocusedElementIsTooSmall];
    48424842
    4843     BOOL shouldShowKeyboard = [&] {
     4843    BOOL shouldShowInputView = [&] {
    48444844        switch (startInputSessionPolicy) {
    48454845        case _WKFocusStartsInputSessionPolicyAuto:
     
    48884888#endif
    48894889
    4890     if (!shouldShowKeyboard)
     4890    if (!shouldShowInputView)
    48914891        return;
    48924892
     
    49524952        [_webView _scheduleVisibleContentRectUpdate];
    49534953   
    4954     if (!shouldZoomToRevealSelectionRect(_focusedElementInformation.elementType))
     4954    if (!shouldDeferZoomingToSelectionWhenRevealingFocusedElement(_focusedElementInformation.elementType))
    49554955        [self _zoomToRevealFocusedElement];
    49564956
     
    51075107    // FIXME: If the initial writing direction just changed, we should wait until we get the next post-layout editor state
    51085108    // before zooming to reveal the selection rect.
    5109     if (shouldZoomToRevealSelectionRect(_focusedElementInformation.elementType))
     5109    if (shouldDeferZoomingToSelectionWhenRevealingFocusedElement(_focusedElementInformation.elementType))
    51105110        [self _zoomToRevealFocusedElement];
    51115111}
Note: See TracChangeset for help on using the changeset viewer.