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