-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathWebViewImpl.h
More file actions
1231 lines (975 loc) · 47.6 KB
/
WebViewImpl.h
File metadata and controls
1231 lines (975 loc) · 47.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (C) 2015-2025 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#if !__has_feature(modules) || (defined(WK_SUPPORTS_SWIFT_OBJCXX_INTEROP) && WK_SUPPORTS_SWIFT_OBJCXX_INTEROP)
#include <wtf/Platform.h>
#if PLATFORM(MAC)
#include "AppKitSPI.h"
#include "DrawingAreaInfo.h"
#include "EditorState.h"
#include "ImageAnalysisUtilities.h"
#include "PDFPluginIdentifier.h"
#include "WKLayoutMode.h"
#include "WebMouseEvent.h"
#include <WebCore/DOMPasteAccess.h>
#include <WebCore/DigitalCredentialsRequestData.h>
#include <WebCore/FocusDirection.h>
#include <WebCore/HTMLMediaElementIdentifier.h>
#include <WebCore/KeypressCommand.h>
#include <WebCore/PlatformPlaybackSessionInterface.h>
#include <WebCore/ScrollTypes.h>
#include <WebCore/ShareableBitmap.h>
#include <WebCore/TextAnimationTypes.h>
#include <WebCore/TextIndicator.h>
#include <WebCore/UserInterfaceLayoutDirection.h>
#include <WebKit/WKDragDestinationAction.h>
#include <WebKit/_WKOverlayScrollbarStyle.h>
#include <WebKit/_WKRectEdge.h>
#include <pal/spi/cocoa/AVKitSPI.h>
#include <pal/spi/cocoa/WritingToolsSPI.h>
#include <wtf/BlockPtr.h>
#include <wtf/CheckedPtr.h>
#include <wtf/CompletionHandler.h>
#include <wtf/Deque.h>
#include <wtf/RetainPtr.h>
#include <wtf/TZoneMalloc.h>
#include <wtf/WeakObjCPtr.h>
#include <wtf/WeakPtr.h>
#include <wtf/WorkQueue.h>
#include <wtf/text/WTFString.h>
#if USE(APPLE_INTERNAL_SDK)
#include <WebKitAdditions/AppKitSPIAdditions.h>
#endif
OBJC_CLASS CAShapeLayer;
OBJC_CLASS NSAccessibilityRemoteUIElement;
OBJC_CLASS NSImmediateActionGestureRecognizer;
OBJC_CLASS NSPanGestureRecognizer;
OBJC_CLASS NSMenu;
OBJC_CLASS NSPopover;
OBJC_CLASS NSScrollPocket;
OBJC_CLASS NSTextInputContext;
OBJC_CLASS NSTextPlaceholder;
OBJC_CLASS NSView;
OBJC_CLASS QLPreviewPanel;
OBJC_CLASS WebTextIndicatorLayer;
OBJC_CLASS WKAccessibilitySettingsObserver;
OBJC_CLASS WKBrowsingContextController;
OBJC_CLASS WKDOMPasteMenuDelegate;
OBJC_CLASS WKEditorUndoTarget;
OBJC_CLASS WKFullScreenWindowController;
OBJC_CLASS WKImageAnalysisOverlayViewDelegate;
OBJC_CLASS WKImmediateActionController;
OBJC_CLASS WKMouseTrackingObserver;
OBJC_CLASS WKAppKitGestureController;
OBJC_CLASS WKRevealItemPresenter;
OBJC_CLASS _WKWarningView;
OBJC_CLASS WKShareSheet;
OBJC_CLASS WKTextAnimationManager;
OBJC_CLASS WKTextSelectionController;
OBJC_CLASS WKViewLayoutStrategy;
OBJC_CLASS WKWebView;
OBJC_CLASS WKWindowVisibilityObserver;
OBJC_CLASS WKTextEffectManager;
OBJC_CLASS _WKRemoteObjectRegistry;
OBJC_CLASS _WKThumbnailView;
#if HAVE(TOUCH_BAR)
OBJC_CLASS NSCandidateListTouchBarItem;
OBJC_CLASS NSCustomTouchBarItem;
OBJC_CLASS NSTouchBar;
OBJC_CLASS NSTouchBarItem;
OBJC_CLASS NSPopoverTouchBarItem;
OBJC_CLASS WKTextTouchBarItemController;
OBJC_CLASS WebPlaybackControlsManager;
#endif // HAVE(TOUCH_BAR)
#if ENABLE(WEB_AUTHN)
OBJC_CLASS WKDigitalCredentialsPicker;
#endif
OBJC_CLASS WKPDFHUDView;
OBJC_CLASS VKCImageAnalysis;
OBJC_CLASS VKCImageAnalysisOverlayView;
#if HAVE(REDESIGNED_TEXT_CURSOR) && PLATFORM(MAC)
OBJC_CLASS _WKWebViewTextInputNotifications;
#endif
namespace API {
class HitTestResult;
class Object;
class PageConfiguration;
}
namespace PAL {
class HysteresisActivity;
enum class HysteresisState : bool;
}
namespace WebCore {
class DestinationColorSpace;
class IntPoint;
struct DataDetectorElementInfo;
struct ExceptionData;
struct ShareDataWithParsedURL;
struct TextAnimationData;
struct TextEffectData;
struct TextRecognitionResult;
#if HAVE(TRANSLATION_UI_SERVICES) && ENABLE(CONTEXT_MENUS)
struct TranslationContextMenuInfo;
#endif
template<typename> class ExceptionOr;
namespace WritingTools {
enum class ReplacementBehavior : uint8_t;
}
struct FrameIdentifierType;
using FrameIdentifier = ObjectIdentifier<FrameIdentifierType>;
} // namespace WebCore
@protocol WebViewImplDelegate
- (NSTextInputContext *)_web_superInputContext;
- (void)_web_superQuickLookWithEvent:(NSEvent *)event;
- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag;
- (void)_web_superSwipeWithEvent:(NSEvent *)event;
- (void)_web_superMagnifyWithEvent:(NSEvent *)event;
- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event;
- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute;
- (void)_web_superDoCommandBySelector:(SEL)selector;
- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event;
- (void)_web_superKeyDown:(NSEvent *)event;
- (NSView *)_web_superHitTest:(NSPoint)point;
- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData;
- (void)_web_prepareForImmediateActionAnimation;
- (void)_web_cancelImmediateActionAnimation;
- (void)_web_completeImmediateActionAnimation;
- (void)_web_dismissContentRelativeChildWindows;
- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
- (void)_web_editorStateDidChange;
- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
- (void)_web_didChangeContentSize:(NSSize)newSize;
#if ENABLE(DRAG_SUPPORT)
- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id <NSDraggingInfo>)draggingInfo;
- (void)_web_didPerformDragOperation:(BOOL)handled;
#endif
@optional
- (void)_web_didAddMediaControlsManager:(id)controlsManager;
- (void)_web_didRemoveMediaControlsManager;
- (void)_didHandleAcceptedCandidate;
- (void)_didUpdateCandidateListVisibility:(BOOL)visible;
- (BOOL)_web_hasActiveIntelligenceTextEffects;
- (void)_web_suppressContentRelativeChildViews;
- (void)_web_restoreContentRelativeChildViews;
@end
namespace WebCore {
struct DragItem;
struct ResolvedCaptionDisplaySettingsOptions;
#if ENABLE(WEB_AUTHN)
struct DigitalCredentialsMobileDocumentRequestData;
struct DigitalCredentialsResponseData;
#endif
struct FrameIdentifierType;
using FrameIdentifier = ObjectIdentifier<FrameIdentifierType>;
}
namespace WebKit {
class PageClient;
class PageClientImpl;
class DrawingAreaProxy;
class MediaSessionCoordinatorProxyPrivate;
class BrowsingWarning;
class ViewGestureController;
class ViewSnapshot;
class WebBackForwardListItem;
class WebEditCommandProxy;
class WebFrameProxy;
class WebPageProxy;
class WebProcessPool;
class WebProcessProxy;
struct WebHitTestResultData;
enum class ContinueUnsafeLoad : bool;
enum class ForceSoftwareCapturingViewportSnapshot : bool;
enum class UndoOrRedo : bool;
typedef id <NSValidatedUserInterfaceItem> ValidationItem;
typedef Vector<RetainPtr<ValidationItem>> ValidationVector;
typedef HashMap<String, ValidationVector> ValidationMap;
class WebViewImpl final : public CanMakeWeakPtr<WebViewImpl>, public CanMakeCheckedPtr<WebViewImpl> {
WTF_MAKE_NONCOPYABLE(WebViewImpl);
WTF_MAKE_TZONE_ALLOCATED(WebViewImpl);
WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(WebViewImpl);
public:
WebViewImpl(WKWebView *, WebProcessPool&, Ref<API::PageConfiguration>&&);
~WebViewImpl();
NSWindow *window();
NSInteger windowNumber();
WebPageProxy& page() { return m_page.get(); }
WKWebView *view() const { return m_view.getAutoreleased(); }
void processWillSwap();
void processDidExit();
void pageClosed();
void didRelaunchProcess();
void NODELETE scrollingCoordinatorWasCreated();
void setDrawsBackground(bool);
bool NODELETE drawsBackground() const;
void setBackgroundColor(NSColor *);
NSColor *backgroundColor() const;
bool NODELETE isOpaque() const;
void setShouldSuppressFirstResponderChanges(bool);
bool acceptsFirstMouse(NSEvent *);
bool NODELETE acceptsFirstResponder();
bool becomeFirstResponder();
bool resignFirstResponder();
bool isFocused() const;
void viewWillStartLiveResize();
void viewDidEndLiveResize();
void createPDFHUD(PDFPluginIdentifier, WebCore::FrameIdentifier, const WebCore::IntRect&);
void updatePDFHUDLocation(PDFPluginIdentifier, const WebCore::IntRect&);
void removePDFHUD(PDFPluginIdentifier);
void removeAllPDFHUDs();
void showPDFHUD(PDFPluginIdentifier);
RetainPtr<NSSet> pdfHUDs();
bool isPointOnPDFHUD(WebCore::FloatPoint locationInView);
RetainPtr<NSView> hitTestPDFHUD(WebCore::FloatPoint locationInView);
bool isViewVisible(NSView *);
void renewGState();
void setFrameSize(CGSize);
void disableFrameSizeUpdates();
void enableFrameSizeUpdates();
bool frameSizeUpdatesDisabled() const;
void setFrameAndScrollBy(CGRect, CGSize);
void updateWindowAndViewFrames();
void setFixedLayoutSize(CGSize);
CGSize fixedLayoutSize() const;
Ref<DrawingAreaProxy> createDrawingAreaProxy(WebProcessProxy&);
bool NODELETE isUsingUISideCompositing() const;
void setDrawingAreaSize(CGSize);
void updateLayer();
static bool wantsUpdateLayer() { return true; }
void drawRect(CGRect);
bool canChangeFrameLayout(WebFrameProxy&);
RetainPtr<NSPrintOperation> printOperationWithPrintInfo(NSPrintInfo *, WebFrameProxy&);
void setAutomaticallyAdjustsContentInsets(bool);
bool NODELETE automaticallyAdjustsContentInsets() const;
void updateContentInsetsIfAutomatic();
void setObscuredContentInsets(const WebCore::FloatBoxExtent&);
WebCore::FloatBoxExtent NODELETE obscuredContentInsets() const;
void flushPendingObscuredContentInsetChanges();
void prepareContentInRect(CGRect);
void updateViewExposedRect();
void setClipsToVisibleRect(bool);
bool clipsToVisibleRect() const { return m_clipsToVisibleRect; }
void setMinimumSizeForAutoLayout(CGSize);
CGSize minimumSizeForAutoLayout() const;
void setSizeToContentAutoSizeMaximumSize(CGSize);
CGSize sizeToContentAutoSizeMaximumSize() const;
void setShouldExpandToViewHeightForAutoLayout(bool);
bool NODELETE shouldExpandToViewHeightForAutoLayout() const;
void setIntrinsicContentSize(CGSize);
CGSize NODELETE intrinsicContentSize() const;
void setViewScale(CGFloat);
CGFloat NODELETE viewScale() const;
void showWarningView(const BrowsingWarning&, CompletionHandler<void(Variant<ContinueUnsafeLoad, URL>&&)>&&);
void clearWarningView();
void clearWarningViewIfForMainFrameNavigation();
WKLayoutMode layoutMode() const;
void setLayoutMode(WKLayoutMode);
void updateSupportsArbitraryLayoutModes();
void windowDidOrderOffScreen();
void windowDidOrderOnScreen();
void windowDidBecomeKey(NSWindow *);
void windowDidResignKey(NSWindow *);
void windowDidMiniaturize();
void windowDidDeminiaturize();
void windowDidMove();
void windowDidResize();
void windowWillBeginSheet();
void windowDidChangeBackingProperties(CGFloat oldBackingScaleFactor);
void windowDidChangeScreen();
void windowDidChangeOcclusionState();
void windowWillClose();
void NODELETE windowWillEnterOrExitFullScreen();
void windowDidEnterOrExitFullScreen();
void screenDidChangeColorSpace();
bool shouldDelayWindowOrderingForEvent(NSEvent *);
bool windowResizeMouseLocationIsInVisibleScrollerThumb(CGPoint);
void applicationShouldSuppressHDR(bool);
void accessibilitySettingsDidChange();
// -[NSView mouseDownCanMoveWindow] returns YES when the NSView is transparent,
// but we don't want a drag in the NSView to move the window, even if it's transparent.
static bool mouseDownCanMoveWindow() { return false; }
void viewWillMoveToWindow(NSWindow *);
void viewDidMoveToWindow();
void viewDidChangeBackingProperties();
void viewDidHide();
void viewDidUnhide();
void activeSpaceDidChange();
void pageDidScroll(const WebCore::IntPoint&);
NSRect scrollViewFrame();
bool NODELETE hasScrolledContentsUnderTitlebar();
void updateTitlebarAdjacencyState();
RetainPtr<NSView> hitTest(CGPoint);
WebCore::DestinationColorSpace colorSpace();
void setUnderlayColor(NSColor *);
RetainPtr<NSColor> underlayColor() const;
RetainPtr<NSColor> pageExtendedBackgroundColor() const;
_WKRectEdge NODELETE pinnedState();
_WKRectEdge NODELETE rubberBandingEnabled();
void NODELETE setRubberBandingEnabled(_WKRectEdge);
bool NODELETE alwaysBounceVertical();
void NODELETE setAlwaysBounceVertical(bool);
bool NODELETE alwaysBounceHorizontal();
void NODELETE setAlwaysBounceHorizontal(bool);
void setOverlayScrollbarStyle(std::optional<WebCore::ScrollbarOverlayStyle> scrollbarStyle);
std::optional<WebCore::ScrollbarOverlayStyle> NODELETE overlayScrollbarStyle() const;
void beginDeferringViewInWindowChanges();
// FIXME: Merge these two?
void endDeferringViewInWindowChanges();
void endDeferringViewInWindowChangesSync();
bool isDeferringViewInWindowChanges() const { return m_shouldDeferViewInWindowChanges; }
void setWindowOcclusionDetectionEnabled(bool enabled) { m_windowOcclusionDetectionEnabled = enabled; }
bool windowOcclusionDetectionEnabled() const { return m_windowOcclusionDetectionEnabled; }
void prepareForMoveToWindow(NSWindow *targetWindow, WTF::Function<void()>&& completionHandler);
NSWindow *targetWindowForMovePreparation() const { return m_targetWindowForMovePreparation.get(); }
void setFontForWebView(NSFont *, id);
void updateSecureInputState();
void resetSecureInputState();
bool inSecureInputState() const { return m_inSecureInputState; }
void notifyInputContextAboutDiscardedComposition();
void handleAcceptedAlternativeText(const String&);
NSInteger spellCheckerDocumentTag();
void pressureChangeWithEvent(NSEvent *);
NSEvent *lastPressureEvent() { return m_lastPressureEvent.get(); }
#if ENABLE(FULLSCREEN_API)
bool NODELETE hasFullScreenWindowController() const;
WKFullScreenWindowController *fullScreenWindowController();
void closeFullScreenWindowController();
#endif
NSView *fullScreenPlaceholderView();
NSWindow *fullScreenWindow();
bool NODELETE isEditable() const;
bool executeSavedCommandBySelector(SEL);
void executeEditCommandForSelector(SEL, const String& argument = String());
void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo);
void clearAllEditCommands();
bool writeSelectionToPasteboard(NSPasteboard *, NSArray *types);
bool readSelectionFromPasteboard(NSPasteboard *);
id validRequestorForSendAndReturnTypes(NSString *sendType, NSString *returnType);
void centerSelectionInVisibleArea();
void selectionDidChange();
void didBecomeEditable();
void updateFontManagerIfNeeded();
void changeFontFromFontManager();
void changeFontAttributesFromSender(id);
void changeFontColorFromSender(id);
bool validateUserInterfaceItem(id <NSValidatedUserInterfaceItem>);
void setEditableElementIsFocused(bool);
enum class ContentRelativeChildViewsSuppressionType : uint8_t { Remove, Restore, TemporarilyRemove };
void suppressContentRelativeChildViews(ContentRelativeChildViewsSuppressionType);
#if HAVE(REDESIGNED_TEXT_CURSOR)
void updateCursorAccessoryPlacement();
#endif
void startSpeaking();
void stopSpeaking(id);
void showGuessPanel(id);
void checkSpelling();
void changeSpelling(id);
void setContinuousSpellCheckingEnabled(bool);
void toggleContinuousSpellChecking();
bool isGrammarCheckingEnabled();
void setGrammarCheckingEnabled(bool);
void toggleGrammarChecking();
void toggleAutomaticSpellingCorrection();
void orderFrontSubstitutionsPanel(id);
void toggleSmartInsertDelete();
bool isAutomaticQuoteSubstitutionEnabled();
void setAutomaticQuoteSubstitutionEnabled(bool);
void toggleAutomaticQuoteSubstitution();
bool isAutomaticDashSubstitutionEnabled();
void setAutomaticDashSubstitutionEnabled(bool);
void toggleAutomaticDashSubstitution();
bool isAutomaticLinkDetectionEnabled();
void setAutomaticLinkDetectionEnabled(bool);
void toggleAutomaticLinkDetection();
bool isAutomaticTextReplacementEnabled();
void setAutomaticTextReplacementEnabled(bool);
void toggleAutomaticTextReplacement();
bool isSmartListsEnabled();
void setSmartListsEnabled(bool);
void toggleSmartLists();
void uppercaseWord();
void lowercaseWord();
void capitalizeWord();
void convertToTraditionalChinese();
void convertToSimplifiedChinese();
void requestCandidatesForSelectionIfNeeded();
void preferencesDidChange();
void updateNeedsViewFrameInWindowCoordinatesIfNeeded();
void teardownTextIndicatorLayer();
void startTextIndicatorFadeOut();
CALayer *textIndicatorInstallationLayer();
void dismissContentRelativeChildWindowsFromViewOnly();
void dismissContentRelativeChildWindowsWithAnimation(bool);
void dismissContentRelativeChildWindowsWithAnimationFromViewOnly(bool);
static void hideWordDefinitionWindow();
void quickLookWithEvent(NSEvent *);
void prepareForDictionaryLookup();
void setAllowsLinkPreview(bool);
bool allowsLinkPreview() const { return m_allowsLinkPreview; }
NSObject *immediateActionAnimationControllerForHitTestResult(API::HitTestResult*, uint32_t type, API::Object* userData);
void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, API::Object* userData);
void prepareForImmediateActionAnimation();
void cancelImmediateActionAnimation();
void completeImmediateActionAnimation();
void didChangeContentSize(CGSize);
void videoControlsManagerDidChange();
void setIgnoresNonWheelEvents(bool);
bool ignoresNonWheelEvents() const { return m_ignoresNonWheelEvents; }
void setIgnoresMouseMoveEvents(bool ignoresMouseMoveEvents) { m_ignoresMouseMoveEvents = ignoresMouseMoveEvents; }
bool ignoresMouseMoveEvents() const { return m_ignoresMouseMoveEvents; }
void setIgnoresAllEvents(bool);
bool ignoresAllEvents() const { return m_ignoresAllEvents; }
void NODELETE setIgnoresMouseDraggedEvents(bool);
bool ignoresMouseDraggedEvents() const { return m_ignoresMouseDraggedEvents; }
void setAccessibilityWebProcessToken(NSData *, pid_t);
void accessibilityRegisterUIProcessTokens();
void updateRemoteAccessibilityRegistration(bool registerProcess);
id accessibilityFocusedUIElement();
bool accessibilityIsIgnored() const { return false; }
id accessibilityHitTest(CGPoint);
void enableAccessibilityIfNecessary(NSString *attribute = nil);
id accessibilityAttributeValue(NSString *, id parameter = nil);
RetainPtr<NSAccessibilityRemoteUIElement> remoteAccessibilityChildIfNotSuspended();
// Accessibility info for debugging
NSUInteger accessibilityRemoteChildTokenHash();
NSUInteger accessibilityUIProcessLocalTokenHash();
NSArray<NSNumber *> *registeredRemoteAccessibilityPids();
NSData *NODELETE remoteAccessibilityChildToken();
bool hasRemoteAccessibilityChild();
void updatePrimaryTrackingAreaOptions(NSTrackingAreaOptions);
NSTrackingRectTag addTrackingRect(CGRect, id owner, void* userData, bool assumeInside);
NSTrackingRectTag addTrackingRectWithTrackingNum(CGRect, id owner, void* userData, bool assumeInside, int tag);
void addTrackingRectsWithTrackingNums(Vector<CGRect>, id owner, void** userDataList, bool assumeInside, NSTrackingRectTag *trackingNums);
void removeTrackingRect(NSTrackingRectTag);
void removeTrackingRects(std::span<NSTrackingRectTag>);
NSString *stringForToolTip(NSToolTipTag tag);
void toolTipChanged(const String& oldToolTip, const String& newToolTip);
void enterAcceleratedCompositingWithRootLayer(CALayer *);
void setAcceleratedCompositingRootLayer(CALayer *);
CALayer *acceleratedCompositingRootLayer() const LIFETIME_BOUND { return m_rootLayer.get(); }
void setThumbnailView(_WKThumbnailView *);
RetainPtr<_WKThumbnailView> thumbnailView() const { return m_thumbnailView.get(); }
void setHeaderBannerLayer(CALayer *);
CALayer *headerBannerLayer() const LIFETIME_BOUND { return m_headerBannerLayer.get(); }
void setFooterBannerLayer(CALayer *);
CALayer *footerBannerLayer() const LIFETIME_BOUND { return m_footerBannerLayer.get(); }
void setInspectorAttachmentView(NSView *);
RetainPtr<NSView> inspectorAttachmentView();
void showShareSheet(WebCore::ShareDataWithParsedURL&&, WTF::CompletionHandler<void(bool)>&&, WKWebView *);
void shareSheetDidDismiss(WKShareSheet *);
#if ENABLE(WEB_AUTHN)
void showDigitalCredentialsPicker(const WebCore::DigitalCredentialsRequestData&, WTF::CompletionHandler<void(Expected<WebCore::DigitalCredentialsResponseData, WebCore::ExceptionData>&&)>&&, WKWebView*);
void dismissDigitalCredentialsPicker(WTF::CompletionHandler<void(bool)>&&, WKWebView*);
#endif
_WKRemoteObjectRegistry *remoteObjectRegistry();
#if ENABLE(DRAG_SUPPORT)
void draggedImage(NSImage *, CGPoint endPoint, NSDragOperation);
NSDragOperation draggingEntered(id <NSDraggingInfo>);
NSDragOperation draggingUpdated(id <NSDraggingInfo>);
void draggingExited(id <NSDraggingInfo>);
bool prepareForDragOperation(id <NSDraggingInfo>);
bool performDragOperation(id <NSDraggingInfo>);
NSView *hitTestForDragTypes(CGPoint, NSSet *types);
void registerDraggedTypes();
NSDragOperation dragSourceOperationMask(NSDraggingSession *, NSDraggingContext);
void draggingSessionEnded(NSDraggingSession *, NSPoint, NSDragOperation);
NSString *fileNameForFilePromiseProvider(NSFilePromiseProvider *, NSString *fileType);
void writeToURLForFilePromiseProvider(NSFilePromiseProvider *, NSURL *, void(^)(NSError *));
void didPerformDragOperation(bool handled);
#endif
void startWindowDrag();
void startDrag(const WebCore::DragItem&, WebCore::ShareableBitmap::Handle&& image, const std::optional<WebCore::FrameIdentifier>& = std::nullopt);
void setPromisedDataForImage(Ref<WebCore::Image>&&, const String& filename, const String& extension, const String& title, const String& url, const String& visibleURL, RefPtr<WebCore::FragmentedSharedBuffer>&& archiveBuffer, const String& pasteboardName, const String& pasteboardOrigin);
void writePromisedImageDragDataToPasteboard(NSPasteboard *);
void pasteboardChangedOwner(NSPasteboard *);
void provideDataForPasteboard(NSPasteboard *, NSString *type);
NSArray *namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestination);
RefPtr<ViewSnapshot> takeViewSnapshot();
RefPtr<ViewSnapshot> takeViewSnapshot(ForceSoftwareCapturingViewportSnapshot);
void saveBackForwardSnapshotForCurrentItem();
void saveBackForwardSnapshotForItem(WebBackForwardListItem&);
void insertTextPlaceholderWithSize(CGSize, void(^completionHandler)(NSTextPlaceholder *));
void removeTextPlaceholder(NSTextPlaceholder *, bool willInsertText, void(^completionHandler)());
_WKWarningView *warningView() LIFETIME_BOUND { return m_warningView.get(); }
ViewGestureController* gestureController() const { return m_gestureController.get(); }
ViewGestureController& ensureGestureController();
#if HAVE(APPKIT_GESTURES_SUPPORT)
WKAppKitGestureController *appKitGestureController() const LIFETIME_BOUND { return m_appKitGestureController.get(); }
#endif
void NODELETE setAllowsBackForwardNavigationGestures(bool);
bool allowsBackForwardNavigationGestures() const { return m_allowsBackForwardNavigationGestures; }
void NODELETE setAllowsMagnification(bool);
bool allowsMagnification() const { return m_allowsMagnification; }
void setMagnification(double, CGPoint centerPoint);
void setMagnification(double);
double magnification() const;
void setCustomSwipeViews(NSArray *);
WebCore::FloatRect windowRelativeBoundsForCustomSwipeViews() const;
WebCore::FloatBoxExtent NODELETE customSwipeViewsObscuredContentInsets() const;
void setCustomSwipeViewsObscuredContentInsets(WebCore::FloatBoxExtent&&);
bool tryToSwipeWithEvent(NSEvent *, bool ignoringPinnedState);
void setDidMoveSwipeSnapshotCallback(BlockPtr<void (CGRect)>&&);
void scrollWheel(NSEvent *);
void swipeWithEvent(NSEvent *);
void magnifyWithEvent(NSEvent *);
void rotateWithEvent(NSEvent *);
void smartMagnifyWithEvent(NSEvent *);
RetainPtr<NSEvent> setLastMouseDownEvent(NSEvent *);
void gestureEventWasNotHandledByWebCore(NSEvent *);
void gestureEventWasNotHandledByWebCoreFromViewOnly(NSEvent *);
void didRestoreScrollPosition();
void scrollToRect(const WebCore::FloatRect&, const WebCore::FloatPoint&);
void setTotalHeightOfBanners(CGFloat totalHeightOfBanners) { m_totalHeightOfBanners = totalHeightOfBanners; }
CGFloat totalHeightOfBanners() const { return m_totalHeightOfBanners; }
void doneWithKeyEvent(NSEvent *, bool eventWasHandled);
NSArray *validAttributesForMarkedTextSingleton();
void doCommandBySelector(SEL);
void insertText(id string);
void insertText(id string, NSRange replacementRange);
NSTextInputContext *inputContext();
NSTextInputContext *inputContextForSelectionUpdates();
void unmarkText();
void setMarkedText(id string, NSRange selectedRange, NSRange replacementRange);
NSRange NODELETE selectedRange();
bool hasMarkedText();
NSRange NODELETE markedRange();
NSAttributedString *NODELETE attributedSubstringForProposedRange(NSRange, NSRangePointer actualRange);
NSUInteger NODELETE characterIndexForPoint(NSPoint);
NSRect NODELETE firstRectForCharacterRange(NSRange, NSRangePointer actualRange);
bool performKeyEquivalent(NSEvent *);
void keyUp(NSEvent *);
void keyDown(NSEvent *);
void flagsChanged(NSEvent *);
// Override this so that AppKit will send us arrow keys as key down events so we can
// support them via the key bindings mechanism.
static bool wantsKeyDownForEvent(NSEvent *) { return true; }
void selectedRangeWithCompletionHandler(void(^)(NSRange));
void hasMarkedTextWithCompletionHandler(void(^)(BOOL hasMarkedText));
void markedRangeWithCompletionHandler(void(^)(NSRange));
void attributedSubstringForProposedRange(NSRange, void(^)(NSAttributedString *attrString, NSRange actualRange));
void firstRectForCharacterRange(NSRange, void(^)(NSRect firstRect, NSRange actualRange));
void characterIndexForPoint(NSPoint, void(^)(NSUInteger));
void typingAttributesWithCompletionHandler(void(^)(NSDictionary<NSString *, id> *));
NSRect unionRectInVisibleSelectedRangeInScreen() const;
NSRect documentVisibleRectInScreen() const;
bool isContentRichlyEditable() const;
#if ENABLE(MULTI_REPRESENTATION_HEIC)
void insertMultiRepresentationHEIC(NSData *, NSString *);
#endif
void createFlagsChangedEventMonitor();
void removeFlagsChangedEventMonitor();
bool NODELETE hasFlagsChangedEventMonitor();
void mouseMoved(NSEvent *);
void mouseDown(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void mouseUp(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void mouseDragged(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void mouseEntered(NSEvent *);
void mouseExited(NSEvent *);
void otherMouseDown(NSEvent *);
void otherMouseDragged(NSEvent *);
void otherMouseUp(NSEvent *);
void rightMouseDown(NSEvent *);
void rightMouseDragged(NSEvent *);
void rightMouseUp(NSEvent *);
void forceRequestCandidatesForTesting();
bool shouldRequestCandidates() const;
#if ENABLE(IMAGE_ANALYSIS)
void requestTextRecognition(const URL& imageURL, WebCore::ShareableBitmap::Handle&& imageData, const String& sourceLanguageIdentifier, const String& targetLanguageIdentifier, CompletionHandler<void(WebCore::TextRecognitionResult&&)>&&);
void computeHasVisualSearchResults(const URL& imageURL, WebCore::ShareableBitmap& imageBitmap, CompletionHandler<void(bool)>&&);
#endif
#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
WebCore::FloatRect imageAnalysisInteractionBounds() const { return m_imageAnalysisInteractionBounds; }
VKCImageAnalysisOverlayView *imageAnalysisOverlayView() const { return m_imageAnalysisOverlayView.get(); }
#endif
bool imageAnalysisOverlayViewHasCursorAtPoint(NSPoint locationInView) const;
bool acceptsPreviewPanelControl(QLPreviewPanel *);
void beginPreviewPanelControl(QLPreviewPanel *);
void endPreviewPanelControl(QLPreviewPanel *);
bool windowIsFrontWindowUnderMouse(NSEvent *);
bool NODELETE requiresUserActionForEditingControlsManager() const;
WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection();
void setUserInterfaceLayoutDirection(NSUserInterfaceLayoutDirection);
void handleAcceptedCandidate(NSTextCheckingResult *acceptedCandidate);
#if HAVE(TOUCH_BAR)
NSTouchBar *makeTouchBar();
void updateTouchBar();
NSTouchBar *currentTouchBar() const LIFETIME_BOUND { return m_currentTouchBar.get(); }
NSCandidateListTouchBarItem *candidateListTouchBarItem() const;
#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
WebCore::PlatformPlaybackSessionInterface* playbackSessionInterface() const;
bool isPictureInPictureActive();
void togglePictureInPicture();
bool isInWindowFullscreenActive() const;
void enterInWindowFullscreen();
void exitInWindowFullscreen();
void updateMediaPlaybackControlsManager();
AVTouchBarScrubber *mediaPlaybackControlsView() const;
#endif
void nowPlayingMediaTitleAndArtist(void(^completionHandler)(NSString *, NSString *));
NSTouchBar *textTouchBar() const;
void dismissTextTouchBarPopoverItemWithIdentifier(NSString *);
bool clientWantsMediaPlaybackControlsView() const { return m_clientWantsMediaPlaybackControlsView; }
void setClientWantsMediaPlaybackControlsView(bool clientWantsMediaPlaybackControlsView) { m_clientWantsMediaPlaybackControlsView = clientWantsMediaPlaybackControlsView; }
void updateTouchBarAndRefreshTextBarIdentifiers();
void setIsCustomizingTouchBar(bool isCustomizingTouchBar) { m_isCustomizingTouchBar = isCustomizingTouchBar; };
bool canTogglePictureInPicture();
#endif // HAVE(TOUCH_BAR)
bool beginBackSwipeForTesting();
bool completeBackSwipeForTesting();
bool didCallEndSwipeGestureForTesting() const;
bool useFormSemanticContext() const;
void semanticContextDidChange();
void effectiveAppearanceDidChange();
bool effectiveAppearanceIsDark();
bool NODELETE effectiveUserInterfaceLevelIsElevated();
void takeFocus(WebCore::FocusDirection);
void clearPromisedImageDragData() { m_promisedImageDragData.reset(); }
void requestDOMPasteAccess(WebCore::DOMPasteAccessCategory, WebCore::DOMPasteRequiresInteraction, const WebCore::IntRect&, const String& originIdentifier, CompletionHandler<void(WebCore::DOMPasteAccessResponse)>&&);
void handleDOMPasteRequestForCategoryWithResult(WebCore::DOMPasteAccessCategory, WebCore::DOMPasteAccessResponse);
NSMenu *domPasteMenu() const LIFETIME_BOUND { return m_domPasteMenu.get(); }
void hideDOMPasteMenuWithResult(WebCore::DOMPasteAccessResponse);
#if HAVE(TRANSLATION_UI_SERVICES) && ENABLE(CONTEXT_MENUS)
bool canHandleContextMenuTranslation() const;
void handleContextMenuTranslation(const WebCore::TranslationContextMenuInfo&);
#endif
#if ENABLE(WRITING_TOOLS) && ENABLE(CONTEXT_MENUS)
bool canHandleContextMenuWritingTools() const;
#endif
#if ENABLE(MEDIA_SESSION_COORDINATOR)
MediaSessionCoordinatorProxyPrivate* mediaSessionCoordinatorForTesting() { return m_coordinatorForTesting.get(); }
void setMediaSessionCoordinatorForTesting(MediaSessionCoordinatorProxyPrivate*);
#endif
#if ENABLE(DATA_DETECTION)
void handleClickForDataDetectionResult(const WebCore::DataDetectorElementInfo&, const WebCore::IntPoint&);
#endif
#if ENABLE(REVEAL)
void didFinishPresentation(WKRevealItemPresenter *);
#endif
void beginTextRecognitionForVideoInElementFullscreen(WebCore::ShareableBitmap::Handle&&, WebCore::FloatRect);
void cancelTextRecognitionForVideoInElementFullscreen();
#if HAVE(INLINE_PREDICTIONS)
void setInlinePredictionsEnabled(bool enabled) { m_inlinePredictionsEnabled = enabled; }
bool inlinePredictionsEnabled() const { return m_inlinePredictionsEnabled; }
#endif
#if ENABLE(WRITING_TOOLS)
void showWritingTools(WTRequestedTool = WTRequestedToolIndex);
void addTextAnimationForAnimationID(WTF::UUID, const WebCore::TextAnimationData&);
void removeTextAnimationForAnimationID(WTF::UUID);
void hideTextAnimationView();
#if ENABLE(WRITING_TOOLS_TEXT_EFFECTS)
void addTextEffectForID(NSUUID *, const WebCore::TextEffectData&);
void removeTextEffectForID(NSUUID *);
#endif
#endif
#if HAVE(INLINE_PREDICTIONS)
bool allowsInlinePredictions() const;
#endif
#if ENABLE(CONTENT_INSET_BACKGROUND_FILL)
void updateScrollPocket();
NSScrollPocket *topScrollPocket() const LIFETIME_BOUND { return m_topScrollPocket.get(); }
void registerViewAboveScrollPocket(NSView *);
void unregisterViewAboveScrollPocket(NSView *);
void updateScrollPocketVisibilityWhenScrolledToTop();
void updateTopScrollPocketCaptureColor();
void updateTopScrollPocketStyle();
void updatePrefersSolidColorHardPocket();
void setClientImplicitlyRequestedTopScrollPocket();
#endif
#if ENABLE(BANNER_VIEW_OVERLAYS)
void setBannerView(WKBannerView *);
WKBannerView *bannerView() const LIFETIME_BOUND { return m_bannerView.get(); }
void applyBannerViewOverlayHeight(CGFloat, bool);
CGFloat bannerViewHeight() const;
CGFloat bannerViewMaximumHeight() const;
void updateBannerViewForWheelEvent(NSEvent *);
void updateBannerViewForPanGesture(NSGestureRecognizerState);
void updateBannerViewFrame();
#endif
#if ENABLE(SCROLL_STRETCH_NOTIFICATIONS)
void topScrollStretchDidChange(CGFloat topScrollStretch);
#endif
#if ENABLE(VIDEO)
void showCaptionDisplaySettings(WebCore::HTMLMediaElementIdentifier, const WebCore::ResolvedCaptionDisplaySettingsOptions&, CompletionHandler<void(Expected<void, WebCore::ExceptionData>&&)>&&);
#endif
#if HAVE(APPKIT_GESTURES_SUPPORT)
void addTextSelectionManager();
bool isTextSelectedAtPoint(NSPoint);
void beginSuppressingSingleClickGestureForTextSelection();
void endSuppressingSingleClickGestureForTextSelection();
#endif
private:
#if HAVE(TOUCH_BAR)
void setUpTextTouchBar(NSTouchBar *);
void updateTextTouchBar();
void updateMediaTouchBar();
bool useMediaPlaybackControlsView() const;
bool isRichlyEditableForTouchBar() const;
#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
void installImageAnalysisOverlayView(RetainPtr<VKCImageAnalysis>&&);
void uninstallImageAnalysisOverlayView();
void performOrDeferImageAnalysisOverlayViewHierarchyTask(std::function<void()>&&);
void fulfillDeferredImageAnalysisOverlayViewHierarchyTask();
#endif
bool pageIsScrolledToTop() const { return m_lastPageScrollPosition.y() <= 0; }
void pageScrollingHysteresisFired(PAL::HysteresisState);
bool hasContentRelativeChildViews() const;
void suppressContentRelativeChildViews();
void restoreContentRelativeChildViews();
bool m_clientWantsMediaPlaybackControlsView { false };
bool m_canCreateTouchBars { false };
bool m_startedListeningToCustomizationEvents { false };
bool m_isUpdatingTextTouchBar { false };
bool m_isCustomizingTouchBar { false };
RetainPtr<NSTouchBar> m_currentTouchBar;
RetainPtr<NSTouchBar> m_richTextTouchBar;
RetainPtr<NSTouchBar> m_plainTextTouchBar;
RetainPtr<NSTouchBar> m_passwordTextTouchBar;
RetainPtr<WKTextTouchBarItemController> m_textTouchBarItemController;
RetainPtr<NSCandidateListTouchBarItem> m_richTextCandidateListTouchBarItem;
RetainPtr<NSCandidateListTouchBarItem> m_plainTextCandidateListTouchBarItem;
RetainPtr<NSCandidateListTouchBarItem> m_passwordTextCandidateListTouchBarItem;
RetainPtr<WebPlaybackControlsManager> m_playbackControlsManager;
RetainPtr<NSCustomTouchBarItem> m_exitFullScreenButton;
#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
RetainPtr<AVTouchBarPlaybackControlsProvider> m_mediaTouchBarProvider;
RetainPtr<AVTouchBarScrubber> m_mediaPlaybackControlsView;
#endif // ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
#endif // HAVE(TOUCH_BAR)
NSRect convertFromViewToScreen(NSRect rectInView) const;
bool supportsArbitraryLayoutModes() const;
float intrinsicDeviceScaleFactor() const;
void sendToolTipMouseExited();
void sendToolTipMouseEntered();
void reparentLayerTreeInThumbnailView();
// Returns true if the thumbnail view consumed the layer.
bool updateThumbnailViewLayer();
void setUserInterfaceItemState(NSString *commandName, bool enabled, int state);
Vector<WebCore::KeypressCommand> collectKeyboardLayoutCommandsForEvent(NSEvent *);
void interpretKeyEvent(NSEvent *, void(^completionHandler)(BOOL handled, const Vector<WebCore::KeypressCommand>&));
void nativeMouseEventHandler(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void nativeMouseEventHandlerInternal(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void scheduleMouseDidMoveOverElement(NSEvent *);
void mouseMovedInternal(NSEvent *);
void mouseDownInternal(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void mouseUpInternal(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void mouseDraggedInternal(NSEvent *, WebEventInputSource, WebCore::PlatformMouseEvent::CanInitiateDrag = WebCore::PlatformMouseEvent::CanInitiateDrag::Yes);
void handleProcessSwapOrExit();
bool mightBeginDragWhileInactive();
bool mightBeginScrollWhileInactive();
void handleRequestedCandidates(NSInteger sequenceNumber, NSArray<NSTextCheckingResult *> *candidates);
#if HAVE(INLINE_PREDICTIONS)
void showInlinePredictionsForCandidates(NSArray<NSTextCheckingResult *> *);
void showInlinePredictionsForCandidate(NSTextCheckingResult *, NSRange, NSRange);
#endif
NSTextCheckingTypes getTextCheckingTypes() const;
void contentRelativeViewsHysteresisTimerFired(PAL::HysteresisState);
void flushPendingMouseEventCallbacks();
void viewWillMoveToWindowImpl(NSWindow *);
RetainPtr<id> toolTipOwnerForSendingMouseEvents() const;
#if ENABLE(DRAG_SUPPORT)
void sendDragEndToPage(CGPoint endPoint, NSDragOperation);
#endif
#if ENABLE(IMAGE_ANALYSIS)
CocoaImageAnalyzer* ensureImageAnalyzer();
int32_t processImageAnalyzerRequest(CocoaImageAnalyzerRequest *, CompletionHandler<void(RetainPtr<CocoaImageAnalysis>&&, NSError *)>&&);
#endif
std::optional<EditorState::PostLayoutData> postLayoutDataForContentEditable();
WeakObjCPtr<WKWebView> m_view;
const UniqueRef<PageClient> m_pageClient;
const Ref<WebPageProxy> m_page;
#if ENABLE(TILED_CA_DRAWING_AREA)
DrawingAreaType m_drawingAreaType { DrawingAreaType::TiledCoreAnimation };