Title: [226877] branches/safari-605-branch/Source/WebKit
- Revision
- 226877
- Author
- jmarc...@apple.com
- Date
- 2018-01-11 22:31:22 -0800 (Thu, 11 Jan 2018)
Log Message
Cherry-pick r226826. rdar://problem/36458927
Modified Paths
Diff
Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (226876 => 226877)
--- branches/safari-605-branch/Source/WebKit/ChangeLog 2018-01-12 06:31:19 UTC (rev 226876)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog 2018-01-12 06:31:22 UTC (rev 226877)
@@ -1,5 +1,27 @@
2018-01-11 Jason Marcell <jmarc...@apple.com>
+ Cherry-pick r226826. rdar://problem/36458927
+
+ 2018-01-11 Megan Gardner <megan_gard...@apple.com>
+
+ Implement MultiDocument protocol for restoring focus to a WKWebView
+ https://bugs.webkit.org/show_bug.cgi?id=181510
+
+ Reviewed by Dan Bernstein.
+
+ Support the UIKit protocol for restoring focus to a what previously had focus.
+ WebKit already has a method to silently remove and replace focus, without telling the
+ web process about the unfocus and refocusing, so we're just using that.
+
+ * Platform/spi/ios/UIKitSPI.h:
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _restoreFocusWithToken:]):
+ (-[WKContentView _preserveFocusWithToken:destructively:]):
+
+
+2018-01-11 Jason Marcell <jmarc...@apple.com>
+
Cherry-pick r226753. rdar://problem/36429138
2018-01-10 Wenson Hsieh <wenson_hs...@apple.com>
Modified: branches/safari-605-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h (226876 => 226877)
--- branches/safari-605-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2018-01-12 06:31:19 UTC (rev 226876)
+++ branches/safari-605-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2018-01-12 06:31:22 UTC (rev 226877)
@@ -378,6 +378,12 @@
@interface UITextInputTraits : NSObject <UITextInputTraits, UITextInputTraits_Private, NSCopying>
@end
+@protocol UITextInputMultiDocument <NSObject>
+@optional
+- (void)_restoreFocusWithToken:(id <NSCopying, NSSecureCoding>)token completion:(void (^)(BOOL didRestore))completion;
+- (void)_preserveFocusWithToken:(id <NSCopying, NSSecureCoding>)token destructively:(BOOL)destructively;
+@end
+
@interface UITextInteractionAssistant : NSObject
@end
Modified: branches/safari-605-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (226876 => 226877)
--- branches/safari-605-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2018-01-12 06:31:19 UTC (rev 226876)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2018-01-12 06:31:22 UTC (rev 226877)
@@ -242,7 +242,7 @@
@end
-@interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UIWebTouchEventsGestureRecognizerDelegate, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWKInteractionViewProtocol, WKFileUploadPanelDelegate, WKActionSheetAssistantDelegate, UITextAutoscrolling
+@interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UITextAutoscrolling, UITextInputMultiDocument, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWebTouchEventsGestureRecognizerDelegate, UIWKInteractionViewProtocol, WKActionSheetAssistantDelegate, WKFileUploadPanelDelegate
#if ENABLE(DATA_INTERACTION)
, UIDragInteractionDelegate, UIDropInteractionDelegate
#endif
Modified: branches/safari-605-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (226876 => 226877)
--- branches/safari-605-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2018-01-12 06:31:19 UTC (rev 226876)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2018-01-12 06:31:22 UTC (rev 226877)
@@ -4073,6 +4073,18 @@
_fileUploadPanel = nil;
}
+#pragma mark - UITextInputMultiDocument
+
+- (void)_restoreFocusWithToken:(id <NSCopying, NSSecureCoding>)token
+{
+ --_webView->_activeFocusedStateRetainCount;
+}
+
+- (void)_preserveFocusWithToken:(id <NSCopying, NSSecureCoding>)token destructively:(BOOL)destructively
+{
+ ++_webView->_activeFocusedStateRetainCount;
+}
+
#pragma mark - Implementation of UIWebTouchEventsGestureRecognizerDelegate.
// FIXME: Remove once -gestureRecognizer:shouldIgnoreWebTouchWithEvent: is in UIWebTouchEventsGestureRecognizer.h. Refer to <rdar://problem/33217525> for more details.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes