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