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