a807ccd2facfe78cf914bdf43ed2497adcc8fc8c
[WebKit-https.git] / Source / WebKit / UIProcess / ios / WKContentViewInteraction.h
1 /*
2  * Copyright (C) 2012-2018 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 #if PLATFORM(IOS_FAMILY)
27
28 #import "WKContentView.h"
29
30 #if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
31 #import "WKShareSheet.h"
32 #endif
33
34 #import "AssistedNodeInformation.h"
35 #import "DragDropInteractionState.h"
36 #import "EditorState.h"
37 #import "GestureTypes.h"
38 #import "InteractionInformationAtPosition.h"
39 #import "UIKitSPI.h"
40 #import "WKActionSheetAssistant.h"
41 #import "WKAirPlayRoutePicker.h"
42 #import "WKFileUploadPanel.h"
43 #import "WKFormPeripheral.h"
44 #import "WKKeyboardScrollingAnimator.h"
45 #import "WKShareSheet.h"
46 #import "WKSyntheticClickTapGestureRecognizer.h"
47 #import "_WKFormInputSession.h"
48 #import <UIKit/UIView.h>
49 #import <WebCore/Color.h>
50 #import <WebCore/FloatQuad.h>
51 #import <wtf/BlockPtr.h>
52 #import <wtf/Forward.h>
53 #import <wtf/OptionSet.h>
54 #import <wtf/Vector.h>
55 #import <wtf/WeakObjCPtr.h>
56 #import <wtf/text/WTFString.h>
57
58 namespace API {
59 class OpenPanelParameters;
60 }
61
62 namespace WTF {
63 class TextStream;
64 }
65
66 namespace WebCore {
67 class Color;
68 class FloatQuad;
69 class IntSize;
70 class SelectionRect;
71 struct PromisedAttachmentInfo;
72 struct ShareDataWithParsedURL;
73 enum class RouteSharingPolicy : uint8_t;
74 }
75
76 #if ENABLE(DRAG_SUPPORT)
77 namespace WebCore {
78 struct DragItem;
79 }
80 #endif
81
82 namespace WebKit {
83 class InputViewUpdateDeferrer;
84 class NativeWebTouchEvent;
85 class SmartMagnificationController;
86 class WebOpenPanelResultListenerProxy;
87 class WebPageProxy;
88 }
89
90 @class _UIHighlightView;
91 @class _UIWebHighlightLongPressGestureRecognizer;
92 @class UIHoverGestureRecognizer;
93 @class WebEvent;
94 @class WKActionSheetAssistant;
95 @class WKFocusedFormControlView;
96 @class WKFormInputControl;
97 @class WKFormInputSession;
98 @class WKInspectorNodeSearchGestureRecognizer;
99
100 typedef void (^UIWKAutocorrectionCompletionHandler)(UIWKAutocorrectionRects *rectsForInput);
101 typedef void (^UIWKAutocorrectionContextHandler)(UIWKAutocorrectionContext *autocorrectionContext);
102 typedef void (^UIWKDictationContextHandler)(NSString *selectedText, NSString *beforeText, NSString *afterText);
103 typedef void (^UIWKSelectionCompletionHandler)(void);
104 typedef void (^UIWKSelectionWithDirectionCompletionHandler)(BOOL selectionEndIsMoving);
105
106 typedef BlockPtr<void(WebKit::InteractionInformationAtPosition)> InteractionInformationCallback;
107 typedef std::pair<WebKit::InteractionInformationRequest, InteractionInformationCallback> InteractionInformationRequestAndCallback;
108
109 #define FOR_EACH_WKCONTENTVIEW_ACTION(M) \
110     M(_addShortcut) \
111     M(_define) \
112     M(_lookup) \
113     M(_promptForReplace) \
114     M(_share) \
115     M(_showTextStyleOptions) \
116     M(_transliterateChinese) \
117     M(_nextAccessoryTab) \
118     M(_previousAccessoryTab) \
119     M(copy) \
120     M(cut) \
121     M(paste) \
122     M(replace) \
123     M(select) \
124     M(selectAll) \
125     M(toggleBoldface) \
126     M(toggleItalics) \
127     M(toggleUnderline) \
128     M(increaseSize) \
129     M(decreaseSize) \
130     M(toggleStrikeThrough) \
131     M(insertUnorderedList) \
132     M(insertOrderedList) \
133     M(indent) \
134     M(outdent) \
135     M(alignLeft) \
136     M(alignRight) \
137     M(alignCenter) \
138     M(alignJustified) \
139     M(pasteAndMatchStyle) \
140     M(makeTextWritingDirectionNatural)
141
142 #define FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(M) \
143     M(_alignCenter) \
144     M(_alignJustified) \
145     M(_alignLeft) \
146     M(_alignRight) \
147     M(_indent) \
148     M(_outdent) \
149     M(_toggleStrikeThrough) \
150     M(_insertOrderedList) \
151     M(_insertUnorderedList) \
152     M(_insertNestedOrderedList) \
153     M(_insertNestedUnorderedList) \
154     M(_increaseListLevel) \
155     M(_decreaseListLevel) \
156     M(_changeListType) \
157     M(_pasteAsQuotation) \
158     M(_pasteAndMatchStyle)
159
160 namespace WebKit {
161
162 enum SuppressSelectionAssistantReason : uint8_t {
163     FocusedElementIsTransparent = 1 << 0,
164     DropAnimationIsRunning = 1 << 1
165 };
166
167 struct WKSelectionDrawingInfo {
168     enum class SelectionType { None, Plugin, Range };
169     WKSelectionDrawingInfo();
170     explicit WKSelectionDrawingInfo(const EditorState&);
171     SelectionType type;
172     WebCore::IntRect caretRect;
173     Vector<WebCore::SelectionRect> selectionRects;
174 };
175
176 WTF::TextStream& operator<<(WTF::TextStream&, const WKSelectionDrawingInfo&);
177
178 struct WKAutoCorrectionData {
179     String fontName;
180     CGFloat fontSize;
181     uint64_t fontTraits;
182     CGRect textFirstRect;
183     CGRect textLastRect;
184     UIWKAutocorrectionCompletionHandler autocorrectionHandler;
185     UIWKAutocorrectionContextHandler autocorrectionContextHandler;
186 };
187
188 }
189
190 @class WKFocusedElementInfo;
191 @protocol WKFormControl;
192
193 @interface WKFormInputSession : NSObject <_WKFormInputSession>
194
195 - (instancetype)initWithContentView:(WKContentView *)view focusedElementInfo:(WKFocusedElementInfo *)elementInfo requiresStrongPasswordAssistance:(BOOL)requiresStrongPasswordAssistance;
196 - (void)endEditing;
197 - (void)invalidate;
198
199 @end
200
201 @interface WKContentView () {
202     RetainPtr<UIWebTouchEventsGestureRecognizer> _touchEventGestureRecognizer;
203
204     BOOL _canSendTouchEventsAsynchronously;
205
206     RetainPtr<WKSyntheticClickTapGestureRecognizer> _singleTapGestureRecognizer;
207     RetainPtr<_UIWebHighlightLongPressGestureRecognizer> _highlightLongPressGestureRecognizer;
208     RetainPtr<UILongPressGestureRecognizer> _longPressGestureRecognizer;
209     RetainPtr<UITapGestureRecognizer> _doubleTapGestureRecognizer;
210     RetainPtr<UITapGestureRecognizer> _nonBlockingDoubleTapGestureRecognizer;
211     RetainPtr<UITapGestureRecognizer> _twoFingerDoubleTapGestureRecognizer;
212     RetainPtr<UITapGestureRecognizer> _twoFingerSingleTapGestureRecognizer;
213     RetainPtr<UITapGestureRecognizer> _stylusSingleTapGestureRecognizer;
214     RetainPtr<WKInspectorNodeSearchGestureRecognizer> _inspectorNodeSearchGestureRecognizer;
215
216 #if PLATFORM(IOSMAC)
217     RetainPtr<UIHoverGestureRecognizer> _hoverGestureRecognizer;
218 #endif
219
220     RetainPtr<UIWKTextInteractionAssistant> _textSelectionAssistant;
221     OptionSet<WebKit::SuppressSelectionAssistantReason> _suppressSelectionAssistantReasons;
222
223     RetainPtr<UITextInputTraits> _traits;
224     RetainPtr<UIWebFormAccessory> _formAccessoryView;
225     RetainPtr<_UIHighlightView> _highlightView;
226     RetainPtr<UIView> _interactionViewsContainerView;
227     RetainPtr<NSString> _markedText;
228     RetainPtr<WKActionSheetAssistant> _actionSheetAssistant;
229 #if ENABLE(AIRPLAY_PICKER)
230     RetainPtr<WKAirPlayRoutePicker> _airPlayRoutePicker;
231 #endif
232     RetainPtr<WKFormInputSession> _formInputSession;
233     RetainPtr<WKFileUploadPanel> _fileUploadPanel;
234 #if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
235     RetainPtr<WKShareSheet> _shareSheet;
236 #endif
237     RetainPtr<UIGestureRecognizer> _previewGestureRecognizer;
238     RetainPtr<UIGestureRecognizer> _previewSecondaryGestureRecognizer;
239     Vector<bool> _focusStateStack;
240 #if HAVE(LINK_PREVIEW)
241     RetainPtr<UIPreviewItemController> _previewItemController;
242 #endif
243
244     std::unique_ptr<WebKit::SmartMagnificationController> _smartMagnificationController;
245
246     WeakObjCPtr<id <UITextInputDelegate>> _inputDelegate;
247
248     uint64_t _latestTapID;
249     struct TapHighlightInformation {
250         WebCore::Color color;
251         Vector<WebCore::FloatQuad> quads;
252         WebCore::IntSize topLeftRadius;
253         WebCore::IntSize topRightRadius;
254         WebCore::IntSize bottomLeftRadius;
255         WebCore::IntSize bottomRightRadius;
256     };
257     TapHighlightInformation _tapHighlightInformation;
258
259     WebKit::WKAutoCorrectionData _autocorrectionData;
260     WebKit::InteractionInformationAtPosition _positionInformation;
261     WebKit::AssistedNodeInformation _assistedNodeInformation;
262     RetainPtr<NSObject<WKFormPeripheral>> _inputPeripheral;
263     RetainPtr<UIEvent> _uiEventBeingResent;
264     BlockPtr<void(::WebEvent *, BOOL)> _keyWebEventHandler;
265
266     CGPoint _lastInteractionLocation;
267     uint64_t _layerTreeTransactionIdAtLastTouchStart;
268
269     WebKit::WKSelectionDrawingInfo _lastSelectionDrawingInfo;
270
271     std::optional<WebKit::InteractionInformationRequest> _outstandingPositionInformationRequest;
272
273     uint64_t _positionInformationCallbackDepth;
274     Vector<std::optional<InteractionInformationRequestAndCallback>> _pendingPositionInformationHandlers;
275     
276     std::unique_ptr<WebKit::InputViewUpdateDeferrer> _inputViewUpdateDeferrer;
277
278     RetainPtr<WKKeyboardScrollViewAnimator> _keyboardScrollingAnimator;
279
280 #if ENABLE(DATALIST_ELEMENT)
281     RetainPtr<UIView <WKFormControl>> _dataListTextSuggestionsInputView;
282     RetainPtr<NSArray<UITextSuggestion *>> _dataListTextSuggestions;
283 #endif
284
285     BOOL _isEditable;
286     BOOL _showingTextStyleOptions;
287     BOOL _hasValidPositionInformation;
288     BOOL _isTapHighlightIDValid;
289     BOOL _potentialTapInProgress;
290     BOOL _isDoubleTapPending;
291     BOOL _highlightLongPressCanClick;
292     BOOL _hasTapHighlightForPotentialTap;
293     BOOL _selectionNeedsUpdate;
294     BOOL _shouldRestoreSelection;
295     BOOL _usingGestureForSelection;
296     BOOL _inspectorNodeSearchEnabled;
297     BOOL _didAccessoryTabInitiateFocus;
298     BOOL _isExpectingFastSingleTapCommit;
299     BOOL _showDebugTapHighlightsForFastClicking;
300
301     BOOL _becomingFirstResponder;
302     BOOL _resigningFirstResponder;
303     BOOL _needsDeferredEndScrollingSelectionUpdate;
304     BOOL _isChangingFocus;
305     BOOL _isBlurringFocusedNode;
306
307     BOOL _focusRequiresStrongPasswordAssistance;
308
309     BOOL _hasSetUpInteractions;
310
311 #if ENABLE(DATA_INTERACTION)
312     WebKit::DragDropInteractionState _dragDropInteractionState;
313     RetainPtr<UIDragInteraction> _dragInteraction;
314     RetainPtr<UIDropInteraction> _dropInteraction;
315     BOOL _shouldRestoreCalloutBarAfterDrop;
316     BOOL _isAnimatingConcludeEditDrag;
317     RetainPtr<UIView> _visibleContentViewSnapshot;
318     RetainPtr<_UITextDragCaretView> _editDropCaretView;
319 #endif
320
321 #if PLATFORM(WATCHOS)
322     RetainPtr<WKFocusedFormControlView> _focusedFormControlView;
323     RetainPtr<UIViewController> _presentedFullScreenInputViewController;
324     RetainPtr<UINavigationController> _inputNavigationViewControllerForFullScreenInputs;
325
326     BOOL _shouldRestoreFirstResponderStatusAfterLosingFocus;
327     BlockPtr<void()> _activeFocusedStateRetainBlock;
328 #endif
329 }
330
331 @end
332
333 @interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UITextAutoscrolling, UITextInputMultiDocument, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWebTouchEventsGestureRecognizerDelegate, UIWKInteractionViewProtocol, WKActionSheetAssistantDelegate, WKFileUploadPanelDelegate, WKKeyboardScrollViewAnimatorDelegate
334 #if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
335     , WKShareSheetDelegate
336 #endif
337 #if ENABLE(DATA_INTERACTION)
338     , UIDragInteractionDelegate, UIDropInteractionDelegate
339 #endif
340 >
341
342 @property (nonatomic, readonly) CGPoint lastInteractionLocation;
343 @property (nonatomic, readonly) BOOL isEditable;
344 @property (nonatomic, readonly) BOOL shouldHideSelectionWhenScrolling;
345 @property (nonatomic, readonly) const WebKit::InteractionInformationAtPosition& positionInformation;
346 @property (nonatomic, readonly) const WebKit::WKAutoCorrectionData& autocorrectionData;
347 @property (nonatomic, readonly) const WebKit::AssistedNodeInformation& assistedNodeInformation;
348 @property (nonatomic, readonly) UIWebFormAccessory *formAccessoryView;
349 @property (nonatomic, readonly) UITextInputAssistantItem *inputAssistantItemForWebView;
350
351 #if ENABLE(DATALIST_ELEMENT)
352 @property (nonatomic, strong) UIView <WKFormControl> *dataListTextSuggestionsInputView;
353 @property (nonatomic, strong) NSArray<UITextSuggestion *> *dataListTextSuggestions;
354 #endif
355
356 - (void)setupInteraction;
357 - (void)cleanupInteraction;
358
359 - (void)scrollViewWillStartPanOrPinchGesture;
360
361 - (BOOL)canBecomeFirstResponderForWebView;
362 - (BOOL)becomeFirstResponderForWebView;
363 - (BOOL)resignFirstResponderForWebView;
364 - (BOOL)canPerformActionForWebView:(SEL)action withSender:(id)sender;
365 - (id)targetForActionForWebView:(SEL)action withSender:(id)sender;
366
367 #define DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW(_action) \
368     - (void)_action ## ForWebView:(id)sender;
369 FOR_EACH_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW)
370 FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW)
371 #undef DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW
372
373 - (void)setFontForWebView:(UIFont *)fontFamily sender:(id)sender;
374 - (void)setFontSizeForWebView:(CGFloat)fontSize sender:(id)sender;
375 - (void)setTextColorForWebView:(UIColor *)color sender:(id)sender;
376
377 #if ENABLE(TOUCH_EVENTS)
378 - (void)_webTouchEvent:(const WebKit::NativeWebTouchEvent&)touchEvent preventsNativeGestures:(BOOL)preventsDefault;
379 #endif
380 - (void)_commitPotentialTapFailed;
381 - (void)_didNotHandleTapAsClick:(const WebCore::IntPoint&)point;
382 - (void)_didCompleteSyntheticClick;
383 - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
384
385 - (BOOL)_mayDisableDoubleTapGesturesDuringSingleTap;
386 - (void)_disableDoubleTapGesturesDuringTapIfNecessary:(uint64_t)requestID;
387 - (void)_startAssistingNode:(const WebKit::AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode changingActivityState:(BOOL)changingActivityState userObject:(NSObject <NSSecureCoding> *)userObject;
388 - (void)_stopAssistingNode;
389 - (void)_selectionChanged;
390 - (void)_updateChangedSelection;
391 - (BOOL)_interpretKeyEvent:(::WebEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
392 - (void)_positionInformationDidChange:(const WebKit::InteractionInformationAtPosition&)info;
393 - (void)_attemptClickAtLocation:(CGPoint)location;
394 - (void)_willStartScrollingOrZooming;
395 - (void)_didScroll;
396 - (void)_didEndScrollingOrZooming;
397 - (void)_scrollingNodeScrollingWillBegin;
398 - (void)_scrollingNodeScrollingDidEnd;
399 - (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&)elementRect routeSharingPolicy:(WebCore::RouteSharingPolicy)policy routingContextUID:(NSString *)contextUID;
400 - (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
401 - (void)_showShareSheet:(const WebCore::ShareDataWithParsedURL&)shareData completionHandler:(WTF::CompletionHandler<void(bool)>&&)completionHandler;
402 - (void)accessoryDone;
403 - (void)_didHandleKeyEvent:(::WebEvent *)event eventWasHandled:(BOOL)eventWasHandled;
404 - (Vector<WebKit::OptionItem>&) assistedNodeSelectOptions;
405 - (void)_enableInspectorNodeSearch;
406 - (void)_disableInspectorNodeSearch;
407 - (void)_becomeFirstResponderWithSelectionMovingForward:(BOOL)selectingForward completionHandler:(void (^)(BOOL didBecomeFirstResponder))completionHandler;
408 - (void)_setDoubleTapGesturesEnabled:(BOOL)enabled;
409 #if ENABLE(DATA_DETECTION)
410 - (NSArray *)_dataDetectionResults;
411 #endif
412 - (NSArray<NSValue *> *)_uiTextSelectionRects;
413 - (void)accessibilityRetrieveSpeakSelectionContent;
414 - (void)_accessibilityRetrieveRectsEnclosingSelectionOffset:(NSInteger)offset withGranularity:(UITextGranularity)granularity;
415 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(const Vector<WebCore::SelectionRect>& rects))completionHandler;
416 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text;
417 - (void)_accessibilityStoreSelection;
418 - (void)_accessibilityClearSelection;
419 - (WKFormInputSession *)_formInputSession;
420
421 @property (nonatomic, readonly) WebKit::InteractionInformationAtPosition currentPositionInformation;
422 - (void)doAfterPositionInformationUpdate:(void (^)(WebKit::InteractionInformationAtPosition))action forRequest:(WebKit::InteractionInformationRequest)request;
423 - (BOOL)ensurePositionInformationIsUpToDate:(WebKit::InteractionInformationRequest)request;
424
425 #if ENABLE(DATA_INTERACTION)
426 - (void)_didChangeDragInteractionPolicy;
427 - (void)_didPerformDragOperation:(BOOL)handled;
428 - (void)_didHandleStartDataInteractionRequest:(BOOL)started;
429 - (void)_didHandleAdditionalDragItemsRequest:(BOOL)added;
430 - (void)_startDrag:(RetainPtr<CGImageRef>)image item:(const WebCore::DragItem&)item;
431 - (void)_didConcludeEditDataInteraction:(std::optional<WebCore::TextIndicatorData>)data;
432 - (void)_didChangeDataInteractionCaretRect:(CGRect)previousRect currentRect:(CGRect)rect;
433 #endif
434
435 - (void)reloadContextViewForPresentedListViewController;
436
437 #if ENABLE(DATALIST_ELEMENT)
438 - (void)updateTextSuggestionsForInputDelegate;
439 #endif
440
441 @end
442
443 @interface WKContentView (WKTesting)
444
445 - (void)_simulateLongPressActionAtLocation:(CGPoint)location;
446 - (void)_simulateTextEntered:(NSString *)text;
447 - (void)selectFormAccessoryPickerRow:(NSInteger)rowIndex;
448 - (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute;
449 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem;
450
451 @property (nonatomic, readonly) NSString *textContentTypeForTesting;
452 @property (nonatomic, readonly) NSString *selectFormPopoverTitle;
453 @property (nonatomic, readonly) NSString *formInputLabel;
454 @property (nonatomic, readonly) WKFormInputControl *formInputControl;
455
456 @end
457
458 #if HAVE(LINK_PREVIEW)
459 @interface WKContentView (WKInteractionPreview) <UIPreviewItemDelegate>
460
461 - (void)_registerPreview;
462 - (void)_unregisterPreview;
463 @end
464 #endif
465
466 @interface WKContentView (WKFileUploadPanel)
467 + (Class)_fileUploadPanelClass;
468 @end
469
470 #endif // PLATFORM(IOS_FAMILY)