Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add support for recognizing data interaction gestures in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=167444 Reviewed by Beth Dakin. Source/WebCore: Minor tweaks to pasteboard code to support data interaction. * WebCore.xcodeproj/project.pbxproj: * platform/PlatformPasteboard.h: * platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::read): * platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::PlatformPasteboard): If the pasteboard is the special data interaction type, use the shared item provider pasteboard; otherwise, fall back to the general pasteboard. (WebCore::PlatformPasteboard::getTypes): Actually populate the list of available types using available pasteboardTypes. (WebCore::PlatformPasteboard::write): Add UTF8 plaintext type (kUTTypeUTF8PlainText) when vending data representations of rich text. * platform/ios/WebItemProviderPasteboard.mm: (-[WebItemProviderPasteboard setItems:]): (-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]): (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]): Move off of deprecated methods when retrieving and supplying data to the item provider pasteboard. * platform/spi/ios/UIKitSPI.h: Source/WebKit2: Adds a new data interaction gesture recognizer, responsible for determining when to begin data interaction. This is a new long press gesture recognizer that fires simultaneously with the existing long press gesture recognizers (for performing long-press actions, and for showing the tap highlight). Also tweaks logic for determining whether selection gesture recognizers should fire to account for data interaction -- in particular, we don't want selection gesture recognizers to cause the current selection to change while data interaction is possible. See -hasSelectablePositionAtPoint and -pointIsInAssistedNode for more details. * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didPerformDataInteractionControllerOperation): (WebKit::PageClientImpl::startDataInteractionWithImage): * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _createAndConfigureLongPressGestureRecognizer]): (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView resignFirstResponder]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView gestureRecognizerShouldBegin:]): (-[WKContentView hasSelectablePositionAtPoint:]): (-[WKContentView pointIsInDataInteractionContent:]): (-[WKContentView pointIsInAssistedNode:]): Canonical link: https://commits.webkit.org/184503@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
230 additions
and 25 deletions.
- +36 −0 Source/WebCore/ChangeLog
- +2 −2 Source/WebCore/WebCore.xcodeproj/project.pbxproj
- +1 −1 Source/WebCore/platform/PlatformPasteboard.h
- +7 −2 Source/WebCore/platform/ios/PasteboardIOS.mm
- +16 −1 Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
- +16 −12 Source/WebCore/platform/ios/WebItemProviderPasteboard.mm
- +33 −0 Source/WebKit2/ChangeLog
- +3 −1 Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
- +22 −1 Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
- +94 −5 Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -92,7 +92,7 @@ class PlatformPasteboard { | ||
RetainPtr<NSPasteboard> m_pasteboard; | ||
#endif | ||
#if PLATFORM(IOS) | ||
RetainPtr<id> m_pasteboard; | ||
#endif | ||
#if PLATFORM(GTK) | ||
GtkClipboard* m_clipboard; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.