Changeset 221443 in webkit
- Timestamp:
- Aug 31, 2017, 2:13:38 PM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r221433 r221443 1 2017-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 1 25 2017-08-30 Alex Christensen <achristensen@webkit.org> 2 26 -
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
r221187 r221443 508 508 UIWKNone = 0, 509 509 UIWKWordIsNearTap = 1, 510 UIWKIsBlockSelection = 2,511 510 UIWKPhraseBoundaryChanged = 4, 512 511 }; -
trunk/Source/WebKit/Shared/ios/GestureTypes.h
r167096 r221443 74 74 None = 0, 75 75 WordIsNearTap = 1 << 0, 76 IsBlockSelection = 1 << 1, 77 PhraseBoundaryChanged = 1 << 2, 76 PhraseBoundaryChanged = 1 << 1, 78 77 }; 79 78 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r221415 r221443 2463 2463 if (flags & WordIsNearTap) 2464 2464 uiFlags |= UIWKWordIsNearTap; 2465 if (flags & IsBlockSelection)2466 uiFlags |= UIWKIsBlockSelection;2467 2465 if (flags & PhraseBoundaryChanged) 2468 2466 uiFlags |= UIWKPhraseBoundaryChanged; -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r221281 r221443 1017 1017 return nullptr; 1018 1018 1019 flags = IsBlockSelection;1020 1019 range = Range::create(bestChoice->document()); 1021 1020 range->selectNodeContents(*bestChoice); … … 1173 1172 } 1174 1173 range = rangeForWebSelectionAtPosition(point, position, flags); 1175 if (wkGestureState == GestureRecognizerState::Ended && flags & IsBlockSelection)1176 m_currentBlockSelection = range;1177 1174 break; 1178 1175 … … 1430 1427 IntRect currentBox = selectionBoxForRange(¤tRange); 1431 1428 IntPoint edgeCenter = computeEdgeCenter(currentBox, handlePosition); 1432 flags = IsBlockSelection;1433 1429 1434 1430 float maxDistance; … … 1614 1610 growThreshold = maxThreshold; 1615 1611 1616 if (flags & IsBlockSelection && areRangesEqual(contractedRange.get(), currentRange.get()))1617 shrinkThreshold = minThreshold;1618 1612 } 1619 1613 … … 1656 1650 float growThreshold = 0; 1657 1651 float shrinkThreshold = 0; 1658 SelectionFlags flags = IsBlockSelection;1652 SelectionFlags flags = None; 1659 1653 1660 1654 switch (static_cast<SelectionTouch>(touch)) { … … 1763 1757 if (shouldSwitchToBlockModeForHandle(pointInDocument, handlePosition)) { 1764 1758 range = switchToBlockSelectionAtPoint(pointInDocument, handlePosition); 1765 flags = IsBlockSelection;1766 1759 } else 1767 1760 range = rangeForPosition(&frame, position, baseIsStart); 1768 1761 break; 1769 1762 } 1770 if (range && flags != IsBlockSelection)1763 if (range) 1771 1764 frame.selection().setSelectedRange(range.get(), position.affinity(), true, UserTriggered); 1772 1765 1773 1766 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 }1784 1767 } 1785 1768
Note:
See TracChangeset
for help on using the changeset viewer.