1/*
2 * Copyright (C) 2010-2019 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#pragma once
27
28#include "APIInjectedBundleEditorClient.h"
29#include "APIInjectedBundleFormClient.h"
30#include "APIInjectedBundlePageContextMenuClient.h"
31#include "APIInjectedBundlePageLoaderClient.h"
32#include "APIInjectedBundlePageResourceLoadClient.h"
33#include "APIInjectedBundlePageUIClient.h"
34#include "APIObject.h"
35#include "CallbackID.h"
36#include "DrawingAreaInfo.h"
37#include "EditingRange.h"
38#include "FocusedElementInformation.h"
39#include "InjectedBundlePageContextMenuClient.h"
40#include "InjectedBundlePageFullScreenClient.h"
41#include "InjectedBundlePagePolicyClient.h"
42#include "LayerTreeContext.h"
43#include "MessageReceiver.h"
44#include "MessageSender.h"
45#include "OptionalCallbackID.h"
46#include "Plugin.h"
47#include "SandboxExtension.h"
48#include "ShareSheetCallbackID.h"
49#include "SharedMemory.h"
50#include "UserData.h"
51#include "WebBackForwardListProxy.h"
52#include "WebURLSchemeHandler.h"
53#include "WebUndoStepID.h"
54#include "WebUserContentController.h"
55#include "WebsitePoliciesData.h"
56#include <JavaScriptCore/InspectorFrontendChannel.h>
57#include <WebCore/ActivityState.h>
58#include <WebCore/DictionaryPopupInfo.h>
59#include <WebCore/DisabledAdaptations.h>
60#include <WebCore/DragActions.h>
61#include <WebCore/FrameLoaderTypes.h>
62#include <WebCore/HTMLMenuElement.h>
63#include <WebCore/HTMLMenuItemElement.h>
64#include <WebCore/IntRect.h>
65#include <WebCore/IntSizeHash.h>
66#include <WebCore/Page.h>
67#include <WebCore/PageOverlay.h>
68#include <WebCore/PluginData.h>
69#include <WebCore/PointerID.h>
70#include <WebCore/SecurityPolicyViolationEvent.h>
71#include <WebCore/ShareData.h>
72#include <WebCore/UserActivity.h>
73#include <WebCore/UserContentTypes.h>
74#include <WebCore/UserInterfaceLayoutDirection.h>
75#include <WebCore/UserScriptTypes.h>
76#include <WebCore/VisibilityState.h>
77#include <WebCore/WebCoreKeyboardUIMode.h>
78#include <memory>
79#include <pal/HysteresisActivity.h>
80#include <wtf/HashMap.h>
81#include <wtf/MonotonicTime.h>
82#include <wtf/RefPtr.h>
83#include <wtf/RunLoop.h>
84#include <wtf/Seconds.h>
85#include <wtf/WallTime.h>
86#include <wtf/text/WTFString.h>
87
88#if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
89typedef struct _AtkObject AtkObject;
90#include <wtf/glib/GRefPtr.h>
91#endif
92
93#if PLATFORM(GTK)
94#include "ArgumentCodersGtk.h"
95#include "WebPrintOperationGtk.h"
96#endif
97
98#if PLATFORM(IOS_FAMILY)
99#include "GestureTypes.h"
100#include "WebPageMessages.h"
101#include <WebCore/IntPointHash.h>
102#include <WebCore/ViewportConfiguration.h>
103#endif
104
105#if ENABLE(APPLICATION_MANIFEST)
106#include <WebCore/ApplicationManifest.h>
107#endif
108
109#if ENABLE(IOS_TOUCH_EVENTS)
110#include <WebKitAdditions/PlatformTouchEventIOS.h>
111#elif ENABLE(TOUCH_EVENTS)
112#include <WebCore/PlatformTouchEvent.h>
113#endif
114
115#if ENABLE(DATA_DETECTION)
116#include <WebCore/DataDetection.h>
117#endif
118
119#if ENABLE(MAC_GESTURE_EVENTS)
120#include <WebKitAdditions/PlatformGestureEventMac.h>
121#endif
122
123#if PLATFORM(COCOA)
124#include "DynamicViewportSizeUpdate.h"
125#include <WebCore/VisibleSelection.h>
126#include <wtf/RetainPtr.h>
127OBJC_CLASS CALayer;
128OBJC_CLASS NSArray;
129OBJC_CLASS NSDictionary;
130OBJC_CLASS NSObject;
131OBJC_CLASS WKAccessibilityWebPageObject;
132#endif
133
134#define ENABLE_VIEWPORT_RESIZING PLATFORM(IOS_FAMILY)
135
136namespace API {
137class Array;
138}
139
140namespace IPC {
141class Connection;
142class Decoder;
143class FormDataReference;
144}
145
146namespace WebCore {
147
148class CaptureDevice;
149class DocumentLoader;
150class DragData;
151class FontAttributeChanges;
152class FontChanges;
153class Frame;
154class FrameSelection;
155class FrameView;
156class GraphicsContext;
157class HTMLMenuElement;
158class HTMLMenuItemElement;
159class HTMLPlugInElement;
160class HTMLPlugInImageElement;
161class IntPoint;
162class KeyboardEvent;
163class MediaPlaybackTargetContext;
164class MediaPlayerRequestInstallMissingPluginsCallback;
165class Page;
166class PrintContext;
167class Range;
168class ResourceRequest;
169class ResourceResponse;
170class SelectionRect;
171class SharedBuffer;
172class SubstituteData;
173class SyntheticEditingCommandType;
174class TextCheckingRequest;
175class VisiblePosition;
176
177enum SyntheticClickType : int8_t;
178enum class DOMPasteAccessResponse : uint8_t;
179enum class DragHandlingMethod : uint8_t;
180enum class ShouldTreatAsContinuingLoad : bool;
181enum class StorageAccessPromptWasShown : bool;
182enum class StorageAccessWasGranted : bool;
183enum class TextIndicatorPresentationTransition : uint8_t;
184enum class WritingDirection : uint8_t;
185
186struct BackForwardItemIdentifier;
187struct CompositionUnderline;
188struct DictationAlternative;
189struct GlobalFrameIdentifier;
190struct GlobalWindowIdentifier;
191struct Highlight;
192struct KeypressCommand;
193struct PromisedAttachmentInfo;
194struct TextCheckingResult;
195struct ViewportArguments;
196
197#if ENABLE(ATTACHMENT_ELEMENT)
198class HTMLAttachmentElement;
199#endif
200}
201
202namespace WebKit {
203
204class DataReference;
205class DrawingArea;
206class DownloadID;
207class FindController;
208class GamepadData;
209class GeolocationPermissionRequestManager;
210class MediaDeviceSandboxExtensions;
211class NotificationPermissionRequestManager;
212class PDFPlugin;
213class PageBanner;
214class PluginView;
215class RemoteObjectRegistry;
216class RemoteWebInspectorUI;
217class TextCheckingControllerProxy;
218class UserMediaPermissionRequestManager;
219class ViewGestureGeometryCollector;
220class VisibleContentRectUpdateInfo;
221class WebColorChooser;
222class WebContextMenu;
223class WebContextMenuItemData;
224class WebDataListSuggestionPicker;
225class WebDocumentLoader;
226class WebEvent;
227class PlaybackSessionManager;
228class VideoFullscreenManager;
229class WebFrame;
230class WebFullScreenManager;
231class WebGestureEvent;
232class WebImage;
233class WebInspector;
234class WebInspectorClient;
235class WebInspectorUI;
236class WebKeyboardEvent;
237class WebMouseEvent;
238class WebNotificationClient;
239class WebOpenPanelResultListener;
240class WebPageGroupProxy;
241class WebPageInspectorTargetController;
242class WebPageOverlay;
243class WebPaymentCoordinator;
244class WebPopupMenu;
245class WebTouchEvent;
246class WebURLSchemeHandlerProxy;
247class WebUndoStep;
248class WebUserContentController;
249class WebWheelEvent;
250class RemoteLayerTreeTransaction;
251
252enum FindOptions : uint16_t;
253enum class DragControllerAction : uint8_t;
254
255struct AttributedString;
256struct BackForwardListItemState;
257struct DataDetectionResult;
258struct EditorState;
259struct InsertTextOptions;
260struct InteractionInformationAtPosition;
261struct InteractionInformationRequest;
262struct LoadParameters;
263struct PrintInfo;
264struct TextInputContext;
265struct WebAutocorrectionContext;
266struct WebPageCreationParameters;
267struct WebPreferencesStore;
268struct WebSelectionData;
269struct WebsitePoliciesData;
270
271using SnapshotOptions = uint32_t;
272using WKEventModifiers = uint32_t;
273
274class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender, public CanMakeWeakPtr<WebPage> {
275public:
276 static Ref<WebPage> create(uint64_t pageID, WebPageCreationParameters&&);
277 virtual ~WebPage();
278
279 void reinitializeWebPage(WebPageCreationParameters&&);
280
281 void close();
282
283 static WebPage* fromCorePage(WebCore::Page*);
284
285 WebCore::Page* corePage() const { return m_page.get(); }
286 uint64_t pageID() const { return m_pageID; }
287 PAL::SessionID sessionID() const { return m_page->sessionID(); }
288 bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); }
289
290 void setSessionID(PAL::SessionID);
291
292 void setSize(const WebCore::IntSize&);
293 const WebCore::IntSize& size() const { return m_viewSize; }
294 WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
295
296 DrawingArea* drawingArea() const { return m_drawingArea.get(); }
297
298#if ENABLE(ASYNC_SCROLLING)
299 WebCore::ScrollingCoordinator* scrollingCoordinator() const;
300#endif
301
302 WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
303
304 void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
305
306 bool scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity);
307
308 void centerSelectionInVisibleArea();
309
310#if PLATFORM(COCOA)
311 void willCommitLayerTree(RemoteLayerTreeTransaction&);
312 void didFlushLayerTreeAtTime(MonotonicTime);
313#endif
314
315 void layoutIfNeeded();
316 void updateRendering();
317
318 enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
319
320 WebInspector* inspector(LazyCreationPolicy = LazyCreationPolicy::CreateIfNeeded);
321 WebInspectorUI* inspectorUI();
322 RemoteWebInspectorUI* remoteInspectorUI();
323 bool isInspectorPage() { return !!m_inspectorUI || !!m_remoteInspectorUI; }
324
325 void inspectorFrontendCountChanged(unsigned);
326
327#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
328 PlaybackSessionManager& playbackSessionManager();
329 VideoFullscreenManager& videoFullscreenManager();
330 void videoControlsManagerDidChange();
331#endif
332
333#if PLATFORM(IOS_FAMILY)
334 void setAllowsMediaDocumentInlinePlayback(bool);
335 bool allowsMediaDocumentInlinePlayback() const { return m_allowsMediaDocumentInlinePlayback; }
336#endif
337
338#if ENABLE(FULLSCREEN_API)
339 WebFullScreenManager* fullScreenManager();
340#endif
341
342 void addConsoleMessage(uint64_t frameID, MessageSource, MessageLevel, const String&, uint64_t requestID = 0);
343 void sendCSPViolationReport(uint64_t frameID, const URL& reportURL, IPC::FormDataReference&&);
344 void enqueueSecurityPolicyViolationEvent(uint64_t frameID, WebCore::SecurityPolicyViolationEvent::Init&&);
345
346 // -- Called by the DrawingArea.
347 // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
348 void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
349
350 // -- Called from WebCore clients.
351 bool handleEditingKeyboardEvent(WebCore::KeyboardEvent&);
352
353 void didStartPageTransition();
354 void didCompletePageTransition();
355 void didCommitLoad(WebFrame*);
356 void willReplaceMultipartContent(const WebFrame&);
357 void didReplaceMultipartContent(const WebFrame&);
358 void didFinishDocumentLoad(WebFrame&);
359 void didFinishLoad(WebFrame&);
360 void show();
361 String userAgent(const URL&) const;
362 String platformUserAgent(const URL&) const;
363 WebCore::KeyboardUIMode keyboardUIMode();
364
365 void didInsertMenuElement(WebCore::HTMLMenuElement&);
366 void didRemoveMenuElement(WebCore::HTMLMenuElement&);
367 void didInsertMenuItemElement(WebCore::HTMLMenuItemElement&);
368 void didRemoveMenuItemElement(WebCore::HTMLMenuItemElement&);
369
370 const String& overrideContentSecurityPolicy() const { return m_overrideContentSecurityPolicy; }
371
372 WebUndoStep* webUndoStep(WebUndoStepID);
373 void addWebUndoStep(WebUndoStepID, Ref<WebUndoStep>&&);
374 void removeWebEditCommand(WebUndoStepID);
375 bool isInRedo() const { return m_isInRedo; }
376
377 bool isAlwaysOnLoggingAllowed() const;
378 void setActivePopupMenu(WebPopupMenu*);
379
380 void setHiddenPageDOMTimerThrottlingIncreaseLimit(Seconds limit)
381 {
382 m_page->setDOMTimerAlignmentIntervalIncreaseLimit(limit);
383 }
384
385#if ENABLE(INPUT_TYPE_COLOR)
386 WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
387 void setActiveColorChooser(WebColorChooser*);
388 void didChooseColor(const WebCore::Color&);
389 void didEndColorPicker();
390#endif
391
392#if ENABLE(DATALIST_ELEMENT)
393 void setActiveDataListSuggestionPicker(WebDataListSuggestionPicker*);
394 void didSelectDataListOption(const String&);
395 void didCloseSuggestions();
396#endif
397
398 WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
399 void setActiveOpenPanelResultListener(Ref<WebOpenPanelResultListener>&&);
400
401 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
402 void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
403
404 // -- InjectedBundle methods
405#if ENABLE(CONTEXT_MENUS)
406 void setInjectedBundleContextMenuClient(std::unique_ptr<API::InjectedBundle::PageContextMenuClient>&&);
407#endif
408 void setInjectedBundleEditorClient(std::unique_ptr<API::InjectedBundle::EditorClient>&&);
409 void setInjectedBundleFormClient(std::unique_ptr<API::InjectedBundle::FormClient>&&);
410 void setInjectedBundlePageLoaderClient(std::unique_ptr<API::InjectedBundle::PageLoaderClient>&&);
411 void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClientBase*);
412 void setInjectedBundleResourceLoadClient(std::unique_ptr<API::InjectedBundle::ResourceLoadClient>&&);
413 void setInjectedBundleUIClient(std::unique_ptr<API::InjectedBundle::PageUIClient>&&);
414#if ENABLE(FULLSCREEN_API)
415 void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClientBase*);
416#endif
417
418#if ENABLE(CONTEXT_MENUS)
419 API::InjectedBundle::PageContextMenuClient& injectedBundleContextMenuClient() { return *m_contextMenuClient; }
420#endif
421 API::InjectedBundle::EditorClient& injectedBundleEditorClient() { return *m_editorClient; }
422 API::InjectedBundle::FormClient& injectedBundleFormClient() { return *m_formClient; }
423 API::InjectedBundle::PageLoaderClient& injectedBundleLoaderClient() { return *m_loaderClient; }
424 InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
425 API::InjectedBundle::ResourceLoadClient& injectedBundleResourceLoadClient() { return *m_resourceLoadClient; }
426 API::InjectedBundle::PageUIClient& injectedBundleUIClient() { return *m_uiClient; }
427#if ENABLE(FULLSCREEN_API)
428 InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
429#endif
430
431 bool findStringFromInjectedBundle(const String&, FindOptions);
432 void findStringMatchesFromInjectedBundle(const String&, FindOptions);
433 void replaceStringMatchesFromInjectedBundle(const Vector<uint32_t>& matchIndices, const String& replacementText, bool selectionOnly);
434
435 WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
436
437 WebCore::Frame* mainFrame() const; // May return nullptr.
438 WebCore::FrameView* mainFrameView() const; // May return nullptr.
439
440 RefPtr<WebCore::Range> currentSelectionAsRange();
441
442#if ENABLE(NETSCAPE_PLUGIN_API)
443 RefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
444#endif
445
446#if ENABLE(WEBGL)
447 WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const URL&);
448 WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const URL&);
449#endif
450
451 enum class IncludePostLayoutDataHint { No, Yes };
452 EditorState editorState(IncludePostLayoutDataHint = IncludePostLayoutDataHint::Yes) const;
453 void updateEditorStateAfterLayoutIfEditabilityChanged();
454
455 // options are RenderTreeExternalRepresentationBehavior values.
456 String renderTreeExternalRepresentation(unsigned options = 0) const;
457 String renderTreeExternalRepresentationForPrinting() const;
458 uint64_t renderTreeSize() const;
459
460 void setTracksRepaints(bool);
461 bool isTrackingRepaints() const;
462 void resetTrackedRepaints();
463 Ref<API::Array> trackedRepaintRects();
464
465 void executeEditingCommand(const String& commandName, const String& argument);
466 bool isEditingCommandEnabled(const String& commandName);
467 void clearMainFrameName();
468 void sendClose();
469
470 void suspendForProcessSwap();
471
472 void sendSetWindowFrame(const WebCore::FloatRect&);
473
474 double textZoomFactor() const;
475 void setTextZoomFactor(double);
476 double pageZoomFactor() const;
477 void setPageZoomFactor(double);
478 void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
479 void windowScreenDidChange(uint32_t);
480 String dumpHistoryForTesting(const String& directory);
481 void clearHistory();
482
483 void accessibilitySettingsDidChange();
484
485 void scalePage(double scale, const WebCore::IntPoint& origin);
486 void scalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates);
487 double pageScaleFactor() const;
488 double totalScaleFactor() const;
489 double viewScaleFactor() const;
490 void scaleView(double scale);
491
492 void setUseFixedLayout(bool);
493 bool useFixedLayout() const { return m_useFixedLayout; }
494 bool setFixedLayoutSize(const WebCore::IntSize&);
495 WebCore::IntSize fixedLayoutSize() const;
496
497 void listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone>);
498
499 void setSuppressScrollbarAnimations(bool);
500
501 void setEnableVerticalRubberBanding(bool);
502 void setEnableHorizontalRubberBanding(bool);
503
504 void setBackgroundExtendsBeyondPage(bool);
505
506 void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
507 void setPaginationBehavesLikeColumns(bool);
508 void setPageLength(double);
509 void setGapBetweenPages(double);
510 void setPaginationLineGridEnabled(bool);
511
512 void postInjectedBundleMessage(const String& messageName, const UserData&);
513
514 void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; }
515 WebCore::Color underlayColor() const { return m_underlayColor; }
516
517 void stopLoading();
518 void stopLoadingFrame(uint64_t frameID);
519 bool defersLoading() const;
520 void setDefersLoading(bool deferLoading);
521
522 void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
523 void exitAcceleratedCompositingMode();
524
525 void addPluginView(PluginView*);
526 void removePluginView(PluginView*);
527
528 bool isVisible() const { return m_activityState.contains(WebCore::ActivityState::IsVisible); }
529 bool isVisibleOrOccluded() const { return m_activityState.contains(WebCore::ActivityState::IsVisibleOrOccluded); }
530
531 LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
532 void setLayerHostingMode(LayerHostingMode);
533
534#if PLATFORM(COCOA)
535 void updatePluginsActiveAndFocusedState();
536 const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
537 const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
538 const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
539
540 bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
541
542 void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
543#endif
544
545#if PLATFORM(MAC)
546 void setTopOverhangImage(WebImage*);
547 void setBottomOverhangImage(WebImage*);
548
549 void setUseSystemAppearance(bool);
550#endif
551
552 void effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance);
553
554 bool windowIsFocused() const;
555 bool windowAndWebPageAreFocused() const;
556
557#if !PLATFORM(IOS_FAMILY)
558 void setHeaderPageBanner(PageBanner*);
559 PageBanner* headerPageBanner();
560 void setFooterPageBanner(PageBanner*);
561 PageBanner* footerPageBanner();
562
563 void hidePageBanners();
564 void showPageBanners();
565
566 void setHeaderBannerHeightForTesting(int);
567 void setFooterBannerHeightForTesting(int);
568#endif
569
570 WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
571 WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
572 WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&);
573 WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&);
574
575 RefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double additionalScaleFactor, SnapshotOptions);
576
577 static const WebEvent* currentEvent();
578
579 FindController& findController() { return m_findController.get(); }
580
581#if ENABLE(GEOLOCATION)
582 GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager.get(); }
583#endif
584
585#if PLATFORM(IOS_FAMILY)
586 void savePageState(WebCore::HistoryItem&);
587 void restorePageState(const WebCore::HistoryItem&);
588#endif
589
590#if ENABLE(MEDIA_STREAM)
591 UserMediaPermissionRequestManager& userMediaPermissionRequestManager() { return m_userMediaPermissionRequestManager; }
592 void captureDevicesChanged();
593#endif
594
595 void elementDidFocus(WebCore::Element&);
596 void elementDidRefocus(WebCore::Element&);
597 void elementDidBlur(WebCore::Element&);
598 void focusedElementDidChangeInputMode(WebCore::Element&, WebCore::InputMode);
599 void resetFocusedElementForFrame(WebFrame*);
600
601 void disabledAdaptationsDidChange(const OptionSet<WebCore::DisabledAdaptations>&);
602 void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
603 void executeEditCommandWithCallback(const String&, const String& argument, CallbackID);
604 void selectAll();
605
606 void textInputContextsInRect(WebCore::FloatRect, CompletionHandler<void(const Vector<WebKit::TextInputContext>&)>&&);
607 void focusTextInputContext(const TextInputContext&, CompletionHandler<void(bool)>&&);
608
609#if PLATFORM(IOS_FAMILY)
610 WebCore::FloatSize screenSize() const;
611 WebCore::FloatSize availableScreenSize() const;
612 WebCore::FloatSize overrideScreenSize() const;
613 int32_t deviceOrientation() const { return m_deviceOrientation; }
614 void didReceiveMobileDocType(bool);
615
616 void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
617 bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
618
619 double minimumPageScaleFactor() const;
620 double maximumPageScaleFactor() const;
621 double maximumPageScaleFactorIgnoringAlwaysScalable() const;
622 bool allowsUserScaling() const;
623 bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; }
624
625 void handleTap(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
626 void potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&, bool shouldRequestMagnificationInformation);
627 void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
628 void commitPotentialTapFailed();
629 void cancelPotentialTap();
630 void cancelPotentialTapInFrame(WebFrame&);
631 void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
632 void didRecognizeLongPress();
633 void handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
634
635 void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
636 void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
637
638 void blurFocusedElement();
639 void requestFocusedElementInformation(CallbackID);
640 void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithFocusedElement, CallbackID);
641 void updateSelectionWithTouches(const WebCore::IntPoint&, uint32_t touches, bool baseIsStart, CallbackID);
642 void selectWithTwoTouches(const WebCore::IntPoint& from, const WebCore::IntPoint& to, uint32_t gestureType, uint32_t gestureState, CallbackID);
643 void extendSelection(uint32_t granularity);
644 void selectWordBackward();
645 void moveSelectionByOffset(int32_t offset, CallbackID);
646 void selectTextWithGranularityAtPoint(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithFocusedElement, CallbackID);
647 void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&, uint32_t granularity, uint32_t direction, bool isInteractingWithFocusedElement, CallbackID);
648 void moveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, CallbackID);
649 void selectPositionAtPoint(const WebCore::IntPoint&, bool isInteractingWithFocusedElement, CallbackID);
650 void beginSelectionInDirection(uint32_t direction, CallbackID);
651 void updateSelectionWithExtentPoint(const WebCore::IntPoint&, bool isInteractingWithFocusedElement, CallbackID);
652 void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithFocusedElement, CallbackID);
653
654 void requestDictationContext(CallbackID);
655 void replaceDictatedText(const String& oldText, const String& newText);
656 void replaceSelectedText(const String& oldText, const String& newText);
657 void requestAutocorrectionData(const String& textForAutocorrection, CallbackID);
658 void applyAutocorrection(const String& correction, const String& originalText, CallbackID);
659 void syncApplyAutocorrection(const String& correction, const String& originalText, CompletionHandler<void(bool)>&&);
660 void requestAutocorrectionContext();
661 void getPositionInformation(const InteractionInformationRequest&, CompletionHandler<void(InteractionInformationAtPosition&&)>&&);
662 void requestPositionInformation(const InteractionInformationRequest&);
663 void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
664 void stopInteraction();
665 void performActionOnElement(uint32_t action);
666 void focusNextFocusedElement(bool isForward, CallbackID);
667 void autofillLoginCredentials(const String&, const String&);
668 void setFocusedElementValue(const String&);
669 void setFocusedElementValueAsNumber(double);
670 void setFocusedElementSelectedIndex(uint32_t index, bool allowMultipleSelection);
671 void setIsShowingInputViewForFocusedElement(bool);
672 void updateSelectionAppearance();
673 void getSelectionContext(CallbackID);
674 void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t requestID);
675 void handleStylusSingleTapAtPoint(const WebCore::IntPoint&, uint64_t requestID);
676 void getRectsForGranularityWithSelectionOffset(uint32_t, int32_t, CallbackID);
677 void getRectsAtSelectionOffsetWithText(int32_t, const String&, CallbackID);
678 void storeSelectionForAccessibility(bool);
679 void startAutoscrollAtPosition(const WebCore::FloatPoint&);
680 void cancelAutoscroll();
681 void requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&&);
682
683 void contentSizeCategoryDidChange(const String&);
684
685 Seconds eventThrottlingDelay() const;
686
687 void showInspectorHighlight(const WebCore::Highlight&);
688 void hideInspectorHighlight();
689
690 void showInspectorIndication();
691 void hideInspectorIndication();
692
693 void enableInspectorNodeSearch();
694 void disableInspectorNodeSearch();
695
696 bool forceAlwaysUserScalable() const { return m_forceAlwaysUserScalable; }
697 void setForceAlwaysUserScalable(bool);
698
699 void updateSelectionWithDelta(int64_t locationDelta, int64_t lengthDelta, CompletionHandler<void()>&&);
700 void requestDocumentEditingContext(WebKit::DocumentEditingContextRequest, CompletionHandler<void(WebKit::DocumentEditingContext)>&&);
701#endif
702
703#if PLATFORM(IOS_FAMILY) && ENABLE(IOS_TOUCH_EVENTS)
704 void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
705#endif
706
707 bool hasRichlyEditableSelection() const;
708
709 enum class LayerTreeFreezeReason {
710 PageTransition = 1 << 0,
711 BackgroundApplication = 1 << 1,
712 ProcessSuspended = 1 << 2,
713 PageSuspended = 1 << 3,
714 Printing = 1 << 4,
715 ProcessSwap = 1 << 5,
716 };
717 void freezeLayerTree(LayerTreeFreezeReason);
718 void unfreezeLayerTree(LayerTreeFreezeReason);
719
720 void markLayersVolatile(Function<void(bool)>&& completionHandler = { });
721 void cancelMarkLayersVolatile();
722
723 NotificationPermissionRequestManager* notificationPermissionRequestManager();
724
725 void pageDidScroll();
726
727#if ENABLE(CONTEXT_MENUS)
728 WebContextMenu* contextMenu();
729 WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
730#endif
731
732 bool hasLocalDataForURL(const URL&);
733
734 static bool canHandleRequest(const WebCore::ResourceRequest&);
735
736 class SandboxExtensionTracker {
737 public:
738 ~SandboxExtensionTracker();
739
740 void invalidate();
741
742 void beginLoad(WebFrame*, SandboxExtension::Handle&&);
743 void beginReload(WebFrame*, SandboxExtension::Handle&&);
744 void willPerformLoadDragDestinationAction(RefPtr<SandboxExtension>&& pendingDropSandboxExtension);
745 void didStartProvisionalLoad(WebFrame*);
746 void didCommitProvisionalLoad(WebFrame*);
747 void didFailProvisionalLoad(WebFrame*);
748
749 private:
750 void setPendingProvisionalSandboxExtension(RefPtr<SandboxExtension>&&);
751 bool shouldReuseCommittedSandboxExtension(WebFrame*);
752
753 RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
754 RefPtr<SandboxExtension> m_provisionalSandboxExtension;
755 RefPtr<SandboxExtension> m_committedSandboxExtension;
756 };
757
758 SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
759
760#if PLATFORM(GTK)
761 void setComposition(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeLength);
762 void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
763 void cancelComposition();
764
765 void collapseSelectionInFrame(uint64_t frameID);
766 void showEmojiPicker(WebCore::Frame&);
767#endif
768
769#if PLATFORM (GTK) && HAVE(GTK_GESTURES)
770 void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, CompletionHandler<void(WebCore::IntPoint&&)>&&);
771#endif
772
773 void didApplyStyle();
774 void didChangeSelection();
775 void didChangeOverflowScrollPosition();
776 void didChangeContents();
777 void discardedComposition();
778 void canceledComposition();
779 void didUpdateComposition();
780 void didEndUserTriggeredSelectionChanges();
781
782#if PLATFORM(COCOA)
783 void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
784 WKAccessibilityWebPageObject* accessibilityRemoteObject();
785 NSObject *accessibilityObjectForMainFramePlugin();
786 const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; }
787
788 void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
789
790 void setTextAsync(const String&);
791 void insertTextAsync(const String& text, const EditingRange& replacementRange, InsertTextOptions&&);
792 void getMarkedRangeAsync(CallbackID);
793 void getSelectedRangeAsync(CallbackID);
794 void characterIndexForPointAsync(const WebCore::IntPoint&, CallbackID);
795 void firstRectForCharacterRangeAsync(const EditingRange&, CallbackID);
796 void setCompositionAsync(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
797 void confirmCompositionAsync();
798
799 void readSelectionFromPasteboard(const String& pasteboardName, CompletionHandler<void(bool&&)>&&);
800 void getStringSelectionForPasteboard(CompletionHandler<void(String&&)>&&);
801 void getDataSelectionForPasteboard(const String pasteboardType, CompletionHandler<void(SharedMemory::Handle&&, uint64_t)>&&);
802 void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, CompletionHandler<void(bool)>&&);
803 void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, CompletionHandler<void(bool)>&&);
804 bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*);
805#endif
806
807#if PLATFORM(MAC)
808 void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool registerUndoGroup = false);
809 void attributedSubstringForCharacterRangeAsync(const EditingRange&, CallbackID);
810 void fontAtSelection(CallbackID);
811#endif
812
813#if PLATFORM(COCOA) && ENABLE(SERVICE_CONTROLS)
814 void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
815#endif
816
817 void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length, bool suppressUnderline);
818 bool hasCompositionForTesting();
819 void confirmCompositionForTesting(const String& compositionString);
820
821#if PLATFORM(COCOA)
822 bool isSpeaking();
823 void speak(const String&);
824 void stopSpeaking();
825
826 void performDictionaryLookupForSelection(WebCore::Frame&, const WebCore::VisibleSelection&, WebCore::TextIndicatorPresentationTransition);
827#endif
828
829 bool isSmartInsertDeleteEnabled();
830 void setSmartInsertDeleteEnabled(bool);
831
832 bool isSelectTrailingWhitespaceEnabled() const;
833 void setSelectTrailingWhitespaceEnabled(bool);
834
835 void replaceSelectionWithText(WebCore::Frame*, const String&);
836 void clearSelection();
837 void restoreSelectionInFocusedEditableElement();
838
839#if ENABLE(DRAG_SUPPORT) && PLATFORM(GTK)
840 void performDragControllerAction(DragControllerAction, const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t draggingSourceOperationMask, WebSelectionData&&, uint32_t flags);
841#endif
842
843#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK)
844 void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&);
845#endif
846
847#if ENABLE(DRAG_SUPPORT)
848 void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
849
850 void willPerformLoadDragDestinationAction();
851 void mayPerformUploadDragDestinationAction();
852
853 void willStartDrag() { ASSERT(!m_isStartingDrag); m_isStartingDrag = true; }
854 void didStartDrag();
855 void dragCancelled();
856 WebCore::DragSourceAction allowedDragSourceActions() const { return m_allowedDragSourceActions; }
857#endif
858
859 void beginPrinting(uint64_t frameID, const PrintInfo&);
860 void endPrinting();
861 void computePagesForPrinting(uint64_t frameID, const PrintInfo&, CallbackID);
862 void computePagesForPrintingImpl(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor, WebCore::FloatBoxExtent& computedMargin);
863
864#if PLATFORM(COCOA)
865 void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, CallbackID);
866 void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, CallbackID);
867 void drawPagesToPDFImpl(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData);
868#endif
869
870#if PLATFORM(IOS_FAMILY)
871 void computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, CallbackID, Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply&&);
872#endif
873
874#if PLATFORM(GTK)
875 void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, CallbackID);
876 void didFinishPrintOperation(const WebCore::ResourceError&, CallbackID);
877#endif
878
879 void addResourceRequest(unsigned long, const WebCore::ResourceRequest&);
880 void removeResourceRequest(unsigned long);
881
882 void setMediaVolume(float);
883 void setMuted(WebCore::MediaProducer::MutedStateFlags);
884 void setMayStartMediaWhenInWindow(bool);
885 void stopMediaCapture();
886
887#if ENABLE(MEDIA_SESSION)
888 void handleMediaEvent(uint32_t /* WebCore::MediaEventType */);
889 void setVolumeOfMediaElement(double, uint64_t);
890#endif
891
892 void updateMainFrameScrollOffsetPinning();
893
894 bool mainFrameHasCustomContentProvider() const;
895 void addMIMETypeWithCustomContentProvider(const String&);
896
897 void mainFrameDidLayout();
898
899 bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
900 void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
901
902 bool canRunModal() const { return m_canRunModal; }
903 void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
904
905 void runModal();
906
907 void setDeviceScaleFactor(float);
908 float deviceScaleFactor() const;
909
910 void forceRepaintWithoutCallback();
911
912 void unmarkAllMisspellings();
913 void unmarkAllBadGrammar();
914
915#if PLATFORM(COCOA)
916 void handleAlternativeTextUIResult(const String&);
917#endif
918
919 // For testing purpose.
920 void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, WallTime);
921 void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, WallTime);
922 void simulateMouseMotion(WebCore::IntPoint, WallTime);
923
924#if ENABLE(CONTEXT_MENUS)
925 void contextMenuShowing() { m_isShowingContextMenu = true; }
926#endif
927
928 void wheelEvent(const WebWheelEvent&);
929
930 void wheelEventHandlersChanged(bool);
931 void recomputeShortCircuitHorizontalWheelEventsState();
932
933#if ENABLE(MAC_GESTURE_EVENTS)
934 void gestureEvent(const WebGestureEvent&);
935#endif
936
937 void updateVisibilityState(bool isInitialState = false);
938
939#if PLATFORM(IOS_FAMILY)
940 void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth);
941 void setMaximumUnobscuredSize(const WebCore::FloatSize&);
942 void setDeviceOrientation(int32_t);
943 void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
944 void dynamicViewportSizeUpdate(const WebCore::FloatSize& viewLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, const WebCore::FloatBoxExtent& targetUnobscuredSafeAreaInsets, double scale, int32_t deviceOrientation, DynamicViewportSizeUpdateID);
945 Optional<float> scaleFromUIProcess(const VisibleContentRectUpdateInfo&) const;
946 void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
947 bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
948 void willStartUserTriggeredZooming();
949 void applicationWillResignActive();
950 void applicationDidEnterBackground(bool isSuspendedUnderLock);
951 void applicationDidFinishSnapshottingAfterEnteringBackground();
952 void applicationWillEnterForeground(bool isSuspendedUnderLock);
953 void applicationDidBecomeActive();
954 void completePendingSyntheticClickForContentChangeObserver();
955
956 bool platformPrefersTextLegibilityBasedZoomScaling() const;
957 const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
958
959 void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
960
961 void updateStringForFind(const String&);
962
963 bool canShowWhileLocked() const { return m_canShowWhileLocked; }
964#endif
965
966#if ENABLE(IOS_TOUCH_EVENTS)
967 void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
968#endif
969
970#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
971 uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
972#endif
973
974 bool shouldUseCustomContentProviderForResponse(const WebCore::ResourceResponse&);
975
976 bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
977 void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
978 bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; }
979 void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
980 bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
981 void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
982 void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; }
983 bool tabToLinksEnabled() const { return m_tabToLinks; }
984
985 bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
986 void setScrollingPerformanceLoggingEnabled(bool);
987
988#if PLATFORM(COCOA)
989 bool shouldUsePDFPlugin() const;
990 bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
991 void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; }
992
993 NSDictionary *dataDetectionContext() const { return m_dataDetectionContext.get(); }
994#endif
995
996 void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const URL& originatingURL, const uint8_t* data, unsigned long size);
997
998#if PLATFORM(COCOA)
999 void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
1000#endif
1001
1002 bool mainFrameIsScrollable() const { return m_mainFrameIsScrollable; }
1003
1004 void setAlwaysShowsHorizontalScroller(bool);
1005 void setAlwaysShowsVerticalScroller(bool);
1006
1007 bool alwaysShowsHorizontalScroller() const { return m_alwaysShowsHorizontalScroller; };
1008 bool alwaysShowsVerticalScroller() const { return m_alwaysShowsVerticalScroller; };
1009
1010 void setViewLayoutSize(const WebCore::IntSize&);
1011 WebCore::IntSize viewLayoutSize() const { return m_viewLayoutSize; }
1012
1013 void setAutoSizingShouldExpandToViewHeight(bool shouldExpand);
1014 bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; }
1015
1016 void setViewportSizeForCSSViewportUnits(Optional<WebCore::IntSize>);
1017 Optional<WebCore::IntSize> viewportSizeForCSSViewportUnits() const { return m_viewportSizeForCSSViewportUnits; }
1018
1019 bool canShowMIMEType(const String& MIMEType) const;
1020 bool canShowResponse(const WebCore::ResourceResponse&) const;
1021
1022 void addTextCheckingRequest(uint64_t requestID, Ref<WebCore::TextCheckingRequest>&&);
1023 void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
1024 void didCancelCheckingText(uint64_t requestID);
1025
1026#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
1027 void determinePrimarySnapshottedPlugIn();
1028 void determinePrimarySnapshottedPlugInTimerFired();
1029 void resetPrimarySnapshottedPlugIn();
1030 bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const;
1031 bool plugInIntersectsSearchRect(WebCore::HTMLPlugInImageElement& pluginImageElement);
1032 bool plugInIsPrimarySize(WebCore::HTMLPlugInImageElement& pluginImageElement, unsigned &pluginArea);
1033#endif
1034
1035#if ENABLE(DATA_DETECTION)
1036 void setDataDetectionResults(NSArray *);
1037 void detectDataInAllFrames(uint64_t, CompletionHandler<void(const DataDetectionResult&)>&&);
1038 void removeDataDetectedLinks(CompletionHandler<void(const DataDetectionResult&)>&&);
1039#endif
1040
1041 unsigned extendIncrementalRenderingSuppression();
1042 void stopExtendingIncrementalRenderingSuppression(unsigned token);
1043 bool shouldExtendIncrementalRenderingSuppression() { return !m_activeRenderingSuppressionTokens.isEmpty(); }
1044
1045 WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
1046 void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
1047
1048 Optional<WebCore::ScrollbarOverlayStyle> scrollbarOverlayStyle() { return m_scrollbarOverlayStyle; }
1049 void setScrollbarOverlayStyle(Optional<uint32_t /* WebCore::ScrollbarOverlayStyle */> scrollbarStyle);
1050
1051 Ref<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
1052 void updateCachedDocumentLoader(WebDocumentLoader&, WebCore::Frame&);
1053
1054 void getBytecodeProfile(CallbackID);
1055 void getSamplingProfilerOutput(CallbackID);
1056
1057#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
1058 void handleTelephoneNumberClick(const String& number, const WebCore::IntPoint&);
1059 void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&);
1060#endif
1061
1062 void didChangeScrollOffsetForFrame(WebCore::Frame*);
1063
1064 void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
1065 bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
1066
1067 void postMessage(const String& messageName, API::Object* messageBody);
1068 void postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
1069 void postMessageIgnoringFullySynchronousMode(const String& messageName, API::Object* messageBody);
1070
1071#if PLATFORM(GTK)
1072 void setInputMethodState(bool);
1073#endif
1074
1075 void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
1076
1077#if ENABLE(VIDEO) && USE(GSTREAMER)
1078 void requestInstallMissingMediaPlugins(const String& details, const String& description, WebCore::MediaPlayerRequestInstallMissingPluginsCallback&);
1079#endif
1080
1081 void addUserScript(String&& source, WebCore::UserContentInjectedFrames, WebCore::UserScriptInjectionTime);
1082 void addUserStyleSheet(const String& source, WebCore::UserContentInjectedFrames);
1083 void removeAllUserContent();
1084
1085 void dispatchDidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone>);
1086
1087 void didRestoreScrollPosition();
1088
1089 bool isControlledByAutomation() const;
1090 void setControlledByAutomation(bool);
1091
1092 void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
1093 void disconnectInspector(const String& targetId);
1094 void sendMessageToTargetBackend(const String& targetId, const String& message);
1095
1096 void insertNewlineInQuotedContent();
1097
1098#if USE(OS_STATE)
1099 WallTime loadCommitTime() const { return m_loadCommitTime; }
1100#endif
1101
1102#if ENABLE(GAMEPAD)
1103 void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible);
1104#endif
1105
1106#if ENABLE(POINTER_LOCK)
1107 void didAcquirePointerLock();
1108 void didNotAcquirePointerLock();
1109 void didLosePointerLock();
1110#endif
1111
1112 void didGetLoadDecisionForIcon(bool decision, CallbackID loadIdentifier, OptionalCallbackID);
1113 void setUseIconLoadingClient(bool);
1114
1115#if ENABLE(DATA_INTERACTION)
1116 void didConcludeEditDrag();
1117#endif
1118
1119 WebURLSchemeHandlerProxy* urlSchemeHandlerForScheme(const String&);
1120 void stopAllURLSchemeTasks();
1121
1122 Optional<double> cpuLimit() const { return m_cpuLimit; }
1123
1124 static PluginView* pluginViewForFrame(WebCore::Frame*);
1125
1126 void flushPendingEditorStateUpdate();
1127
1128#if ENABLE(RESOURCE_LOAD_STATISTICS)
1129 void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, CompletionHandler<void(bool)>&&);
1130 void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&);
1131#endif
1132
1133#if ENABLE(DEVICE_ORIENTATION)
1134 void shouldAllowDeviceOrientationAndMotionAccess(uint64_t frameID, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&);
1135#endif
1136
1137 void showShareSheet(WebCore::ShareDataWithParsedURL&, CompletionHandler<void(bool)>&& callback);
1138 void didCompleteShareSheet(bool wasCompleted, ShareSheetCallbackID contextId);
1139
1140#if ENABLE(ATTACHMENT_ELEMENT)
1141 void insertAttachment(const String& identifier, Optional<uint64_t>&& fileSize, const String& fileName, const String& contentType, CallbackID);
1142 void updateAttachmentAttributes(const String& identifier, Optional<uint64_t>&& fileSize, const String& contentType, const String& fileName, const IPC::DataReference& enclosingImageData, CallbackID);
1143#endif
1144
1145#if ENABLE(APPLICATION_MANIFEST)
1146 void getApplicationManifest(CallbackID);
1147 void didFinishLoadingApplicationManifest(uint64_t, const Optional<WebCore::ApplicationManifest>&);
1148#endif
1149
1150#if PLATFORM(WPE)
1151 int releaseHostFileDescriptor() { return m_hostFileDescriptor.releaseFileDescriptor(); }
1152#endif
1153
1154 void updateCurrentModifierState(OptionSet<WebCore::PlatformEvent::Modifier> modifiers);
1155
1156 UserContentControllerIdentifier userContentControllerIdentifier() const { return m_userContentController->identifier(); }
1157
1158 WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() const { return m_userInterfaceLayoutDirection; }
1159
1160 bool isSuspended() const { return m_isSuspended; }
1161
1162 void didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&);
1163
1164 template<typename T>
1165 bool sendSyncWithDelayedReply(T&& message, typename T::Reply&& reply)
1166 {
1167 cancelGesturesBlockedOnSynchronousReplies();
1168 return sendSync(WTFMove(message), WTFMove(reply), m_pageID, Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend);
1169 }
1170
1171 WebCore::DOMPasteAccessResponse requestDOMPasteAccess(const String& originIdentifier);
1172 WebCore::IntRect rectForElementAtInteractionLocation() const;
1173
1174 const Optional<WebCore::Color>& backgroundColor() const { return m_backgroundColor; }
1175
1176 void suspendAllMediaBuffering();
1177 void resumeAllMediaBuffering();
1178
1179 void configureLoggingChannel(const String&, WTFLogChannelState, WTFLogLevel);
1180
1181 WebCore::Element* elementForTextInputContext(const TextInputContext&);
1182
1183#if ENABLE(APPLE_PAY)
1184 WebPaymentCoordinator* paymentCoordinator();
1185#endif
1186
1187#if ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING)
1188 TextCheckingControllerProxy& textCheckingController() { return m_textCheckingControllerProxy.get(); }
1189#endif
1190
1191 void setRemoteObjectRegistry(RemoteObjectRegistry&);
1192
1193 void updateIntrinsicContentSizeIfNeeded(const WebCore::IntSize&);
1194 void scheduleFullEditorStateUpdate();
1195 bool isThrottleable() const;
1196
1197 bool userIsInteracting() const { return m_userIsInteracting; }
1198 void setUserIsInteracting(bool userIsInteracting) { m_userIsInteracting = userIsInteracting; }
1199
1200private:
1201 WebPage(uint64_t pageID, WebPageCreationParameters&&);
1202
1203 void updateThrottleState();
1204
1205 // IPC::MessageSender
1206 IPC::Connection* messageSenderConnection() const override;
1207 uint64_t messageSenderDestinationID() const override;
1208
1209 void platformInitialize();
1210 void platformReinitialize();
1211 void platformDetach();
1212 void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
1213 void sendEditorStateUpdate();
1214
1215#if PLATFORM(COCOA)
1216 void sendTouchBarMenuDataAddedUpdate(WebCore::HTMLMenuElement&);
1217 void sendTouchBarMenuDataRemovedUpdate(WebCore::HTMLMenuElement&);
1218 void sendTouchBarMenuItemDataAddedUpdate(WebCore::HTMLMenuItemElement&);
1219 void sendTouchBarMenuItemDataRemovedUpdate(WebCore::HTMLMenuItemElement&);
1220#endif
1221
1222 void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
1223
1224#if PLATFORM(IOS_FAMILY)
1225 WebCore::FloatSize viewLayoutSizeAdjustedForQuirks(const WebCore::FloatSize&);
1226 void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
1227 enum class ZoomToInitialScale { No, Yes };
1228 void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);
1229 void updateViewportSizeForCSSViewportUnits();
1230
1231 static void convertSelectionRectsToRootView(WebCore::FrameView*, Vector<WebCore::SelectionRect>&);
1232 RefPtr<WebCore::Range> rangeForWebSelectionAtPosition(const WebCore::IntPoint&, const WebCore::VisiblePosition&, SelectionFlags&);
1233 void getFocusedElementInformation(FocusedElementInformation&);
1234 void platformInitializeAccessibility();
1235 void generateSyntheticEditingCommand(SyntheticEditingCommandType);
1236 void handleSyntheticClick(WebCore::Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebKit::WebEvent::Modifier>);
1237 void completeSyntheticClick(WebCore::Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebKit::WebEvent::Modifier>, WebCore::SyntheticClickType);
1238 void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
1239 void resetTextAutosizing();
1240 WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&, const WebCore::IntPoint&, bool isInteractingWithFocusedElement);
1241 RefPtr<WebCore::Range> rangeForGranularityAtPoint(WebCore::Frame&, const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithFocusedElement);
1242 void dispatchSyntheticMouseEventsForSelectionGesture(SelectionTouch, const WebCore::IntPoint&);
1243
1244 void sendPositionInformation(InteractionInformationAtPosition&&);
1245 InteractionInformationAtPosition positionInformation(const InteractionInformationRequest&);
1246 WebAutocorrectionContext autocorrectionContext();
1247 bool applyAutocorrectionInternal(const String& correction, const String& originalText);
1248 bool shouldIgnoreMetaViewport() const;
1249#endif
1250
1251#if ENABLE(VIEWPORT_RESIZING)
1252 void scheduleShrinkToFitContent();
1253 void shrinkToFitContentTimerFired();
1254 bool immediatelyShrinkToFitContent();
1255#endif
1256
1257#if PLATFORM(IOS_FAMILY) && ENABLE(DATA_INTERACTION)
1258 void requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t allowedActions);
1259 void requestAdditionalItemsForDragSession(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t allowedActions);
1260#endif
1261
1262#if !PLATFORM(COCOA) && !PLATFORM(WPE)
1263 static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
1264#endif
1265
1266 bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
1267
1268#if PLATFORM(MAC)
1269 bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
1270#endif
1271
1272 void updateDrawingAreaLayerTreeFreezeState();
1273 bool markLayersVolatileImmediatelyIfPossible();
1274 void layerVolatilityTimerFired();
1275 void callVolatilityCompletionHandlers(bool succeeded);
1276
1277 String sourceForFrame(WebFrame*);
1278
1279 void loadDataImpl(uint64_t navigationID, bool shouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&&, Ref<WebCore::SharedBuffer>&&, const String& MIMEType, const String& encodingName, const URL& baseURL, const URL& failingURL, const UserData&);
1280
1281 // Actions
1282 void tryClose();
1283 void platformDidReceiveLoadParameters(const LoadParameters&);
1284 void loadRequest(LoadParameters&&);
1285 void loadData(LoadParameters&&);
1286 void loadAlternateHTML(LoadParameters&&);
1287 void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
1288 void reload(uint64_t navigationID, uint32_t reloadOptions, SandboxExtension::Handle&&);
1289 void goToBackForwardItem(uint64_t navigationID, const WebCore::BackForwardItemIdentifier&, WebCore::FrameLoadType, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&&);
1290 void tryRestoreScrollPosition();
1291 void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, CallbackID);
1292 void updateIsInWindow(bool isInitialState = false);
1293 void visibilityDidChange();
1294 void setActivityState(OptionSet<WebCore::ActivityState::Flag>, ActivityStateChangeID, const Vector<CallbackID>& callbackIDs);
1295 void validateCommand(const String&, CallbackID);
1296 void executeEditCommand(const String&, const String&);
1297 void setEditable(bool);
1298
1299 void didChangeSelectionOrOverflowScrollPosition();
1300
1301 void increaseListLevel();
1302 void decreaseListLevel();
1303 void changeListType();
1304
1305 void setBaseWritingDirection(WebCore::WritingDirection);
1306
1307 void setNeedsFontAttributes(bool);
1308
1309 void mouseEvent(const WebMouseEvent&);
1310 void keyEvent(const WebKeyboardEvent&);
1311
1312#if ENABLE(IOS_TOUCH_EVENTS)
1313 void touchEventSync(const WebTouchEvent&, CompletionHandler<void(bool)>&&);
1314 void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
1315#elif ENABLE(TOUCH_EVENTS)
1316 void touchEvent(const WebTouchEvent&);
1317#endif
1318
1319#if ENABLE(POINTER_EVENTS)
1320 void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
1321#endif
1322
1323#if ENABLE(CONTEXT_MENUS)
1324 void contextMenuHidden() { m_isShowingContextMenu = false; }
1325 void contextMenuForKeyEvent();
1326#endif
1327
1328 static bool scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
1329 static bool logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
1330
1331 void loadURLInFrame(URL&&, uint64_t frameID);
1332 void loadDataInFrame(IPC::DataReference&&, String&& MIMEType, String&& encodingName, URL&& baseURL, uint64_t frameID);
1333
1334 enum class WasRestoredByAPIRequest { No, Yes };
1335 void restoreSessionInternal(const Vector<BackForwardListItemState>&, WasRestoredByAPIRequest, WebBackForwardListProxy::OverwriteExistingItem);
1336 void restoreSession(const Vector<BackForwardListItemState>&);
1337 void didRemoveBackForwardItem(const WebCore::BackForwardItemIdentifier&);
1338 void updateBackForwardListForReattach(const Vector<WebKit::BackForwardListItemState>&);
1339 void setCurrentHistoryItemForReattach(WebKit::BackForwardListItemState&&);
1340
1341 void requestFontAttributesAtSelectionStart(CallbackID);
1342
1343#if ENABLE(REMOTE_INSPECTOR)
1344 void setIndicating(bool);
1345#endif
1346
1347 void setBackgroundColor(const Optional<WebCore::Color>&);
1348
1349#if PLATFORM(COCOA)
1350 void setTopContentInsetFenced(float, IPC::Attachment);
1351#endif
1352 void setTopContentInset(float);
1353
1354 void viewWillStartLiveResize();
1355 void viewWillEndLiveResize();
1356
1357 void getContentsAsString(CallbackID);
1358#if PLATFORM(COCOA)
1359 void getContentsAsAttributedString(CompletionHandler<void(const AttributedString&)>&&);
1360#endif
1361#if ENABLE(MHTML)
1362 void getContentsAsMHTMLData(CallbackID);
1363#endif
1364 void getMainResourceDataOfFrame(uint64_t frameID, CallbackID);
1365 void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, CallbackID);
1366 void getRenderTreeExternalRepresentation(CallbackID);
1367 void getSelectionOrContentsAsString(CallbackID);
1368 void getSelectionAsWebArchiveData(CallbackID);
1369 void getSourceForFrame(uint64_t frameID, CallbackID);
1370 void getWebArchiveOfFrame(uint64_t frameID, CallbackID);
1371 void runJavaScript(WebFrame*, const String&, bool forceUserGesture, const Optional<String>& worldName, CallbackID);
1372 void runJavaScriptInMainFrameScriptWorld(const String&, bool forceUserGesture, const Optional<String>& worldName, CallbackID);
1373 void runJavaScriptInFrame(uint64_t frameID, const String&, bool forceUserGesture, CallbackID);
1374 void forceRepaint(CallbackID);
1375 void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, CallbackID);
1376
1377 void preferencesDidChange(const WebPreferencesStore&);
1378 void updatePreferences(const WebPreferencesStore&);
1379 void updatePreferencesGenerated(const WebPreferencesStore&);
1380
1381#if PLATFORM(IOS_FAMILY)
1382 bool parentProcessHasServiceWorkerEntitlement() const;
1383#else
1384 bool parentProcessHasServiceWorkerEntitlement() const { return true; }
1385#endif
1386
1387 void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, WebCore::PolicyCheckIdentifier, WebCore::PolicyAction, uint64_t navigationID, const DownloadID&, Optional<WebsitePoliciesData>&&);
1388 void continueWillSubmitForm(uint64_t frameID, uint64_t listenerID);
1389 void setUserAgent(const String&);
1390 void setCustomTextEncodingName(const String&);
1391 void suspendActiveDOMObjectsAndAnimations();
1392 void resumeActiveDOMObjectsAndAnimations();
1393
1394#if PLATFORM(COCOA)
1395 void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
1396 void performDictionaryLookupOfCurrentSelection();
1397 void performDictionaryLookupForRange(WebCore::Frame&, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1398 WebCore::DictionaryPopupInfo dictionaryPopupInfoForRange(WebCore::Frame&, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1399#if ENABLE(PDFKIT_PLUGIN)
1400 WebCore::DictionaryPopupInfo dictionaryPopupInfoForSelectionInPDFPlugin(PDFSelection *, PDFPlugin&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1401#endif
1402
1403 void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
1404
1405 RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
1406 void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
1407 void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
1408 void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
1409#endif
1410
1411 void setMainFrameIsScrollable(bool);
1412
1413 void unapplyEditCommand(WebUndoStepID commandID);
1414 void reapplyEditCommand(WebUndoStepID commandID);
1415 void didRemoveEditCommand(WebUndoStepID commandID);
1416
1417 void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1418 void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1419 void getImageForFindMatch(uint32_t matchIndex);
1420 void selectFindMatch(uint32_t matchIndex);
1421 void hideFindUI();
1422 void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1423 void replaceMatches(const Vector<uint32_t>& matchIndices, const String& replacementText, bool selectionOnly, CallbackID);
1424
1425#if USE(COORDINATED_GRAPHICS)
1426 void sendViewportAttributesChanged(const WebCore::ViewportArguments&);
1427#endif
1428
1429 void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
1430 void setTextForActivePopupMenu(int32_t index);
1431
1432#if PLATFORM(GTK)
1433 void failedToShowPopupMenu();
1434#endif
1435
1436 void didChooseFilesForOpenPanel(const Vector<String>&);
1437 void didCancelForOpenPanel();
1438
1439#if PLATFORM(IOS_FAMILY)
1440 void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const IPC::DataReference& iconData);
1441#endif
1442
1443#if ENABLE(SANDBOX_EXTENSIONS)
1444 void extendSandboxForFilesFromOpenPanel(SandboxExtension::HandleArray&&);
1445#endif
1446
1447 void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
1448
1449 void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
1450
1451#if ENABLE(MEDIA_STREAM)
1452 void userMediaAccessWasGranted(uint64_t userMediaID, WebCore::CaptureDevice&& audioDeviceUID, WebCore::CaptureDevice&& videoDeviceUID, String&& mediaDeviceIdentifierHashSalt, CompletionHandler<void()>&&);
1453 void userMediaAccessWasDenied(uint64_t userMediaID, uint64_t reason, String&& invalidConstraint);
1454
1455 void didCompleteMediaDeviceEnumeration(uint64_t userMediaID, const Vector<WebCore::CaptureDevice>& devices, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess);
1456#endif
1457
1458#if ENABLE(WEB_RTC)
1459 void disableICECandidateFiltering();
1460 void enableICECandidateFiltering();
1461#endif
1462
1463#if ENABLE(WEB_RTC) && USE(LIBWEBRTC)
1464 void disableEnumeratingAllNetworkInterfaces();
1465 void enableEnumeratingAllNetworkInterfaces();
1466#endif
1467
1468 void stopAllMediaPlayback();
1469 void suspendAllMediaPlayback();
1470 void resumeAllMediaPlayback();
1471
1472 void advanceToNextMisspelling(bool startBeforeSelection);
1473 void changeSpellingToWord(const String& word);
1474
1475#if USE(APPKIT)
1476 void uppercaseWord();
1477 void lowercaseWord();
1478 void capitalizeWord();
1479#endif
1480
1481 bool shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const;
1482 void platformDidSelectAll();
1483
1484#if ENABLE(CONTEXT_MENUS)
1485 void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
1486#endif
1487
1488 void changeSelectedIndex(int32_t index);
1489 void setCanStartMediaTimerFired();
1490
1491 static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
1492
1493 static PluginView* focusedPluginViewForFrame(WebCore::Frame&);
1494
1495 void reportUsedFeatures();
1496
1497 void updateWebsitePolicies(WebsitePoliciesData&&);
1498
1499 void changeFont(WebCore::FontChanges&&);
1500 void changeFontAttributes(WebCore::FontAttributeChanges&&);
1501
1502#if PLATFORM(MAC)
1503 void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
1504 std::tuple<RefPtr<WebCore::Range>, NSDictionary *> lookupTextAtLocation(WebCore::FloatPoint);
1505 void immediateActionDidUpdate();
1506 void immediateActionDidCancel();
1507 void immediateActionDidComplete();
1508
1509 void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
1510 void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
1511 void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
1512
1513 void handleAcceptedCandidate(WebCore::TextCheckingResult);
1514#endif
1515
1516#if PLATFORM(COCOA)
1517 void requestActiveNowPlayingSessionInfo(CallbackID);
1518 RetainPtr<NSData> accessibilityRemoteTokenData() const;
1519 void accessibilityTransferRemoteToken(RetainPtr<NSData>);
1520#endif
1521
1522 void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
1523
1524#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
1525 void playbackTargetSelected(uint64_t, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
1526 void playbackTargetAvailabilityDidChange(uint64_t, bool);
1527 void setShouldPlayToPlaybackTarget(uint64_t, bool);
1528#endif
1529
1530 void clearWheelEventTestTrigger();
1531
1532 void setShouldScaleViewToFitDocument(bool);
1533
1534 void pageStoppedScrolling();
1535
1536#if ENABLE(VIDEO) && USE(GSTREAMER)
1537 void didEndRequestInstallMissingMediaPlugins(uint32_t result);
1538#endif
1539
1540 void setResourceCachingDisabled(bool);
1541 void setUserInterfaceLayoutDirection(uint32_t);
1542
1543 bool canPluginHandleResponse(const WebCore::ResourceResponse&);
1544
1545#if USE(QUICK_LOOK)
1546 void didReceivePasswordForQuickLookDocument(const String&);
1547#endif
1548
1549 void simulateDeviceOrientationChange(double alpha, double beta, double gamma);
1550
1551#if ENABLE(SPEECH_SYNTHESIS)
1552 void speakingErrorOccurred();
1553 void boundaryEventOccurred(bool wordBoundary, unsigned charIndex);
1554 void voicesDidChange();
1555#endif
1556
1557 void frameBecameRemote(uint64_t frameID, WebCore::GlobalFrameIdentifier&& remoteFrameIdentifier, WebCore::GlobalWindowIdentifier&& remoteWindowIdentifier);
1558
1559 void registerURLSchemeHandler(uint64_t identifier, const String& scheme);
1560
1561 void urlSchemeTaskDidPerformRedirection(uint64_t handlerIdentifier, uint64_t taskIdentifier, WebCore::ResourceResponse&&, WebCore::ResourceRequest&&);
1562 void urlSchemeTaskDidReceiveResponse(uint64_t handlerIdentifier, uint64_t taskIdentifier, const WebCore::ResourceResponse&);
1563 void urlSchemeTaskDidReceiveData(uint64_t handlerIdentifier, uint64_t taskIdentifier, const IPC::DataReference&);
1564 void urlSchemeTaskDidComplete(uint64_t handlerIdentifier, uint64_t taskIdentifier, const WebCore::ResourceError&);
1565
1566 void setIsSuspended(bool);
1567
1568 RefPtr<WebImage> snapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
1569 RefPtr<WebImage> snapshotNode(WebCore::Node&, SnapshotOptions, unsigned maximumPixelCount = std::numeric_limits<unsigned>::max());
1570#if USE(CF)
1571 RetainPtr<CFDataRef> pdfSnapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
1572#endif
1573
1574#if ENABLE(ATTACHMENT_ELEMENT)
1575 RefPtr<WebCore::HTMLAttachmentElement> attachmentElementWithIdentifier(const String& identifier) const;
1576#endif
1577
1578 bool canShowMIMEType(const String&, const Function<bool(const String&, WebCore::PluginData::AllowedPluginTypes)>& supportsPlugin) const;
1579
1580 void cancelGesturesBlockedOnSynchronousReplies();
1581
1582 bool shouldDispatchUpdateAfterFocusingElement(const WebCore::Element&) const;
1583
1584 uint64_t m_pageID;
1585
1586 std::unique_ptr<WebCore::Page> m_page;
1587 RefPtr<WebFrame> m_mainFrame;
1588
1589 RefPtr<WebPageGroupProxy> m_pageGroup;
1590
1591 String m_userAgent;
1592
1593 WebCore::IntSize m_viewSize;
1594 std::unique_ptr<DrawingArea> m_drawingArea;
1595
1596 HashSet<PluginView*> m_pluginViews;
1597 bool m_hasSeenPlugin { false };
1598
1599 HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
1600
1601 bool m_useFixedLayout { false };
1602 bool m_drawsBackground { true };
1603
1604 WebCore::Color m_underlayColor;
1605
1606 bool m_isInRedo { false };
1607 bool m_isClosed { false };
1608 bool m_tabToLinks { false };
1609
1610 bool m_asynchronousPluginInitializationEnabled { false };
1611 bool m_asynchronousPluginInitializationEnabledForAllPlugins { false };
1612 bool m_artificialPluginInitializationDelayEnabled { false };
1613 bool m_scrollingPerformanceLoggingEnabled { false };
1614 bool m_mainFrameIsScrollable { true };
1615
1616 bool m_alwaysShowsHorizontalScroller { false };
1617 bool m_alwaysShowsVerticalScroller { false };
1618
1619#if PLATFORM(IOS_FAMILY)
1620 bool m_ignoreViewportScalingConstraints { false };
1621#endif
1622
1623#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
1624 bool m_readyToFindPrimarySnapshottedPlugin { false };
1625 bool m_didFindPrimarySnapshottedPlugin { false };
1626 unsigned m_numberOfPrimarySnapshotDetectionAttempts { 0 };
1627 String m_primaryPlugInPageOrigin;
1628 String m_primaryPlugInOrigin;
1629 String m_primaryPlugInMimeType;
1630 RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer;
1631#endif
1632
1633 // The layer hosting mode.
1634 LayerHostingMode m_layerHostingMode;
1635
1636#if PLATFORM(COCOA)
1637 bool m_pdfPluginEnabled { false };
1638 bool m_hasCachedWindowFrame { false };
1639
1640 // The frame of the containing window in screen coordinates.
1641 WebCore::FloatRect m_windowFrameInScreenCoordinates;
1642
1643 // The frame of the containing window in unflipped screen coordinates.
1644 WebCore::FloatRect m_windowFrameInUnflippedScreenCoordinates;
1645
1646 // The frame of the view in window coordinates.
1647 WebCore::FloatRect m_viewFrameInWindowCoordinates;
1648
1649 // The accessibility position of the view.
1650 WebCore::FloatPoint m_accessibilityPosition;
1651
1652 RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
1653#endif
1654
1655#if ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING)
1656 UniqueRef<TextCheckingControllerProxy> m_textCheckingControllerProxy;
1657#endif
1658
1659#if PLATFORM(COCOA) || PLATFORM(GTK)
1660 std::unique_ptr<ViewGestureGeometryCollector> m_viewGestureGeometryCollector;
1661#endif
1662
1663#if PLATFORM(COCOA)
1664 RetainPtr<NSDictionary> m_dataDetectionContext;
1665#endif
1666
1667#if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
1668 GRefPtr<AtkObject> m_accessibilityObject;
1669#endif
1670
1671#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
1672 // Our view's window in the UI process.
1673 uint64_t m_nativeWindowHandle { 0 };
1674#endif
1675
1676#if !PLATFORM(IOS_FAMILY)
1677 RefPtr<PageBanner> m_headerBanner;
1678 RefPtr<PageBanner> m_footerBanner;
1679#endif
1680
1681 RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
1682 bool m_mayStartMediaWhenInWindow { false };
1683
1684 HashMap<WebUndoStepID, RefPtr<WebUndoStep>> m_undoStepMap;
1685
1686#if ENABLE(CONTEXT_MENUS)
1687 std::unique_ptr<API::InjectedBundle::PageContextMenuClient> m_contextMenuClient;
1688#endif
1689 std::unique_ptr<API::InjectedBundle::EditorClient> m_editorClient;
1690 std::unique_ptr<API::InjectedBundle::FormClient> m_formClient;
1691 std::unique_ptr<API::InjectedBundle::PageLoaderClient> m_loaderClient;
1692 InjectedBundlePagePolicyClient m_policyClient;
1693 std::unique_ptr<API::InjectedBundle::ResourceLoadClient> m_resourceLoadClient;
1694 std::unique_ptr<API::InjectedBundle::PageUIClient> m_uiClient;
1695#if ENABLE(FULLSCREEN_API)
1696 InjectedBundlePageFullScreenClient m_fullScreenClient;
1697#endif
1698
1699 UniqueRef<FindController> m_findController;
1700
1701 RefPtr<WebInspector> m_inspector;
1702 RefPtr<WebInspectorUI> m_inspectorUI;
1703 RefPtr<RemoteWebInspectorUI> m_remoteInspectorUI;
1704 std::unique_ptr<WebPageInspectorTargetController> m_inspectorTargetController;
1705
1706#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
1707 RefPtr<PlaybackSessionManager> m_playbackSessionManager;
1708 RefPtr<VideoFullscreenManager> m_videoFullscreenManager;
1709#endif
1710
1711#if PLATFORM(IOS_FAMILY)
1712 bool m_allowsMediaDocumentInlinePlayback { false };
1713 RefPtr<WebCore::Range> m_startingGestureRange;
1714#endif
1715
1716#if ENABLE(FULLSCREEN_API)
1717 RefPtr<WebFullScreenManager> m_fullScreenManager;
1718#endif
1719
1720 RefPtr<WebPopupMenu> m_activePopupMenu;
1721
1722#if ENABLE(CONTEXT_MENUS)
1723 RefPtr<WebContextMenu> m_contextMenu;
1724#endif
1725
1726#if ENABLE(INPUT_TYPE_COLOR)
1727 WebColorChooser* m_activeColorChooser { nullptr };
1728#endif
1729
1730#if ENABLE(DATALIST_ELEMENT)
1731 WeakPtr<WebDataListSuggestionPicker> m_activeDataListSuggestionPicker;
1732#endif
1733
1734 RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
1735 RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
1736
1737 Ref<WebUserContentController> m_userContentController;
1738
1739#if ENABLE(GEOLOCATION)
1740 UniqueRef<GeolocationPermissionRequestManager> m_geolocationPermissionRequestManager;
1741#endif
1742
1743#if ENABLE(MEDIA_STREAM)
1744 UniqueRef<UserMediaPermissionRequestManager> m_userMediaPermissionRequestManager;
1745#endif
1746
1747 std::unique_ptr<WebCore::PrintContext> m_printContext;
1748#if PLATFORM(GTK)
1749 RefPtr<WebPrintOperationGtk> m_printOperation;
1750#endif
1751
1752 SandboxExtensionTracker m_sandboxExtensionTracker;
1753
1754 RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
1755 Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
1756
1757 PAL::HysteresisActivity m_pageScrolledHysteresis;
1758
1759 bool m_canRunBeforeUnloadConfirmPanel { false };
1760
1761 bool m_canRunModal { false };
1762 bool m_isRunningModal { false };
1763
1764#if ENABLE(DRAG_SUPPORT)
1765 bool m_isStartingDrag { false };
1766 WebCore::DragSourceAction m_allowedDragSourceActions { WebCore::DragSourceActionAny };
1767#endif
1768
1769 bool m_cachedMainFrameIsPinnedToLeftSide { true };
1770 bool m_cachedMainFrameIsPinnedToRightSide { true };
1771 bool m_cachedMainFrameIsPinnedToTopSide { true };
1772 bool m_cachedMainFrameIsPinnedToBottomSide { true };
1773 bool m_canShortCircuitHorizontalWheelEvents { false };
1774 bool m_hasWheelEventHandlers { false };
1775
1776 unsigned m_cachedPageCount { 0 };
1777
1778 HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
1779
1780 WebCore::IntSize m_viewLayoutSize;
1781 bool m_autoSizingShouldExpandToViewHeight { false };
1782 Optional<WebCore::IntSize> m_viewportSizeForCSSViewportUnits;
1783
1784 bool m_userIsInteracting { false };
1785 bool m_hasEverFocusedElementDueToUserInteractionSincePageTransition { false };
1786 bool m_isTouchBarUpdateSupressedForHiddenContentEditable { false };
1787 bool m_isNeverRichlyEditableForTouchBar { false };
1788 OptionSet<WebCore::ActivityState::Flag> m_lastActivityStateChanges;
1789
1790#if ENABLE(CONTEXT_MENUS)
1791 bool m_isShowingContextMenu { false };
1792#endif
1793
1794 RefPtr<WebCore::Element> m_focusedElement;
1795 RefPtr<WebCore::Element> m_recentlyBlurredElement;
1796 bool m_hasPendingEditorStateUpdate { false };
1797
1798#if ENABLE(IOS_TOUCH_EVENTS)
1799 CompletionHandler<void(bool)> m_pendingSynchronousTouchEventReply;
1800#endif
1801
1802#if PLATFORM(IOS_FAMILY)
1803 RefPtr<WebCore::Range> m_currentWordRange;
1804 RefPtr<WebCore::Node> m_interactionNode;
1805 WebCore::IntPoint m_lastInteractionLocation;
1806
1807 bool m_isShowingInputViewForFocusedElement { false };
1808
1809 enum SelectionAnchor { Start, End };
1810 SelectionAnchor m_selectionAnchor { Start };
1811
1812 RefPtr<WebCore::Node> m_potentialTapNode;
1813 WebCore::FloatPoint m_potentialTapLocation;
1814 RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin;
1815
1816 WebCore::ViewportConfiguration m_viewportConfiguration;
1817
1818 bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
1819 bool m_hasRestoredExposedContentRectAfterDidCommitLoad { false };
1820 bool m_scaleWasSetByUIProcess { false };
1821 bool m_userHasChangedPageScaleFactor { false };
1822 bool m_hasStablePageScaleFactor { true };
1823 bool m_useTestingViewportConfiguration { false };
1824 bool m_isInStableState { true };
1825 bool m_forceAlwaysUserScalable { false };
1826 MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
1827 Seconds m_estimatedLatency { 0 };
1828 WebCore::FloatSize m_screenSize;
1829 WebCore::FloatSize m_availableScreenSize;
1830 WebCore::FloatSize m_overrideScreenSize;
1831 WebCore::IntRect m_blockRectForTextSelection;
1832
1833 RefPtr<WebCore::Range> m_initialSelection;
1834 WebCore::VisibleSelection m_storedSelectionForAccessibility { WebCore::VisibleSelection() };
1835 WebCore::IntSize m_blockSelectionDesiredSize;
1836 WebCore::FloatSize m_maximumUnobscuredSize;
1837 int32_t m_deviceOrientation { 0 };
1838 bool m_keyboardIsAttached { false };
1839 bool m_canShowWhileLocked { false };
1840 bool m_inDynamicSizeUpdate { false };
1841 HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
1842 RefPtr<WebCore::Node> m_pendingSyntheticClickNode;
1843 WebCore::FloatPoint m_pendingSyntheticClickLocation;
1844 WebCore::FloatRect m_previousExposedContentRect;
1845 OptionSet<WebKit::WebEvent::Modifier> m_pendingSyntheticClickModifiers;
1846 FocusedElementIdentifier m_currentFocusedElementIdentifier { 0 };
1847 Optional<DynamicViewportSizeUpdateID> m_pendingDynamicViewportSizeUpdateID;
1848 double m_lastTransactionPageScaleFactor { 0 };
1849 uint64_t m_lastTransactionIDWithScaleChange { 0 };
1850
1851 CompletionHandler<void(InteractionInformationAtPosition&&)> m_pendingSynchronousPositionInformationReply;
1852#endif
1853
1854 WebCore::Timer m_layerVolatilityTimer;
1855 Vector<Function<void(bool)>> m_markLayersAsVolatileCompletionHandlers;
1856 bool m_isSuspendedUnderLock { false };
1857
1858 HashSet<String, ASCIICaseInsensitiveHash> m_mimeTypesWithCustomContentProviders;
1859 Optional<WebCore::Color> m_backgroundColor { WebCore::Color::white };
1860
1861 HashSet<unsigned> m_activeRenderingSuppressionTokens;
1862 unsigned m_maximumRenderingSuppressionToken { 0 };
1863
1864 WebCore::ScrollPinningBehavior m_scrollPinningBehavior { WebCore::DoNotPin };
1865 Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
1866
1867 bool m_useAsyncScrolling { false };
1868
1869 OptionSet<WebCore::ActivityState::Flag> m_activityState;
1870
1871 bool m_isAppNapEnabled { true };
1872 UserActivity m_userActivity;
1873
1874 uint64_t m_pendingNavigationID { 0 };
1875 Optional<WebsitePoliciesData> m_pendingWebsitePolicies;
1876
1877 bool m_mainFrameProgressCompleted { false };
1878 bool m_shouldDispatchFakeMouseMoveEvents { true };
1879 bool m_isEditorStateMissingPostLayoutData { false };
1880 bool m_isSelectingTextWhileInsertingAsynchronously { false };
1881
1882 enum class EditorStateIsContentEditable { No, Yes, Unset };
1883 mutable EditorStateIsContentEditable m_lastEditorStateWasContentEditable { EditorStateIsContentEditable::Unset };
1884
1885#if PLATFORM(GTK)
1886 bool m_inputMethodEnabled { false };
1887#endif
1888
1889#if ENABLE(VIDEO) && USE(GSTREAMER)
1890 RefPtr<WebCore::MediaPlayerRequestInstallMissingPluginsCallback> m_installMediaPluginsCallback;
1891#endif
1892
1893#if USE(OS_STATE)
1894 WallTime m_loadCommitTime;
1895#endif
1896
1897 WebCore::UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { WebCore::UserInterfaceLayoutDirection::LTR };
1898
1899 const String m_overrideContentSecurityPolicy;
1900 const Optional<double> m_cpuLimit;
1901
1902#if PLATFORM(WPE)
1903 IPC::Attachment m_hostFileDescriptor;
1904#endif
1905
1906 HashMap<String, RefPtr<WebURLSchemeHandlerProxy>> m_schemeToURLSchemeHandlerProxyMap;
1907 HashMap<uint64_t, WebURLSchemeHandlerProxy*> m_identifierToURLSchemeHandlerProxyMap;
1908
1909 HashMap<uint64_t, Function<void(bool granted)>> m_storageAccessResponseCallbackMap;
1910 HashMap<ShareSheetCallbackID, Function<void(bool completed)>> m_shareSheetResponseCallbackMap;
1911
1912#if ENABLE(APPLICATION_MANIFEST)
1913 HashMap<uint64_t, uint64_t> m_applicationManifestFetchCallbackMap;
1914#endif
1915
1916 OptionSet<LayerTreeFreezeReason> m_layerTreeFreezeReasons;
1917 bool m_isSuspended { false };
1918 bool m_needsFontAttributes { false };
1919#if PLATFORM(COCOA)
1920 WeakPtr<RemoteObjectRegistry> m_remoteObjectRegistry;
1921#endif
1922 WebCore::IntSize m_lastSentIntrinsicContentSize;
1923#if ENABLE(VIEWPORT_RESIZING)
1924 WebCore::DeferrableOneShotTimer m_shrinkToFitContentTimer;
1925#endif
1926};
1927
1928} // namespace WebKit
1929
1930