5ea7776e5ae807dde085f28a2f2971370b007edd
[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 WKDrawingCoordinator;
97 @class WKFocusedFormControlView;
98 @class WKFormInputControl;
99 @class WKFormInputSession;
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     FocusedElementIsTransparentOrFullyClipped = 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         BOOL nodeHasBuiltInClickHandling { false };
246         WebCore::Color color;
247         Vector<WebCore::FloatQuad> quads;
248         WebCore::IntSize topLeftRadius;
249         WebCore::IntSize topRightRadius;
250         WebCore::IntSize bottomLeftRadius;
251         WebCore::IntSize bottomRightRadius;
252     };
253     TapHighlightInformation _tapHighlightInformation;
254
255     WebKit::WKAutoCorrectionData _autocorrectionData;
256     WebKit::InteractionInformationAtPosition _positionInformation;
257     WebKit::FocusedElementInformation _focusedElementInformation;
258     RetainPtr<NSObject<WKFormPeripheral>> _inputPeripheral;
259     RetainPtr<UIEvent> _uiEventBeingResent;
260     BlockPtr<void(::WebEvent *, BOOL)> _keyWebEventHandler;
261
262     CGPoint _lastInteractionLocation;
263     uint64_t _layerTreeTransactionIdAtLastTouchStart;
264
265     WebKit::WKSelectionDrawingInfo _lastSelectionDrawingInfo;
266
267     Optional<WebKit::InteractionInformationRequest> _outstandingPositionInformationRequest;
268
269     uint64_t _positionInformationCallbackDepth;
270     Vector<Optional<InteractionInformationRequestAndCallback>> _pendingPositionInformationHandlers;
271     
272     std::unique_ptr<WebKit::InputViewUpdateDeferrer> _inputViewUpdateDeferrer;
273
274     RetainPtr<WKKeyboardScrollViewAnimator> _keyboardScrollingAnimator;
275
276 #if ENABLE(DATALIST_ELEMENT)
277     RetainPtr<UIView <WKFormControl>> _dataListTextSuggestionsInputView;
278     RetainPtr<NSArray<UITextSuggestion *>> _dataListTextSuggestions;
279 #endif
280
281 #if HAVE(PENCILKIT)
282     RetainPtr<WKDrawingCoordinator> _drawingCoordinator;
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 _isChangingFocusUsingAccessoryTab;
298     BOOL _didAccessoryTabInitiateFocus;
299     BOOL _isExpectingFastSingleTapCommit;
300     BOOL _showDebugTapHighlightsForFastClicking;
301     BOOL _isZoomingToRevealFocusedElement;
302
303     BOOL _becomingFirstResponder;
304     BOOL _resigningFirstResponder;
305     BOOL _needsDeferredEndScrollingSelectionUpdate;
306     BOOL _isChangingFocus;
307     BOOL _isBlurringFocusedNode;
308
309     BOOL _focusRequiresStrongPasswordAssistance;
310
311     BOOL _hasSetUpInteractions;
312
313 #if ENABLE(DATA_INTERACTION)
314     WebKit::DragDropInteractionState _dragDropInteractionState;
315     RetainPtr<UIDragInteraction> _dragInteraction;
316     RetainPtr<UIDropInteraction> _dropInteraction;
317     BOOL _shouldRestoreCalloutBarAfterDrop;
318     BOOL _isAnimatingConcludeEditDrag;
319     RetainPtr<UIView> _visibleContentViewSnapshot;
320     RetainPtr<_UITextDragCaretView> _editDropCaretView;
321 #endif
322
323 #if PLATFORM(WATCHOS)
324     RetainPtr<WKFocusedFormControlView> _focusedFormControlView;
325     RetainPtr<UIViewController> _presentedFullScreenInputViewController;
326     RetainPtr<UINavigationController> _inputNavigationViewControllerForFullScreenInputs;
327
328     BOOL _shouldRestoreFirstResponderStatusAfterLosingFocus;
329     BlockPtr<void()> _activeFocusedStateRetainBlock;
330 #endif
331 }
332
333 @end
334
335 @interface WKContentView (WKInteraction) <UIGestureRecognizerDelegate, UITextAutoscrolling, UITextInputMultiDocument, UITextInputPrivate, UIWebFormAccessoryDelegate, UIWebTouchEventsGestureRecognizerDelegate, UIWKInteractionViewProtocol, WKActionSheetAssistantDelegate, WKFileUploadPanelDelegate, WKKeyboardScrollViewAnimatorDelegate
336 #if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
337     , WKShareSheetDelegate
338 #endif
339 #if ENABLE(DATA_INTERACTION)
340     , UIDragInteractionDelegate, UIDropInteractionDelegate
341 #endif
342 >
343
344 @property (nonatomic, readonly) CGPoint lastInteractionLocation;
345 @property (nonatomic, readonly) BOOL isEditable;
346 @property (nonatomic, readonly) BOOL shouldHideSelectionWhenScrolling;
347 @property (nonatomic, readonly) const WebKit::InteractionInformationAtPosition& positionInformation;
348 @property (nonatomic, readonly) const WebKit::WKAutoCorrectionData& autocorrectionData;
349 @property (nonatomic, readonly) const WebKit::FocusedElementInformation& focusedElementInformation;
350 @property (nonatomic, readonly) UIWebFormAccessory *formAccessoryView;
351 @property (nonatomic, readonly) UITextInputAssistantItem *inputAssistantItemForWebView;
352
353 #if ENABLE(DATALIST_ELEMENT)
354 @property (nonatomic, strong) UIView <WKFormControl> *dataListTextSuggestionsInputView;
355 @property (nonatomic, strong) NSArray<UITextSuggestion *> *dataListTextSuggestions;
356 #endif
357
358 - (void)setupInteraction;
359 - (void)cleanupInteraction;
360
361 - (void)scrollViewWillStartPanOrPinchGesture;
362
363 - (BOOL)canBecomeFirstResponderForWebView;
364 - (BOOL)becomeFirstResponderForWebView;
365 - (BOOL)resignFirstResponderForWebView;
366 - (BOOL)canPerformActionForWebView:(SEL)action withSender:(id)sender;
367 - (id)targetForActionForWebView:(SEL)action withSender:(id)sender;
368
369 #define DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW(_action) \
370     - (void)_action ## ForWebView:(id)sender;
371 FOR_EACH_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW)
372 FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW)
373 #undef DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW
374
375 - (void)_setFontForWebView:(UIFont *)fontFamily sender:(id)sender;
376 - (void)_setFontSizeForWebView:(CGFloat)fontSize sender:(id)sender;
377 - (void)_setTextColorForWebView:(UIColor *)color sender:(id)sender;
378
379 #if ENABLE(TOUCH_EVENTS)
380 - (void)_webTouchEvent:(const WebKit::NativeWebTouchEvent&)touchEvent preventsNativeGestures:(BOOL)preventsDefault;
381 #endif
382 - (void)_commitPotentialTapFailed;
383 - (void)_didNotHandleTapAsClick:(const WebCore::IntPoint&)point;
384 - (void)_didCompleteSyntheticClick;
385 - (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 nodeHasBuiltInClickHandling:(BOOL)nodeHasBuiltInClickHandling;
386
387 - (BOOL)_mayDisableDoubleTapGesturesDuringSingleTap;
388 - (void)_disableDoubleTapGesturesDuringTapIfNecessary:(uint64_t)requestID;
389 - (void)_elementDidFocus:(const WebKit::FocusedElementInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode changingActivityState:(BOOL)changingActivityState userObject:(NSObject <NSSecureCoding> *)userObject;
390 - (void)_elementDidBlur;
391 - (void)_didUpdateInputMode:(WebCore::InputMode)mode;
392 - (void)_didReceiveEditorStateUpdateAfterFocus;
393 - (void)_selectionChanged;
394 - (void)_updateChangedSelection;
395 - (BOOL)_interpretKeyEvent:(::WebEvent *)theEvent isCharEvent:(BOOL)isCharEvent;
396 - (void)_positionInformationDidChange:(const WebKit::InteractionInformationAtPosition&)info;
397 - (void)_attemptClickAtLocation:(CGPoint)location;
398 - (void)_willStartScrollingOrZooming;
399 - (void)_didScroll;
400 - (void)_didEndScrollingOrZooming;
401 - (void)_scrollingNodeScrollingWillBegin;
402 - (void)_scrollingNodeScrollingDidEnd;
403 - (void)_showPlaybackTargetPicker:(BOOL)hasVideo fromRect:(const WebCore::IntRect&)elementRect routeSharingPolicy:(WebCore::RouteSharingPolicy)policy routingContextUID:(NSString *)contextUID;
404 - (void)_showRunOpenPanel:(API::OpenPanelParameters*)parameters resultListener:(WebKit::WebOpenPanelResultListenerProxy*)listener;
405 - (void)_showShareSheet:(const WebCore::ShareDataWithParsedURL&)shareData completionHandler:(WTF::CompletionHandler<void(bool)>&&)completionHandler;
406 - (void)accessoryDone;
407 - (void)_didHandleKeyEvent:(::WebEvent *)event eventWasHandled:(BOOL)eventWasHandled;
408 - (Vector<WebKit::OptionItem>&) focusedSelectElementOptions;
409 - (void)_enableInspectorNodeSearch;
410 - (void)_disableInspectorNodeSearch;
411 - (void)_becomeFirstResponderWithSelectionMovingForward:(BOOL)selectingForward completionHandler:(void (^)(BOOL didBecomeFirstResponder))completionHandler;
412 - (void)_setDoubleTapGesturesEnabled:(BOOL)enabled;
413 #if ENABLE(DATA_DETECTION)
414 - (NSArray *)_dataDetectionResults;
415 #endif
416 - (NSArray<NSValue *> *)_uiTextSelectionRects;
417 - (void)accessibilityRetrieveSpeakSelectionContent;
418 - (void)_accessibilityRetrieveRectsEnclosingSelectionOffset:(NSInteger)offset withGranularity:(UITextGranularity)granularity;
419 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(const Vector<WebCore::SelectionRect>& rects))completionHandler;
420 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text;
421 - (void)_accessibilityStoreSelection;
422 - (void)_accessibilityClearSelection;
423 - (WKFormInputSession *)_formInputSession;
424
425 @property (nonatomic, readonly) WebKit::InteractionInformationAtPosition currentPositionInformation;
426 - (void)doAfterPositionInformationUpdate:(void (^)(WebKit::InteractionInformationAtPosition))action forRequest:(WebKit::InteractionInformationRequest)request;
427 - (BOOL)ensurePositionInformationIsUpToDate:(WebKit::InteractionInformationRequest)request;
428
429 #if ENABLE(DATA_INTERACTION)
430 - (void)_didChangeDragInteractionPolicy;
431 - (void)_didPerformDragOperation:(BOOL)handled;
432 - (void)_didHandleDragStartRequest:(BOOL)started;
433 - (void)_didHandleAdditionalDragItemsRequest:(BOOL)added;
434 - (void)_startDrag:(RetainPtr<CGImageRef>)image item:(const WebCore::DragItem&)item;
435 - (void)_didConcludeEditDrag:(Optional<WebCore::TextIndicatorData>)data;
436 - (void)_didChangeDragCaretRect:(CGRect)previousRect currentRect:(CGRect)rect;
437 #endif
438
439 - (void)reloadContextViewForPresentedListViewController;
440
441 #if ENABLE(DATALIST_ELEMENT)
442 - (void)updateTextSuggestionsForInputDelegate;
443 #endif
444
445 #if HAVE(PENCILKIT)
446 - (WKDrawingCoordinator *)_drawingCoordinator;
447 #endif
448
449 @end
450
451 @interface WKContentView (WKTesting)
452
453 - (void)_simulateLongPressActionAtLocation:(CGPoint)location;
454 - (void)_simulateTextEntered:(NSString *)text;
455 - (void)selectFormAccessoryPickerRow:(NSInteger)rowIndex;
456 - (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute;
457 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem;
458
459 @property (nonatomic, readonly) NSString *textContentTypeForTesting;
460 @property (nonatomic, readonly) NSString *selectFormPopoverTitle;
461 @property (nonatomic, readonly) NSString *formInputLabel;
462 @property (nonatomic, readonly) WKFormInputControl *formInputControl;
463
464 @end
465
466 #if HAVE(LINK_PREVIEW)
467 @interface WKContentView (WKInteractionPreview) <UIPreviewItemDelegate>
468
469 - (void)_registerPreview;
470 - (void)_unregisterPreview;
471 @end
472 #endif
473
474 @interface WKContentView (WKFileUploadPanel)
475 + (Class)_fileUploadPanelClass;
476 @end
477
478 #endif // PLATFORM(IOS_FAMILY)