Add magnify and rotate gesture event support for Mac
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.h
1 /*
2  * Copyright (C) 2010, 2011, 2013 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 #ifndef WebPage_h
27 #define WebPage_h
28
29 #include "APIInjectedBundleFormClient.h"
30 #include "APIInjectedBundlePageContextMenuClient.h"
31 #include "APIInjectedBundlePageUIClient.h"
32 #include "APIObject.h"
33 #include "FindController.h"
34 #include "GeolocationPermissionRequestManager.h"
35 #include "ImageOptions.h"
36 #include "InjectedBundlePageDiagnosticLoggingClient.h"
37 #include "InjectedBundlePageEditorClient.h"
38 #include "InjectedBundlePageFullScreenClient.h"
39 #include "InjectedBundlePageLoaderClient.h"
40 #include "InjectedBundlePagePolicyClient.h"
41 #include "InjectedBundlePageResourceLoadClient.h"
42 #include "LayerTreeHost.h"
43 #include "MessageReceiver.h"
44 #include "MessageSender.h"
45 #include "Plugin.h"
46 #include "SandboxExtension.h"
47 #include "ShareableBitmap.h"
48 #include "UserData.h"
49 #include "UserMediaPermissionRequestManager.h"
50 #include <WebCore/DictationAlternative.h>
51 #include <WebCore/DictionaryPopupInfo.h>
52 #include <WebCore/DragData.h>
53 #include <WebCore/Editor.h>
54 #include <WebCore/FrameLoaderTypes.h>
55 #include <WebCore/HitTestResult.h>
56 #include <WebCore/HysteresisActivity.h>
57 #include <WebCore/IntRect.h>
58 #include <WebCore/IntSizeHash.h>
59 #include <WebCore/Page.h>
60 #include <WebCore/PageOverlay.h>
61 #include <WebCore/PageVisibilityState.h>
62 #include <WebCore/ScrollTypes.h>
63 #include <WebCore/TextChecking.h>
64 #include <WebCore/TextIndicator.h>
65 #include <WebCore/UserActivity.h>
66 #include <WebCore/UserContentTypes.h>
67 #include <WebCore/UserScriptTypes.h>
68 #include <WebCore/ViewState.h>
69 #include <WebCore/ViewportConfiguration.h>
70 #include <WebCore/WebCoreKeyboardUIMode.h>
71 #include <memory>
72 #include <wtf/HashMap.h>
73 #include <wtf/PassRefPtr.h>
74 #include <wtf/RefPtr.h>
75 #include <wtf/RunLoop.h>
76 #include <wtf/text/WTFString.h>
77
78 #if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
79 #include "WebPageAccessibilityObject.h"
80 #include <wtf/glib/GRefPtr.h>
81 #endif
82
83 #if PLATFORM(GTK)
84 #include "ArgumentCodersGtk.h"
85 #include "WebPrintOperationGtk.h"
86 #endif
87
88 #if PLATFORM(IOS)
89 #include "GestureTypes.h"
90 #import "WebPageMessages.h"
91 #endif
92
93 #if ENABLE(IOS_TOUCH_EVENTS)
94 #include <WebKitAdditions/PlatformTouchEventIOS.h>
95 #elif ENABLE(TOUCH_EVENTS)
96 #include <WebCore/PlatformTouchEvent.h>
97 #endif
98
99 #if ENABLE(MAC_GESTURE_EVENTS)
100 #include <WebKitAdditions/PlatformGestureEventMac.h>
101 #endif
102
103 #if ENABLE(CONTEXT_MENUS)
104 #include "InjectedBundlePageContextMenuClient.h"
105 #endif
106
107 #if PLATFORM(COCOA)
108 #include "ViewGestureGeometryCollector.h"
109 #include <wtf/RetainPtr.h>
110 OBJC_CLASS CALayer;
111 OBJC_CLASS NSDictionary;
112 OBJC_CLASS NSObject;
113 OBJC_CLASS WKAccessibilityWebPageObject;
114 #endif
115
116 namespace API {
117 class Array;
118 }
119
120 namespace IPC {
121 class ArgumentDecoder;
122 class Connection;
123 }
124
125 namespace WebCore {
126 class DocumentLoader;
127 class GraphicsContext;
128 class Frame;
129 class FrameView;
130 class HTMLPlugInElement;
131 class HTMLPlugInImageElement;
132 class IntPoint;
133 class KeyboardEvent;
134 class Page;
135 class PrintContext;
136 class Range;
137 class ResourceResponse;
138 class ResourceRequest;
139 class SharedBuffer;
140 class SubstituteData;
141 class TextCheckingRequest;
142 class URL;
143 class VisibleSelection;
144 struct Highlight;
145 struct KeypressCommand;
146 struct MediaPlaybackTargetContext;
147 struct TextCheckingResult;
148
149 #if ENABLE(VIDEO) && USE(GSTREAMER)
150 class MediaPlayerRequestInstallMissingPluginsCallback;
151 #endif
152 }
153
154 namespace WebKit {
155 class DrawingArea;
156 class InjectedBundleBackForwardList;
157 class NotificationPermissionRequestManager;
158 class PDFPlugin;
159 class PageBanner;
160 class PluginView;
161 class VisibleContentRectUpdateInfo;
162 class WebColorChooser;
163 class WebContextMenu;
164 class WebContextMenuItemData;
165 class WebDocumentLoader;
166 class WebEvent;
167 class WebFrame;
168 class WebFullScreenManager;
169 class WebImage;
170 class WebInspector;
171 class WebInspectorClient;
172 class WebInspectorUI;
173 class WebGestureEvent;
174 class WebKeyboardEvent;
175 class WebMouseEvent;
176 class WebNotificationClient;
177 class WebOpenPanelResultListener;
178 class WebPageGroupProxy;
179 class WebPageOverlay;
180 class WebPopupMenu;
181 class WebUndoStep;
182 class WebUserContentController;
183 class WebVideoFullscreenManager;
184 class WebWheelEvent;
185 struct AssistedNodeInformation;
186 struct AttributedString;
187 struct BackForwardListItemState;
188 struct EditingRange;
189 struct EditorState;
190 struct InteractionInformationAtPosition;
191 struct PrintInfo;
192 struct WebPageCreationParameters;
193 struct WebPreferencesStore;
194
195 #if PLATFORM(COCOA)
196 class RemoteLayerTreeTransaction;
197 #endif
198
199 #if ENABLE(TOUCH_EVENTS)
200 class WebTouchEvent;
201 #endif
202
203 class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender {
204 public:
205     static Ref<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
206     virtual ~WebPage();
207
208     void reinitializeWebPage(const WebPageCreationParameters&);
209
210     void close();
211
212     static WebPage* fromCorePage(WebCore::Page*);
213
214     WebCore::Page* corePage() const { return m_page.get(); }
215     uint64_t pageID() const { return m_pageID; }
216     WebCore::SessionID sessionID() const { return m_page->sessionID(); }
217     bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); }
218
219     void setSessionID(WebCore::SessionID);
220
221     void setSize(const WebCore::IntSize&);
222     const WebCore::IntSize& size() const { return m_viewSize; }
223     WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
224     
225     InjectedBundleBackForwardList* backForwardList();
226     DrawingArea* drawingArea() const { return m_drawingArea.get(); }
227 #if ENABLE(ASYNC_SCROLLING)
228     WebCore::ScrollingCoordinator* scrollingCoordinator() const;
229 #endif
230
231     WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
232
233     void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
234
235     bool scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity);
236
237     void centerSelectionInVisibleArea();
238
239 #if PLATFORM(COCOA)
240     void willCommitLayerTree(RemoteLayerTreeTransaction&);
241     void didFlushLayerTreeAtTime(std::chrono::milliseconds);
242 #endif
243
244     enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
245
246     WebInspector* inspector(LazyCreationPolicy = LazyCreationPolicy::CreateIfNeeded);
247     WebInspectorUI* inspectorUI();
248     bool isInspectorPage() { return !!m_inspectorUI; }
249
250 #if PLATFORM(IOS)
251     WebVideoFullscreenManager* videoFullscreenManager();
252     void setAllowsMediaDocumentInlinePlayback(bool);
253     bool allowsMediaDocumentInlinePlayback() const { return m_allowsMediaDocumentInlinePlayback; }
254 #endif
255
256 #if ENABLE(FULLSCREEN_API)
257     WebFullScreenManager* fullScreenManager();
258 #endif
259
260     // -- Called by the DrawingArea.
261     // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
262     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
263     void layoutIfNeeded();
264
265     // -- Called from WebCore clients.
266     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
267
268     void didStartPageTransition();
269     void didCompletePageTransition();
270     void didCommitLoad(WebFrame*);
271     void willReplaceMultipartContent(const WebFrame&);
272     void didReplaceMultipartContent(const WebFrame&);
273     void didFinishLoad(WebFrame*);
274     void show();
275     String userAgent(const WebCore::URL&) const;
276     String userAgent(WebFrame*, const WebCore::URL&) const;
277     String platformUserAgent(const WebCore::URL&) const;
278     WebCore::KeyboardUIMode keyboardUIMode();
279
280     WebUndoStep* webUndoStep(uint64_t);
281     void addWebUndoStep(uint64_t, WebUndoStep*);
282     void removeWebEditCommand(uint64_t);
283     bool isInRedo() const { return m_isInRedo; }
284
285     void setActivePopupMenu(WebPopupMenu*);
286
287 #if ENABLE(INPUT_TYPE_COLOR)
288     WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
289     void setActiveColorChooser(WebColorChooser*);
290     void didChooseColor(const WebCore::Color&);
291     void didEndColorPicker();
292 #endif
293
294     WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
295     void setActiveOpenPanelResultListener(PassRefPtr<WebOpenPanelResultListener>);
296
297     void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
298     void didReceiveSyncMessage(IPC::Connection&, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
299
300     // -- InjectedBundle methods
301 #if ENABLE(CONTEXT_MENUS)
302     void setInjectedBundleContextMenuClient(std::unique_ptr<API::InjectedBundle::PageContextMenuClient>);
303 #endif
304     void initializeInjectedBundleEditorClient(WKBundlePageEditorClientBase*);
305     void setInjectedBundleFormClient(std::unique_ptr<API::InjectedBundle::FormClient>);
306     void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClientBase*);
307     void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClientBase*);
308     void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClientBase*);
309     void setInjectedBundleUIClient(std::unique_ptr<API::InjectedBundle::PageUIClient>);
310 #if ENABLE(FULLSCREEN_API)
311     void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClientBase*);
312 #endif
313     void initializeInjectedBundleDiagnosticLoggingClient(WKBundlePageDiagnosticLoggingClientBase*);
314
315 #if ENABLE(CONTEXT_MENUS)
316     API::InjectedBundle::PageContextMenuClient& injectedBundleContextMenuClient() { return *m_contextMenuClient.get(); }
317 #endif
318     InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
319     API::InjectedBundle::FormClient& injectedBundleFormClient() { return *m_formClient.get(); }
320     InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
321     InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
322     InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
323     API::InjectedBundle::PageUIClient& injectedBundleUIClient() { return *m_uiClient.get(); }
324     InjectedBundlePageDiagnosticLoggingClient& injectedBundleDiagnosticLoggingClient() { return m_logDiagnosticMessageClient; }
325 #if ENABLE(FULLSCREEN_API)
326     InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
327 #endif
328
329     bool findStringFromInjectedBundle(const String&, FindOptions);
330
331     WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
332
333     WebCore::MainFrame* mainFrame() const; // May return 0.
334     WebCore::FrameView* mainFrameView() const; // May return 0.
335
336     PassRefPtr<WebCore::Range> currentSelectionAsRange();
337
338 #if ENABLE(NETSCAPE_PLUGIN_API)
339     PassRefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
340 #endif
341
342 #if ENABLE(WEBGL)
343     WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const String&);
344     WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const String&);
345 #endif // ENABLE(WEBGL)
346     
347     enum class IncludePostLayoutDataHint { No, Yes };
348     EditorState editorState(IncludePostLayoutDataHint = IncludePostLayoutDataHint::Yes) const;
349     void sendPostLayoutEditorStateIfNeeded();
350
351     String renderTreeExternalRepresentation() const;
352     String renderTreeExternalRepresentationForPrinting() const;
353     uint64_t renderTreeSize() const;
354
355     void setTracksRepaints(bool);
356     bool isTrackingRepaints() const;
357     void resetTrackedRepaints();
358     Ref<API::Array> trackedRepaintRects();
359
360     void executeEditingCommand(const String& commandName, const String& argument);
361     bool isEditingCommandEnabled(const String& commandName);
362     void clearMainFrameName();
363     void sendClose();
364
365     void sendSetWindowFrame(const WebCore::FloatRect&);
366
367     double textZoomFactor() const;
368     void setTextZoomFactor(double);
369     double pageZoomFactor() const;
370     void setPageZoomFactor(double);
371     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
372     void windowScreenDidChange(uint32_t);
373
374     void scalePage(double scale, const WebCore::IntPoint& origin);
375     void scalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates);
376     double pageScaleFactor() const;
377     double totalScaleFactor() const;
378     double viewScaleFactor() const;
379     void scaleView(double scale);
380
381     void setUseFixedLayout(bool);
382     bool useFixedLayout() const { return m_useFixedLayout; }
383     void setFixedLayoutSize(const WebCore::IntSize&);
384     WebCore::IntSize fixedLayoutSize() const;
385
386     void listenForLayoutMilestones(uint32_t /* LayoutMilestones */);
387
388     void setSuppressScrollbarAnimations(bool);
389     
390     void setEnableVerticalRubberBanding(bool);
391     void setEnableHorizontalRubberBanding(bool);
392     
393     void setBackgroundExtendsBeyondPage(bool);
394
395     void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
396     void setPaginationBehavesLikeColumns(bool);
397     void setPageLength(double);
398     void setGapBetweenPages(double);
399
400     void postInjectedBundleMessage(const String& messageName, const UserData&);
401
402     bool drawsBackground() const { return m_drawsBackground; }
403     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
404
405     void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; }
406     WebCore::Color underlayColor() const { return m_underlayColor; }
407
408     void stopLoading();
409     void stopLoadingFrame(uint64_t frameID);
410     bool defersLoading() const;
411     void setDefersLoading(bool deferLoading);
412
413     void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
414     void exitAcceleratedCompositingMode();
415
416     void addPluginView(PluginView*);
417     void removePluginView(PluginView*);
418
419     bool isVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
420     bool isVisibleOrOccluded() const { return m_viewState & WebCore::ViewState::IsVisibleOrOccluded; }
421
422     LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
423     void setLayerHostingMode(unsigned);
424
425 #if PLATFORM(COCOA)
426     void updatePluginsActiveAndFocusedState();
427     const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
428     const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
429     const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
430
431     bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
432
433 #if !PLATFORM(IOS)
434     void setTopOverhangImage(PassRefPtr<WebImage>);
435     void setBottomOverhangImage(PassRefPtr<WebImage>);
436 #endif // !PLATFORM(IOS)
437
438     void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
439 #endif // PLATFORM(COCOA)
440
441     bool windowIsFocused() const;
442     bool windowAndWebPageAreFocused() const;
443
444 #if !PLATFORM(IOS)
445     void setHeaderPageBanner(PassRefPtr<PageBanner>);
446     PageBanner* headerPageBanner();
447     void setFooterPageBanner(PassRefPtr<PageBanner>);
448     PageBanner* footerPageBanner();
449
450     void hidePageBanners();
451     void showPageBanners();
452     
453 #endif // !PLATFORM(IOS)
454
455     WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
456     WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
457     
458 #if PLATFORM(IOS)
459     WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&);
460     WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&);
461 #endif
462     
463     PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double additionalScaleFactor, SnapshotOptions);
464     PassRefPtr<WebImage> snapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
465     PassRefPtr<WebImage> snapshotNode(WebCore::Node&, SnapshotOptions, unsigned maximumPixelCount = std::numeric_limits<unsigned>::max());
466
467     static const WebEvent* currentEvent();
468
469     FindController& findController() { return m_findController; }
470
471 #if ENABLE(GEOLOCATION)
472     GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
473 #endif
474
475 #if PLATFORM(IOS) || PLATFORM(EFL)
476     void savePageState(WebCore::HistoryItem&);
477     void restorePageState(const WebCore::HistoryItem&);
478 #endif
479
480 #if ENABLE(MEDIA_STREAM)
481     UserMediaPermissionRequestManager& userMediaPermissionRequestManager() { return m_userMediaPermissionRequestManager; }
482 #endif
483
484 #if PLATFORM(IOS)
485     WebCore::FloatSize screenSize() const;
486     WebCore::FloatSize availableScreenSize() const;
487     int32_t deviceOrientation() const { return m_deviceOrientation; }
488     void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
489     void didReceiveMobileDocType(bool);
490
491     void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
492     bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
493
494     double minimumPageScaleFactor() const;
495     double maximumPageScaleFactor() const;
496     bool allowsUserScaling() const;
497     bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; }
498
499     void handleTap(const WebCore::IntPoint&, uint64_t lastLayerTreeTransactionId);
500     void potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
501     void commitPotentialTap(uint64_t lastLayerTreeTransactionId);
502     void commitPotentialTapFailed();
503     void cancelPotentialTap();
504     void cancelPotentialTapInFrame(WebFrame&);
505     void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
506
507     void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
508     void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
509
510     void blurAssistedNode();
511     void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, uint64_t callbackID);
512     void updateSelectionWithTouches(const WebCore::IntPoint& point, uint32_t touches, bool baseIsStart, uint64_t callbackID);
513     void updateBlockSelectionWithTouch(const WebCore::IntPoint&, uint32_t touch, uint32_t handlePosition);
514     void selectWithTwoTouches(const WebCore::IntPoint& from, const WebCore::IntPoint& to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
515     void extendSelection(uint32_t granularity);
516     void selectWordBackward();
517     void moveSelectionByOffset(int32_t offset, uint64_t callbackID);
518     void selectTextWithGranularityAtPoint(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
519     void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&, uint32_t granularity, uint32_t direction, bool isInteractingWithAssistedNode, uint64_t callbackID);
520     void moveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, uint64_t callbackID);
521     void selectPositionAtPoint(const WebCore::IntPoint&, bool isInteractingWithAssistedNode, uint64_t callbackID);
522     void beginSelectionInDirection(uint32_t direction, uint64_t callbackID);
523     void updateSelectionWithExtentPoint(const WebCore::IntPoint&, bool isInteractingWithAssistedNode, uint64_t callbackID);
524     void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
525
526     void elementDidFocus(WebCore::Node*);
527     void elementDidBlur(WebCore::Node*);
528     void requestDictationContext(uint64_t callbackID);
529     void replaceDictatedText(const String& oldText, const String& newText);
530     void replaceSelectedText(const String& oldText, const String& newText);
531     void requestAutocorrectionData(const String& textForAutocorrection, uint64_t callbackID);
532     void applyAutocorrection(const String& correction, const String& originalText, uint64_t callbackID);
533     void syncApplyAutocorrection(const String& correction, const String& originalText, bool& correctionApplied);
534     void requestAutocorrectionContext(uint64_t callbackID);
535     void getAutocorrectionContext(String& beforeText, String& markedText, String& selectedText, String& afterText, uint64_t& location, uint64_t& length);
536     void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
537     void requestPositionInformation(const WebCore::IntPoint&);
538     void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
539     void stopInteraction();
540     void performActionOnElement(uint32_t action);
541     void focusNextAssistedNode(bool isForward, uint64_t callbackID);
542     void setAssistedNodeValue(const String&);
543     void setAssistedNodeValueAsNumber(double);
544     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection);
545     void resetAssistedNodeForFrame(WebFrame*);
546     WebCore::IntRect rectForElementAtInteractionLocation();
547     void updateSelectionAppearance();
548     void getLookupContextAtPoint(const WebCore::IntPoint, uint64_t callbackID);
549
550 #if ENABLE(IOS_TOUCH_EVENTS)
551     void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
552 #endif
553
554     void contentSizeCategoryDidChange(const String&);
555     void executeEditCommandWithCallback(const String&, uint64_t callbackID);
556
557     std::chrono::milliseconds eventThrottlingDelay() const;
558
559     void showInspectorHighlight(const WebCore::Highlight&);
560     void hideInspectorHighlight();
561
562     void showInspectorIndication();
563     void hideInspectorIndication();
564
565     void enableInspectorNodeSearch();
566     void disableInspectorNodeSearch();
567 #endif
568
569     void setLayerTreeStateIsFrozen(bool);
570     bool markLayersVolatileImmediatelyIfPossible();
571
572     NotificationPermissionRequestManager* notificationPermissionRequestManager();
573
574     void pageDidScroll();
575 #if USE(COORDINATED_GRAPHICS)
576     void pageDidRequestScroll(const WebCore::IntPoint&);
577     void setFixedVisibleContentRect(const WebCore::IntRect&);
578     void sendViewportAttributesChanged();
579 #endif
580
581 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
582     void commitPageTransitionViewport();
583 #endif
584
585 #if ENABLE(CONTEXT_MENUS)
586     WebContextMenu* contextMenu();
587     WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
588 #endif
589     
590     bool hasLocalDataForURL(const WebCore::URL&);
591     String cachedResponseMIMETypeForURL(const WebCore::URL&);
592     String cachedSuggestedFilenameForURL(const WebCore::URL&);
593     PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::URL&);
594
595     static bool canHandleRequest(const WebCore::ResourceRequest&);
596
597     class SandboxExtensionTracker {
598     public:
599         ~SandboxExtensionTracker();
600
601         void invalidate();
602
603         void beginLoad(WebFrame*, const SandboxExtension::Handle& handle);
604         void willPerformLoadDragDestinationAction(PassRefPtr<SandboxExtension> pendingDropSandboxExtension);
605         void didStartProvisionalLoad(WebFrame*);
606         void didCommitProvisionalLoad(WebFrame*);
607         void didFailProvisionalLoad(WebFrame*);
608
609     private:
610         void setPendingProvisionalSandboxExtension(PassRefPtr<SandboxExtension>);
611
612         RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
613         RefPtr<SandboxExtension> m_provisionalSandboxExtension;
614         RefPtr<SandboxExtension> m_committedSandboxExtension;
615     };
616
617     SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
618
619 #if PLATFORM(EFL)
620     void setThemePath(const String&);
621 #endif
622
623 #if PLATFORM(GTK)
624     void setComposition(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeLength);
625     void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
626     void cancelComposition();
627 #endif
628
629 #if PLATFORM (GTK) && HAVE(GTK_GESTURES)
630     void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& result);
631 #endif
632
633     void didApplyStyle();
634     void didChangeSelection();
635     void discardedComposition();
636
637 #if PLATFORM(COCOA)
638     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
639     WKAccessibilityWebPageObject* accessibilityRemoteObject();
640     NSObject *accessibilityObjectForMainFramePlugin();
641     const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; }
642     
643     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
644
645     void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false);
646     void getMarkedRangeAsync(uint64_t callbackID);
647     void getSelectedRangeAsync(uint64_t callbackID);
648     void characterIndexForPointAsync(const WebCore::IntPoint&, uint64_t callbackID);
649     void firstRectForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
650     void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
651     void confirmCompositionAsync();
652
653 #if PLATFORM(MAC)
654     void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool registerUndoGroup = false);
655     void attributedSubstringForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
656     void fontAtSelection(uint64_t callbackID);
657 #if !USE(ASYNC_NSTEXTINPUTCLIENT)
658     void insertText(const String& text, const EditingRange& replacementRange, bool& handled, EditorState& newState);
659     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange, EditorState& newState);
660     void confirmComposition(EditorState& newState);
661     void insertDictatedText(const String& text, const EditingRange& replacementRange, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool& handled, EditorState& newState);
662     void getAttributedSubstringFromRange(const EditingRange&, AttributedString&);
663     void getMarkedRange(EditingRange&);
664     void getSelectedRange(EditingRange&);
665     void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
666     void firstRectForCharacterRange(const EditingRange&, WebCore::IntRect& resultRect);
667     void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState);
668     void cancelComposition(EditorState& newState);
669 #endif
670 #endif
671
672     void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result);
673     void getStringSelectionForPasteboard(WTF::String& stringValue);
674     void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size);
675     void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result);
676     void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result);
677     bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*);
678
679 #if ENABLE(SERVICE_CONTROLS)
680     void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
681 #endif
682
683 #elif PLATFORM(EFL)
684     void confirmComposition(const String& compositionString);
685     void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
686     void cancelComposition();
687 #endif
688
689 #if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
690     void updateAccessibilityTree();
691 #endif
692
693     void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length);
694     bool hasCompositionForTesting();
695     void confirmCompositionForTesting(const String& compositionString);
696
697     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
698     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
699     void dummy(bool&);
700
701 #if PLATFORM(COCOA)
702     bool isSpeaking();
703     void speak(const String&);
704     void stopSpeaking();
705
706     void performDictionaryLookupForSelection(WebCore::Frame*, const WebCore::VisibleSelection&, WebCore::TextIndicatorPresentationTransition);
707 #endif
708
709     bool isSmartInsertDeleteEnabled();
710     void setSmartInsertDeleteEnabled(bool);
711
712     bool isSelectTrailingWhitespaceEnabled();
713     void setSelectTrailingWhitespaceEnabled(bool);
714
715     void replaceSelectionWithText(WebCore::Frame*, const String&);
716     void clearSelection();
717     void restoreSelectionInFocusedEditableElement();
718
719 #if ENABLE(DRAG_SUPPORT)
720 #if PLATFORM(GTK)
721     void performDragControllerAction(uint64_t action, WebCore::DragData);
722 #else
723     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
724 #endif
725     void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
726
727     void willPerformLoadDragDestinationAction();
728     void mayPerformUploadDragDestinationAction();
729
730     void willStartDrag() { ASSERT(!m_isStartingDrag); m_isStartingDrag = true; }
731     void didStartDrag() { ASSERT(m_isStartingDrag); m_isStartingDrag = false; }
732 #endif // ENABLE(DRAG_SUPPORT)
733
734     void beginPrinting(uint64_t frameID, const PrintInfo&);
735     void endPrinting();
736     void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
737     void computePagesForPrintingImpl(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor);
738 #if PLATFORM(COCOA)
739     void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, uint64_t callbackID);
740     void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, uint64_t callbackID);
741     void drawPagesToPDFImpl(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData);
742 #if PLATFORM(IOS)
743     void computePagesForPrintingAndStartDrawingToPDF(uint64_t frameID, const PrintInfo&, uint32_t firstPage, PassRefPtr<Messages::WebPage::ComputePagesForPrintingAndStartDrawingToPDF::DelayedReply>);
744 #endif
745 #elif PLATFORM(GTK)
746     void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
747     void didFinishPrintOperation(const WebCore::ResourceError&, uint64_t callbackID);
748 #endif
749
750     void addResourceRequest(unsigned long, const WebCore::ResourceRequest&);
751     void removeResourceRequest(unsigned long);
752
753     void setMediaVolume(float);
754     void setMuted(bool);
755     void setMayStartMediaWhenInWindow(bool);
756
757 #if ENABLE(MEDIA_SESSION)
758     void handleMediaEvent(uint32_t /* WebCore::MediaEventType */);
759     void setVolumeOfMediaElement(double, uint64_t);
760 #endif
761
762     void updateMainFrameScrollOffsetPinning();
763
764     bool mainFrameHasCustomContentProvider() const;
765     void addMIMETypeWithCustomContentProvider(const String&);
766
767     void mainFrameDidLayout();
768
769     bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
770     void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
771
772     bool canRunModal() const { return m_canRunModal; }
773     void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
774
775     void runModal();
776
777     void setDeviceScaleFactor(float);
778     float deviceScaleFactor() const;
779
780     void forceRepaintWithoutCallback();
781
782     void unmarkAllMisspellings();
783     void unmarkAllBadGrammar();
784 #if PLATFORM(COCOA)
785     void handleAlternativeTextUIResult(const String&);
786 #endif
787
788     // For testing purpose.
789     void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
790     void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
791     void simulateMouseMotion(WebCore::IntPoint, double time);
792
793 #if ENABLE(CONTEXT_MENUS)
794     void contextMenuShowing() { m_isShowingContextMenu = true; }
795 #endif
796
797     void wheelEvent(const WebWheelEvent&);
798
799     void wheelEventHandlersChanged(bool);
800     void recomputeShortCircuitHorizontalWheelEventsState();
801
802 #if ENABLE(MAC_GESTURE_EVENTS)
803     void gestureEvent(const WebGestureEvent&);
804 #endif
805
806     void updateVisibilityState(bool isInitialState = false);
807
808 #if PLATFORM(IOS)
809     void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&);
810     void setMaximumUnobscuredSize(const WebCore::FloatSize&);
811     void setDeviceOrientation(int32_t);
812     void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double scale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID);
813     void synchronizeDynamicViewportUpdate(double& newTargetScale, WebCore::FloatPoint& newScrollPosition, uint64_t& nextValidLayerTreeTransactionID);
814     void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, double oldestTimestamp);
815     bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
816     void willStartUserTriggeredZooming();
817     void applicationWillResignActive();
818     void applicationDidEnterBackground(bool isSuspendedUnderLock);
819     void applicationWillEnterForeground(bool isSuspendedUnderLock);
820     void applicationDidBecomeActive();
821     void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
822     void completePendingSyntheticClickForContentChangeObserver();
823 #endif
824
825 #if ENABLE(IOS_TOUCH_EVENTS)
826     void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
827 #endif
828
829 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
830     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
831 #endif
832
833     bool shouldUseCustomContentProviderForResponse(const WebCore::ResourceResponse&);
834     bool canPluginHandleResponse(const WebCore::ResourceResponse& response);
835
836     bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
837     void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
838     bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; }
839     void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
840     bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
841     void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
842     void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; }
843     bool tabToLinksEnabled() const { return m_tabToLinks; }
844
845     bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
846     void setScrollingPerformanceLoggingEnabled(bool);
847
848 #if PLATFORM(COCOA)
849     bool shouldUsePDFPlugin() const;
850     bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
851     void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; }
852 #endif
853
854     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size);
855 #if PLATFORM(COCOA)
856     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
857 #endif
858
859     bool mainFrameIsScrollable() const { return m_mainFrameIsScrollable; }
860
861     void setMinimumLayoutSize(const WebCore::IntSize&);
862     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
863
864     void setAutoSizingShouldExpandToViewHeight(bool shouldExpand);
865     bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; }
866
867     bool canShowMIMEType(const String& MIMEType) const;
868
869     void addTextCheckingRequest(uint64_t requestID, PassRefPtr<WebCore::TextCheckingRequest>);
870     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
871     void didCancelCheckingText(uint64_t requestID);
872
873 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
874     void determinePrimarySnapshottedPlugIn();
875     void determinePrimarySnapshottedPlugInTimerFired();
876     void resetPrimarySnapshottedPlugIn();
877     bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const;
878     bool plugInIntersectsSearchRect(WebCore::HTMLPlugInImageElement& pluginImageElement);
879     bool plugInIsPrimarySize(WebCore::HTMLPlugInImageElement& pluginImageElement, unsigned &pluginArea);
880 #endif
881
882     unsigned extendIncrementalRenderingSuppression();
883     void stopExtendingIncrementalRenderingSuppression(unsigned token);
884     bool shouldExtendIncrementalRenderingSuppression() { return !m_activeRenderingSuppressionTokens.isEmpty(); }
885
886     WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
887     void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
888
889     WTF::Optional<WebCore::ScrollbarOverlayStyle> scrollbarOverlayStyle() { return m_scrollbarOverlayStyle; }
890     void setScrollbarOverlayStyle(WTF::Optional<uint32_t /* WebCore::ScrollbarOverlayStyle */> scrollbarStyle);
891
892     Ref<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
893     void updateCachedDocumentLoader(WebDocumentLoader&, WebCore::Frame&);
894
895     void getBytecodeProfile(uint64_t callbackID);
896     
897     // Some platforms require accessibility-enabled processes to spin the run loop so that the WebProcess doesn't hang.
898     // While this is not ideal, it does not have to be applied to every platform at the moment.
899     static bool synchronousMessagesShouldSpinRunLoop();
900
901 #if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
902     void handleTelephoneNumberClick(const String& number, const WebCore::IntPoint&);
903     void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&);
904 #endif
905
906     void didChangeScrollOffsetForFrame(WebCore::Frame*);
907
908     void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
909     bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
910
911     void setPageActivityState(WebCore::PageActivityState::Flags);
912
913     void postMessage(const String& messageName, API::Object* messageBody);
914     void postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
915
916 #if PLATFORM(GTK)
917     void setInputMethodState(bool);
918 #endif
919
920     void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
921 #if ENABLE(VIDEO)
922 #if USE(GSTREAMER)
923     void requestInstallMissingMediaPlugins(const String& details, const String& description, WebCore::MediaPlayerRequestInstallMissingPluginsCallback&);
924 #endif
925 #endif
926
927     void addUserScript(const String& source, WebCore::UserContentInjectedFrames, WebCore::UserScriptInjectionTime);
928     void addUserStyleSheet(const String& source, WebCore::UserContentInjectedFrames);
929     void removeAllUserContent();
930
931     void dispatchDidLayout(WebCore::LayoutMilestones);
932
933 private:
934     WebPage(uint64_t pageID, const WebPageCreationParameters&);
935
936     // IPC::MessageSender
937     virtual IPC::Connection* messageSenderConnection() override;
938     virtual uint64_t messageSenderDestinationID() override;
939
940     void platformInitialize();
941     void platformDetach();
942     void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
943
944     void didReceiveWebPageMessage(IPC::Connection&, IPC::MessageDecoder&);
945     void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
946
947 #if PLATFORM(IOS)
948     void resetViewportDefaultConfiguration(WebFrame* mainFrame);
949     void viewportConfigurationChanged();
950     void updateViewportSizeForCSSViewportUnits();
951
952     static void convertSelectionRectsToRootView(WebCore::FrameView*, Vector<WebCore::SelectionRect>&);
953     PassRefPtr<WebCore::Range> rangeForWebSelectionAtPosition(const WebCore::IntPoint&, const WebCore::VisiblePosition&, SelectionFlags&);
954     PassRefPtr<WebCore::Range> rangeForBlockAtPoint(const WebCore::IntPoint&);
955     void computeExpandAndShrinkThresholdsForHandle(const WebCore::IntPoint&, SelectionHandlePosition, float& growThreshold, float& shrinkThreshold);
956     PassRefPtr<WebCore::Range> changeBlockSelection(const WebCore::IntPoint&, SelectionHandlePosition, float& growThreshold, float& shrinkThreshold, SelectionFlags&);
957     PassRefPtr<WebCore::Range> expandedRangeFromHandle(WebCore::Range*, SelectionHandlePosition);
958     PassRefPtr<WebCore::Range> contractedRangeFromHandle(WebCore::Range* currentRange, SelectionHandlePosition, SelectionFlags&);
959     void getAssistedNodeInformation(AssistedNodeInformation&);
960     void platformInitializeAccessibility();
961     void handleSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint& location);
962     void completeSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint& location);
963     void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
964     void resetTextAutosizingBeforeLayoutIfNeeded(const WebCore::FloatSize& oldSize, const WebCore::FloatSize& newSize);
965     WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&, const WebCore::IntPoint&, bool isInteractingWithAssistedNode);
966     PassRefPtr<WebCore::Range> rangeForGranularityAtPoint(const WebCore::Frame&, const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode);
967     void volatilityTimerFired();
968 #endif
969 #if !PLATFORM(COCOA)
970     static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
971 #endif
972     bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
973
974 #if PLATFORM(MAC)
975     bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
976 #endif
977
978     String sourceForFrame(WebFrame*);
979
980     void loadDataImpl(uint64_t navigationID, PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::URL& baseURL, const WebCore::URL& failingURL, const UserData&);
981     void loadString(uint64_t navigationID, const String&, const String& MIMEType, const WebCore::URL& baseURL, const WebCore::URL& failingURL, const UserData&);
982
983     bool platformHasLocalDataForURL(const WebCore::URL&);
984
985     // Actions
986     void tryClose();
987     void loadRequest(uint64_t navigationID, const WebCore::ResourceRequest&, const SandboxExtension::Handle&, uint64_t shouldOpenExternalURLsPolicy, const UserData&);
988     void loadData(uint64_t navigationID, const IPC::DataReference&, const String& MIMEType, const String& encodingName, const String& baseURL, const UserData&);
989     void loadHTMLString(uint64_t navigationID, const String& htmlString, const String& baseURL, const UserData&);
990     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, const String& provisionalLoadErrorURL, const UserData&);
991     void loadPlainTextString(const String&, const UserData&);
992     void loadWebArchiveData(const IPC::DataReference&, const UserData&);
993     void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
994     void reload(uint64_t navigationID, bool reloadFromOrigin, bool contentBlockersEnabled, const SandboxExtension::Handle&);
995     void goForward(uint64_t navigationID, uint64_t);
996     void goBack(uint64_t navigationID, uint64_t);
997     void goToBackForwardItem(uint64_t navigationID, uint64_t);
998     void tryRestoreScrollPosition();
999     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, uint64_t callbackID);
1000     void updateIsInWindow(bool isInitialState = false);
1001     void setViewState(WebCore::ViewState::Flags, bool wantsDidUpdateViewState, const Vector<uint64_t>& callbackIDs);
1002     void validateCommand(const String&, uint64_t);
1003     void executeEditCommand(const String&, const String&);
1004     void setEditable(bool);
1005
1006     void updateUserActivity();
1007
1008     void mouseEvent(const WebMouseEvent&);
1009     void keyEvent(const WebKeyboardEvent&);
1010 #if ENABLE(IOS_TOUCH_EVENTS)
1011     void touchEventSync(const WebTouchEvent&, bool& handled);
1012 #elif ENABLE(TOUCH_EVENTS)
1013     void touchEvent(const WebTouchEvent&);
1014 #endif
1015 #if ENABLE(CONTEXT_MENUS)
1016     void contextMenuHidden() { m_isShowingContextMenu = false; }
1017 #endif
1018
1019     static bool scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
1020     static bool logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
1021
1022     void loadURLInFrame(const String&, uint64_t frameID);
1023
1024     void restoreSession(const Vector<BackForwardListItemState>&);
1025     void didRemoveBackForwardItem(uint64_t);
1026
1027 #if ENABLE(REMOTE_INSPECTOR)
1028     void setAllowsRemoteInspection(bool);
1029 #endif
1030
1031     void setDrawsBackground(bool);
1032     void setDrawsTransparentBackground(bool);
1033
1034     void setTopContentInset(float);
1035
1036     void viewWillStartLiveResize();
1037     void viewWillEndLiveResize();
1038
1039     void getContentsAsString(uint64_t callbackID);
1040 #if ENABLE(MHTML)
1041     void getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding);
1042 #endif
1043     void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
1044     void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
1045     void getRenderTreeExternalRepresentation(uint64_t callbackID);
1046     void getSelectionOrContentsAsString(uint64_t callbackID);
1047     void getSelectionAsWebArchiveData(uint64_t callbackID);
1048     void getSourceForFrame(uint64_t frameID, uint64_t callbackID);
1049     void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
1050     void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
1051     void forceRepaint(uint64_t callbackID);
1052     void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, uint64_t callbackID);
1053
1054     void preferencesDidChange(const WebPreferencesStore&);
1055     void platformPreferencesDidChange(const WebPreferencesStore&);
1056     void updatePreferences(const WebPreferencesStore&);
1057
1058     void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t navigationID, uint64_t downloadID);
1059     void setUserAgent(const String&);
1060     void setCustomTextEncodingName(const String&);
1061     void suspendActiveDOMObjectsAndAnimations();
1062     void resumeActiveDOMObjectsAndAnimations();
1063
1064 #if PLATFORM(COCOA)
1065     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
1066     void performDictionaryLookupOfCurrentSelection();
1067     void performDictionaryLookupForRange(WebCore::Frame*, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1068     WebCore::DictionaryPopupInfo dictionaryPopupInfoForRange(WebCore::Frame*, WebCore::Range&, NSDictionary **options, WebCore::TextIndicatorPresentationTransition);
1069 #if ENABLE(PDFKIT_PLUGIN)
1070     WebCore::DictionaryPopupInfo dictionaryPopupInfoForSelectionInPDFPlugin(PDFSelection *, PDFPlugin&, NSDictionary **options, WebCore::TextIndicatorPresentationTransition);
1071 #endif
1072
1073     void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
1074
1075     RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
1076     void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
1077     void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
1078     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
1079 #endif
1080
1081     void setMainFrameIsScrollable(bool);
1082
1083     void unapplyEditCommand(uint64_t commandID);
1084     void reapplyEditCommand(uint64_t commandID);
1085     void didRemoveEditCommand(uint64_t commandID);
1086
1087     void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1088     void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1089     void getImageForFindMatch(uint32_t matchIndex);
1090     void selectFindMatch(uint32_t matchIndex);
1091     void hideFindUI();
1092     void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1093
1094 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
1095     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area);
1096 #endif
1097
1098     void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
1099     void setTextForActivePopupMenu(int32_t index);
1100
1101 #if PLATFORM(GTK)
1102     void failedToShowPopupMenu();
1103 #endif
1104
1105 #if PLATFORM(IOS)
1106     void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const IPC::DataReference& iconData);
1107 #endif
1108     void didChooseFilesForOpenPanel(const Vector<String>&);
1109     void didCancelForOpenPanel();
1110 #if ENABLE(SANDBOX_EXTENSIONS)
1111     void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
1112 #endif
1113
1114     void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
1115
1116     void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
1117
1118 #if ENABLE(MEDIA_STREAM)
1119     WK_EXPORT void didReceiveUserMediaPermissionDecision(uint64_t userMediaID, bool allowed, const String& audioDeviceUID, const String& videoDeviceUID);
1120 #endif
1121
1122     void advanceToNextMisspelling(bool startBeforeSelection);
1123     void changeSpellingToWord(const String& word);
1124 #if USE(APPKIT)
1125     void uppercaseWord();
1126     void lowercaseWord();
1127     void capitalizeWord();
1128 #endif
1129
1130 #if ENABLE(CONTEXT_MENUS)
1131     void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
1132 #endif
1133
1134     void changeSelectedIndex(int32_t index);
1135     void setCanStartMediaTimerFired();
1136
1137     bool canHandleUserEvents() const;
1138
1139     static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
1140
1141     static PluginView* focusedPluginViewForFrame(WebCore::Frame&);
1142     static PluginView* pluginViewForFrame(WebCore::Frame*);
1143
1144     static PassRefPtr<WebCore::Range> rangeFromEditingRange(WebCore::Frame&, const EditingRange&);
1145
1146     void reportUsedFeatures();
1147
1148 #if PLATFORM(MAC)
1149     void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
1150     RefPtr<WebCore::Range> lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
1151     void immediateActionDidUpdate();
1152     void immediateActionDidCancel();
1153     void immediateActionDidComplete();
1154     void setFont(const String& fontFamily, double fontSize, uint64_t fontTraits);
1155
1156     void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
1157     void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
1158     void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
1159 #endif
1160
1161     void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
1162
1163 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1164     void playbackTargetSelected(uint64_t, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
1165     void playbackTargetAvailabilityDidChange(uint64_t, bool);
1166     void setShouldPlayToPlaybackTarget(uint64_t, bool);
1167 #endif
1168
1169     void clearWheelEventTestTrigger();
1170
1171     void setShouldScaleViewToFitDocument(bool);
1172
1173     void pageStoppedScrolling();
1174
1175 #if ENABLE(VIDEO) && USE(GSTREAMER)
1176     void didEndRequestInstallMissingMediaPlugins(uint32_t result);
1177 #endif
1178
1179     uint64_t m_pageID;
1180
1181     std::unique_ptr<WebCore::Page> m_page;
1182     RefPtr<WebFrame> m_mainFrame;
1183     RefPtr<InjectedBundleBackForwardList> m_backForwardList;
1184
1185     RefPtr<WebPageGroupProxy> m_pageGroup;
1186
1187     String m_userAgent;
1188
1189     WebCore::IntSize m_viewSize;
1190     std::unique_ptr<DrawingArea> m_drawingArea;
1191
1192     HashSet<PluginView*> m_pluginViews;
1193     bool m_hasSeenPlugin;
1194
1195     HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
1196
1197     bool m_useFixedLayout;
1198
1199     bool m_drawsBackground;
1200     bool m_drawsTransparentBackground;
1201
1202     WebCore::Color m_underlayColor;
1203
1204     bool m_isInRedo;
1205     bool m_isClosed;
1206
1207     bool m_tabToLinks;
1208     
1209     bool m_asynchronousPluginInitializationEnabled;
1210     bool m_asynchronousPluginInitializationEnabledForAllPlugins;
1211     bool m_artificialPluginInitializationDelayEnabled;
1212
1213     bool m_scrollingPerformanceLoggingEnabled;
1214
1215     bool m_mainFrameIsScrollable;
1216
1217 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
1218     bool m_readyToFindPrimarySnapshottedPlugin;
1219     bool m_didFindPrimarySnapshottedPlugin;
1220     unsigned m_numberOfPrimarySnapshotDetectionAttempts;
1221     String m_primaryPlugInPageOrigin;
1222     String m_primaryPlugInOrigin;
1223     String m_primaryPlugInMimeType;
1224     RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer;
1225 #endif
1226
1227     // The layer hosting mode.
1228     LayerHostingMode m_layerHostingMode;
1229
1230 #if PLATFORM(COCOA)
1231     bool m_pdfPluginEnabled;
1232
1233     bool m_hasCachedWindowFrame;
1234
1235     // The frame of the containing window in screen coordinates.
1236     WebCore::FloatRect m_windowFrameInScreenCoordinates;
1237
1238     // The frame of the containing window in unflipped screen coordinates.
1239     WebCore::FloatRect m_windowFrameInUnflippedScreenCoordinates;
1240
1241     // The frame of the view in window coordinates.
1242     WebCore::FloatRect m_viewFrameInWindowCoordinates;
1243
1244     // The accessibility position of the view.
1245     WebCore::FloatPoint m_accessibilityPosition;
1246     
1247     RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
1248
1249     ViewGestureGeometryCollector m_viewGestureGeometryCollector;
1250
1251 #elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
1252     GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
1253 #endif
1254
1255 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
1256     // Our view's window in the UI process.
1257     uint64_t m_nativeWindowHandle;
1258 #endif
1259
1260 #if !PLATFORM(IOS)
1261     RefPtr<PageBanner> m_headerBanner;
1262     RefPtr<PageBanner> m_footerBanner;
1263 #endif // !PLATFORM(IOS)
1264
1265     RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
1266     bool m_mayStartMediaWhenInWindow;
1267
1268     HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap;
1269
1270 #if ENABLE(CONTEXT_MENUS)
1271     std::unique_ptr<API::InjectedBundle::PageContextMenuClient> m_contextMenuClient;
1272 #endif
1273     InjectedBundlePageEditorClient m_editorClient;
1274     std::unique_ptr<API::InjectedBundle::FormClient> m_formClient;
1275     InjectedBundlePageLoaderClient m_loaderClient;
1276     InjectedBundlePagePolicyClient m_policyClient;
1277     InjectedBundlePageResourceLoadClient m_resourceLoadClient;
1278     std::unique_ptr<API::InjectedBundle::PageUIClient> m_uiClient;
1279 #if ENABLE(FULLSCREEN_API)
1280     InjectedBundlePageFullScreenClient m_fullScreenClient;
1281 #endif
1282     InjectedBundlePageDiagnosticLoggingClient m_logDiagnosticMessageClient;
1283
1284     FindController m_findController;
1285
1286     RefPtr<WebInspector> m_inspector;
1287     RefPtr<WebInspectorUI> m_inspectorUI;
1288 #if PLATFORM(IOS)
1289     RefPtr<WebVideoFullscreenManager> m_videoFullscreenManager;
1290     bool m_allowsMediaDocumentInlinePlayback { false };
1291 #endif
1292 #if ENABLE(FULLSCREEN_API)
1293     RefPtr<WebFullScreenManager> m_fullScreenManager;
1294 #endif
1295     RefPtr<WebPopupMenu> m_activePopupMenu;
1296 #if ENABLE(CONTEXT_MENUS)
1297     RefPtr<WebContextMenu> m_contextMenu;
1298 #endif
1299 #if ENABLE(INPUT_TYPE_COLOR)
1300     WebColorChooser* m_activeColorChooser;
1301 #endif
1302     RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
1303     RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
1304
1305     RefPtr<WebUserContentController> m_userContentController;
1306
1307 #if ENABLE(GEOLOCATION)
1308     GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
1309 #endif
1310
1311 #if ENABLE(MEDIA_STREAM)
1312     UserMediaPermissionRequestManager m_userMediaPermissionRequestManager;
1313 #endif
1314
1315     std::unique_ptr<WebCore::PrintContext> m_printContext;
1316 #if PLATFORM(GTK)
1317     RefPtr<WebPrintOperationGtk> m_printOperation;
1318 #endif
1319
1320     SandboxExtensionTracker m_sandboxExtensionTracker;
1321
1322     RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
1323     Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
1324
1325     WebCore::HysteresisActivity m_pageScrolledHysteresis;
1326
1327     bool m_canRunBeforeUnloadConfirmPanel;
1328
1329     bool m_canRunModal;
1330     bool m_isRunningModal;
1331
1332 #if ENABLE(DRAG_SUPPORT)
1333     bool m_isStartingDrag;
1334 #endif
1335
1336     bool m_cachedMainFrameIsPinnedToLeftSide;
1337     bool m_cachedMainFrameIsPinnedToRightSide;
1338     bool m_cachedMainFrameIsPinnedToTopSide;
1339     bool m_cachedMainFrameIsPinnedToBottomSide;
1340     bool m_canShortCircuitHorizontalWheelEvents;
1341     bool m_hasWheelEventHandlers;
1342
1343     unsigned m_cachedPageCount;
1344
1345     HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
1346
1347     WebCore::IntSize m_minimumLayoutSize;
1348     bool m_autoSizingShouldExpandToViewHeight;
1349
1350 #if ENABLE(CONTEXT_MENUS)
1351     bool m_isShowingContextMenu;
1352 #endif
1353     
1354 #if PLATFORM(IOS)
1355     RefPtr<WebCore::Node> m_assistedNode;
1356     RefPtr<WebCore::Range> m_currentWordRange;
1357     RefPtr<WebCore::Node> m_interactionNode;
1358     WebCore::IntPoint m_lastInteractionLocation;
1359     
1360     enum SelectionAnchor {
1361         Start,
1362         End
1363     };
1364     SelectionAnchor m_selectionAnchor;
1365
1366     RefPtr<WebCore::Node> m_potentialTapNode;
1367     WebCore::FloatPoint m_potentialTapLocation;
1368
1369     WebCore::ViewportConfiguration m_viewportConfiguration;
1370     bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad;
1371     bool m_scaleWasSetByUIProcess;
1372     bool m_userHasChangedPageScaleFactor;
1373     bool m_hasStablePageScaleFactor;
1374     bool m_userIsInteracting;
1375     bool m_hasFocusedDueToUserInteraction { false };
1376     bool m_hasPendingBlurNotification;
1377     bool m_useTestingViewportConfiguration;
1378     bool m_isInStableState;
1379     std::chrono::milliseconds m_oldestNonStableUpdateVisibleContentRectsTimestamp;
1380     std::chrono::milliseconds m_estimatedLatency;
1381     WebCore::FloatSize m_screenSize;
1382     WebCore::FloatSize m_availableScreenSize;
1383     RefPtr<WebCore::Range> m_currentBlockSelection;
1384     RefPtr<WebCore::Range> m_initialSelection;
1385     WebCore::IntSize m_blockSelectionDesiredSize;
1386     WebCore::FloatSize m_maximumUnobscuredSize;
1387     int32_t m_deviceOrientation;
1388     bool m_inDynamicSizeUpdate;
1389     HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
1390     RefPtr<WebCore::Node> m_pendingSyntheticClickNode;
1391     WebCore::FloatPoint m_pendingSyntheticClickLocation;
1392     WebCore::FloatRect m_previousExposedContentRect;
1393     WebCore::Timer m_volatilityTimer;
1394 #endif
1395
1396     HashSet<String, CaseFoldingHash> m_mimeTypesWithCustomContentProviders;
1397     WebCore::Color m_backgroundColor;
1398
1399     HashSet<unsigned> m_activeRenderingSuppressionTokens;
1400     unsigned m_maximumRenderingSuppressionToken;
1401     
1402     WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1403     WTF::Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
1404
1405     bool m_useAsyncScrolling;
1406
1407     WebCore::ViewState::Flags m_viewState;
1408     WebCore::PageActivityState::Flags m_activityState;
1409
1410     bool m_processSuppressionEnabled;
1411     UserActivity m_userActivity;
1412
1413     uint64_t m_pendingNavigationID;
1414
1415 #if ENABLE(WEBGL)
1416     WebCore::WebGLLoadPolicy m_systemWebGLPolicy;
1417 #endif
1418
1419     bool m_mainFrameProgressCompleted;
1420     bool m_shouldDispatchFakeMouseMoveEvents;
1421     bool m_isEditorStateMissingPostLayoutData { false };
1422
1423 #if PLATFORM(GTK)
1424     bool m_inputMethodEnabled { false };
1425 #endif
1426
1427 #if ENABLE(VIDEO) && USE(GSTREAMER)
1428     RefPtr<WebCore::MediaPlayerRequestInstallMissingPluginsCallback> m_installMediaPluginsCallback;
1429 #endif
1430 };
1431
1432 } // namespace WebKit
1433
1434 #endif // WebPage_h