Changeset 226911 in webkit
- Timestamp:
- Jan 12, 2018, 1:32:17 PM (8 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Platform/spi/ios/UIKitSPI.h (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.h (modified) (1 diff)
-
UIProcess/ios/WKContentViewInteraction.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r226904 r226911 1 2018-01-12 Megan Gardner <megan_gardner@apple.com> 2 3 Implement MultiDocument protocol for restoring focus to a WKWebView 4 https://bugs.webkit.org/show_bug.cgi?id=181510 5 6 Reviewed by Dan Bernstein. 7 8 Support the UIKit protocol for restoring focus to a what previously had focus. 9 WebKit already knows what node was previously being focused by the DOM, we merely 10 need to be asked to turn the focus on again. 11 Resubmitting https://trac.webkit.org/changeset/226826 as it broke internal builds 12 13 * Platform/spi/ios/UIKitSPI.h: 14 * UIProcess/ios/WKContentViewInteraction.h: 15 * UIProcess/ios/WKContentViewInteraction.mm: 16 (-[WKContentView _restoreFocusWithToken:]): 17 (-[WKContentView _preserveFocusWithToken:destructively:]): 18 1 19 2018-01-12 Youenn Fablet <youenn@apple.com> 2 20 -
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
r226903 r226911 968 968 @end 969 969 970 #if __has_include(<UIKit/UITextInputMultiDocument.h>) 971 #import <UIKit/UITextAutofillSuggestion.h> 972 #else 973 @protocol UITextAutofillSuggestion <NSObject> 974 @optional 975 - (void)_restoreFocusWithToken:(id <NSCopying, NSSecureCoding>)token completion:(void (^)(BOOL didRestore))completion; 976 - (void)_preserveFocusWithToken:(id <NSCopying, NSSecureCoding>)token destructively:(BOOL)destructively; 977 @end 978 #endif 979 970 980 @interface UIResponder () 971 981 - (UIResponder *)firstResponder; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r226903 r226911 243 243 @end 244 244 245 @interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UI WebTouchEventsGestureRecognizerDelegate, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWKInteractionViewProtocol, WKFileUploadPanelDelegate, WKActionSheetAssistantDelegate, UITextAutoscrolling245 @interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UITextAutoscrolling, UITextInputMultiDocument, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWebTouchEventsGestureRecognizerDelegate, UIWKInteractionViewProtocol, WKActionSheetAssistantDelegate, WKFileUploadPanelDelegate 246 246 #if ENABLE(DATA_INTERACTION) 247 247 , UIDragInteractionDelegate, UIDropInteractionDelegate -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r226903 r226911 4128 4128 } 4129 4129 4130 #pragma mark - UITextInputMultiDocument 4131 4132 - (void)_restoreFocusWithToken:(id <NSCopying, NSSecureCoding>)token 4133 { 4134 --_webView->_activeFocusedStateRetainCount; 4135 } 4136 4137 - (void)_preserveFocusWithToken:(id <NSCopying, NSSecureCoding>)token destructively:(BOOL)destructively 4138 { 4139 ++_webView->_activeFocusedStateRetainCount; 4140 } 4141 4130 4142 #pragma mark - Implementation of UIWebTouchEventsGestureRecognizerDelegate. 4131 4143
Note:
See TracChangeset
for help on using the changeset viewer.