5e4697dea23ec3dc51a7e5c51306c19de348b584
[WebKit-https.git] / Source / WebKit / WebProcess / WebPage / WebPage.h
1 /*
2  * Copyright (C) 2010-2019 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 #pragma once
27
28 #include "APIInjectedBundleEditorClient.h"
29 #include "APIInjectedBundleFormClient.h"
30 #include "APIInjectedBundlePageContextMenuClient.h"
31 #include "APIInjectedBundlePageLoaderClient.h"
32 #include "APIInjectedBundlePageResourceLoadClient.h"
33 #include "APIInjectedBundlePageUIClient.h"
34 #include "APIObject.h"
35 #include "CallbackID.h"
36 #include "DrawingAreaInfo.h"
37 #include "EditingRange.h"
38 #include "FocusedElementInformation.h"
39 #include "InjectedBundlePageContextMenuClient.h"
40 #include "InjectedBundlePageFullScreenClient.h"
41 #include "InjectedBundlePagePolicyClient.h"
42 #include "LayerTreeContext.h"
43 #include "MessageReceiver.h"
44 #include "MessageSender.h"
45 #include "OptionalCallbackID.h"
46 #include "Plugin.h"
47 #include "SandboxExtension.h"
48 #include "ShareSheetCallbackID.h"
49 #include "SharedMemory.h"
50 #include "UserData.h"
51 #include "WebBackForwardListProxy.h"
52 #include "WebURLSchemeHandler.h"
53 #include "WebUndoStepID.h"
54 #include "WebUserContentController.h"
55 #include "WebsitePoliciesData.h"
56 #include <JavaScriptCore/InspectorFrontendChannel.h>
57 #include <WebCore/ActivityState.h>
58 #include <WebCore/DictionaryPopupInfo.h>
59 #include <WebCore/DisabledAdaptations.h>
60 #include <WebCore/DragActions.h>
61 #include <WebCore/FrameLoaderTypes.h>
62 #include <WebCore/HTMLMenuElement.h>
63 #include <WebCore/HTMLMenuItemElement.h>
64 #include <WebCore/IntRect.h>
65 #include <WebCore/IntSizeHash.h>
66 #include <WebCore/Page.h>
67 #include <WebCore/PageOverlay.h>
68 #include <WebCore/PluginData.h>
69 #include <WebCore/PointerID.h>
70 #include <WebCore/SecurityPolicyViolationEvent.h>
71 #include <WebCore/ShareData.h>
72 #include <WebCore/UserActivity.h>
73 #include <WebCore/UserContentTypes.h>
74 #include <WebCore/UserInterfaceLayoutDirection.h>
75 #include <WebCore/UserScriptTypes.h>
76 #include <WebCore/VisibilityState.h>
77 #include <WebCore/WebCoreKeyboardUIMode.h>
78 #include <memory>
79 #include <pal/HysteresisActivity.h>
80 #include <wtf/HashMap.h>
81 #include <wtf/MonotonicTime.h>
82 #include <wtf/RefPtr.h>
83 #include <wtf/RunLoop.h>
84 #include <wtf/Seconds.h>
85 #include <wtf/WallTime.h>
86 #include <wtf/text/WTFString.h>
87
88 #if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
89 typedef struct _AtkObject AtkObject;
90 #include <wtf/glib/GRefPtr.h>
91 #endif
92
93 #if PLATFORM(GTK)
94 #include "ArgumentCodersGtk.h"
95 #include "WebPrintOperationGtk.h"
96 #endif
97
98 #if PLATFORM(IOS_FAMILY)
99 #include "GestureTypes.h"
100 #include "WebPageMessages.h"
101 #include <WebCore/IntPointHash.h>
102 #include <WebCore/ViewportConfiguration.h>
103 #endif
104
105 #if ENABLE(APPLICATION_MANIFEST)
106 #include <WebCore/ApplicationManifest.h>
107 #endif
108
109 #if ENABLE(IOS_TOUCH_EVENTS)
110 #include <WebKitAdditions/PlatformTouchEventIOS.h>
111 #elif ENABLE(TOUCH_EVENTS)
112 #include <WebCore/PlatformTouchEvent.h>
113 #endif
114
115 #if ENABLE(DATA_DETECTION)
116 #include <WebCore/DataDetection.h>
117 #endif
118
119 #if ENABLE(MAC_GESTURE_EVENTS)
120 #include <WebKitAdditions/PlatformGestureEventMac.h>
121 #endif
122
123 #if PLATFORM(COCOA)
124 #include "DynamicViewportSizeUpdate.h"
125 #include <WebCore/VisibleSelection.h>
126 #include <wtf/RetainPtr.h>
127 OBJC_CLASS CALayer;
128 OBJC_CLASS NSArray;
129 OBJC_CLASS NSDictionary;
130 OBJC_CLASS NSObject;
131 OBJC_CLASS WKAccessibilityWebPageObject;
132 #endif
133
134 namespace API {
135 class Array;
136 }
137
138 namespace IPC {
139 class Connection;
140 class Decoder;
141 class FormDataReference;
142 }
143
144 namespace WebCore {
145
146 class CaptureDevice;
147 class DocumentLoader;
148 class DragData;
149 class FontAttributeChanges;
150 class FontChanges;
151 class Frame;
152 class FrameSelection;
153 class FrameView;
154 class GraphicsContext;
155 class HTMLMenuElement;
156 class HTMLMenuItemElement;
157 class HTMLPlugInElement;
158 class HTMLPlugInImageElement;
159 class IntPoint;
160 class KeyboardEvent;
161 class MediaPlaybackTargetContext;
162 class MediaPlayerRequestInstallMissingPluginsCallback;
163 class Page;
164 class PrintContext;
165 class Range;
166 class ResourceRequest;
167 class ResourceResponse;
168 class SelectionRect;
169 class SharedBuffer;
170 class SubstituteData;
171 class TextCheckingRequest;
172 class VisiblePosition;
173
174 enum SyntheticClickType : int8_t;
175 enum class DOMPasteAccessResponse : uint8_t;
176 enum class DragHandlingMethod : uint8_t;
177 enum class ShouldTreatAsContinuingLoad : bool;
178 enum class TextIndicatorPresentationTransition : uint8_t;
179 enum class WritingDirection : uint8_t;
180
181 struct BackForwardItemIdentifier;
182 struct CompositionUnderline;
183 struct DictationAlternative;
184 struct GlobalFrameIdentifier;
185 struct GlobalWindowIdentifier;
186 struct Highlight;
187 struct KeypressCommand;
188 struct PromisedAttachmentInfo;
189 struct TextCheckingResult;
190 struct ViewportArguments;
191
192 #if ENABLE(ATTACHMENT_ELEMENT)
193 class HTMLAttachmentElement;
194 #endif
195 }
196
197 namespace WebKit {
198
199 class DataReference;
200 class DrawingArea;
201 class DownloadID;
202 class FindController;
203 class GamepadData;
204 class GeolocationPermissionRequestManager;
205 class MediaDeviceSandboxExtensions;
206 class NotificationPermissionRequestManager;
207 class PDFPlugin;
208 class PageBanner;
209 class PluginView;
210 class RemoteObjectRegistry;
211 class RemoteWebInspectorUI;
212 class TextCheckingControllerProxy;
213 class UserMediaPermissionRequestManager;
214 class ViewGestureGeometryCollector;
215 class VisibleContentRectUpdateInfo;
216 class WebColorChooser;
217 class WebContextMenu;
218 class WebContextMenuItemData;
219 class WebDataListSuggestionPicker;
220 class WebDocumentLoader;
221 class WebEvent;
222 class PlaybackSessionManager;
223 class VideoFullscreenManager;
224 class WebFrame;
225 class WebFullScreenManager;
226 class WebGestureEvent;
227 class WebImage;
228 class WebInspector;
229 class WebInspectorClient;
230 class WebInspectorUI;
231 class WebKeyboardEvent;
232 class WebMouseEvent;
233 class WebNotificationClient;
234 class WebOpenPanelResultListener;
235 class WebPageGroupProxy;
236 class WebPageInspectorTargetController;
237 class WebPageOverlay;
238 class WebPaymentCoordinator;
239 class WebPopupMenu;
240 class WebTouchEvent;
241 class WebURLSchemeHandlerProxy;
242 class WebUndoStep;
243 class WebUserContentController;
244 class WebWheelEvent;
245 class RemoteLayerTreeTransaction;
246
247 enum FindOptions : uint16_t;
248 enum class DragControllerAction : uint8_t;
249
250 struct AttributedString;
251 struct DataDetectionResult;
252 struct BackForwardListItemState;
253 struct EditorState;
254 struct InteractionInformationAtPosition;
255 struct InteractionInformationRequest;
256 struct LoadParameters;
257 struct PrintInfo;
258 struct TextInputContext;
259 struct WebAutocorrectionContext;
260 struct WebPageCreationParameters;
261 struct WebPreferencesStore;
262 struct WebSelectionData;
263 struct WebsitePoliciesData;
264
265 using SnapshotOptions = uint32_t;
266 using WKEventModifiers = uint32_t;
267
268 class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender, public CanMakeWeakPtr<WebPage> {
269 public:
270     static Ref<WebPage> create(uint64_t pageID, WebPageCreationParameters&&);
271     virtual ~WebPage();
272
273     void reinitializeWebPage(WebPageCreationParameters&&);
274
275     void close();
276
277     static WebPage* fromCorePage(WebCore::Page*);
278
279     WebCore::Page* corePage() const { return m_page.get(); }
280     uint64_t pageID() const { return m_pageID; }
281     PAL::SessionID sessionID() const { return m_page->sessionID(); }
282     bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); }
283
284     void setSessionID(PAL::SessionID);
285
286     void setSize(const WebCore::IntSize&);
287     const WebCore::IntSize& size() const { return m_viewSize; }
288     WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
289
290     DrawingArea* drawingArea() const { return m_drawingArea.get(); }
291
292 #if ENABLE(ASYNC_SCROLLING)
293     WebCore::ScrollingCoordinator* scrollingCoordinator() const;
294 #endif
295
296     WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
297
298     void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
299
300     bool scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity);
301
302     void centerSelectionInVisibleArea();
303
304 #if PLATFORM(COCOA)
305     void willCommitLayerTree(RemoteLayerTreeTransaction&);
306     void didFlushLayerTreeAtTime(MonotonicTime);
307 #endif
308
309     void layoutIfNeeded();
310     void updateRendering();
311
312     enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
313
314     WebInspector* inspector(LazyCreationPolicy = LazyCreationPolicy::CreateIfNeeded);
315     WebInspectorUI* inspectorUI();
316     RemoteWebInspectorUI* remoteInspectorUI();
317     bool isInspectorPage() { return !!m_inspectorUI || !!m_remoteInspectorUI; }
318
319     void inspectorFrontendCountChanged(unsigned);
320
321 #if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
322     PlaybackSessionManager& playbackSessionManager();
323     VideoFullscreenManager& videoFullscreenManager();
324     void videoControlsManagerDidChange();
325 #endif
326
327 #if PLATFORM(IOS_FAMILY)
328     void setAllowsMediaDocumentInlinePlayback(bool);
329     bool allowsMediaDocumentInlinePlayback() const { return m_allowsMediaDocumentInlinePlayback; }
330 #endif
331
332 #if ENABLE(FULLSCREEN_API)
333     WebFullScreenManager* fullScreenManager();
334 #endif
335
336     void addConsoleMessage(uint64_t frameID, MessageSource, MessageLevel, const String&, uint64_t requestID = 0);
337     void sendCSPViolationReport(uint64_t frameID, const URL& reportURL, IPC::FormDataReference&&);
338     void enqueueSecurityPolicyViolationEvent(uint64_t frameID, WebCore::SecurityPolicyViolationEvent::Init&&);
339
340     // -- Called by the DrawingArea.
341     // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
342     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
343
344     // -- Called from WebCore clients.
345     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
346
347     void didStartPageTransition();
348     void didCompletePageTransition();
349     void didCommitLoad(WebFrame*);
350     void willReplaceMultipartContent(const WebFrame&);
351     void didReplaceMultipartContent(const WebFrame&);
352     void didFinishLoad(WebFrame*);
353     void show();
354     String userAgent(const URL&) const;
355     String platformUserAgent(const URL&) const;
356     WebCore::KeyboardUIMode keyboardUIMode();
357
358     void didInsertMenuElement(WebCore::HTMLMenuElement&);
359     void didRemoveMenuElement(WebCore::HTMLMenuElement&);
360     void didInsertMenuItemElement(WebCore::HTMLMenuItemElement&);
361     void didRemoveMenuItemElement(WebCore::HTMLMenuItemElement&);
362
363     const String& overrideContentSecurityPolicy() const { return m_overrideContentSecurityPolicy; }
364
365     WebUndoStep* webUndoStep(WebUndoStepID);
366     void addWebUndoStep(WebUndoStepID, Ref<WebUndoStep>&&);
367     void removeWebEditCommand(WebUndoStepID);
368     bool isInRedo() const { return m_isInRedo; }
369
370     bool isAlwaysOnLoggingAllowed() const;
371     void setActivePopupMenu(WebPopupMenu*);
372
373     void setHiddenPageDOMTimerThrottlingIncreaseLimit(Seconds limit)
374     {
375         m_page->setDOMTimerAlignmentIntervalIncreaseLimit(limit);
376     }
377
378 #if ENABLE(INPUT_TYPE_COLOR)
379     WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
380     void setActiveColorChooser(WebColorChooser*);
381     void didChooseColor(const WebCore::Color&);
382     void didEndColorPicker();
383 #endif
384
385 #if ENABLE(DATALIST_ELEMENT)
386     void setActiveDataListSuggestionPicker(WebDataListSuggestionPicker*);
387     void didSelectDataListOption(const String&);
388     void didCloseSuggestions();
389 #endif
390
391     WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
392     void setActiveOpenPanelResultListener(Ref<WebOpenPanelResultListener>&&);
393
394     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
395     void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
396
397     // -- InjectedBundle methods
398 #if ENABLE(CONTEXT_MENUS)
399     void setInjectedBundleContextMenuClient(std::unique_ptr<API::InjectedBundle::PageContextMenuClient>&&);
400 #endif
401     void setInjectedBundleEditorClient(std::unique_ptr<API::InjectedBundle::EditorClient>&&);
402     void setInjectedBundleFormClient(std::unique_ptr<API::InjectedBundle::FormClient>&&);
403     void setInjectedBundlePageLoaderClient(std::unique_ptr<API::InjectedBundle::PageLoaderClient>&&);
404     void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClientBase*);
405     void setInjectedBundleResourceLoadClient(std::unique_ptr<API::InjectedBundle::ResourceLoadClient>&&);
406     void setInjectedBundleUIClient(std::unique_ptr<API::InjectedBundle::PageUIClient>&&);
407 #if ENABLE(FULLSCREEN_API)
408     void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClientBase*);
409 #endif
410
411 #if ENABLE(CONTEXT_MENUS)
412     API::InjectedBundle::PageContextMenuClient& injectedBundleContextMenuClient() { return *m_contextMenuClient; }
413 #endif
414     API::InjectedBundle::EditorClient& injectedBundleEditorClient() { return *m_editorClient; }
415     API::InjectedBundle::FormClient& injectedBundleFormClient() { return *m_formClient; }
416     API::InjectedBundle::PageLoaderClient& injectedBundleLoaderClient() { return *m_loaderClient; }
417     InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
418     API::InjectedBundle::ResourceLoadClient& injectedBundleResourceLoadClient() { return *m_resourceLoadClient; }
419     API::InjectedBundle::PageUIClient& injectedBundleUIClient() { return *m_uiClient; }
420 #if ENABLE(FULLSCREEN_API)
421     InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
422 #endif
423
424     bool findStringFromInjectedBundle(const String&, FindOptions);
425     void findStringMatchesFromInjectedBundle(const String&, FindOptions);
426     void replaceStringMatchesFromInjectedBundle(const Vector<uint32_t>& matchIndices, const String& replacementText, bool selectionOnly);
427
428     WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
429
430     WebCore::Frame* mainFrame() const; // May return nullptr.
431     WebCore::FrameView* mainFrameView() const; // May return nullptr.
432
433     RefPtr<WebCore::Range> currentSelectionAsRange();
434
435 #if ENABLE(NETSCAPE_PLUGIN_API)
436     RefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
437 #endif
438
439 #if ENABLE(WEBGL)
440     WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const URL&);
441     WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const URL&);
442 #endif
443     
444     enum class IncludePostLayoutDataHint { No, Yes };
445     EditorState editorState(IncludePostLayoutDataHint = IncludePostLayoutDataHint::Yes) const;
446     void updateEditorStateAfterLayoutIfEditabilityChanged();
447
448     // options are RenderTreeExternalRepresentationBehavior values.
449     String renderTreeExternalRepresentation(unsigned options = 0) const;
450     String renderTreeExternalRepresentationForPrinting() const;
451     uint64_t renderTreeSize() const;
452
453     void setTracksRepaints(bool);
454     bool isTrackingRepaints() const;
455     void resetTrackedRepaints();
456     Ref<API::Array> trackedRepaintRects();
457
458     void executeEditingCommand(const String& commandName, const String& argument);
459     bool isEditingCommandEnabled(const String& commandName);
460     void clearMainFrameName();
461     void sendClose();
462
463     void suspendForProcessSwap();
464
465     void sendSetWindowFrame(const WebCore::FloatRect&);
466
467     double textZoomFactor() const;
468     void setTextZoomFactor(double);
469     double pageZoomFactor() const;
470     void setPageZoomFactor(double);
471     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
472     void windowScreenDidChange(uint32_t);
473     String dumpHistoryForTesting(const String& directory);
474     void clearHistory();
475
476     void accessibilitySettingsDidChange();
477
478     void scalePage(double scale, const WebCore::IntPoint& origin);
479     void scalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates);
480     double pageScaleFactor() const;
481     double totalScaleFactor() const;
482     double viewScaleFactor() const;
483     void scaleView(double scale);
484
485     void setUseFixedLayout(bool);
486     bool useFixedLayout() const { return m_useFixedLayout; }
487     bool setFixedLayoutSize(const WebCore::IntSize&);
488     WebCore::IntSize fixedLayoutSize() const;
489
490     void listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone>);
491
492     void setSuppressScrollbarAnimations(bool);
493     
494     void setEnableVerticalRubberBanding(bool);
495     void setEnableHorizontalRubberBanding(bool);
496     
497     void setBackgroundExtendsBeyondPage(bool);
498
499     void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
500     void setPaginationBehavesLikeColumns(bool);
501     void setPageLength(double);
502     void setGapBetweenPages(double);
503     void setPaginationLineGridEnabled(bool);
504     
505     void postInjectedBundleMessage(const String& messageName, const UserData&);
506
507     void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; }
508     WebCore::Color underlayColor() const { return m_underlayColor; }
509
510     void stopLoading();
511     void stopLoadingFrame(uint64_t frameID);
512     bool defersLoading() const;
513     void setDefersLoading(bool deferLoading);
514
515     void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
516     void exitAcceleratedCompositingMode();
517
518     void addPluginView(PluginView*);
519     void removePluginView(PluginView*);
520
521     bool isVisible() const { return m_activityState.contains(WebCore::ActivityState::IsVisible); }
522     bool isVisibleOrOccluded() const { return m_activityState.contains(WebCore::ActivityState::IsVisibleOrOccluded); }
523
524     LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
525     void setLayerHostingMode(LayerHostingMode);
526
527 #if PLATFORM(COCOA)
528     void updatePluginsActiveAndFocusedState();
529     const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
530     const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
531     const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
532
533     bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
534
535     void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
536 #endif
537
538 #if PLATFORM(MAC)
539     void setTopOverhangImage(WebImage*);
540     void setBottomOverhangImage(WebImage*);
541     
542     void setUseSystemAppearance(bool);
543 #endif
544
545     void setUseDarkAppearance(bool);
546
547     bool windowIsFocused() const;
548     bool windowAndWebPageAreFocused() const;
549
550 #if !PLATFORM(IOS_FAMILY)
551     void setHeaderPageBanner(PageBanner*);
552     PageBanner* headerPageBanner();
553     void setFooterPageBanner(PageBanner*);
554     PageBanner* footerPageBanner();
555
556     void hidePageBanners();
557     void showPageBanners();
558     
559     void setHeaderBannerHeightForTesting(int);
560     void setFooterBannerHeightForTesting(int);
561 #endif
562
563     WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
564     WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
565     WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&);
566     WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&);
567     
568     RefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double additionalScaleFactor, SnapshotOptions);
569
570     static const WebEvent* currentEvent();
571
572     FindController& findController() { return m_findController.get(); }
573
574 #if ENABLE(GEOLOCATION)
575     GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager.get(); }
576 #endif
577
578 #if PLATFORM(IOS_FAMILY)
579     void savePageState(WebCore::HistoryItem&);
580     void restorePageState(const WebCore::HistoryItem&);
581 #endif
582
583 #if ENABLE(MEDIA_STREAM)
584     UserMediaPermissionRequestManager& userMediaPermissionRequestManager() { return m_userMediaPermissionRequestManager; }
585     void captureDevicesChanged();
586 #endif
587
588     void elementDidFocus(WebCore::Element&);
589     void elementDidRefocus(WebCore::Element&);
590     void elementDidBlur(WebCore::Element&);
591     void focusedElementDidChangeInputMode(WebCore::Element&, WebCore::InputMode);
592     void resetFocusedElementForFrame(WebFrame*);
593
594     void disabledAdaptationsDidChange(const OptionSet<WebCore::DisabledAdaptations>&);
595     void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
596     void executeEditCommandWithCallback(const String&, const String& argument, CallbackID);
597
598     void textInputContextsInRect(WebCore::FloatRect, CompletionHandler<void(const Vector<WebKit::TextInputContext>&)>&&);
599     void focusTextInputContext(const TextInputContext&, CompletionHandler<void(bool)>&&);
600
601 #if PLATFORM(IOS_FAMILY)
602     WebCore::FloatSize screenSize() const;
603     WebCore::FloatSize availableScreenSize() const;
604     WebCore::FloatSize overrideScreenSize() const;
605     int32_t deviceOrientation() const { return m_deviceOrientation; }
606     void didReceiveMobileDocType(bool);
607
608     void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
609     bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
610
611     double minimumPageScaleFactor() const;
612     double maximumPageScaleFactor() const;
613     double maximumPageScaleFactorIgnoringAlwaysScalable() const;
614     bool allowsUserScaling() const;
615     bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; }
616
617     void handleTap(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
618     void potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&, bool shouldRequestMagnificationInformation);
619     void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
620     void commitPotentialTapFailed();
621     void cancelPotentialTap();
622     void cancelPotentialTapInFrame(WebFrame&);
623     void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
624     void didRecognizeLongPress();
625
626     void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
627     void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
628
629     void blurFocusedElement();
630     void requestFocusedElementInformation(CallbackID);
631     void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithFocusedElement, CallbackID);
632     void updateSelectionWithTouches(const WebCore::IntPoint&, uint32_t touches, bool baseIsStart, CallbackID);
633     void selectWithTwoTouches(const WebCore::IntPoint& from, const WebCore::IntPoint& to, uint32_t gestureType, uint32_t gestureState, CallbackID);
634     void extendSelection(uint32_t granularity);
635     void selectWordBackward();
636     void moveSelectionByOffset(int32_t offset, CallbackID);
637     void selectTextWithGranularityAtPoint(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithFocusedElement, CallbackID);
638     void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&, uint32_t granularity, uint32_t direction, bool isInteractingWithFocusedElement, CallbackID);
639     void moveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, CallbackID);
640     void selectPositionAtPoint(const WebCore::IntPoint&, bool isInteractingWithFocusedElement, CallbackID);
641     void beginSelectionInDirection(uint32_t direction, CallbackID);
642     void updateSelectionWithExtentPoint(const WebCore::IntPoint&, bool isInteractingWithFocusedElement, CallbackID);
643     void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithFocusedElement, CallbackID);
644
645     void requestDictationContext(CallbackID);
646     void replaceDictatedText(const String& oldText, const String& newText);
647     void replaceSelectedText(const String& oldText, const String& newText);
648     void requestAutocorrectionData(const String& textForAutocorrection, CallbackID);
649     void applyAutocorrection(const String& correction, const String& originalText, CallbackID);
650     void syncApplyAutocorrection(const String& correction, const String& originalText, CompletionHandler<void(bool)>&&);
651     void requestAutocorrectionContext();
652     void getPositionInformation(const InteractionInformationRequest&, CompletionHandler<void(InteractionInformationAtPosition&&)>&&);
653     void requestPositionInformation(const InteractionInformationRequest&);
654     void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
655     void stopInteraction();
656     void performActionOnElement(uint32_t action);
657     void focusNextFocusedElement(bool isForward, CallbackID);
658     void autofillLoginCredentials(const String&, const String&);
659     void setFocusedElementValue(const String&);
660     void setFocusedElementValueAsNumber(double);
661     void setFocusedElementSelectedIndex(uint32_t index, bool allowMultipleSelection);
662     void setIsShowingInputViewForFocusedElement(bool);
663     void updateSelectionAppearance();
664     void getSelectionContext(CallbackID);
665     void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t requestID);
666     void handleStylusSingleTapAtPoint(const WebCore::IntPoint&, uint64_t requestID);
667     void getRectsForGranularityWithSelectionOffset(uint32_t, int32_t, CallbackID);
668     void getRectsAtSelectionOffsetWithText(int32_t, const String&, CallbackID);
669     void storeSelectionForAccessibility(bool);
670     void startAutoscrollAtPosition(const WebCore::FloatPoint&);
671     void cancelAutoscroll();
672     void requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&&);
673
674     void contentSizeCategoryDidChange(const String&);
675
676     Seconds eventThrottlingDelay() const;
677
678     void showInspectorHighlight(const WebCore::Highlight&);
679     void hideInspectorHighlight();
680
681     void showInspectorIndication();
682     void hideInspectorIndication();
683
684     void enableInspectorNodeSearch();
685     void disableInspectorNodeSearch();
686
687     bool forceAlwaysUserScalable() const { return m_forceAlwaysUserScalable; }
688     void setForceAlwaysUserScalable(bool);
689
690     void updateSelectionWithDelta(int64_t locationDelta, int64_t lengthDelta, CompletionHandler<void()>&&);
691     void requestDocumentEditingContext(WebKit::DocumentEditingContextRequest, CompletionHandler<void(WebKit::DocumentEditingContext)>&&);
692 #endif
693
694 #if PLATFORM(IOS_FAMILY) && ENABLE(IOS_TOUCH_EVENTS)
695     void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
696 #endif
697
698     bool hasRichlyEditableSelection() const;
699
700     enum class LayerTreeFreezeReason {
701         PageTransition          = 1 << 0,
702         BackgroundApplication   = 1 << 1,
703         ProcessSuspended        = 1 << 2,
704         PageSuspended           = 1 << 3,
705         Printing                = 1 << 4,
706         ProcessSwap             = 1 << 5,
707     };
708     void freezeLayerTree(LayerTreeFreezeReason);
709     void unfreezeLayerTree(LayerTreeFreezeReason);
710
711     void markLayersVolatile(Function<void(bool)>&& completionHandler = { });
712     void cancelMarkLayersVolatile();
713
714     NotificationPermissionRequestManager* notificationPermissionRequestManager();
715
716     void pageDidScroll();
717
718 #if ENABLE(CONTEXT_MENUS)
719     WebContextMenu* contextMenu();
720     WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
721 #endif
722
723     bool hasLocalDataForURL(const URL&);
724
725     static bool canHandleRequest(const WebCore::ResourceRequest&);
726
727     class SandboxExtensionTracker {
728     public:
729         ~SandboxExtensionTracker();
730
731         void invalidate();
732
733         void beginLoad(WebFrame*, SandboxExtension::Handle&&);
734         void beginReload(WebFrame*, SandboxExtension::Handle&&);
735         void willPerformLoadDragDestinationAction(RefPtr<SandboxExtension>&& pendingDropSandboxExtension);
736         void didStartProvisionalLoad(WebFrame*);
737         void didCommitProvisionalLoad(WebFrame*);
738         void didFailProvisionalLoad(WebFrame*);
739
740     private:
741         void setPendingProvisionalSandboxExtension(RefPtr<SandboxExtension>&&);
742         bool shouldReuseCommittedSandboxExtension(WebFrame*);
743
744         RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
745         RefPtr<SandboxExtension> m_provisionalSandboxExtension;
746         RefPtr<SandboxExtension> m_committedSandboxExtension;
747     };
748
749     SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
750
751 #if PLATFORM(GTK)
752     void setComposition(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeLength);
753     void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
754     void cancelComposition();
755
756     void collapseSelectionInFrame(uint64_t frameID);
757 #endif
758
759 #if PLATFORM (GTK) && HAVE(GTK_GESTURES)
760     void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, CompletionHandler<void(WebCore::IntPoint&&)>&&);
761 #endif
762
763     void didApplyStyle();
764     void didChangeSelection();
765     void didChangeOverflowScrollPosition();
766     void didChangeContents();
767     void discardedComposition();
768     void canceledComposition();
769     void didUpdateComposition();
770     void didEndUserTriggeredSelectionChanges();
771
772 #if PLATFORM(COCOA)
773     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
774     WKAccessibilityWebPageObject* accessibilityRemoteObject();
775     NSObject *accessibilityObjectForMainFramePlugin();
776     const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; }
777     
778     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
779
780     void setTextAsync(const String&);
781     void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false, uint32_t editingRangeIsRelativeTo = (uint32_t)EditingRangeIsRelativeTo::EditableRoot, bool suppressSelectionUpdate = false);
782     void getMarkedRangeAsync(CallbackID);
783     void getSelectedRangeAsync(CallbackID);
784     void characterIndexForPointAsync(const WebCore::IntPoint&, CallbackID);
785     void firstRectForCharacterRangeAsync(const EditingRange&, CallbackID);
786     void setCompositionAsync(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
787     void confirmCompositionAsync();
788
789     void readSelectionFromPasteboard(const String& pasteboardName, CompletionHandler<void(bool&&)>&&);
790     void getStringSelectionForPasteboard(CompletionHandler<void(String&&)>&&);
791     void getDataSelectionForPasteboard(const String pasteboardType, CompletionHandler<void(SharedMemory::Handle&&, uint64_t)>&&);
792     void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, CompletionHandler<void(bool)>&&);
793     void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, CompletionHandler<void(bool)>&&);
794     bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*);
795 #endif
796
797 #if PLATFORM(MAC)
798     void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool registerUndoGroup = false);
799     void attributedSubstringForCharacterRangeAsync(const EditingRange&, CallbackID);
800     void fontAtSelection(CallbackID);
801 #endif
802
803 #if PLATFORM(COCOA) && ENABLE(SERVICE_CONTROLS)
804     void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
805 #endif
806
807     void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length, bool suppressUnderline);
808     bool hasCompositionForTesting();
809     void confirmCompositionForTesting(const String& compositionString);
810
811 #if PLATFORM(COCOA)
812     bool isSpeaking();
813     void speak(const String&);
814     void stopSpeaking();
815
816     void performDictionaryLookupForSelection(WebCore::Frame&, const WebCore::VisibleSelection&, WebCore::TextIndicatorPresentationTransition);
817 #endif
818
819     bool isSmartInsertDeleteEnabled();
820     void setSmartInsertDeleteEnabled(bool);
821
822     bool isSelectTrailingWhitespaceEnabled() const;
823     void setSelectTrailingWhitespaceEnabled(bool);
824
825     void replaceSelectionWithText(WebCore::Frame*, const String&);
826     void clearSelection();
827     void restoreSelectionInFocusedEditableElement();
828
829 #if ENABLE(DRAG_SUPPORT) && PLATFORM(GTK)
830     void performDragControllerAction(DragControllerAction, const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t draggingSourceOperationMask, WebSelectionData&&, uint32_t flags);
831 #endif
832
833 #if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK)
834     void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&);
835 #endif
836
837 #if ENABLE(DRAG_SUPPORT)
838     void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
839
840     void willPerformLoadDragDestinationAction();
841     void mayPerformUploadDragDestinationAction();
842
843     void willStartDrag() { ASSERT(!m_isStartingDrag); m_isStartingDrag = true; }
844     void didStartDrag();
845     void dragCancelled();
846     WebCore::DragSourceAction allowedDragSourceActions() const { return m_allowedDragSourceActions; }
847 #endif
848
849     void beginPrinting(uint64_t frameID, const PrintInfo&);
850     void endPrinting();
851     void computePagesForPrinting(uint64_t frameID, const PrintInfo&, CallbackID);
852     void computePagesForPrintingImpl(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor, WebCore::FloatBoxExtent& computedMargin);
853
854 #if PLATFORM(COCOA)
855     void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, CallbackID);
856     void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, CallbackID);
857     void drawPagesToPDFImpl(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData);
858 #endif
859
860 #if PLATFORM(IOS_FAMILY)
861     void computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, CallbackID, Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply&&);
862 #endif
863
864 #if PLATFORM(GTK)
865     void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, CallbackID);
866     void didFinishPrintOperation(const WebCore::ResourceError&, CallbackID);
867 #endif
868
869     void addResourceRequest(unsigned long, const WebCore::ResourceRequest&);
870     void removeResourceRequest(unsigned long);
871
872     void setMediaVolume(float);
873     void setMuted(WebCore::MediaProducer::MutedStateFlags);
874     void setMayStartMediaWhenInWindow(bool);
875     void stopMediaCapture();
876
877 #if ENABLE(MEDIA_SESSION)
878     void handleMediaEvent(uint32_t /* WebCore::MediaEventType */);
879     void setVolumeOfMediaElement(double, uint64_t);
880 #endif
881
882     void updateMainFrameScrollOffsetPinning();
883
884     bool mainFrameHasCustomContentProvider() const;
885     void addMIMETypeWithCustomContentProvider(const String&);
886
887     void mainFrameDidLayout();
888
889     bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
890     void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
891
892     bool canRunModal() const { return m_canRunModal; }
893     void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
894
895     void runModal();
896
897     void setDeviceScaleFactor(float);
898     float deviceScaleFactor() const;
899
900     void forceRepaintWithoutCallback();
901
902     void unmarkAllMisspellings();
903     void unmarkAllBadGrammar();
904
905 #if PLATFORM(COCOA)
906     void handleAlternativeTextUIResult(const String&);
907 #endif
908
909     // For testing purpose.
910     void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, WallTime);
911     void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, WallTime);
912     void simulateMouseMotion(WebCore::IntPoint, WallTime);
913
914 #if ENABLE(CONTEXT_MENUS)
915     void contextMenuShowing() { m_isShowingContextMenu = true; }
916 #endif
917
918     void wheelEvent(const WebWheelEvent&);
919
920     void wheelEventHandlersChanged(bool);
921     void recomputeShortCircuitHorizontalWheelEventsState();
922
923 #if ENABLE(MAC_GESTURE_EVENTS)
924     void gestureEvent(const WebGestureEvent&);
925 #endif
926
927     void updateVisibilityState(bool isInitialState = false);
928
929 #if PLATFORM(IOS_FAMILY)
930     void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth);
931     void setMaximumUnobscuredSize(const WebCore::FloatSize&);
932     void setDeviceOrientation(int32_t);
933     void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
934     void dynamicViewportSizeUpdate(const WebCore::FloatSize& viewLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, const WebCore::FloatBoxExtent& targetUnobscuredSafeAreaInsets, double scale, int32_t deviceOrientation, DynamicViewportSizeUpdateID);
935     Optional<float> scaleFromUIProcess(const VisibleContentRectUpdateInfo&) const;
936     void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
937     bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
938     void willStartUserTriggeredZooming();
939     void applicationWillResignActive();
940     void applicationDidEnterBackground(bool isSuspendedUnderLock);
941     void applicationDidFinishSnapshottingAfterEnteringBackground();
942     void applicationWillEnterForeground(bool isSuspendedUnderLock);
943     void applicationDidBecomeActive();
944     void completePendingSyntheticClickForContentChangeObserver();
945
946     bool platformPrefersTextLegibilityBasedZoomScaling() const;
947     const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; }
948
949     void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached);
950
951     void updateStringForFind(const String&);
952 #endif
953
954 #if ENABLE(IOS_TOUCH_EVENTS)
955     void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
956 #endif
957
958 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
959     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
960 #endif
961
962     bool shouldUseCustomContentProviderForResponse(const WebCore::ResourceResponse&);
963
964     bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
965     void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
966     bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; }
967     void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
968     bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
969     void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
970     void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; }
971     bool tabToLinksEnabled() const { return m_tabToLinks; }
972
973     bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
974     void setScrollingPerformanceLoggingEnabled(bool);
975
976 #if PLATFORM(COCOA)
977     bool shouldUsePDFPlugin() const;
978     bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
979     void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; }
980
981     NSDictionary *dataDetectionContext() const { return m_dataDetectionContext.get(); }
982 #endif
983
984     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const URL& originatingURL, const uint8_t* data, unsigned long size);
985
986 #if PLATFORM(COCOA)
987     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
988 #endif
989
990     bool mainFrameIsScrollable() const { return m_mainFrameIsScrollable; }
991
992     void setAlwaysShowsHorizontalScroller(bool);
993     void setAlwaysShowsVerticalScroller(bool);
994
995     bool alwaysShowsHorizontalScroller() const { return m_alwaysShowsHorizontalScroller; };
996     bool alwaysShowsVerticalScroller() const { return m_alwaysShowsVerticalScroller; };
997
998     void setViewLayoutSize(const WebCore::IntSize&);
999     WebCore::IntSize viewLayoutSize() const { return m_viewLayoutSize; }
1000
1001     void setAutoSizingShouldExpandToViewHeight(bool shouldExpand);
1002     bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; }
1003
1004     void setViewportSizeForCSSViewportUnits(Optional<WebCore::IntSize>);
1005     Optional<WebCore::IntSize> viewportSizeForCSSViewportUnits() const { return m_viewportSizeForCSSViewportUnits; }
1006
1007     bool canShowMIMEType(const String& MIMEType) const;
1008     bool canShowResponse(const WebCore::ResourceResponse&) const;
1009
1010     void addTextCheckingRequest(uint64_t requestID, Ref<WebCore::TextCheckingRequest>&&);
1011     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
1012     void didCancelCheckingText(uint64_t requestID);
1013
1014 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
1015     void determinePrimarySnapshottedPlugIn();
1016     void determinePrimarySnapshottedPlugInTimerFired();
1017     void resetPrimarySnapshottedPlugIn();
1018     bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const;
1019     bool plugInIntersectsSearchRect(WebCore::HTMLPlugInImageElement& pluginImageElement);
1020     bool plugInIsPrimarySize(WebCore::HTMLPlugInImageElement& pluginImageElement, unsigned &pluginArea);
1021 #endif
1022
1023 #if ENABLE(DATA_DETECTION)
1024     void setDataDetectionResults(NSArray *);
1025     void detectDataInAllFrames(uint64_t, CompletionHandler<void(const DataDetectionResult&)>&&);
1026     void removeDataDetectedLinks(CompletionHandler<void(const DataDetectionResult&)>&&);
1027 #endif
1028
1029     unsigned extendIncrementalRenderingSuppression();
1030     void stopExtendingIncrementalRenderingSuppression(unsigned token);
1031     bool shouldExtendIncrementalRenderingSuppression() { return !m_activeRenderingSuppressionTokens.isEmpty(); }
1032
1033     WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
1034     void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
1035
1036     Optional<WebCore::ScrollbarOverlayStyle> scrollbarOverlayStyle() { return m_scrollbarOverlayStyle; }
1037     void setScrollbarOverlayStyle(Optional<uint32_t /* WebCore::ScrollbarOverlayStyle */> scrollbarStyle);
1038
1039     Ref<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
1040     void updateCachedDocumentLoader(WebDocumentLoader&, WebCore::Frame&);
1041
1042     void getBytecodeProfile(CallbackID);
1043     void getSamplingProfilerOutput(CallbackID);
1044     
1045 #if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
1046     void handleTelephoneNumberClick(const String& number, const WebCore::IntPoint&);
1047     void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&);
1048 #endif
1049
1050     void didChangeScrollOffsetForFrame(WebCore::Frame*);
1051
1052     void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
1053     bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
1054
1055     void postMessage(const String& messageName, API::Object* messageBody);
1056     void postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
1057     void postMessageIgnoringFullySynchronousMode(const String& messageName, API::Object* messageBody);
1058
1059 #if PLATFORM(GTK)
1060     void setInputMethodState(bool);
1061 #endif
1062
1063     void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
1064
1065 #if ENABLE(VIDEO) && USE(GSTREAMER)
1066     void requestInstallMissingMediaPlugins(const String& details, const String& description, WebCore::MediaPlayerRequestInstallMissingPluginsCallback&);
1067 #endif
1068
1069     void addUserScript(String&& source, WebCore::UserContentInjectedFrames, WebCore::UserScriptInjectionTime);
1070     void addUserStyleSheet(const String& source, WebCore::UserContentInjectedFrames);
1071     void removeAllUserContent();
1072
1073     void dispatchDidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone>);
1074
1075     void didRestoreScrollPosition();
1076
1077     bool isControlledByAutomation() const;
1078     void setControlledByAutomation(bool);
1079
1080     void connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType);
1081     void disconnectInspector(const String& targetId);
1082     void sendMessageToTargetBackend(const String& targetId, const String& message);
1083
1084     void insertNewlineInQuotedContent();
1085
1086 #if USE(OS_STATE)
1087     WallTime loadCommitTime() const { return m_loadCommitTime; }
1088 #endif
1089
1090 #if ENABLE(GAMEPAD)
1091     void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible);
1092 #endif
1093     
1094 #if ENABLE(POINTER_LOCK)
1095     void didAcquirePointerLock();
1096     void didNotAcquirePointerLock();
1097     void didLosePointerLock();
1098 #endif
1099
1100     void didGetLoadDecisionForIcon(bool decision, CallbackID loadIdentifier, OptionalCallbackID);
1101     void setUseIconLoadingClient(bool);
1102
1103 #if ENABLE(DATA_INTERACTION)
1104     void didConcludeEditDrag();
1105 #endif
1106
1107     WebURLSchemeHandlerProxy* urlSchemeHandlerForScheme(const String&);
1108     void stopAllURLSchemeTasks();
1109
1110     Optional<double> cpuLimit() const { return m_cpuLimit; }
1111
1112     static PluginView* pluginViewForFrame(WebCore::Frame*);
1113
1114     void flushPendingEditorStateUpdate();
1115
1116 #if ENABLE(RESOURCE_LOAD_STATISTICS)
1117     void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, CompletionHandler<void(bool)>&& callback);
1118     void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, CompletionHandler<void(bool)>&& callback);
1119 #endif
1120
1121 #if ENABLE(DEVICE_ORIENTATION)
1122     void shouldAllowDeviceOrientationAndMotionAccess(uint64_t frameID, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&);
1123 #endif
1124
1125     void showShareSheet(WebCore::ShareDataWithParsedURL&, CompletionHandler<void(bool)>&& callback);
1126     void didCompleteShareSheet(bool wasCompleted, ShareSheetCallbackID contextId);
1127     
1128 #if ENABLE(ATTACHMENT_ELEMENT)
1129     void insertAttachment(const String& identifier, Optional<uint64_t>&& fileSize, const String& fileName, const String& contentType, CallbackID);
1130     void updateAttachmentAttributes(const String& identifier, Optional<uint64_t>&& fileSize, const String& contentType, const String& fileName, const IPC::DataReference& enclosingImageData, CallbackID);
1131 #endif
1132
1133 #if ENABLE(APPLICATION_MANIFEST)
1134     void getApplicationManifest(CallbackID);
1135     void didFinishLoadingApplicationManifest(uint64_t, const Optional<WebCore::ApplicationManifest>&);
1136 #endif
1137
1138 #if PLATFORM(WPE)
1139     int releaseHostFileDescriptor() { return m_hostFileDescriptor.releaseFileDescriptor(); }
1140 #endif
1141
1142     void updateCurrentModifierState(OptionSet<WebCore::PlatformEvent::Modifier> modifiers);
1143
1144     UserContentControllerIdentifier userContentControllerIdentifier() const { return m_userContentController->identifier(); }
1145
1146     WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() const { return m_userInterfaceLayoutDirection; }
1147
1148     bool isSuspended() const { return m_isSuspended; }
1149
1150     void didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&);
1151
1152     template<typename T>
1153     bool sendSyncWithDelayedReply(T&& message, typename T::Reply&& reply)
1154     {
1155         cancelGesturesBlockedOnSynchronousReplies();
1156         return sendSync(WTFMove(message), WTFMove(reply), m_pageID, Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend);
1157     }
1158
1159     WebCore::DOMPasteAccessResponse requestDOMPasteAccess(const String& originIdentifier);
1160     WebCore::IntRect rectForElementAtInteractionLocation() const;
1161
1162     const Optional<WebCore::Color>& backgroundColor() const { return m_backgroundColor; }
1163
1164     void suspendAllMediaBuffering();
1165     void resumeAllMediaBuffering();
1166
1167     void configureLoggingChannel(const String&, WTFLogChannelState, WTFLogLevel);
1168
1169     WebCore::Element* elementForTextInputContext(const TextInputContext&);
1170
1171 #if ENABLE(APPLE_PAY)
1172     WebPaymentCoordinator* paymentCoordinator();
1173 #endif
1174
1175 #if ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING)
1176     TextCheckingControllerProxy& textCheckingController() { return m_textCheckingControllerProxy.get(); }
1177 #endif
1178
1179     void setRemoteObjectRegistry(RemoteObjectRegistry&);
1180
1181 private:
1182     WebPage(uint64_t pageID, WebPageCreationParameters&&);
1183
1184     void updateThrottleState();
1185     void updateUserActivity();
1186
1187     // IPC::MessageSender
1188     IPC::Connection* messageSenderConnection() const override;
1189     uint64_t messageSenderDestinationID() const override;
1190
1191     void platformInitialize();
1192     void platformReinitialize();
1193     void platformDetach();
1194     void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
1195     void sendEditorStateUpdate();
1196     void scheduleFullEditorStateUpdate();
1197
1198 #if PLATFORM(COCOA)
1199     void sendTouchBarMenuDataAddedUpdate(WebCore::HTMLMenuElement&);
1200     void sendTouchBarMenuDataRemovedUpdate(WebCore::HTMLMenuElement&);
1201     void sendTouchBarMenuItemDataAddedUpdate(WebCore::HTMLMenuItemElement&);
1202     void sendTouchBarMenuItemDataRemovedUpdate(WebCore::HTMLMenuItemElement&);
1203 #endif
1204
1205     void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
1206
1207 #if PLATFORM(IOS_FAMILY)
1208     void resetViewportDefaultConfiguration(WebFrame* mainFrame, bool hasMobileDocType = false);
1209     enum class ZoomToInitialScale { No, Yes };
1210     void viewportConfigurationChanged(ZoomToInitialScale = ZoomToInitialScale::No);
1211     void updateViewportSizeForCSSViewportUnits();
1212
1213     static void convertSelectionRectsToRootView(WebCore::FrameView*, Vector<WebCore::SelectionRect>&);
1214     RefPtr<WebCore::Range> rangeForWebSelectionAtPosition(const WebCore::IntPoint&, const WebCore::VisiblePosition&, SelectionFlags&);
1215     void getFocusedElementInformation(FocusedElementInformation&);
1216     void platformInitializeAccessibility();
1217     void handleSyntheticClick(WebCore::Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebKit::WebEvent::Modifier>);
1218     void completeSyntheticClick(WebCore::Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebKit::WebEvent::Modifier>, WebCore::SyntheticClickType);
1219     void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
1220     void resetTextAutosizing();
1221     WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&, const WebCore::IntPoint&, bool isInteractingWithFocusedElement);
1222     RefPtr<WebCore::Range> rangeForGranularityAtPoint(WebCore::Frame&, const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithFocusedElement);
1223
1224     void sendPositionInformation(InteractionInformationAtPosition&&);
1225     InteractionInformationAtPosition positionInformation(const InteractionInformationRequest&);
1226     WebAutocorrectionContext autocorrectionContext();
1227     bool applyAutocorrectionInternal(const String& correction, const String& originalText);
1228 #endif
1229
1230 #if PLATFORM(IOS_FAMILY) && ENABLE(DATA_INTERACTION)
1231     void requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t allowedActions);
1232     void requestAdditionalItemsForDragSession(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t allowedActions);
1233 #endif
1234
1235 #if !PLATFORM(COCOA) && !PLATFORM(WPE)
1236     static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
1237 #endif
1238
1239     bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
1240
1241 #if PLATFORM(MAC)
1242     bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
1243 #endif
1244
1245     void updateDrawingAreaLayerTreeFreezeState();
1246     bool markLayersVolatileImmediatelyIfPossible();
1247     void layerVolatilityTimerFired();
1248     void callVolatilityCompletionHandlers(bool succeeded);
1249
1250     String sourceForFrame(WebFrame*);
1251
1252     void loadDataImpl(uint64_t navigationID, bool shouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&&, Ref<WebCore::SharedBuffer>&&, const String& MIMEType, const String& encodingName, const URL& baseURL, const URL& failingURL, const UserData&);
1253
1254     // Actions
1255     void tryClose();
1256     void platformDidReceiveLoadParameters(const LoadParameters&);
1257     void loadRequest(LoadParameters&&);
1258     void loadData(LoadParameters&&);
1259     void loadAlternateHTML(LoadParameters&&);
1260     void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
1261     void reload(uint64_t navigationID, uint32_t reloadOptions, SandboxExtension::Handle&&);
1262     void goToBackForwardItem(uint64_t navigationID, const WebCore::BackForwardItemIdentifier&, WebCore::FrameLoadType, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&&);
1263     void tryRestoreScrollPosition();
1264     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, CallbackID);
1265     void updateIsInWindow(bool isInitialState = false);
1266     void visibilityDidChange();
1267     void setActivityState(OptionSet<WebCore::ActivityState::Flag>, ActivityStateChangeID, const Vector<CallbackID>& callbackIDs);
1268     void validateCommand(const String&, CallbackID);
1269     void executeEditCommand(const String&, const String&);
1270     void setEditable(bool);
1271
1272     void didChangeSelectionOrOverflowScrollPosition();
1273
1274     void increaseListLevel();
1275     void decreaseListLevel();
1276     void changeListType();
1277
1278     void setBaseWritingDirection(WebCore::WritingDirection);
1279
1280     void setNeedsFontAttributes(bool);
1281
1282     void mouseEvent(const WebMouseEvent&);
1283     void keyEvent(const WebKeyboardEvent&);
1284
1285 #if ENABLE(IOS_TOUCH_EVENTS)
1286     void touchEventSync(const WebTouchEvent&, CompletionHandler<void(bool)>&&);
1287     void updatePotentialTapSecurityOrigin(const WebTouchEvent&, bool wasHandled);
1288 #elif ENABLE(TOUCH_EVENTS)
1289     void touchEvent(const WebTouchEvent&);
1290 #endif
1291
1292 #if ENABLE(POINTER_EVENTS)
1293     void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&);
1294 #endif
1295
1296 #if ENABLE(CONTEXT_MENUS)
1297     void contextMenuHidden() { m_isShowingContextMenu = false; }
1298     void contextMenuForKeyEvent();
1299 #endif
1300
1301     static bool scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
1302     static bool logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
1303
1304     void loadURLInFrame(URL&&, uint64_t frameID);
1305     void loadDataInFrame(IPC::DataReference&&, String&& MIMEType, String&& encodingName, URL&& baseURL, uint64_t frameID);
1306
1307     enum class WasRestoredByAPIRequest { No, Yes };
1308     void restoreSessionInternal(const Vector<BackForwardListItemState>&, WasRestoredByAPIRequest, WebBackForwardListProxy::OverwriteExistingItem);
1309     void restoreSession(const Vector<BackForwardListItemState>&);
1310     void didRemoveBackForwardItem(const WebCore::BackForwardItemIdentifier&);
1311     void updateBackForwardListForReattach(const Vector<WebKit::BackForwardListItemState>&);
1312     void setCurrentHistoryItemForReattach(WebKit::BackForwardListItemState&&);
1313
1314     void requestFontAttributesAtSelectionStart(CallbackID);
1315
1316 #if ENABLE(REMOTE_INSPECTOR)
1317     void setIndicating(bool);
1318 #endif
1319
1320     void setBackgroundColor(const Optional<WebCore::Color>&);
1321
1322 #if PLATFORM(COCOA)
1323     void setTopContentInsetFenced(float, IPC::Attachment);
1324 #endif
1325     void setTopContentInset(float);
1326
1327     void viewWillStartLiveResize();
1328     void viewWillEndLiveResize();
1329
1330     void getContentsAsString(CallbackID);
1331 #if PLATFORM(COCOA)
1332     void getContentsAsAttributedString(CompletionHandler<void(const AttributedString&)>&&);
1333 #endif
1334 #if ENABLE(MHTML)
1335     void getContentsAsMHTMLData(CallbackID);
1336 #endif
1337     void getMainResourceDataOfFrame(uint64_t frameID, CallbackID);
1338     void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, CallbackID);
1339     void getRenderTreeExternalRepresentation(CallbackID);
1340     void getSelectionOrContentsAsString(CallbackID);
1341     void getSelectionAsWebArchiveData(CallbackID);
1342     void getSourceForFrame(uint64_t frameID, CallbackID);
1343     void getWebArchiveOfFrame(uint64_t frameID, CallbackID);
1344     void runJavaScript(WebFrame*, const String&, bool forceUserGesture, const Optional<String>& worldName, CallbackID);
1345     void runJavaScriptInMainFrameScriptWorld(const String&, bool forceUserGesture, const Optional<String>& worldName, CallbackID);
1346     void runJavaScriptInFrame(uint64_t frameID, const String&, bool forceUserGesture, CallbackID);
1347     void forceRepaint(CallbackID);
1348     void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, CallbackID);
1349
1350     void preferencesDidChange(const WebPreferencesStore&);
1351     void updatePreferences(const WebPreferencesStore&);
1352     void updatePreferencesGenerated(const WebPreferencesStore&);
1353
1354 #if PLATFORM(IOS_FAMILY)
1355     bool parentProcessHasServiceWorkerEntitlement() const;
1356 #else
1357     bool parentProcessHasServiceWorkerEntitlement() const { return true; }
1358 #endif
1359
1360     void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, WebCore::PolicyCheckIdentifier, WebCore::PolicyAction, uint64_t navigationID, const DownloadID&, Optional<WebsitePoliciesData>&&);
1361     void continueWillSubmitForm(uint64_t frameID, uint64_t listenerID);
1362     void setUserAgent(const String&);
1363     void setCustomTextEncodingName(const String&);
1364     void suspendActiveDOMObjectsAndAnimations();
1365     void resumeActiveDOMObjectsAndAnimations();
1366
1367 #if PLATFORM(COCOA)
1368     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
1369     void performDictionaryLookupOfCurrentSelection();
1370     void performDictionaryLookupForRange(WebCore::Frame&, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1371     WebCore::DictionaryPopupInfo dictionaryPopupInfoForRange(WebCore::Frame&, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1372 #if ENABLE(PDFKIT_PLUGIN)
1373     WebCore::DictionaryPopupInfo dictionaryPopupInfoForSelectionInPDFPlugin(PDFSelection *, PDFPlugin&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
1374 #endif
1375
1376     void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
1377
1378     RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
1379     void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
1380     void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
1381     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
1382 #endif
1383
1384     void setMainFrameIsScrollable(bool);
1385
1386     void unapplyEditCommand(WebUndoStepID commandID);
1387     void reapplyEditCommand(WebUndoStepID commandID);
1388     void didRemoveEditCommand(WebUndoStepID commandID);
1389
1390     void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1391     void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1392     void getImageForFindMatch(uint32_t matchIndex);
1393     void selectFindMatch(uint32_t matchIndex);
1394     void hideFindUI();
1395     void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
1396     void replaceMatches(const Vector<uint32_t>& matchIndices, const String& replacementText, bool selectionOnly, CallbackID);
1397
1398 #if USE(COORDINATED_GRAPHICS)
1399     void sendViewportAttributesChanged(const WebCore::ViewportArguments&);
1400 #endif
1401
1402     void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
1403     void setTextForActivePopupMenu(int32_t index);
1404
1405 #if PLATFORM(GTK)
1406     void failedToShowPopupMenu();
1407 #endif
1408
1409     void didChooseFilesForOpenPanel(const Vector<String>&);
1410     void didCancelForOpenPanel();
1411
1412 #if PLATFORM(IOS_FAMILY)
1413     void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const IPC::DataReference& iconData);
1414 #endif
1415
1416 #if ENABLE(SANDBOX_EXTENSIONS)
1417     void extendSandboxForFilesFromOpenPanel(SandboxExtension::HandleArray&&);
1418 #endif
1419
1420     void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
1421
1422     void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
1423
1424 #if ENABLE(MEDIA_STREAM)
1425     void userMediaAccessWasGranted(uint64_t userMediaID, WebCore::CaptureDevice&& audioDeviceUID, WebCore::CaptureDevice&& videoDeviceUID, String&& mediaDeviceIdentifierHashSalt);
1426     void userMediaAccessWasDenied(uint64_t userMediaID, uint64_t reason, String&& invalidConstraint);
1427
1428     void didCompleteMediaDeviceEnumeration(uint64_t userMediaID, const Vector<WebCore::CaptureDevice>& devices, String&& deviceIdentifierHashSalt, bool originHasPersistentAccess);
1429 #endif
1430
1431 #if ENABLE(WEB_RTC)
1432     void disableICECandidateFiltering();
1433     void enableICECandidateFiltering();
1434 #endif
1435
1436 #if ENABLE(WEB_RTC) && USE(LIBWEBRTC)
1437     void disableEnumeratingAllNetworkInterfaces();
1438     void enableEnumeratingAllNetworkInterfaces();
1439 #endif
1440
1441     void stopAllMediaPlayback();
1442     void suspendAllMediaPlayback();
1443     void resumeAllMediaPlayback();
1444
1445     void advanceToNextMisspelling(bool startBeforeSelection);
1446     void changeSpellingToWord(const String& word);
1447
1448 #if USE(APPKIT)
1449     void uppercaseWord();
1450     void lowercaseWord();
1451     void capitalizeWord();
1452 #endif
1453
1454 #if ENABLE(CONTEXT_MENUS)
1455     void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
1456 #endif
1457
1458     void changeSelectedIndex(int32_t index);
1459     void setCanStartMediaTimerFired();
1460
1461     static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
1462
1463     static PluginView* focusedPluginViewForFrame(WebCore::Frame&);
1464
1465     void reportUsedFeatures();
1466
1467     void updateWebsitePolicies(WebsitePoliciesData&&);
1468
1469     void changeFont(WebCore::FontChanges&&);
1470     void changeFontAttributes(WebCore::FontAttributeChanges&&);
1471
1472 #if PLATFORM(MAC)
1473     void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
1474     std::tuple<RefPtr<WebCore::Range>, NSDictionary *> lookupTextAtLocation(WebCore::FloatPoint);
1475     void immediateActionDidUpdate();
1476     void immediateActionDidCancel();
1477     void immediateActionDidComplete();
1478
1479     void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
1480     void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
1481     void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
1482
1483     void handleAcceptedCandidate(WebCore::TextCheckingResult);
1484 #endif
1485
1486 #if PLATFORM(COCOA)
1487     void requestActiveNowPlayingSessionInfo(CallbackID);
1488     RetainPtr<NSData> accessibilityRemoteTokenData() const;
1489     void accessibilityTransferRemoteToken(RetainPtr<NSData>);
1490 #endif
1491
1492     void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
1493
1494 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
1495     void playbackTargetSelected(uint64_t, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
1496     void playbackTargetAvailabilityDidChange(uint64_t, bool);
1497     void setShouldPlayToPlaybackTarget(uint64_t, bool);
1498 #endif
1499
1500     void clearWheelEventTestTrigger();
1501
1502     void setShouldScaleViewToFitDocument(bool);
1503
1504     void pageStoppedScrolling();
1505
1506 #if ENABLE(VIDEO) && USE(GSTREAMER)
1507     void didEndRequestInstallMissingMediaPlugins(uint32_t result);
1508 #endif
1509
1510     void setResourceCachingDisabled(bool);
1511     void setUserInterfaceLayoutDirection(uint32_t);
1512
1513     bool canPluginHandleResponse(const WebCore::ResourceResponse&);
1514
1515 #if USE(QUICK_LOOK)
1516     void didReceivePasswordForQuickLookDocument(const String&);
1517 #endif
1518
1519     void simulateDeviceOrientationChange(double alpha, double beta, double gamma);
1520
1521 #if ENABLE(SPEECH_SYNTHESIS)
1522     void speakingErrorOccurred();
1523     void boundaryEventOccurred(bool wordBoundary, unsigned charIndex);
1524     void voicesDidChange();
1525 #endif
1526
1527     void frameBecameRemote(uint64_t frameID, WebCore::GlobalFrameIdentifier&& remoteFrameIdentifier, WebCore::GlobalWindowIdentifier&& remoteWindowIdentifier);
1528
1529     void registerURLSchemeHandler(uint64_t identifier, const String& scheme);
1530
1531     void urlSchemeTaskDidPerformRedirection(uint64_t handlerIdentifier, uint64_t taskIdentifier, WebCore::ResourceResponse&&, WebCore::ResourceRequest&&);
1532     void urlSchemeTaskDidReceiveResponse(uint64_t handlerIdentifier, uint64_t taskIdentifier, const WebCore::ResourceResponse&);
1533     void urlSchemeTaskDidReceiveData(uint64_t handlerIdentifier, uint64_t taskIdentifier, const IPC::DataReference&);
1534     void urlSchemeTaskDidComplete(uint64_t handlerIdentifier, uint64_t taskIdentifier, const WebCore::ResourceError&);
1535
1536     void setIsSuspended(bool);
1537
1538     RefPtr<WebImage> snapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
1539     RefPtr<WebImage> snapshotNode(WebCore::Node&, SnapshotOptions, unsigned maximumPixelCount = std::numeric_limits<unsigned>::max());
1540 #if USE(CF)
1541     RetainPtr<CFDataRef> pdfSnapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
1542 #endif
1543
1544 #if ENABLE(ATTACHMENT_ELEMENT)
1545     RefPtr<WebCore::HTMLAttachmentElement> attachmentElementWithIdentifier(const String& identifier) const;
1546 #endif
1547
1548     bool canShowMIMEType(const String&, const Function<bool(const String&, WebCore::PluginData::AllowedPluginTypes)>& supportsPlugin) const;
1549
1550     void cancelGesturesBlockedOnSynchronousReplies();
1551
1552     bool shouldDispatchUpdateAfterFocusingElement(const WebCore::Element&) const;
1553
1554     uint64_t m_pageID;
1555
1556     std::unique_ptr<WebCore::Page> m_page;
1557     RefPtr<WebFrame> m_mainFrame;
1558
1559     RefPtr<WebPageGroupProxy> m_pageGroup;
1560
1561     String m_userAgent;
1562
1563     WebCore::IntSize m_viewSize;
1564     std::unique_ptr<DrawingArea> m_drawingArea;
1565
1566     HashSet<PluginView*> m_pluginViews;
1567     bool m_hasSeenPlugin { false };
1568
1569     HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
1570
1571     bool m_useFixedLayout { false };
1572     bool m_drawsBackground { true };
1573
1574     WebCore::Color m_underlayColor;
1575
1576     bool m_isInRedo { false };
1577     bool m_isClosed { false };
1578     bool m_tabToLinks { false };
1579     
1580     bool m_asynchronousPluginInitializationEnabled { false };
1581     bool m_asynchronousPluginInitializationEnabledForAllPlugins { false };
1582     bool m_artificialPluginInitializationDelayEnabled { false };
1583     bool m_scrollingPerformanceLoggingEnabled { false };
1584     bool m_mainFrameIsScrollable { true };
1585
1586     bool m_alwaysShowsHorizontalScroller { false };
1587     bool m_alwaysShowsVerticalScroller { false };
1588
1589 #if PLATFORM(IOS_FAMILY)
1590     bool m_ignoreViewportScalingConstraints { false };
1591 #endif
1592
1593 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
1594     bool m_readyToFindPrimarySnapshottedPlugin { false };
1595     bool m_didFindPrimarySnapshottedPlugin { false };
1596     unsigned m_numberOfPrimarySnapshotDetectionAttempts { 0 };
1597     String m_primaryPlugInPageOrigin;
1598     String m_primaryPlugInOrigin;
1599     String m_primaryPlugInMimeType;
1600     RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer;
1601 #endif
1602
1603     // The layer hosting mode.
1604     LayerHostingMode m_layerHostingMode;
1605
1606 #if PLATFORM(COCOA)
1607     bool m_pdfPluginEnabled { false };
1608     bool m_hasCachedWindowFrame { false };
1609
1610     // The frame of the containing window in screen coordinates.
1611     WebCore::FloatRect m_windowFrameInScreenCoordinates;
1612
1613     // The frame of the containing window in unflipped screen coordinates.
1614     WebCore::FloatRect m_windowFrameInUnflippedScreenCoordinates;
1615
1616     // The frame of the view in window coordinates.
1617     WebCore::FloatRect m_viewFrameInWindowCoordinates;
1618
1619     // The accessibility position of the view.
1620     WebCore::FloatPoint m_accessibilityPosition;
1621     
1622     RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
1623 #endif
1624
1625 #if ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING)
1626     UniqueRef<TextCheckingControllerProxy> m_textCheckingControllerProxy;
1627 #endif
1628
1629 #if PLATFORM(COCOA) || PLATFORM(GTK)
1630     std::unique_ptr<ViewGestureGeometryCollector> m_viewGestureGeometryCollector;
1631 #endif
1632
1633 #if PLATFORM(COCOA)
1634     RetainPtr<NSDictionary> m_dataDetectionContext;
1635 #endif
1636
1637 #if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
1638     GRefPtr<AtkObject> m_accessibilityObject;
1639 #endif
1640
1641 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
1642     // Our view's window in the UI process.
1643     uint64_t m_nativeWindowHandle { 0 };
1644 #endif
1645
1646 #if !PLATFORM(IOS_FAMILY)
1647     RefPtr<PageBanner> m_headerBanner;
1648     RefPtr<PageBanner> m_footerBanner;
1649 #endif
1650
1651     RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
1652     bool m_mayStartMediaWhenInWindow { false };
1653
1654     HashMap<WebUndoStepID, RefPtr<WebUndoStep>> m_undoStepMap;
1655
1656 #if ENABLE(CONTEXT_MENUS)
1657     std::unique_ptr<API::InjectedBundle::PageContextMenuClient> m_contextMenuClient;
1658 #endif
1659     std::unique_ptr<API::InjectedBundle::EditorClient> m_editorClient;
1660     std::unique_ptr<API::InjectedBundle::FormClient> m_formClient;
1661     std::unique_ptr<API::InjectedBundle::PageLoaderClient> m_loaderClient;
1662     InjectedBundlePagePolicyClient m_policyClient;
1663     std::unique_ptr<API::InjectedBundle::ResourceLoadClient> m_resourceLoadClient;
1664     std::unique_ptr<API::InjectedBundle::PageUIClient> m_uiClient;
1665 #if ENABLE(FULLSCREEN_API)
1666     InjectedBundlePageFullScreenClient m_fullScreenClient;
1667 #endif
1668
1669     UniqueRef<FindController> m_findController;
1670
1671     RefPtr<WebInspector> m_inspector;
1672     RefPtr<WebInspectorUI> m_inspectorUI;
1673     RefPtr<RemoteWebInspectorUI> m_remoteInspectorUI;
1674     std::unique_ptr<WebPageInspectorTargetController> m_inspectorTargetController;
1675
1676 #if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
1677     RefPtr<PlaybackSessionManager> m_playbackSessionManager;
1678     RefPtr<VideoFullscreenManager> m_videoFullscreenManager;
1679 #endif
1680
1681 #if PLATFORM(IOS_FAMILY)
1682     bool m_allowsMediaDocumentInlinePlayback { false };
1683     RefPtr<WebCore::Range> m_startingGestureRange;
1684 #endif
1685
1686 #if ENABLE(FULLSCREEN_API)
1687     RefPtr<WebFullScreenManager> m_fullScreenManager;
1688 #endif
1689
1690     RefPtr<WebPopupMenu> m_activePopupMenu;
1691
1692 #if ENABLE(CONTEXT_MENUS)
1693     RefPtr<WebContextMenu> m_contextMenu;
1694 #endif
1695
1696 #if ENABLE(INPUT_TYPE_COLOR)
1697     WebColorChooser* m_activeColorChooser { nullptr };
1698 #endif
1699
1700 #if ENABLE(DATALIST_ELEMENT)
1701     WeakPtr<WebDataListSuggestionPicker> m_activeDataListSuggestionPicker;
1702 #endif
1703
1704     RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
1705     RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
1706
1707     Ref<WebUserContentController> m_userContentController;
1708
1709 #if ENABLE(GEOLOCATION)
1710     UniqueRef<GeolocationPermissionRequestManager> m_geolocationPermissionRequestManager;
1711 #endif
1712
1713 #if ENABLE(MEDIA_STREAM)
1714     UniqueRef<UserMediaPermissionRequestManager> m_userMediaPermissionRequestManager;
1715 #endif
1716
1717     std::unique_ptr<WebCore::PrintContext> m_printContext;
1718 #if PLATFORM(GTK)
1719     RefPtr<WebPrintOperationGtk> m_printOperation;
1720 #endif
1721
1722     SandboxExtensionTracker m_sandboxExtensionTracker;
1723
1724     RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
1725     Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
1726
1727     PAL::HysteresisActivity m_pageScrolledHysteresis;
1728
1729     bool m_canRunBeforeUnloadConfirmPanel { false };
1730
1731     bool m_canRunModal { false };
1732     bool m_isRunningModal { false };
1733
1734 #if ENABLE(DRAG_SUPPORT)
1735     bool m_isStartingDrag { false };
1736     WebCore::DragSourceAction m_allowedDragSourceActions { WebCore::DragSourceActionAny };
1737 #endif
1738
1739     bool m_cachedMainFrameIsPinnedToLeftSide { true };
1740     bool m_cachedMainFrameIsPinnedToRightSide { true };
1741     bool m_cachedMainFrameIsPinnedToTopSide { true };
1742     bool m_cachedMainFrameIsPinnedToBottomSide { true };
1743     bool m_canShortCircuitHorizontalWheelEvents { false };
1744     bool m_hasWheelEventHandlers { false };
1745
1746     unsigned m_cachedPageCount { 0 };
1747
1748     HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
1749
1750     WebCore::IntSize m_viewLayoutSize;
1751     bool m_autoSizingShouldExpandToViewHeight { false };
1752     Optional<WebCore::IntSize> m_viewportSizeForCSSViewportUnits;
1753
1754     bool m_userIsInteracting { false };
1755     bool m_hasEverFocusedElementDueToUserInteractionSincePageTransition { false };
1756     bool m_isTouchBarUpdateSupressedForHiddenContentEditable { false };
1757     bool m_isNeverRichlyEditableForTouchBar { false };
1758     OptionSet<WebCore::ActivityState::Flag> m_lastActivityStateChanges;
1759
1760 #if ENABLE(CONTEXT_MENUS)
1761     bool m_isShowingContextMenu { false };
1762 #endif
1763
1764     RefPtr<WebCore::Element> m_focusedElement;
1765     RefPtr<WebCore::Element> m_recentlyBlurredElement;
1766     bool m_hasPendingEditorStateUpdate { false };
1767
1768 #if ENABLE(IOS_TOUCH_EVENTS)
1769     CompletionHandler<void(bool)> m_pendingSynchronousTouchEventReply;
1770 #endif
1771     
1772 #if PLATFORM(IOS_FAMILY)
1773     RefPtr<WebCore::Range> m_currentWordRange;
1774     RefPtr<WebCore::Node> m_interactionNode;
1775     WebCore::IntPoint m_lastInteractionLocation;
1776
1777     bool m_isShowingInputViewForFocusedElement { false };
1778     
1779     enum SelectionAnchor { Start, End };
1780     SelectionAnchor m_selectionAnchor { Start };
1781
1782     RefPtr<WebCore::Node> m_potentialTapNode;
1783     WebCore::FloatPoint m_potentialTapLocation;
1784     RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin;
1785
1786     WebCore::ViewportConfiguration m_viewportConfiguration;
1787
1788     bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
1789     bool m_hasRestoredExposedContentRectAfterDidCommitLoad { false };
1790     bool m_scaleWasSetByUIProcess { false };
1791     bool m_userHasChangedPageScaleFactor { false };
1792     bool m_hasStablePageScaleFactor { true };
1793     bool m_useTestingViewportConfiguration { false };
1794     bool m_isInStableState { true };
1795     bool m_forceAlwaysUserScalable { false };
1796     MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
1797     Seconds m_estimatedLatency { 0 };
1798     WebCore::FloatSize m_screenSize;
1799     WebCore::FloatSize m_availableScreenSize;
1800     WebCore::FloatSize m_overrideScreenSize;
1801     RefPtr<WebCore::Range> m_currentBlockSelection;
1802     WebCore::IntRect m_blockRectForTextSelection;
1803
1804     RefPtr<WebCore::Range> m_initialSelection;
1805     WebCore::VisibleSelection m_storedSelectionForAccessibility { WebCore::VisibleSelection() };
1806     WebCore::IntSize m_blockSelectionDesiredSize;
1807     WebCore::FloatSize m_maximumUnobscuredSize;
1808     int32_t m_deviceOrientation { 0 };
1809     bool m_keyboardIsAttached { false };
1810     bool m_inDynamicSizeUpdate { false };
1811     HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
1812     RefPtr<WebCore::Node> m_pendingSyntheticClickNode;
1813     WebCore::FloatPoint m_pendingSyntheticClickLocation;
1814     WebCore::FloatRect m_previousExposedContentRect;
1815     OptionSet<WebKit::WebEvent::Modifier> m_pendingSyntheticClickModifiers;
1816     FocusedElementIdentifier m_currentFocusedElementIdentifier { 0 };
1817     Optional<DynamicViewportSizeUpdateID> m_pendingDynamicViewportSizeUpdateID;
1818     double m_lastTransactionPageScaleFactor { 0 };
1819     uint64_t m_lastTransactionIDWithScaleChange { 0 };
1820
1821     CompletionHandler<void(InteractionInformationAtPosition&&)> m_pendingSynchronousPositionInformationReply;
1822 #endif
1823
1824     WebCore::Timer m_layerVolatilityTimer;
1825     Vector<Function<void(bool)>> m_markLayersAsVolatileCompletionHandlers;
1826     bool m_isSuspendedUnderLock { false };
1827
1828     HashSet<String, ASCIICaseInsensitiveHash> m_mimeTypesWithCustomContentProviders;
1829     Optional<WebCore::Color> m_backgroundColor { WebCore::Color::white };
1830
1831     HashSet<unsigned> m_activeRenderingSuppressionTokens;
1832     unsigned m_maximumRenderingSuppressionToken { 0 };
1833     
1834     WebCore::ScrollPinningBehavior m_scrollPinningBehavior { WebCore::DoNotPin };
1835     Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
1836
1837     bool m_useAsyncScrolling { false };
1838
1839     OptionSet<WebCore::ActivityState::Flag> m_activityState;
1840
1841     bool m_processSuppressionEnabled;
1842     UserActivity m_userActivity;
1843     PAL::HysteresisActivity m_userActivityHysteresis;
1844
1845     uint64_t m_pendingNavigationID { 0 };
1846     Optional<WebsitePoliciesData> m_pendingWebsitePolicies;
1847
1848     bool m_mainFrameProgressCompleted { false };
1849     bool m_shouldDispatchFakeMouseMoveEvents { true };
1850     bool m_isEditorStateMissingPostLayoutData { false };
1851     bool m_isSelectingTextWhileInsertingAsynchronously { false };
1852
1853     enum class EditorStateIsContentEditable { No, Yes, Unset };
1854     mutable EditorStateIsContentEditable m_lastEditorStateWasContentEditable { EditorStateIsContentEditable::Unset };
1855
1856 #if PLATFORM(GTK)
1857     bool m_inputMethodEnabled { false };
1858 #endif
1859
1860 #if ENABLE(VIDEO) && USE(GSTREAMER)
1861     RefPtr<WebCore::MediaPlayerRequestInstallMissingPluginsCallback> m_installMediaPluginsCallback;
1862 #endif
1863
1864 #if USE(OS_STATE)
1865     WallTime m_loadCommitTime;
1866 #endif
1867
1868     WebCore::UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { WebCore::UserInterfaceLayoutDirection::LTR };
1869
1870     const String m_overrideContentSecurityPolicy;
1871     const Optional<double> m_cpuLimit;
1872
1873 #if PLATFORM(WPE)
1874     IPC::Attachment m_hostFileDescriptor;
1875 #endif
1876
1877     HashMap<String, RefPtr<WebURLSchemeHandlerProxy>> m_schemeToURLSchemeHandlerProxyMap;
1878     HashMap<uint64_t, WebURLSchemeHandlerProxy*> m_identifierToURLSchemeHandlerProxyMap;
1879
1880     HashMap<uint64_t, Function<void(bool granted)>> m_storageAccessResponseCallbackMap;
1881     HashMap<ShareSheetCallbackID, Function<void(bool completed)>> m_shareSheetResponseCallbackMap;
1882
1883 #if ENABLE(APPLICATION_MANIFEST)
1884     HashMap<uint64_t, uint64_t> m_applicationManifestFetchCallbackMap;
1885 #endif
1886
1887     OptionSet<LayerTreeFreezeReason> m_LayerTreeFreezeReasons;
1888     bool m_isSuspended { false };
1889     bool m_needsFontAttributes { false };
1890 #if PLATFORM(COCOA)
1891     WeakPtr<RemoteObjectRegistry> m_remoteObjectRegistry;
1892 #endif
1893 };
1894
1895 } // namespace WebKit
1896