Changeset 245067 in webkit
- Timestamp:
- May 8, 2019 1:50:22 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245062 r245067 1 2019-05-08 Tim Horton <timothy_horton@apple.com> 2 3 iOS: Selection is dismissed even if click is preventDefault()'d 4 https://bugs.webkit.org/show_bug.cgi?id=197686 5 <rdar://problem/49398824> 6 7 Reviewed by Wenson Hsieh. 8 9 * editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler-expected.txt: Added. 10 * editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html: Added. 11 * editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler-expected.txt: Added. 12 * editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html: Added. 13 New tests. 14 15 * platform/ios/editing/deleting/smart-delete-paragraph-003-expected.txt: 16 * platform/ios/editing/pasteboard/smart-paste-paragraph-003-expected.txt: 17 Rebaseline since we changed the timing of editing callbacks by changing where the selection happens. 18 1 19 2019-05-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 20 -
trunk/LayoutTests/platform/ios/editing/deleting/smart-delete-paragraph-003-expected.txt
r243296 r245067 1 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 2 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of BODY > HTML > #document to 3 of BODY > HTML > #document toDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment toDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment toDOMRange:range from 0 of #text > DIV > #document-fragment to 4 of #text > DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification8 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 6 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > #document-fragment to 15 of #text > DIV > #document-fragment -
trunk/LayoutTests/platform/ios/editing/pasteboard/smart-paste-paragraph-003-expected.txt
r243124 r245067 1 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 2 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of BODY > HTML > #document to 3 of BODY > HTML > #document toDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 4 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment toDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > #document-fragment to 0 of DIV > #document-fragment toDOMRange:range from 0 of #text > DIV > #document-fragment to 4 of #text > DIV > #document-fragment affinity:NSSelectionAffinityDownstream stillSelecting:FALSE7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification8 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/Source/WebKit/ChangeLog
r245065 r245067 1 2019-05-08 Tim Horton <timothy_horton@apple.com> 2 3 iOS: Selection is dismissed even if click is preventDefault()'d 4 https://bugs.webkit.org/show_bug.cgi?id=197686 5 <rdar://problem/49398824> 6 7 Reviewed by Wenson Hsieh. 8 9 We currently unconditionally dismiss the selection on any tap; however 10 if a site preventDefault()s on click, we shouldn't perform the default 11 action of dismissing the selection. 12 13 Instead of clearing the selection in the UI process, clear it in the 14 Web content process if we don't dispatch a synthetic click; the normal 15 WebCore machinery will handle it in the case that we do. 16 17 * UIProcess/ios/WKContentViewInteraction.mm: 18 (-[WKContentView _singleTapRecognized:]): 19 * WebProcess/WebPage/WebPage.h: 20 * WebProcess/WebPage/ios/WebPageIOS.mm: 21 (WebKit::WebPage::commitPotentialTapFailed): 22 (WebKit::WebPage::selectWithGesture): 23 (WebKit::WebPage::clearSelection): 24 (WebKit::WebPage::selectTextWithGranularityAtPoint): 25 1 26 2019-05-08 Alexander Mikhaylenko <exalm7659@gmail.com> 2 27 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r245062 r245067 2349 2349 ASSERT(_potentialTapInProgress); 2350 2350 2351 // We don't want to clear the selection if it is in editable content.2352 // The selection could have been set by autofocusing on page load and not2353 // reflected in the UI process since the user was not interacting with the page.2354 if (!_page->editorState().isContentEditable)2355 _page->clearSelection();2356 2357 2351 _lastInteractionLocation = gestureRecognizer.location; 2358 2352 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r245062 r245067 1819 1819 WebCore::FloatSize m_availableScreenSize; 1820 1820 WebCore::FloatSize m_overrideScreenSize; 1821 RefPtr<WebCore::Range> m_currentBlockSelection;1822 1821 WebCore::IntRect m_blockRectForTextSelection; 1823 1822 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r245062 r245067 948 948 void WebPage::commitPotentialTapFailed() 949 949 { 950 if (!m_page->focusController().focusedOrMainFrame().selection().selection().isContentEditable()) 951 clearSelection(); 952 950 953 send(Messages::WebPageProxy::CommitPotentialTapFailed()); 951 954 send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(m_potentialTapLocation))); … … 1368 1371 m_blockSelectionDesiredSize.setWidth(blockSelectionStartWidth); 1369 1372 m_blockSelectionDesiredSize.setHeight(blockSelectionStartHeight); 1370 m_currentBlockSelection = nullptr;1371 1373 } 1372 1374 range = rangeForWebSelectionAtPosition(point, position, flags); … … 1500 1502 { 1501 1503 m_startingGestureRange = nullptr; 1502 m_currentBlockSelection = nullptr;1503 1504 m_page->focusController().focusedOrMainFrame().selection().clear(); 1504 1505 } … … 1959 1960 m_blockSelectionDesiredSize.setWidth(blockSelectionStartWidth); 1960 1961 m_blockSelectionDesiredSize.setHeight(blockSelectionStartHeight); 1961 m_currentBlockSelection = nullptr;1962 1962 auto* renderer = range ? range->startContainer().renderer() : nullptr; 1963 1963 if (renderer && renderer->style().preserveNewline())
Note: See TracChangeset
for help on using the changeset viewer.