[iOS DnD] [WK2] Add SPI to enable, disable, or follow default behavior for DnD on...
[WebKit.git] / Source / WebKit2 / UIProcess / API / Cocoa / WKWebViewPrivate.h
1 /*
2  * Copyright (C) 2014 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #import <WebKit/WKWebView.h>
27
28 #if WK_API_ENABLED
29
30 #import <WebKit/_WKActivatedElementInfo.h>
31 #import <WebKit/_WKFindOptions.h>
32 #import <WebKit/_WKLayoutMode.h>
33 #import <WebKit/_WKRenderingProgressEvents.h>
34
35 typedef NS_ENUM(NSInteger, _WKPaginationMode) {
36     _WKPaginationModeUnpaginated,
37     _WKPaginationModeLeftToRight,
38     _WKPaginationModeRightToLeft,
39     _WKPaginationModeTopToBottom,
40     _WKPaginationModeBottomToTop,
41 } WK_API_AVAILABLE(macosx(10.10), ios(8.0));
42
43 typedef NS_OPTIONS(NSInteger, _WKMediaCaptureState) {
44     _WKMediaCaptureStateNone = 0,
45     _WKMediaCaptureStateActiveMicrophone = 1 << 0,
46     _WKMediaCaptureStateActiveCamera = 1 << 1,
47     _WKMediaCaptureStateMutedMicrophone = 1 << 2,
48     _WKMediaCaptureStateMutedCamera = 1 << 3,
49 } WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
50
51 typedef NS_OPTIONS(NSInteger, _WKMediaMutedState) {
52     _WKMediaNoneMuted = 0,
53     _WKMediaAudioMuted = 1 << 0,
54     _WKMediaCaptureDevicesMuted = 1 << 1,
55 } WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
56
57 typedef NS_OPTIONS(NSUInteger, _WKCaptureDevices) {
58     _WKCaptureDeviceMicrophone = 1 << 0,
59     _WKCaptureDeviceCamera = 1 << 1,
60 } WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
61
62 #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
63
64 typedef NS_ENUM(NSUInteger, _WKDragInteractionPolicy) {
65     _WKDragInteractionPolicyDefault = 0,
66     _WKDragInteractionPolicyAlwaysEnable,
67     _WKDragInteractionPolicyAlwaysDisable
68 } WK_API_AVAILABLE(ios(WK_IOS_TBA));
69
70 #endif
71
72 #if !TARGET_OS_IPHONE
73
74 typedef NS_ENUM(NSInteger, _WKImmediateActionType) {
75     _WKImmediateActionNone,
76     _WKImmediateActionLinkPreview,
77     _WKImmediateActionDataDetectedItem,
78     _WKImmediateActionLookupText,
79     _WKImmediateActionMailtoLink,
80     _WKImmediateActionTelLink
81 } WK_API_AVAILABLE(macosx(10.12));
82
83 #endif
84
85 @class WKBrowsingContextHandle;
86 @class _WKDraggableElementInfo;
87 @class _WKFrameHandle;
88 @class _WKHitTestResult;
89 @class _WKIconLoadingDelegate;
90 @class _WKRemoteObjectRegistry;
91 @class _WKSessionState;
92 @class _WKWebsitePolicies;
93 @class _WKWebViewPrintFormatter;
94
95 @protocol WKHistoryDelegatePrivate;
96 @protocol _WKDiagnosticLoggingDelegate;
97 @protocol _WKFindDelegate;
98 @protocol _WKIconLoadingDelegate;
99 @protocol _WKInputDelegate;
100 @protocol _WKFullscreenDelegate;
101
102 @interface WKWebView (WKPrivate)
103
104 // FIXME: This should return a _WKRemoteObjectRegistry *.
105 @property (nonatomic, readonly) id _remoteObjectRegistry;
106 @property (nonatomic, readonly) WKBrowsingContextHandle *_handle;
107
108 @property (nonatomic, setter=_setObservedRenderingProgressEvents:) _WKRenderingProgressEvents _observedRenderingProgressEvents;
109
110 @property (nonatomic, weak, setter=_setHistoryDelegate:) id <WKHistoryDelegatePrivate> _historyDelegate;
111 @property (nonatomic, weak, setter=_setIconLoadingDelegate:) id <_WKIconLoadingDelegate> _iconLoadingDelegate;
112
113 @property (nonatomic, readonly) NSURL *_unreachableURL;
114
115 - (void)_loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL;
116 - (WKNavigation *)_loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL userData:(id)userData WK_API_AVAILABLE(macosx(10.12), ios(10.0));
117 - (WKNavigation *)_loadRequest:(NSURLRequest *)request shouldOpenExternalURLs:(BOOL)shouldOpenExternalURLs WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
118
119 @property (nonatomic, readonly) NSArray *_certificateChain WK_API_DEPRECATED_WITH_REPLACEMENT("certificateChain", macosx(10.10, 10.11), ios(8.0, 9.0));
120 @property (nonatomic, readonly) NSURL *_committedURL;
121 @property (nonatomic, readonly) NSString *_MIMEType;
122 @property (nonatomic, readonly) NSString *_userAgent WK_API_AVAILABLE(macosx(10.11), ios(9.0));
123
124 @property (copy, setter=_setApplicationNameForUserAgent:) NSString *_applicationNameForUserAgent;
125 @property (copy, setter=_setCustomUserAgent:) NSString *_customUserAgent;
126
127 @property (nonatomic, setter=_setUserContentExtensionsEnabled:) BOOL _userContentExtensionsEnabled WK_API_AVAILABLE(macosx(10.11), ios(9.0));
128
129 @property (nonatomic, readonly) pid_t _webProcessIdentifier;
130
131 @property (nonatomic, getter=_isEditable, setter=_setEditable:) BOOL _editable WK_API_AVAILABLE(macosx(10.11), ios(9.0));
132
133 // FIXME: Remove these once nobody is using them.
134 @property (nonatomic, readonly) NSData *_sessionStateData;
135 - (void)_restoreFromSessionStateData:(NSData *)sessionStateData;
136
137 @property (nonatomic, readonly) _WKSessionState *_sessionState;
138 - (WKNavigation *)_restoreSessionState:(_WKSessionState *)sessionState andNavigate:(BOOL)navigate;
139 - (_WKSessionState *)_sessionStateWithFilter:(BOOL (^)(WKBackForwardListItem *item))filter;
140
141 @property (nonatomic, setter=_setAllowsRemoteInspection:) BOOL _allowsRemoteInspection;
142 @property (nonatomic, copy, setter=_setRemoteInspectionNameOverride:) NSString *_remoteInspectionNameOverride WK_API_AVAILABLE(macosx(10.12), ios(10.0));
143
144 @property (nonatomic, setter=_setAddsVisitedLinks:) BOOL _addsVisitedLinks;
145
146 @property (nonatomic, readonly) BOOL _networkRequestsInProgress;
147
148 @property (nonatomic, readonly, getter=_isShowingNavigationGestureSnapshot) BOOL _showingNavigationGestureSnapshot;
149
150 - (void)_close;
151
152 - (void)_updateWebsitePolicies:(_WKWebsitePolicies *)websitePolicies WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
153
154 - (void)_evaluateJavaScriptWithoutUserGesture:(NSString *)javaScriptString completionHandler:(void (^)(id, NSError *))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
155
156 @property (nonatomic, setter=_setLayoutMode:) _WKLayoutMode _layoutMode;
157 // For use with _layoutMode = _WKLayoutModeFixedSize:
158 @property (nonatomic, setter=_setFixedLayoutSize:) CGSize _fixedLayoutSize;
159
160 @property (nonatomic, setter=_setViewportSizeForCSSViewportUnits:) CGSize _viewportSizeForCSSViewportUnits WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
161
162 @property (nonatomic, setter=_setViewScale:) CGFloat _viewScale;
163
164 #if TARGET_OS_IPHONE
165 // DERECATED: The setters of the three following function are deprecated, please use overrideLayoutParameters.
166 // Define the smallest size a page take with a regular viewport.
167 @property (nonatomic, readonly) CGSize _minimumLayoutSizeOverride;
168 // Define the largest size the unobscured area can get for the current view bounds. This value is used to define viewport units.
169 @property (nonatomic, readonly) CGSize _maximumUnobscuredSizeOverride;
170
171 // Define the inset of the scrollview unusable by the web page.
172 @property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
173
174 @property (nonatomic, setter=_setUnobscuredSafeAreaInsets:) UIEdgeInsets _unobscuredSafeAreaInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
175 @property (nonatomic, readonly) BOOL _safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
176 @property (nonatomic, setter=_setObscuredInsetEdgesAffectedBySafeArea:) UIRectEdge _obscuredInsetEdgesAffectedBySafeArea WK_API_AVAILABLE(ios(WK_IOS_TBA));
177
178 // An ancestor view whose bounds will be intersected with those of this WKWebView to determine the visible region of content to render.
179 @property (nonatomic, readonly) UIView *_enclosingViewForExposedRectComputation WK_API_AVAILABLE(ios(WK_IOS_TBA));
180
181 // Override the interface orientation. Clients using _beginAnimatedResizeWithUpdates: must update the interface orientation
182 // in the update block.
183 @property (nonatomic, setter=_setInterfaceOrientationOverride:) UIInterfaceOrientation _interfaceOrientationOverride;
184
185 @property (nonatomic, setter=_setAllowsViewportShrinkToFit:) BOOL _allowsViewportShrinkToFit;
186
187 @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
188
189 // FIXME: Remove these three properties once we expose WKWebViewContentProvider as API.
190 @property (nonatomic, readonly, getter=_isDisplayingPDF) BOOL _displayingPDF;
191 @property (nonatomic, readonly) NSData *_dataForDisplayedPDF;
192 // FIXME: This can be removed once WKNavigation's response property is implemented.
193 @property (nonatomic, readonly) NSString *_suggestedFilenameForDisplayedPDF;
194
195 @property (nonatomic, readonly) _WKWebViewPrintFormatter *_webViewPrintFormatter;
196
197 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
198 @property (nonatomic, setter=_setDragInteractionPolicy:) _WKDragInteractionPolicy _dragInteractionPolicy WK_API_AVAILABLE(ios(WK_IOS_TBA));
199 #endif
200
201 - (void)_beginInteractiveObscuredInsetsChange;
202 - (void)_endInteractiveObscuredInsetsChange;
203 - (void)_hideContentUntilNextUpdate;
204
205 - (void)_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock;
206 - (void)_endAnimatedResize;
207 - (void)_resizeWhileHidingContentWithUpdates:(void (^)(void))updateBlock;
208
209 - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler;
210
211 // Deprecated: Use [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:] instead.
212 // This function is kept for binary compatibility with iOS 8.0, it can be removed after the bincompat window.
213 - (void)_overrideLayoutParametersWithMinimumLayoutSize:(CGSize)minimumLayoutSize minimumLayoutSizeForMinimalUI:(CGSize)minimumLayoutSizeForMinimalUI maximumUnobscuredSizeOverride:(CGSize)maximumUnobscuredSizeOverride WK_API_DEPRECATED_WITH_REPLACEMENT("-_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:", ios(8.0, 9.0));
214
215 - (void)_overrideLayoutParametersWithMinimumLayoutSize:(CGSize)minimumLayoutSize maximumUnobscuredSizeOverride:(CGSize)maximumUnobscuredSizeOverride WK_API_AVAILABLE(ios(9_0));
216
217 - (void)_clearOverrideLayoutParameters WK_API_AVAILABLE(ios(WK_IOS_TBA));
218 - (void)_clearInterfaceOrientationOverride WK_API_AVAILABLE(ios(WK_IOS_TBA));
219
220 - (UIView *)_viewForFindUI;
221
222 - (void)_setOverlaidAccessoryViewsInset:(CGSize)inset;
223
224 - (void)_killWebContentProcess;
225 - (void)_didRelaunchProcess;
226
227 // Puts the view into a state where being taken out of the view hierarchy and resigning first responder
228 // will not count as becoming inactive and unfocused. The returned block must be called to exit the state.
229 - (void (^)(void))_retainActiveFocusedState WK_API_AVAILABLE(ios(9_0));
230
231 - (void)_becomeFirstResponderWithSelectionMovingForward:(BOOL)selectingForward completionHandler:(void (^)(BOOL didBecomeFirstResponder))completionHandler WK_API_AVAILABLE(ios(9_0));
232
233 - (id)_snapshotLayerContentsForBackForwardListItem:(WKBackForwardListItem *)item WK_API_AVAILABLE(ios(9_0));
234 - (NSArray *)_dataDetectionResults;
235
236 - (void)_accessibilityRetrieveSpeakSelectionContent WK_API_AVAILABLE(ios(WK_IOS_TBA));
237 - (void)_accessibilityDidGetSpeakSelectionContent:(NSString *)content WK_API_AVAILABLE(ios(WK_IOS_TBA));
238
239 #else
240 @property (readonly) NSColor *_pageExtendedBackgroundColor;
241 @property (nonatomic, setter=_setDrawsBackground:) BOOL _drawsBackground;
242 @property (nonatomic, setter=_setTopContentInset:) CGFloat _topContentInset;
243
244 @property (nonatomic, setter=_setAutomaticallyAdjustsContentInsets:) BOOL _automaticallyAdjustsContentInsets;
245
246 // Default value is 0. A value of 0 means the window's backing scale factor will be used and automatically update when the window moves screens.
247 @property (nonatomic, setter=_setOverrideDeviceScaleFactor:) CGFloat _overrideDeviceScaleFactor WK_API_AVAILABLE(macosx(10.11));
248
249 @property (nonatomic, setter=_setWindowOcclusionDetectionEnabled:) BOOL _windowOcclusionDetectionEnabled;
250
251 - (void)_setShouldSuppressFirstResponderChanges:(BOOL)shouldSuppress;
252
253 // Clients that want to maintain default behavior can return nil. To disable the immediate action entirely, return NSNull. And to
254 // do something custom, return an object that conforms to the NSImmediateActionAnimationController protocol.
255 - (id)_immediateActionAnimationControllerForHitTestResult:(_WKHitTestResult *)hitTestResult withType:(_WKImmediateActionType)type userData:(id<NSSecureCoding>)userData;
256
257 @property (nonatomic, setter=_setMinimumLayoutWidth:) CGFloat _minimumLayoutWidth WK_API_AVAILABLE(macosx(10.12));
258
259 // When using _minimumLayoutWidth, the web content will lay out to the intrinsic height
260 // of the content; use this property to force it to lay out to the height of the view instead.
261 @property (nonatomic, setter=_setShouldExpandContentToViewHeightForAutoLayout:) BOOL _shouldExpandContentToViewHeightForAutoLayout WK_API_AVAILABLE(macosx(10.12));
262
263 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo;
264 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macosx(10.12), ios(10.0));
265
266 // FIXME: This SPI should become a part of the WKUIDelegate. rdar://problem/26561537
267 @property (nonatomic, readwrite, setter=_setWantsMediaPlaybackControlsView:) BOOL _wantsMediaPlaybackControlsView WK_API_AVAILABLE(macosx(10.12.3));
268 @property (nonatomic, readonly) id _mediaPlaybackControlsView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
269 - (void)_addMediaPlaybackControlsView:(id)mediaPlaybackControlsView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
270 - (void)_removeMediaPlaybackControlsView WK_API_AVAILABLE(macosx(10.12.3));
271
272 - (void)_prepareForMoveToWindow:(NSWindow *)targetWindow completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
273
274 #endif
275
276 - (WKNavigation *)_reloadWithoutContentBlockers WK_API_AVAILABLE(macosx(10.12), ios(10.0));
277 - (WKNavigation *)_reloadExpiredOnly WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
278
279 - (void)_killWebContentProcessAndResetState;
280
281 - (void)_getMainResourceDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler;
282 - (void)_getWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler;
283 - (void)_getContentsAsStringWithCompletionHandler:(void (^)(NSString *, NSError *))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
284
285 @property (nonatomic, setter=_setPaginationMode:) _WKPaginationMode _paginationMode;
286 // Whether the column-break-{before,after} properties are respected instead of the
287 // page-break-{before,after} properties.
288 @property (nonatomic, setter=_setPaginationBehavesLikeColumns:) BOOL _paginationBehavesLikeColumns;
289 // Set to 0 to have the page length equal the view length.
290 @property (nonatomic, setter=_setPageLength:) CGFloat _pageLength;
291 @property (nonatomic, setter=_setGapBetweenPages:) CGFloat _gapBetweenPages;
292 @property (nonatomic, setter=_setPaginationLineGridEnabled:) BOOL _paginationLineGridEnabled;
293 @property (readonly) NSUInteger _pageCount;
294
295 @property (nonatomic, readonly) BOOL _supportsTextZoom;
296 @property (nonatomic, setter=_setTextZoomFactor:) double _textZoomFactor;
297 @property (nonatomic, setter=_setPageZoomFactor:) double _pageZoomFactor;
298
299 @property (nonatomic, weak, setter=_setDiagnosticLoggingDelegate:) id <_WKDiagnosticLoggingDelegate> _diagnosticLoggingDelegate WK_API_AVAILABLE(macosx(10.11), ios(9.0));
300 @property (nonatomic, weak, setter=_setFindDelegate:) id <_WKFindDelegate> _findDelegate;
301 - (void)_findString:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount;
302 - (void)_countStringMatches:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount;
303 - (void)_hideFindUI;
304
305 @property (nonatomic, weak, setter=_setInputDelegate:) id <_WKInputDelegate> _inputDelegate WK_API_AVAILABLE(macosx(10.12), ios(10.0));
306
307 @property (nonatomic, readonly, getter=_isDisplayingStandaloneImageDocument) BOOL _displayingStandaloneImageDocument;
308 @property (nonatomic, readonly, getter=_isDisplayingStandaloneMediaDocument) BOOL _displayingStandaloneMediaDocument;
309
310 @property (nonatomic, setter=_setScrollPerformanceDataCollectionEnabled:) BOOL _scrollPerformanceDataCollectionEnabled WK_API_AVAILABLE(macosx(10.11), ios(9.0));
311 @property (nonatomic, readonly) NSArray *_scrollPerformanceData WK_API_AVAILABLE(macosx(10.11), ios(9.0));
312
313 - (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item WK_API_AVAILABLE(macosx(10.11), ios(9.0));
314
315 @property (nonatomic, getter=_allowsMediaDocumentInlinePlayback, setter=_setAllowsMediaDocumentInlinePlayback:) BOOL _allowsMediaDocumentInlinePlayback;
316
317 @property (nonatomic, readonly) BOOL _webProcessIsResponsive WK_API_AVAILABLE(macosx(10.12), ios(10.0));
318
319 @property (nonatomic, setter=_setFullscreenDelegate:) id<_WKFullscreenDelegate> _fullscreenDelegate WK_API_AVAILABLE(macosx(WK_MAC_TBA));
320 @property (nonatomic, readonly) BOOL _isInFullscreen WK_API_AVAILABLE(macosx(10.12.3));
321
322 - (void)_muteMediaCapture WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
323 - (void)_setPageMuted:(_WKMediaMutedState)mutedState WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
324
325 @property (nonatomic, setter=_setMediaCaptureEnabled:) BOOL _mediaCaptureEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
326
327 @end
328
329 #if !TARGET_OS_IPHONE
330 @interface WKWebView (WKNSTextFinderClient) <NSTextFinderClient>
331 @end
332 #endif
333
334 @interface WKWebView (WKTesting)
335
336 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
337
338 #if TARGET_OS_IPHONE
339
340 @property (nonatomic, readonly) CGRect _contentVisibleRect WK_API_AVAILABLE(ios(10.0));
341 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point WK_API_AVAILABLE(ios(10.0));
342 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point WK_API_AVAILABLE(ios(10.0));
343
344 - (void)keyboardAccessoryBarNext WK_API_AVAILABLE(ios(10.0));
345 - (void)keyboardAccessoryBarPrevious WK_API_AVAILABLE(ios(10.0));
346 - (void)dismissFormAccessoryView WK_API_AVAILABLE(ios(10.3));
347 - (void)selectFormAccessoryPickerRow:(int)rowIndex WK_API_AVAILABLE(ios(10.3));
348
349 - (void)applyAutocorrection:(NSString *)newString toString:(NSString *)oldString withCompletionHandler:(void (^)())completionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));
350
351 - (void)didStartFormControlInteraction WK_API_AVAILABLE(ios(10.3));
352 - (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(10.3));
353
354 - (void)_didShowForcePressPreview WK_API_AVAILABLE(ios(10.3));
355 - (void)_didDismissForcePressPreview WK_API_AVAILABLE(ios(10.3));
356 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock WK_API_AVAILABLE(ios(10.3));
357
358 @property (nonatomic, readonly) NSArray<NSValue *> *_uiTextSelectionRects WK_API_AVAILABLE(ios(10.3));
359 @property (nonatomic, readonly) CGRect _uiTextCaretRect WK_API_AVAILABLE(ios(10.3));
360 @property (nonatomic, readonly) CGRect _inputViewBounds WK_API_AVAILABLE(ios(10.3));
361
362 @property (nonatomic, readonly) NSString *_scrollingTreeAsText WK_API_AVAILABLE(ios(10.3));
363
364 @property (nonatomic, readonly) NSNumber *_stableStateOverride WK_API_AVAILABLE(ios(10.3));
365
366 - (NSDictionary *)_propertiesOfLayerWithID:(unsigned long long)layerID WK_API_AVAILABLE(ios(WK_IOS_TBA));
367
368 - (void)_simulateDataInteractionEntered:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
369 - (NSUInteger)_simulateDataInteractionUpdated:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
370 - (void)_simulateDataInteractionPerformOperation:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
371 - (void)_simulateDataInteractionEnded:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
372 - (void)_simulateDataInteractionSessionDidEnd:(id)session WK_API_AVAILABLE(ios(WK_IOS_TBA));
373 - (void)_simulateWillBeginDataInteractionWithSession:(id)session WK_API_AVAILABLE(ios(WK_IOS_TBA));
374 - (NSArray *)_simulatedItemsForSession:(id)session WK_API_AVAILABLE(ios(WK_IOS_TBA));
375 - (void)_simulatePrepareForDataInteractionSession:(id)session completion:(dispatch_block_t)completion WK_API_AVAILABLE(ios(WK_IOS_TBA));
376 - (void)_simulateLongPressActionAtLocation:(CGPoint)location;
377
378 @property (nonatomic, readonly) CGRect _dragCaretRect WK_API_AVAILABLE(ios(WK_IOS_TBA));
379
380 - (_WKDraggableElementInfo *)_draggableElementAtPosition:(CGPoint)position WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
381 - (void)_requestDraggableElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKDraggableElementInfo *))block WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
382
383 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block WK_API_AVAILABLE(ios(WK_IOS_TBA));
384
385 #endif // TARGET_OS_IPHONE
386
387 #if !TARGET_OS_IPHONE
388 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager WK_API_AVAILABLE(macosx(10.12));
389 - (void)_requestControlledElementID WK_API_AVAILABLE(macosx(10.12.3));
390 - (void)_handleControlledElementIDResponse:(NSString *)identifier WK_API_AVAILABLE(macosx(10.12.3));
391 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate WK_API_AVAILABLE(macosx(10.12.3));
392 - (void)_didHandleAcceptedCandidate WK_API_AVAILABLE(macosx(10.12.3));
393 - (void)_forceRequestCandidates WK_API_AVAILABLE(macosx(10.12.3));
394 - (void)_didUpdateCandidateListVisibility:(BOOL)visible WK_API_AVAILABLE(macosx(10.12.3));
395 @property (nonatomic, readonly) BOOL _shouldRequestCandidates WK_API_AVAILABLE(macosx(10.12.3));
396 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange WK_API_AVAILABLE(macosx(10.12.3));
397 - (NSRect)_candidateRect WK_API_AVAILABLE(macosx(WK_MAC_TBA));
398
399 - (void)_setHeaderBannerHeight:(int)height WK_API_AVAILABLE(macosx(10.12.3));
400 - (void)_setFooterBannerHeight:(int)height WK_API_AVAILABLE(macosx(10.12.3));
401 #endif
402
403 - (void)_requestActiveNowPlayingSessionInfo WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
404 - (void)_handleActiveNowPlayingSessionInfoResponse:(BOOL)hasActiveSession title:(NSString *)title duration:(double)duration elapsedTime:(double)elapsedTime WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
405
406 - (void)_setPageScale:(CGFloat)scale withOrigin:(CGPoint)origin WK_API_AVAILABLE(ios(10.3));
407 - (CGFloat)_pageScale WK_API_AVAILABLE(ios(10.3));
408
409 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(10.12), ios(10.0));
410 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
411 - (void)_doAfterNextVisibleContentRectUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
412
413 - (void)_disableBackForwardSnapshotVolatilityForTesting WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
414
415 @end
416
417 #endif