Title: [196037] trunk/Source/WebKit2
- Revision
- 196037
- Author
- [email protected]
- Date
- 2016-02-02 16:09:33 -0800 (Tue, 02 Feb 2016)
Log Message
Provide handleKeyWebEvent with completion handler.
https://bugs.webkit.org/show_bug.cgi?id=153806
rdar://problem/24399218
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (196036 => 196037)
--- trunk/Source/WebKit2/ChangeLog 2016-02-03 00:08:33 UTC (rev 196036)
+++ trunk/Source/WebKit2/ChangeLog 2016-02-03 00:09:33 UTC (rev 196037)
@@ -1,3 +1,16 @@
+2016-02-02 Enrica Casucci <[email protected]>
+
+ Provide handleKeyWebEvent with completion handler.
+ https://bugs.webkit.org/show_bug.cgi?id=153806
+ rdar://problem/24399218
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
+ (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
+
2016-02-02 Alex Christensen <[email protected]>
Fix authentication with NetworkSession
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (196036 => 196037)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2016-02-03 00:08:33 UTC (rev 196036)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h 2016-02-03 00:09:33 UTC (rev 196037)
@@ -70,6 +70,7 @@
typedef void (^UIWKDictationContextHandler)(NSString *selectedText, NSString *beforeText, NSString *afterText);
typedef void (^UIWKSelectionCompletionHandler)(void);
typedef void (^UIWKSelectionWithDirectionCompletionHandler)(BOOL selectionEndIsMoving);
+typedef void (^UIWKKeyWebEventCompletionHandler)(WebIOSEvent *theEvent, BOOL wasHandled);
namespace WebKit {
struct WKSelectionDrawingInfo {
@@ -142,6 +143,7 @@
WebKit::AssistedNodeInformation _assistedNodeInformation;
RetainPtr<NSObject<WKFormPeripheral>> _inputPeripheral;
RetainPtr<UIEvent> _uiEventBeingResent;
+ UIWKKeyWebEventCompletionHandler _keyWebEventHandler;
CGPoint _lastInteractionLocation;
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (196036 => 196037)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-02-03 00:08:33 UTC (rev 196036)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2016-02-03 00:09:33 UTC (rev 196037)
@@ -2870,8 +2870,21 @@
_page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent));
}
+- (void)handleKeyWebEvent:(WebIOSEvent *)theEvent withCompletionHandler:(void (^)(WebIOSEvent *theEvent, BOOL wasHandled))completionHandler
+{
+ _keyWebEventHandler = [completionHandler copy];
+ _page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent));
+}
+
- (void)_didHandleKeyEvent:(WebIOSEvent *)event eventWasHandled:(BOOL)eventWasHandled
{
+ if (_keyWebEventHandler) {
+ _keyWebEventHandler(event, eventWasHandled);
+ [_keyWebEventHandler release];
+ _keyWebEventHandler = nil;
+ return;
+ }
+
if (event.type == WebEventKeyDown) {
// FIXME: This is only for staging purposes.
if ([[UIKeyboardImpl sharedInstance] respondsToSelector:@selector(didHandleWebKeyEvent:)])
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes