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