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