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