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