9be9f0a4f79051f26482813481d6afd065a7195e
[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
63
64 typedef NS_ENUM(NSInteger, _WKImmediateActionType) {
65     _WKImmediateActionNone,
66     _WKImmediateActionLinkPreview,
67     _WKImmediateActionDataDetectedItem,
68     _WKImmediateActionLookupText,
69     _WKImmediateActionMailtoLink,
70     _WKImmediateActionTelLink
71 } WK_API_AVAILABLE(macosx(10.12));
72
73 #endif
74
75 @class WKBrowsingContextHandle;
76 @class _WKDraggableElementInfo;
77 @class _WKFrameHandle;
78 @class _WKHitTestResult;
79 @class _WKIconLoadingDelegate;
80 @class _WKRemoteObjectRegistry;
81 @class _WKSessionState;
82 @class _WKWebsitePolicies;
83 @class _WKWebViewPrintFormatter;
84
85 @protocol WKHistoryDelegatePrivate;
86 @protocol _WKDiagnosticLoggingDelegate;
87 @protocol _WKFindDelegate;
88 @protocol _WKIconLoadingDelegate;
89 @protocol _WKInputDelegate;
90 @protocol _WKFullscreenDelegate;
91
92 @interface WKWebView (WKPrivate)
93
94 // FIXME: This should return a _WKRemoteObjectRegistry *.
95 @property (nonatomic, readonly) id _remoteObjectRegistry;
96 @property (nonatomic, readonly) WKBrowsingContextHandle *_handle;
97
98 @property (nonatomic, setter=_setObservedRenderingProgressEvents:) _WKRenderingProgressEvents _observedRenderingProgressEvents;
99
100 @property (nonatomic, weak, setter=_setHistoryDelegate:) id <WKHistoryDelegatePrivate> _historyDelegate;
101 @property (nonatomic, weak, setter=_setIconLoadingDelegate:) id <_WKIconLoadingDelegate> _iconLoadingDelegate;
102
103 @property (nonatomic, readonly) NSURL *_unreachableURL;
104
105 - (void)_loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL;
106 - (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));
107 - (WKNavigation *)_loadRequest:(NSURLRequest *)request shouldOpenExternalURLs:(BOOL)shouldOpenExternalURLs WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
108
109 @property (nonatomic, readonly) NSArray *_certificateChain WK_API_DEPRECATED_WITH_REPLACEMENT("certificateChain", macosx(10.10, 10.11), ios(8.0, 9.0));
110 @property (nonatomic, readonly) NSURL *_committedURL;
111 @property (nonatomic, readonly) NSString *_MIMEType;
112 @property (nonatomic, readonly) NSString *_userAgent WK_API_AVAILABLE(macosx(10.11), ios(9.0));
113
114 @property (copy, setter=_setApplicationNameForUserAgent:) NSString *_applicationNameForUserAgent;
115 @property (copy, setter=_setCustomUserAgent:) NSString *_customUserAgent;
116
117 @property (nonatomic, setter=_setUserContentExtensionsEnabled:) BOOL _userContentExtensionsEnabled WK_API_AVAILABLE(macosx(10.11), ios(9.0));
118
119 @property (nonatomic, readonly) pid_t _webProcessIdentifier;
120
121 @property (nonatomic, getter=_isEditable, setter=_setEditable:) BOOL _editable WK_API_AVAILABLE(macosx(10.11), ios(9.0));
122
123 // FIXME: Remove these once nobody is using them.
124 @property (nonatomic, readonly) NSData *_sessionStateData;
125 - (void)_restoreFromSessionStateData:(NSData *)sessionStateData;
126
127 @property (nonatomic, readonly) _WKSessionState *_sessionState;
128 - (WKNavigation *)_restoreSessionState:(_WKSessionState *)sessionState andNavigate:(BOOL)navigate;
129 - (_WKSessionState *)_sessionStateWithFilter:(BOOL (^)(WKBackForwardListItem *item))filter;
130
131 @property (nonatomic, setter=_setAllowsRemoteInspection:) BOOL _allowsRemoteInspection;
132 @property (nonatomic, copy, setter=_setRemoteInspectionNameOverride:) NSString *_remoteInspectionNameOverride WK_API_AVAILABLE(macosx(10.12), ios(10.0));
133
134 @property (nonatomic, setter=_setAddsVisitedLinks:) BOOL _addsVisitedLinks;
135
136 @property (nonatomic, readonly) BOOL _networkRequestsInProgress;
137
138 @property (nonatomic, readonly, getter=_isShowingNavigationGestureSnapshot) BOOL _showingNavigationGestureSnapshot;
139
140 - (void)_close;
141
142 - (void)_updateWebsitePolicies:(_WKWebsitePolicies *)websitePolicies WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
143
144 - (void)_evaluateJavaScriptWithoutUserGesture:(NSString *)javaScriptString completionHandler:(void (^)(id, NSError *))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
145
146 @property (nonatomic, setter=_setLayoutMode:) _WKLayoutMode _layoutMode;
147 // For use with _layoutMode = _WKLayoutModeFixedSize:
148 @property (nonatomic, setter=_setFixedLayoutSize:) CGSize _fixedLayoutSize;
149
150 @property (nonatomic, setter=_setViewportSizeForCSSViewportUnits:) CGSize _viewportSizeForCSSViewportUnits WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
151
152 @property (nonatomic, setter=_setViewScale:) CGFloat _viewScale;
153
154 #if TARGET_OS_IPHONE
155 // DERECATED: The setters of the three following function are deprecated, please use overrideLayoutParameters.
156 // Define the smallest size a page take with a regular viewport.
157 @property (nonatomic, readonly) CGSize _minimumLayoutSizeOverride;
158 // Define the largest size the unobscured area can get for the current view bounds. This value is used to define viewport units.
159 @property (nonatomic, readonly) CGSize _maximumUnobscuredSizeOverride;
160
161 // Define the inset of the scrollview unusable by the web page.
162 @property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
163
164 @property (nonatomic, setter=_setUnobscuredSafeAreaInsets:) UIEdgeInsets _unobscuredSafeAreaInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
165 @property (nonatomic, readonly) BOOL _safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(WK_IOS_TBA));
166 @property (nonatomic, setter=_setObscuredInsetEdgesAffectedBySafeArea:) UIRectEdge _obscuredInsetEdgesAffectedBySafeArea WK_API_AVAILABLE(ios(WK_IOS_TBA));
167
168 // An ancestor view whose bounds will be intersected with those of this WKWebView to determine the visible region of content to render.
169 @property (nonatomic, readonly) UIView *_enclosingViewForExposedRectComputation WK_API_AVAILABLE(ios(WK_IOS_TBA));
170
171 // Override the interface orientation. Clients using _beginAnimatedResizeWithUpdates: must update the interface orientation
172 // in the update block.
173 @property (nonatomic, setter=_setInterfaceOrientationOverride:) UIInterfaceOrientation _interfaceOrientationOverride;
174
175 @property (nonatomic, setter=_setAllowsViewportShrinkToFit:) BOOL _allowsViewportShrinkToFit;
176
177 @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
178
179 // FIXME: Remove these three properties once we expose WKWebViewContentProvider as API.
180 @property (nonatomic, readonly, getter=_isDisplayingPDF) BOOL _displayingPDF;
181 @property (nonatomic, readonly) NSData *_dataForDisplayedPDF;
182 // FIXME: This can be removed once WKNavigation's response property is implemented.
183 @property (nonatomic, readonly) NSString *_suggestedFilenameForDisplayedPDF;
184
185 @property (nonatomic, readonly) _WKWebViewPrintFormatter *_webViewPrintFormatter;
186
187 - (void)_beginInteractiveObscuredInsetsChange;
188 - (void)_endInteractiveObscuredInsetsChange;
189 - (void)_hideContentUntilNextUpdate;
190
191 - (void)_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock;
192 - (void)_endAnimatedResize;
193 - (void)_resizeWhileHidingContentWithUpdates:(void (^)(void))updateBlock;
194
195 - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler;
196
197 // Deprecated: Use [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:] instead.
198 // This function is kept for binary compatibility with iOS 8.0, it can be removed after the bincompat window.
199 - (void)_overrideLayoutParametersWithMinimumLayoutSize:(CGSize)minimumLayoutSize minimumLayoutSizeForMinimalUI:(CGSize)minimumLayoutSizeForMinimalUI maximumUnobscuredSizeOverride:(CGSize)maximumUnobscuredSizeOverride WK_API_DEPRECATED_WITH_REPLACEMENT("-_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:", ios(8.0, 9.0));
200
201 - (void)_overrideLayoutParametersWithMinimumLayoutSize:(CGSize)minimumLayoutSize maximumUnobscuredSizeOverride:(CGSize)maximumUnobscuredSizeOverride WK_API_AVAILABLE(ios(9_0));
202
203 - (void)_clearOverrideLayoutParameters WK_API_AVAILABLE(ios(WK_IOS_TBA));
204 - (void)_clearInterfaceOrientationOverride WK_API_AVAILABLE(ios(WK_IOS_TBA));
205
206 - (UIView *)_viewForFindUI;
207
208 - (void)_setOverlaidAccessoryViewsInset:(CGSize)inset;
209
210 - (void)_killWebContentProcess;
211 - (void)_didRelaunchProcess;
212
213 // Puts the view into a state where being taken out of the view hierarchy and resigning first responder
214 // will not count as becoming inactive and unfocused. The returned block must be called to exit the state.
215 - (void (^)(void))_retainActiveFocusedState WK_API_AVAILABLE(ios(9_0));
216
217 - (void)_becomeFirstResponderWithSelectionMovingForward:(BOOL)selectingForward completionHandler:(void (^)(BOOL didBecomeFirstResponder))completionHandler WK_API_AVAILABLE(ios(9_0));
218
219 - (id)_snapshotLayerContentsForBackForwardListItem:(WKBackForwardListItem *)item WK_API_AVAILABLE(ios(9_0));
220 - (NSArray *)_dataDetectionResults;
221
222 - (void)_accessibilityRetrieveSpeakSelectionContent WK_API_AVAILABLE(ios(WK_IOS_TBA));
223 - (void)_accessibilityDidGetSpeakSelectionContent:(NSString *)content WK_API_AVAILABLE(ios(WK_IOS_TBA));
224
225 #else
226 @property (readonly) NSColor *_pageExtendedBackgroundColor;
227 @property (nonatomic, setter=_setDrawsBackground:) BOOL _drawsBackground;
228 @property (nonatomic, setter=_setTopContentInset:) CGFloat _topContentInset;
229
230 @property (nonatomic, setter=_setAutomaticallyAdjustsContentInsets:) BOOL _automaticallyAdjustsContentInsets;
231
232 // 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.
233 @property (nonatomic, setter=_setOverrideDeviceScaleFactor:) CGFloat _overrideDeviceScaleFactor WK_API_AVAILABLE(macosx(10.11));
234
235 @property (nonatomic, setter=_setWindowOcclusionDetectionEnabled:) BOOL _windowOcclusionDetectionEnabled;
236
237 - (void)_setShouldSuppressFirstResponderChanges:(BOOL)shouldSuppress;
238
239 // Clients that want to maintain default behavior can return nil. To disable the immediate action entirely, return NSNull. And to
240 // do something custom, return an object that conforms to the NSImmediateActionAnimationController protocol.
241 - (id)_immediateActionAnimationControllerForHitTestResult:(_WKHitTestResult *)hitTestResult withType:(_WKImmediateActionType)type userData:(id<NSSecureCoding>)userData;
242
243 @property (nonatomic, setter=_setMinimumLayoutWidth:) CGFloat _minimumLayoutWidth WK_API_AVAILABLE(macosx(10.12));
244
245 // When using _minimumLayoutWidth, the web content will lay out to the intrinsic height
246 // of the content; use this property to force it to lay out to the height of the view instead.
247 @property (nonatomic, setter=_setShouldExpandContentToViewHeightForAutoLayout:) BOOL _shouldExpandContentToViewHeightForAutoLayout WK_API_AVAILABLE(macosx(10.12));
248
249 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo;
250 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macosx(10.12), ios(10.0));
251
252 // FIXME: This SPI should become a part of the WKUIDelegate. rdar://problem/26561537
253 @property (nonatomic, readwrite, setter=_setWantsMediaPlaybackControlsView:) BOOL _wantsMediaPlaybackControlsView WK_API_AVAILABLE(macosx(10.12.3));
254 @property (nonatomic, readonly) id _mediaPlaybackControlsView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
255 - (void)_addMediaPlaybackControlsView:(id)mediaPlaybackControlsView WK_API_AVAILABLE(macosx(WK_MAC_TBA));
256 - (void)_removeMediaPlaybackControlsView WK_API_AVAILABLE(macosx(10.12.3));
257
258 - (void)_prepareForMoveToWindow:(NSWindow *)targetWindow completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
259
260 #endif
261
262 - (WKNavigation *)_reloadWithoutContentBlockers WK_API_AVAILABLE(macosx(10.12), ios(10.0));
263 - (WKNavigation *)_reloadExpiredOnly WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
264
265 - (void)_killWebContentProcessAndResetState;
266
267 - (void)_getMainResourceDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler;
268 - (void)_getWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler;
269 - (void)_getContentsAsStringWithCompletionHandler:(void (^)(NSString *, NSError *))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
270
271 @property (nonatomic, setter=_setPaginationMode:) _WKPaginationMode _paginationMode;
272 // Whether the column-break-{before,after} properties are respected instead of the
273 // page-break-{before,after} properties.
274 @property (nonatomic, setter=_setPaginationBehavesLikeColumns:) BOOL _paginationBehavesLikeColumns;
275 // Set to 0 to have the page length equal the view length.
276 @property (nonatomic, setter=_setPageLength:) CGFloat _pageLength;
277 @property (nonatomic, setter=_setGapBetweenPages:) CGFloat _gapBetweenPages;
278 @property (nonatomic, setter=_setPaginationLineGridEnabled:) BOOL _paginationLineGridEnabled;
279 @property (readonly) NSUInteger _pageCount;
280
281 @property (nonatomic, readonly) BOOL _supportsTextZoom;
282 @property (nonatomic, setter=_setTextZoomFactor:) double _textZoomFactor;
283 @property (nonatomic, setter=_setPageZoomFactor:) double _pageZoomFactor;
284
285 @property (nonatomic, weak, setter=_setDiagnosticLoggingDelegate:) id <_WKDiagnosticLoggingDelegate> _diagnosticLoggingDelegate WK_API_AVAILABLE(macosx(10.11), ios(9.0));
286 @property (nonatomic, weak, setter=_setFindDelegate:) id <_WKFindDelegate> _findDelegate;
287 - (void)_findString:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount;
288 - (void)_countStringMatches:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount;
289 - (void)_hideFindUI;
290
291 @property (nonatomic, weak, setter=_setInputDelegate:) id <_WKInputDelegate> _inputDelegate WK_API_AVAILABLE(macosx(10.12), ios(10.0));
292
293 @property (nonatomic, readonly, getter=_isDisplayingStandaloneImageDocument) BOOL _displayingStandaloneImageDocument;
294 @property (nonatomic, readonly, getter=_isDisplayingStandaloneMediaDocument) BOOL _displayingStandaloneMediaDocument;
295
296 @property (nonatomic, setter=_setScrollPerformanceDataCollectionEnabled:) BOOL _scrollPerformanceDataCollectionEnabled WK_API_AVAILABLE(macosx(10.11), ios(9.0));
297 @property (nonatomic, readonly) NSArray *_scrollPerformanceData WK_API_AVAILABLE(macosx(10.11), ios(9.0));
298
299 - (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item WK_API_AVAILABLE(macosx(10.11), ios(9.0));
300
301 @property (nonatomic, getter=_allowsMediaDocumentInlinePlayback, setter=_setAllowsMediaDocumentInlinePlayback:) BOOL _allowsMediaDocumentInlinePlayback;
302
303 @property (nonatomic, readonly) BOOL _webProcessIsResponsive WK_API_AVAILABLE(macosx(10.12), ios(10.0));
304
305 @property (nonatomic, setter=_setFullscreenDelegate:) id<_WKFullscreenDelegate> _fullscreenDelegate WK_API_AVAILABLE(macosx(WK_MAC_TBA));
306 @property (nonatomic, readonly) BOOL _isInFullscreen WK_API_AVAILABLE(macosx(10.12.3));
307
308 - (void)_muteMediaCapture WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
309 - (void)_setPageMuted:(_WKMediaMutedState)mutedState WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
310
311 @property (nonatomic, setter=_setMediaCaptureEnabled:) BOOL _mediaCaptureEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
312
313 @end
314
315 #if !TARGET_OS_IPHONE
316 @interface WKWebView (WKNSTextFinderClient) <NSTextFinderClient>
317 @end
318 #endif
319
320 @interface WKWebView (WKTesting)
321
322 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
323
324 #if TARGET_OS_IPHONE
325
326 @property (nonatomic, readonly) CGRect _contentVisibleRect WK_API_AVAILABLE(ios(10.0));
327 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point WK_API_AVAILABLE(ios(10.0));
328 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point WK_API_AVAILABLE(ios(10.0));
329
330 - (void)keyboardAccessoryBarNext WK_API_AVAILABLE(ios(10.0));
331 - (void)keyboardAccessoryBarPrevious WK_API_AVAILABLE(ios(10.0));
332 - (void)dismissFormAccessoryView WK_API_AVAILABLE(ios(10.3));
333 - (void)selectFormAccessoryPickerRow:(int)rowIndex WK_API_AVAILABLE(ios(10.3));
334
335 - (void)applyAutocorrection:(NSString *)newString toString:(NSString *)oldString withCompletionHandler:(void (^)())completionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));
336
337 - (void)didStartFormControlInteraction WK_API_AVAILABLE(ios(10.3));
338 - (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(10.3));
339
340 - (void)_didShowForcePressPreview WK_API_AVAILABLE(ios(10.3));
341 - (void)_didDismissForcePressPreview WK_API_AVAILABLE(ios(10.3));
342 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock WK_API_AVAILABLE(ios(10.3));
343
344 @property (nonatomic, readonly) NSArray<NSValue *> *_uiTextSelectionRects WK_API_AVAILABLE(ios(10.3));
345 @property (nonatomic, readonly) CGRect _uiTextCaretRect WK_API_AVAILABLE(ios(10.3));
346 @property (nonatomic, readonly) CGRect _inputViewBounds WK_API_AVAILABLE(ios(10.3));
347
348 @property (nonatomic, readonly) NSString *_scrollingTreeAsText WK_API_AVAILABLE(ios(10.3));
349
350 @property (nonatomic, readonly) NSNumber *_stableStateOverride WK_API_AVAILABLE(ios(10.3));
351
352 - (NSDictionary *)_propertiesOfLayerWithID:(unsigned long long)layerID WK_API_AVAILABLE(ios(WK_IOS_TBA));
353
354 - (void)_simulateDataInteractionEntered:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
355 - (NSUInteger)_simulateDataInteractionUpdated:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
356 - (void)_simulateDataInteractionPerformOperation:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
357 - (void)_simulateDataInteractionEnded:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA));
358 - (void)_simulateDataInteractionSessionDidEnd:(id)session WK_API_AVAILABLE(ios(WK_IOS_TBA));
359 - (void)_simulateWillBeginDataInteractionWithSession:(id)session WK_API_AVAILABLE(ios(WK_IOS_TBA));
360 - (NSArray *)_simulatedItemsForSession:(id)session WK_API_AVAILABLE(ios(WK_IOS_TBA));
361 - (void)_simulatePrepareForDataInteractionSession:(id)session completion:(dispatch_block_t)completion WK_API_AVAILABLE(ios(WK_IOS_TBA));
362 - (void)_simulateLongPressActionAtLocation:(CGPoint)location;
363
364 @property (nonatomic, readonly) CGRect _dragCaretRect WK_API_AVAILABLE(ios(WK_IOS_TBA));
365
366 - (_WKDraggableElementInfo *)_draggableElementAtPosition:(CGPoint)position WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
367 - (void)_requestDraggableElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKDraggableElementInfo *))block WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
368
369 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block WK_API_AVAILABLE(ios(WK_IOS_TBA));
370
371 #endif // TARGET_OS_IPHONE
372
373 #if !TARGET_OS_IPHONE
374 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager WK_API_AVAILABLE(macosx(10.12));
375 - (void)_requestControlledElementID WK_API_AVAILABLE(macosx(10.12.3));
376 - (void)_handleControlledElementIDResponse:(NSString *)identifier WK_API_AVAILABLE(macosx(10.12.3));
377 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate WK_API_AVAILABLE(macosx(10.12.3));
378 - (void)_didHandleAcceptedCandidate WK_API_AVAILABLE(macosx(10.12.3));
379 - (void)_forceRequestCandidates WK_API_AVAILABLE(macosx(10.12.3));
380 - (void)_didUpdateCandidateListVisibility:(BOOL)visible WK_API_AVAILABLE(macosx(10.12.3));
381 @property (nonatomic, readonly) BOOL _shouldRequestCandidates WK_API_AVAILABLE(macosx(10.12.3));
382 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange WK_API_AVAILABLE(macosx(10.12.3));
383 - (NSRect)_candidateRect WK_API_AVAILABLE(macosx(WK_MAC_TBA));
384
385 - (void)_setHeaderBannerHeight:(int)height WK_API_AVAILABLE(macosx(10.12.3));
386 - (void)_setFooterBannerHeight:(int)height WK_API_AVAILABLE(macosx(10.12.3));
387 #endif
388
389 - (void)_requestActiveNowPlayingSessionInfo WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
390 - (void)_handleActiveNowPlayingSessionInfoResponse:(BOOL)hasActiveSession title:(NSString *)title duration:(double)duration elapsedTime:(double)elapsedTime WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
391
392 - (void)_setPageScale:(CGFloat)scale withOrigin:(CGPoint)origin WK_API_AVAILABLE(ios(10.3));
393 - (CGFloat)_pageScale WK_API_AVAILABLE(ios(10.3));
394
395 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(10.12), ios(10.0));
396 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
397 - (void)_doAfterNextVisibleContentRectUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
398
399 - (void)_disableBackForwardSnapshotVolatilityForTesting WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
400
401 @end
402
403 #endif