Changeset 221443 in webkit


Ignore:
Timestamp:
Aug 31, 2017, 2:13:38 PM (8 years ago)
Author:
Megan Gardner
Message:

Remove IsBlockSelection flag
https://bugs.webkit.org/show_bug.cgi?id=176141

Reviewed by Dean Jackson.

Block selection is disabled. Removed code associated with this flag to allow removal of the
flag in UIKit.

No tests for a removed feature.

  • Platform/spi/ios/UIKitSPI.h:
  • Shared/ios/GestureTypes.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(toUIWKSelectionFlags):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
(WebKit::WebPage::updateBlockSelectionWithTouch):
(WebKit::WebPage::updateSelectionWithTouches):

Location:
trunk/Source/WebKit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r221433 r221443  
     12017-08-30  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Remove IsBlockSelection flag
     4        https://bugs.webkit.org/show_bug.cgi?id=176141
     5
     6        Reviewed by Dean Jackson.
     7
     8        Block selection is disabled. Removed code associated with this flag to allow removal of the
     9        flag in UIKit.
     10       
     11        No tests for a removed feature.
     12
     13        * Platform/spi/ios/UIKitSPI.h:
     14        * Shared/ios/GestureTypes.h:
     15        * UIProcess/ios/WKContentViewInteraction.mm:
     16        (toUIWKSelectionFlags):
     17        * WebProcess/WebPage/ios/WebPageIOS.mm:
     18        (WebKit::WebPage::rangeForWebSelectionAtPosition):
     19        (WebKit::WebPage::selectWithGesture):
     20        (WebKit::WebPage::contractedRangeFromHandle):
     21        (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
     22        (WebKit::WebPage::updateBlockSelectionWithTouch):
     23        (WebKit::WebPage::updateSelectionWithTouches):
     24
    1252017-08-30  Alex Christensen  <achristensen@webkit.org>
    226
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r221187 r221443  
    508508    UIWKNone = 0,
    509509    UIWKWordIsNearTap = 1,
    510     UIWKIsBlockSelection = 2,
    511510    UIWKPhraseBoundaryChanged = 4,
    512511};
  • trunk/Source/WebKit/Shared/ios/GestureTypes.h

    r167096 r221443  
    7474    None = 0,
    7575    WordIsNearTap = 1 << 0,
    76     IsBlockSelection = 1 << 1,
    77     PhraseBoundaryChanged = 1 << 2,
     76    PhraseBoundaryChanged = 1 << 1,
    7877};
    7978
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r221415 r221443  
    24632463    if (flags & WordIsNearTap)
    24642464        uiFlags |= UIWKWordIsNearTap;
    2465     if (flags & IsBlockSelection)
    2466         uiFlags |= UIWKIsBlockSelection;
    24672465    if (flags & PhraseBoundaryChanged)
    24682466        uiFlags |= UIWKPhraseBoundaryChanged;
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r221281 r221443  
    10171017        return nullptr;
    10181018
    1019     flags = IsBlockSelection;
    10201019    range = Range::create(bestChoice->document());
    10211020    range->selectNodeContents(*bestChoice);
     
    11731172        }
    11741173        range = rangeForWebSelectionAtPosition(point, position, flags);
    1175         if (wkGestureState == GestureRecognizerState::Ended && flags & IsBlockSelection)
    1176             m_currentBlockSelection = range;
    11771174        break;
    11781175
     
    14301427    IntRect currentBox = selectionBoxForRange(&currentRange);
    14311428    IntPoint edgeCenter = computeEdgeCenter(currentBox, handlePosition);
    1432     flags = IsBlockSelection;
    14331429
    14341430    float maxDistance;
     
    16141610        growThreshold = maxThreshold;
    16151611
    1616     if (flags & IsBlockSelection && areRangesEqual(contractedRange.get(), currentRange.get()))
    1617         shrinkThreshold = minThreshold;
    16181612}
    16191613
     
    16561650    float growThreshold = 0;
    16571651    float shrinkThreshold = 0;
    1658     SelectionFlags flags = IsBlockSelection;
     1652    SelectionFlags flags = None;
    16591653
    16601654    switch (static_cast<SelectionTouch>(touch)) {
     
    17631757        if (shouldSwitchToBlockModeForHandle(pointInDocument, handlePosition)) {
    17641758            range = switchToBlockSelectionAtPoint(pointInDocument, handlePosition);
    1765             flags = IsBlockSelection;
    17661759        } else
    17671760            range = rangeForPosition(&frame, position, baseIsStart);
    17681761        break;
    17691762    }
    1770     if (range && flags != IsBlockSelection)
     1763    if (range)
    17711764        frame.selection().setSelectedRange(range.get(), position.affinity(), true, UserTriggered);
    17721765
    17731766    send(Messages::WebPageProxy::TouchesCallback(point, touches, flags, callbackID));
    1774     if (range && flags == IsBlockSelection) {
    1775         // We just switched to block selection therefore we need to compute the thresholds.
    1776         m_currentBlockSelection = range;
    1777         frame.selection().setSelectedRange(range.get(), position.affinity(), true, UserTriggered);
    1778        
    1779         float growThreshold = 0;
    1780         float shrinkThreshold = 0;
    1781         computeExpandAndShrinkThresholdsForHandle(point, handlePosition, growThreshold, shrinkThreshold);
    1782         send(Messages::WebPageProxy::DidUpdateBlockSelectionWithTouch(static_cast<uint32_t>(SelectionTouch::Started), static_cast<uint32_t>(IsBlockSelection), growThreshold, shrinkThreshold));
    1783     }
    17841767}
    17851768
Note: See TracChangeset for help on using the changeset viewer.