WKWebView does not render PDF pages in AirPrint
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.h
1 /*
2  * Copyright (C) 2010-2016 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 "APIObject.h"
29 #include "APISession.h"
30 #include "AssistedNodeInformation.h"
31 #include "AutoCorrectionCallback.h"
32 #include "Connection.h"
33 #include "ContextMenuContextData.h"
34 #include "DownloadID.h"
35 #include "DragControllerAction.h"
36 #include "DrawingAreaProxy.h"
37 #include "EditingRange.h"
38 #include "EditorState.h"
39 #include "GeolocationPermissionRequestManagerProxy.h"
40 #include "LayerTreeContext.h"
41 #include "MessageSender.h"
42 #include "NotificationPermissionRequestManagerProxy.h"
43 #include "PageLoadState.h"
44 #include "ProcessThrottler.h"
45 #include "SandboxExtension.h"
46 #include "ShareableBitmap.h"
47 #include "UserInterfaceLayoutDirection.h"
48 #include "UserMediaPermissionRequestManagerProxy.h"
49 #include "VisibleContentRectUpdateInfo.h"
50 #include "WKBase.h"
51 #include "WKPagePrivate.h"
52 #include "WebColorPicker.h"
53 #include "WebContextMenuItemData.h"
54 #include "WebCoreArgumentCoders.h"
55 #include "WebFrameProxy.h"
56 #include "WebPageCreationParameters.h"
57 #include "WebPageDiagnosticLoggingClient.h"
58 #include "WebPageInjectedBundleClient.h"
59 #include "WebPreferences.h"
60 #include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
61 #include "WebPageProxyMessages.h"
62 #include "WebPopupMenuProxy.h"
63 #include "WebProcessLifetimeTracker.h"
64 #include <WebCore/Color.h>
65 #include <WebCore/DragActions.h>
66 #include <WebCore/FrameLoaderTypes.h>
67 #include <WebCore/HitTestResult.h>
68 #include <WebCore/MediaProducer.h>
69 #include <WebCore/Page.h>
70 #include <WebCore/PlatformScreen.h>
71 #include <WebCore/ScrollTypes.h>
72 #include <WebCore/SearchPopupMenu.h>
73 #include <WebCore/TextChecking.h>
74 #include <WebCore/TextGranularity.h>
75 #include <WebCore/ViewState.h>
76 #include <WebCore/VisibleSelection.h>
77 #include <memory>
78 #include <wtf/HashMap.h>
79 #include <wtf/HashSet.h>
80 #include <wtf/PassRefPtr.h>
81 #include <wtf/Ref.h>
82 #include <wtf/RefPtr.h>
83 #include <wtf/Vector.h>
84 #include <wtf/text/WTFString.h>
85
86 OBJC_CLASS NSView;
87 OBJC_CLASS _WKRemoteObjectRegistry;
88
89 #if ENABLE(DRAG_SUPPORT)
90 #include <WebCore/DragActions.h>
91 #endif
92
93 #if ENABLE(TOUCH_EVENTS)
94 #include "NativeWebTouchEvent.h"
95 #endif
96
97 #if PLATFORM(COCOA)
98 #include "LayerRepresentation.h"
99 #endif
100
101 #if PLATFORM(MAC)
102 #include "AttributedString.h"
103 #endif
104
105 #if PLATFORM(IOS)
106 #include "ProcessThrottler.h"
107 #endif
108
109 #if PLATFORM(GTK)
110 #include "ArgumentCodersGtk.h"
111 #endif
112
113 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
114 #include <WebCore/MediaPlaybackTargetPicker.h>
115 #include <WebCore/WebMediaSessionManagerClient.h>
116 #endif
117
118 #if USE(APPLE_INTERNAL_SDK)
119 #include <WebKitAdditions/WebPageProxyIncludes.h>
120 #endif
121
122 #if ENABLE(MEDIA_SESSION)
123 namespace WebCore {
124 class MediaSessionMetadata;
125 }
126 #endif
127
128 namespace API {
129 class ContextMenuClient;
130 class FindClient;
131 class FindMatchesClient;
132 class FormClient;
133 class HistoryClient;
134 class LoaderClient;
135 class Navigation;
136 class NavigationClient;
137 class PolicyClient;
138 class UIClient;
139 class URLRequest;
140 }
141
142 namespace IPC {
143 class ArgumentDecoder;
144 class Connection;
145 }
146
147 namespace WebCore {
148 class AuthenticationChallenge;
149 class Cursor;
150 class DragData;
151 class FloatRect;
152 class GraphicsLayer;
153 class IntSize;
154 class ProtectionSpace;
155 class RunLoopObserver;
156 class SharedBuffer;
157 class TextIndicator;
158 struct DictionaryPopupInfo;
159 struct ExceptionDetails;
160 struct FileChooserSettings;
161 struct SecurityOriginData;
162 struct TextAlternativeWithRange;
163 struct TextCheckingResult;
164 struct ViewportAttributes;
165 struct WindowFeatures;
166 }
167
168 #if PLATFORM(GTK)
169 typedef GtkWidget* PlatformWidget;
170 #endif
171
172 namespace WebKit {
173
174 enum HiddenPageThrottlingAutoIncreasesCounterType { };
175 typedef RefCounter<HiddenPageThrottlingAutoIncreasesCounterType> HiddenPageThrottlingAutoIncreasesCounter;
176
177 class CertificateInfo;
178 class NativeWebGestureEvent;
179 class NativeWebKeyboardEvent;
180 class NativeWebMouseEvent;
181 class NativeWebWheelEvent;
182 class PageClient;
183 class RemoteLayerTreeScrollingPerformanceData;
184 class RemoteLayerTreeTransaction;
185 class RemoteScrollingCoordinatorProxy;
186 class StringPairVector;
187 class UserData;
188 class ViewSnapshot;
189 class VisitedLinkStore;
190 class WebBackForwardList;
191 class WebBackForwardListItem;
192 class WebContextMenuProxy;
193 class WebEditCommandProxy;
194 class WebFullScreenManagerProxy;
195 class WebPlaybackSessionManagerProxy;
196 class WebNavigationState;
197 class WebVideoFullscreenManagerProxy;
198 class WebKeyboardEvent;
199 class WebMouseEvent;
200 class WebOpenPanelResultListenerProxy;
201 class WebPageGroup;
202 class WebProcessProxy;
203 class WebUserContentControllerProxy;
204 class WebWheelEvent;
205 class WebsiteDataStore;
206 struct AttributedString;
207 struct ColorSpaceData;
208 struct EditingRange;
209 struct EditorState;
210 struct PlatformPopupMenuData;
211 struct PrintInfo;
212 struct WebPopupItem;
213
214 #if ENABLE(VIBRATION)
215 class WebVibrationProxy;
216 #endif
217
218 #if USE(QUICK_LOOK)
219 class QuickLookDocumentData;
220 #endif
221
222 typedef GenericCallback<uint64_t> UnsignedCallback;
223 typedef GenericCallback<EditingRange> EditingRangeCallback;
224 typedef GenericCallback<const String&> StringCallback;
225 typedef GenericCallback<API::SerializedScriptValue*, bool, const WebCore::ExceptionDetails&> ScriptValueCallback;
226
227 #if PLATFORM(GTK)
228 typedef GenericCallback<API::Error*> PrintFinishedCallback;
229 #endif
230
231 #if ENABLE(TOUCH_EVENTS)
232 struct QueuedTouchEvents {
233     QueuedTouchEvents(const NativeWebTouchEvent& event)
234         : forwardedEvent(event)
235     {
236     }
237     NativeWebTouchEvent forwardedEvent;
238     Vector<NativeWebTouchEvent> deferredTouchEvents;
239 };
240 #endif
241
242 typedef GenericCallback<const String&, bool, int32_t> ValidateCommandCallback;
243 typedef GenericCallback<const WebCore::IntRect&, const EditingRange&> RectForCharacterRangeCallback;
244
245 #if PLATFORM(MAC)
246 typedef GenericCallback<const AttributedString&, const EditingRange&> AttributedStringForCharacterRangeCallback;
247 typedef GenericCallback<const String&, double, bool> FontAtSelectionCallback;
248 #endif
249
250 #if PLATFORM(IOS)
251 typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t> GestureCallback;
252 typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t> TouchesCallback;
253 struct NodeAssistanceArguments {
254     AssistedNodeInformation m_nodeInformation;
255     bool m_userIsInteracting;
256     bool m_blurPreviousNode;
257     RefPtr<API::Object> m_userData;
258 };
259
260 using DrawToPDFCallback = GenericCallback<const IPC::DataReference&>;
261 #endif
262
263 #if PLATFORM(COCOA)
264 typedef GenericCallback<const WebCore::MachSendRight&> MachSendRightCallback;
265 #endif
266
267 class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
268 #if ENABLE(INPUT_TYPE_COLOR)
269     , public WebColorPicker::Client
270 #endif
271 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
272     , public WebCore::WebMediaSessionManagerClient
273 #endif
274     , public WebPopupMenuProxy::Client
275     , public IPC::MessageReceiver
276     , public IPC::MessageSender {
277 public:
278     static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
279     virtual ~WebPageProxy();
280
281     const API::PageConfiguration& configuration() const;
282
283     uint64_t pageID() const { return m_pageID; }
284     WebCore::SessionID sessionID() const { return m_sessionID; }
285     void setSessionID(WebCore::SessionID);
286
287     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
288     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
289     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
290
291     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
292
293     WebNavigationState& navigationState() { return *m_navigationState.get(); }
294
295     WebsiteDataStore& websiteDataStore() { return m_websiteDataStore; }
296
297 #if ENABLE(DATA_DETECTION)
298     NSArray *dataDetectionResults() { return m_dataDetectionResults.get(); }
299 #endif
300         
301 #if ENABLE(ASYNC_SCROLLING)
302     RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); }
303 #endif
304
305     WebBackForwardList& backForwardList() { return m_backForwardList; }
306
307     bool addsVisitedLinks() const { return m_addsVisitedLinks; }
308     void setAddsVisitedLinks(bool addsVisitedLinks) { m_addsVisitedLinks = addsVisitedLinks; }
309
310     void fullscreenMayReturnToInline();
311     void didEnterFullscreen();
312     void didExitFullscreen();
313
314     WebInspectorProxy* inspector() const;
315
316     bool isControlledByAutomation() const { return m_controlledByAutomation; }
317     void setControlledByAutomation(bool);
318
319 #if ENABLE(REMOTE_INSPECTOR)
320     bool allowsRemoteInspection() const { return m_allowsRemoteInspection; }
321     void setAllowsRemoteInspection(bool);
322     String remoteInspectionNameOverride() const { return m_remoteInspectionNameOverride; }
323     void setRemoteInspectionNameOverride(const String&);
324 #endif
325
326 #if ENABLE(VIBRATION)
327     WebVibrationProxy* vibration() { return m_vibration.get(); }
328 #endif
329
330 #if ENABLE(FULLSCREEN_API)
331     WebFullScreenManagerProxy* fullScreenManager();
332 #endif
333 #if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
334     WebPlaybackSessionManagerProxy* playbackSessionManager();
335     WebVideoFullscreenManagerProxy* videoFullscreenManager();
336 #endif
337
338 #if PLATFORM(IOS)
339     bool allowsMediaDocumentInlinePlayback() const;
340     void setAllowsMediaDocumentInlinePlayback(bool);
341 #endif
342
343 #if ENABLE(CONTEXT_MENUS)
344     API::ContextMenuClient& contextMenuClient() { return *m_contextMenuClient; }
345     void setContextMenuClient(std::unique_ptr<API::ContextMenuClient>);
346 #endif
347     API::FindClient& findClient() { return *m_findClient; }
348     void setFindClient(std::unique_ptr<API::FindClient>);
349     API::FindMatchesClient& findMatchesClient() { return *m_findMatchesClient; }
350     void setFindMatchesClient(std::unique_ptr<API::FindMatchesClient>);
351     API::DiagnosticLoggingClient& diagnosticLoggingClient() { return *m_diagnosticLoggingClient; }
352     void setDiagnosticLoggingClient(std::unique_ptr<API::DiagnosticLoggingClient>);
353     void setFormClient(std::unique_ptr<API::FormClient>);
354     void setNavigationClient(std::unique_ptr<API::NavigationClient>);
355     void setHistoryClient(std::unique_ptr<API::HistoryClient>);
356     void setLoaderClient(std::unique_ptr<API::LoaderClient>);
357     void setPolicyClient(std::unique_ptr<API::PolicyClient>);
358     void setInjectedBundleClient(const WKPageInjectedBundleClientBase*);
359     WebPageInjectedBundleClient* injectedBundleClient() { return m_injectedBundleClient.get(); }
360
361     API::UIClient& uiClient() { return *m_uiClient; }
362     void setUIClient(std::unique_ptr<API::UIClient>);
363
364     void initializeWebPage();
365
366     void close();
367     bool tryClose();
368     bool isClosed() const { return m_isClosed; }
369
370     void closePage(bool stopResponsivenessTimer);
371
372     RefPtr<API::Navigation> loadRequest(const WebCore::ResourceRequest&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes, API::Object* userData = nullptr);
373     RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
374     RefPtr<API::Navigation> loadData(API::Data*, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
375     RefPtr<API::Navigation> loadHTMLString(const String& htmlString, const String& baseURL, API::Object* userData = nullptr);
376     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, API::Object* userData = nullptr);
377     void loadPlainTextString(const String&, API::Object* userData = nullptr);
378     void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
379     void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
380
381     void stopLoading();
382     RefPtr<API::Navigation> reload(bool reloadFromOrigin, bool contentBlockersEnabled);
383
384     RefPtr<API::Navigation> goForward();
385     RefPtr<API::Navigation> goBack();
386
387     RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem*);
388     void tryRestoreScrollPosition();
389     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<WebBackForwardListItem>> removed);
390     void willGoToBackForwardListItem(uint64_t itemID, const UserData&);
391
392     bool shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem*);
393
394     bool willHandleHorizontalScrollEvents() const;
395
396     bool canShowMIMEType(const String& mimeType);
397
398     bool drawsBackground() const { return m_drawsBackground; }
399     void setDrawsBackground(bool);
400
401     float topContentInset() const { return m_topContentInset; }
402     void setTopContentInset(float);
403
404     WebCore::Color underlayColor() const { return m_underlayColor; }
405     void setUnderlayColor(const WebCore::Color&);
406
407     // At this time, m_pageExtendedBackgroundColor can be set via pageExtendedBackgroundColorDidChange() which is a message
408     // from the UIProcess, or by didCommitLayerTree(). When PLATFORM(MAC) adopts UI side compositing, we should get rid of
409     // the message entirely.
410     WebCore::Color pageExtendedBackgroundColor() const { return m_pageExtendedBackgroundColor; }
411
412     void viewWillStartLiveResize();
413     void viewWillEndLiveResize();
414
415     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, std::function<void (CallbackBase::Error)>);
416     
417     void clearSelection();
418     void restoreSelectionInFocusedEditableElement();
419
420     void setViewNeedsDisplay(const WebCore::Region&);
421     void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll);
422     
423     void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
424     bool delegatesScrolling() const { return m_delegatesScrolling; }
425
426     enum class ViewStateChangeDispatchMode { Deferrable, Immediate };
427     void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, bool wantsSynchronousReply = false, ViewStateChangeDispatchMode = ViewStateChangeDispatchMode::Deferrable);
428     bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
429     void waitForDidUpdateViewState();
430     void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
431
432     void layerHostingModeDidChange();
433
434     WebCore::IntSize viewSize() const;
435     bool isViewVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
436     bool isViewWindowActive() const;
437
438     void addMIMETypeWithCustomContentProvider(const String& mimeType);
439
440     void executeEditCommand(const String& commandName, const String& argument = String());
441     void validateCommand(const String& commandName, std::function<void (const String&, bool, int32_t, CallbackBase::Error)>);
442
443     const EditorState& editorState() const { return m_editorState; }
444     bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
445     bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
446     bool isContentEditable() const { return m_editorState.isContentEditable; }
447     
448     bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
449     void setMaintainsInactiveSelection(bool);
450     void setEditable(bool);
451     bool isEditable() const { return m_isEditable; }
452
453 #if PLATFORM(IOS)
454     void executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)>);
455     double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
456     const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
457     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); }
458
459     void updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
460     void resendLastVisibleContentRects();
461
462     enum class UnobscuredRectConstraint { ConstrainedToDocumentRect, Unconstrained };
463     WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, double displayedContentScale, UnobscuredRectConstraint = UnobscuredRectConstraint::Unconstrained) const;
464     void overflowScrollViewWillStartPanGesture();
465     void overflowScrollViewDidScroll();
466     void overflowScrollWillStartScroll();
467     void overflowScrollDidEndScroll();
468
469     void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double targetScale, int32_t deviceOrientation);
470     void synchronizeDynamicViewportUpdate();
471
472     void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&);
473     void setMaximumUnobscuredSize(const WebCore::FloatSize&);
474     void setDeviceOrientation(int32_t);
475     int32_t deviceOrientation() const { return m_deviceOrientation; }
476     void willCommitLayerTree(uint64_t transactionID);
477
478     void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, std::function<void (const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>);
479     void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, std::function<void (const WebCore::IntPoint&, uint32_t, uint32_t, CallbackBase::Error)>);
480     void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, std::function<void (const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>);
481     void updateBlockSelectionWithTouch(const WebCore::IntPoint, uint32_t touch, uint32_t handlePosition);
482     void extendSelection(WebCore::TextGranularity);
483     void selectWordBackward();
484     void moveSelectionByOffset(int32_t offset, std::function<void (CallbackBase::Error)>);
485     void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
486     void selectPositionAtPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
487     void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, bool isInteractingWithAssistedNode, std::function<void (CallbackBase::Error)>);
488     void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, std::function<void(CallbackBase::Error)>);
489     void beginSelectionInDirection(WebCore::SelectionDirection, std::function<void (uint64_t, CallbackBase::Error)>);
490     void updateSelectionWithExtentPoint(const WebCore::IntPoint, bool isInteractingWithAssistedNode, std::function<void (uint64_t, CallbackBase::Error)>);
491     void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithAssistedNode, std::function<void(uint64_t, CallbackBase::Error)>);
492     void requestAutocorrectionData(const String& textForAutocorrection, std::function<void (const Vector<WebCore::FloatRect>&, const String&, double, uint64_t, CallbackBase::Error)>);
493     void applyAutocorrection(const String& correction, const String& originalText, std::function<void (const String&, CallbackBase::Error)>);
494     bool applyAutocorrection(const String& correction, const String& originalText);
495     void requestAutocorrectionContext(std::function<void (const String&, const String&, const String&, const String&, uint64_t, uint64_t, CallbackBase::Error)>);
496     void getAutocorrectionContext(String& contextBefore, String& markedText, String& selectedText, String& contextAfter, uint64_t& location, uint64_t& length);
497     void requestDictationContext(std::function<void (const String&, const String&, const String&, CallbackBase::Error)>);
498     void replaceDictatedText(const String& oldText, const String& newText);
499     void replaceSelectedText(const String& oldText, const String& newText);
500     void didReceivePositionInformation(const InteractionInformationAtPosition&);
501     void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
502     void requestPositionInformation(const WebCore::IntPoint&);
503     void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
504     void stopInteraction();
505     void performActionOnElement(uint32_t action);
506     void saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize);
507     void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
508     void focusNextAssistedNode(bool isForward, std::function<void (CallbackBase::Error)>);
509     void setAssistedNodeValue(const String&);
510     void setAssistedNodeValueAsNumber(double);
511     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection = false);
512     void applicationDidEnterBackground();
513     void applicationWillEnterForeground();
514     void applicationWillResignActive();
515     void applicationDidBecomeActive();
516     void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
517     void commitPotentialTapFailed();
518     void didNotHandleTapAsClick(const WebCore::IntPoint&);
519     void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID);
520     void contentSizeCategoryDidChange(const String& contentSizeCategory);
521     void getSelectionContext(std::function<void(const String&, const String&, const String&, CallbackBase::Error)>);
522     void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, std::function<void(const String&, CallbackBase::Error)>);
523     void updateForceAlwaysUserScalable();
524 #endif
525 #if ENABLE(DATA_DETECTION)
526     void setDataDetectionResult(const DataDetectionResult&);
527 #endif
528     void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&);
529     void layerTreeCommitComplete();
530
531 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
532     void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
533     void commitPageTransitionViewport();
534 #endif
535 #if PLATFORM(EFL)
536     void setThemePath(const String&);
537 #endif
538
539 #if PLATFORM(GTK)
540     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
541     void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
542     void cancelComposition();
543 #endif
544
545 #if PLATFORM(GTK)
546     void setInputMethodState(bool enabled);
547 #endif
548
549 #if PLATFORM (GTK) && HAVE(GTK_GESTURES)
550     void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center);
551 #endif
552
553 #if PLATFORM(COCOA)
554     void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
555     void setMainFrameIsScrollable(bool);
556
557     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
558     bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
559     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
560
561     void setAcceleratedCompositingRootLayer(LayerOrView*);
562     LayerOrView* acceleratedCompositingRootLayer() const;
563
564     void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false, EditingRangeIsRelativeTo = EditingRangeIsRelativeTo::EditableRoot);
565     void getMarkedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
566     void getSelectedRangeAsync(std::function<void (EditingRange, CallbackBase::Error)>);
567     void characterIndexForPointAsync(const WebCore::IntPoint&, std::function<void (uint64_t, CallbackBase::Error)>);
568     void firstRectForCharacterRangeAsync(const EditingRange&, std::function<void (const WebCore::IntRect&, const EditingRange&, CallbackBase::Error)>);
569     void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
570     void confirmCompositionAsync();
571
572     void setScrollPerformanceDataCollectionEnabled(bool);
573     bool scrollPerformanceDataCollectionEnabled() const { return m_scrollPerformanceDataCollectionEnabled; }
574     RemoteLayerTreeScrollingPerformanceData* scrollingPerformanceData() { return m_scrollingPerformanceData.get(); }
575 #endif // PLATFORM(COCOA)
576
577 #if PLATFORM(MAC)
578     void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives, bool registerUndoGroup);
579     void attributedSubstringForCharacterRangeAsync(const EditingRange&, std::function<void (const AttributedString&, const EditingRange&, CallbackBase::Error)>);
580     void setFont(const String& fontFamily, double fontSize, uint64_t fontTraits);
581     void fontAtSelection(std::function<void (const String&, double, bool, CallbackBase::Error)>);
582
583     void startWindowDrag();
584     NSWindow *platformWindow();
585     void rootViewToWindow(const WebCore::IntRect& viewRect, WebCore::IntRect& windowRect);
586
587 #if WK_API_ENABLED
588     NSView *inspectorAttachmentView();
589     _WKRemoteObjectRegistry *remoteObjectRegistry();
590 #endif
591
592     void intrinsicContentSizeDidChange(const WebCore::IntSize& intrinsicContentSize);
593     CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const;
594 #endif // PLATFORM(MAC)
595
596 #if PLATFORM(EFL)
597     void handleInputMethodKeydown(bool& handled);
598     void confirmComposition(const String&);
599     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
600     void cancelComposition();
601 #endif
602
603 #if PLATFORM(GTK)
604     PlatformWidget viewWidget();
605     const WebCore::Color& backgroundColor() const { return m_backgroundColor; }
606     void setBackgroundColor(const WebCore::Color& color) { m_backgroundColor = color; }
607 #endif
608
609     void handleMouseEvent(const NativeWebMouseEvent&);
610     void handleWheelEvent(const NativeWebWheelEvent&);
611     void handleKeyboardEvent(const NativeWebKeyboardEvent&);
612
613 #if ENABLE(MAC_GESTURE_EVENTS)
614     void handleGestureEvent(const NativeWebGestureEvent&);
615 #endif
616
617 #if ENABLE(IOS_TOUCH_EVENTS)
618     void handleTouchEventSynchronously(const NativeWebTouchEvent&);
619     void handleTouchEventAsynchronously(const NativeWebTouchEvent&);
620
621 #elif ENABLE(TOUCH_EVENTS)
622     void handleTouchEvent(const NativeWebTouchEvent&);
623 #endif
624
625     void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
626     void centerSelectionInVisibleArea();
627
628     const String& toolTip() const { return m_toolTip; }
629
630     const String& userAgent() const { return m_userAgent; }
631     void setApplicationNameForUserAgent(const String&);
632     const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
633     void setCustomUserAgent(const String&);
634     const String& customUserAgent() const { return m_customUserAgent; }
635     static String standardUserAgent(const String& applicationName = String());
636
637     bool supportsTextEncoding() const;
638     void setCustomTextEncodingName(const String&);
639     String customTextEncodingName() const { return m_customTextEncodingName; }
640
641     bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; }
642     void resumeActiveDOMObjectsAndAnimations();
643     void suspendActiveDOMObjectsAndAnimations();
644
645     double estimatedProgress() const;
646
647     void terminateProcess();
648
649     SessionState sessionState(const std::function<bool (WebBackForwardListItem&)>& = nullptr) const;
650     RefPtr<API::Navigation> restoreFromSessionState(SessionState, bool navigate);
651
652     bool supportsTextZoom() const;
653     double textZoomFactor() const { return m_textZoomFactor; }
654     void setTextZoomFactor(double);
655     double pageZoomFactor() const;
656     void setPageZoomFactor(double);
657     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
658
659     void scalePage(double scale, const WebCore::IntPoint& origin);
660     void scalePageInViewCoordinates(double scale, const WebCore::IntPoint& centerInViewCoordinates);
661     double pageScaleFactor() const;
662     double viewScaleFactor() const { return m_viewScaleFactor; }
663     void scaleView(double scale);
664     void setShouldScaleViewToFitDocument(bool);
665     
666     float deviceScaleFactor() const;
667     void setIntrinsicDeviceScaleFactor(float);
668     void setCustomDeviceScaleFactor(float);
669     void windowScreenDidChange(WebCore::PlatformDisplayID);
670
671     void setUseFixedLayout(bool);
672     void setFixedLayoutSize(const WebCore::IntSize&);
673     bool useFixedLayout() const { return m_useFixedLayout; };
674     const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
675
676     void listenForLayoutMilestones(WebCore::LayoutMilestones);
677
678     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
679     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
680
681     void setSuppressScrollbarAnimations(bool);
682     bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
683
684     bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
685     bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
686     bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; }
687     bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
688
689     bool rubberBandsAtLeft() const;
690     void setRubberBandsAtLeft(bool);
691     bool rubberBandsAtRight() const;
692     void setRubberBandsAtRight(bool);
693     bool rubberBandsAtTop() const;
694     void setRubberBandsAtTop(bool);
695     bool rubberBandsAtBottom() const;
696     void setRubberBandsAtBottom(bool);
697
698     void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
699     bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; }
700         
701     void setEnableVerticalRubberBanding(bool);
702     bool verticalRubberBandingIsEnabled() const;
703     void setEnableHorizontalRubberBanding(bool);
704     bool horizontalRubberBandingIsEnabled() const;
705         
706     void setBackgroundExtendsBeyondPage(bool);
707     bool backgroundExtendsBeyondPage() const;
708
709     void setPaginationMode(WebCore::Pagination::Mode);
710     WebCore::Pagination::Mode paginationMode() const { return m_paginationMode; }
711     void setPaginationBehavesLikeColumns(bool);
712     bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
713     void setPageLength(double);
714     double pageLength() const { return m_pageLength; }
715     void setGapBetweenPages(double);
716     double gapBetweenPages() const { return m_gapBetweenPages; }
717     void setPaginationLineGridEnabled(bool);
718     bool paginationLineGridEnabled() const { return m_paginationLineGridEnabled; }
719     unsigned pageCount() const { return m_pageCount; }
720
721 #if PLATFORM(COCOA)
722     // Called by the web process through a message.
723     void registerWebProcessAccessibilityToken(const IPC::DataReference&);
724     // Called by the UI process when it is ready to send its tokens to the web process.
725     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
726     bool readSelectionFromPasteboard(const String& pasteboardName);
727     String stringSelectionForPasteboard();
728     RefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
729     void makeFirstResponder();
730
731     ColorSpaceData colorSpace();
732 #endif
733
734 #if ENABLE(SERVICE_CONTROLS)
735     void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
736 #endif
737
738     void pageScaleFactorDidChange(double);
739     void pluginScaleFactorDidChange(double);
740     void pluginZoomFactorDidChange(double);
741
742     // Find.
743     void findString(const String&, FindOptions, unsigned maxMatchCount);
744     void findStringMatches(const String&, FindOptions, unsigned maxMatchCount);
745     void getImageForFindMatch(int32_t matchIndex);
746     void selectFindMatch(int32_t matchIndex);
747     void didGetImageForFindMatch(const ShareableBitmap::Handle& contentImageHandle, uint32_t matchIndex);
748     void hideFindUI();
749     void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
750     void didCountStringMatches(const String&, uint32_t matchCount);
751     void setTextIndicator(const WebCore::TextIndicatorData&, uint64_t /* WebCore::TextIndicatorWindowLifetime */ lifetime = 0 /* Permanent */);
752     void setTextIndicatorAnimationProgress(float);
753     void clearTextIndicator();
754     void didFindString(const String&, const Vector<WebCore::IntRect>&, uint32_t matchCount, int32_t matchIndex);
755     void didFailToFindString(const String&);
756     void didFindStringMatches(const String&, const Vector<Vector<WebCore::IntRect>>& matchRects, int32_t firstIndexAfterSelection);
757
758     void getContentsAsString(std::function<void (const String&, CallbackBase::Error)>);
759     void getBytecodeProfile(std::function<void (const String&, CallbackBase::Error)>);
760     void isWebProcessResponsive(std::function<void (bool isWebProcessResponsive)>);
761
762 #if ENABLE(MHTML)
763     void getContentsAsMHTMLData(std::function<void (API::Data*, CallbackBase::Error)>);
764 #endif
765     void getMainResourceDataOfFrame(WebFrameProxy*, std::function<void (API::Data*, CallbackBase::Error)>);
766     void getResourceDataFromFrame(WebFrameProxy*, API::URL*, std::function<void (API::Data*, CallbackBase::Error)>);
767     void getRenderTreeExternalRepresentation(std::function<void (const String&, CallbackBase::Error)>);
768     void getSelectionOrContentsAsString(std::function<void (const String&, CallbackBase::Error)>);
769     void getSelectionAsWebArchiveData(std::function<void (API::Data*, CallbackBase::Error)>);
770     void getSourceForFrame(WebFrameProxy*, std::function<void (const String&, CallbackBase::Error)>);
771     void getWebArchiveOfFrame(WebFrameProxy*, std::function<void (API::Data*, CallbackBase::Error)>);
772     void runJavaScriptInMainFrame(const String&, std::function<void (API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)> callbackFunction);
773     void forceRepaint(PassRefPtr<VoidCallback>);
774
775     float headerHeight(WebFrameProxy*);
776     float footerHeight(WebFrameProxy*);
777     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
778     void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
779
780 #if PLATFORM(COCOA)
781     // Dictionary.
782     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
783     void performDictionaryLookupOfCurrentSelection();
784 #endif
785
786     void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID, API::Navigation* navigationID);
787
788     void backForwardRemovedItem(uint64_t itemID);
789
790 #if ENABLE(DRAG_SUPPORT)    
791     // Drag and drop support.
792     void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
793     void dragUpdated(WebCore::DragData&, const String& dragStorageName = String());
794     void dragExited(WebCore::DragData&, const String& dragStorageName = String());
795     void performDragOperation(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
796
797     void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
798     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
799 #if PLATFORM(COCOA)
800     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
801     void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
802                          const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
803 #if ENABLE(ATTACHMENT_ELEMENT)
804     void setPromisedDataForAttachment(const String& pasteboardName, const String& filename, const String& extension, const String& title, const String& url, const String& visibleURL);
805 #endif
806 #endif
807 #if PLATFORM(GTK)
808     void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
809 #endif
810 #endif
811
812     void processDidBecomeUnresponsive();
813     void processDidBecomeResponsive();
814     void processDidCrash();
815     void willChangeProcessIsResponsive();
816     void didChangeProcessIsResponsive();
817
818 #if PLATFORM(IOS)
819     void processWillBecomeSuspended();
820     void processWillBecomeForeground();
821 #endif
822
823     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
824     virtual void exitAcceleratedCompositingMode();
825     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
826     void willEnterAcceleratedCompositingMode();
827
828     enum UndoOrRedo { Undo, Redo };
829     void addEditCommand(WebEditCommandProxy*);
830     void removeEditCommand(WebEditCommandProxy*);
831     bool isValidEditCommand(WebEditCommandProxy*);
832     void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
833
834 #if PLATFORM(COCOA)
835     void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
836     bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
837 #endif
838
839     WebProcessProxy& process() { return m_process; }
840     pid_t processIdentifier() const;
841
842     WebPreferences& preferences() { return m_preferences; }
843     void setPreferences(WebPreferences&);
844
845     WebPageGroup& pageGroup() { return m_pageGroup; }
846
847     bool isValid() const;
848
849 #if ENABLE(DRAG_SUPPORT)
850     WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; }
851     bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; }
852     unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
853     void resetCurrentDragInformation()
854     {
855         m_currentDragOperation = WebCore::DragOperationNone;
856         m_currentDragIsOverFileInput = false;
857         m_currentDragNumberOfFilesToBeAccepted = 0;
858     }
859 #endif
860
861     void preferencesDidChange();
862
863 #if ENABLE(CONTEXT_MENUS)
864     // Called by the WebContextMenuProxy.
865     void contextMenuItemSelected(const WebContextMenuItemData&);
866 #endif
867
868     // Called by the WebOpenPanelResultListenerProxy.
869 #if PLATFORM(IOS)
870     void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const API::Data* iconData);
871 #endif
872     void didChooseFilesForOpenPanel(const Vector<String>&);
873     void didCancelForOpenPanel();
874
875     WebPageCreationParameters creationParameters();
876
877 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
878     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
879 #endif
880
881     void handleDownloadRequest(DownloadProxy*);
882
883     void advanceToNextMisspelling(bool startBeforeSelection);
884     void changeSpellingToWord(const String& word);
885 #if USE(APPKIT)
886     void uppercaseWord();
887     void lowercaseWord();
888     void capitalizeWord();
889 #endif
890
891 #if PLATFORM(COCOA)
892     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
893     void setSmartInsertDeleteEnabled(bool);
894 #endif
895
896 #if PLATFORM(GTK)
897     String accessibilityPlugID() const { return m_accessibilityPlugID; }
898 #endif
899
900     void setCanRunModal(bool);
901     bool canRunModal();
902
903     void beginPrinting(WebFrameProxy*, const PrintInfo&);
904     void endPrinting();
905     void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
906 #if PLATFORM(COCOA)
907     void drawRectToImage(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, PassRefPtr<ImageCallback>);
908     void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
909 #if PLATFORM(IOS)
910     uint32_t computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, DrawToPDFCallback::CallbackFunction&&);
911     void drawToPDFCallback(const IPC::DataReference& pdfData, uint64_t callbackID);
912 #endif
913 #elif PLATFORM(GTK)
914     void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
915 #endif
916
917     PageLoadState& pageLoadState() { return m_pageLoadState; }
918
919 #if PLATFORM(COCOA)
920     void handleAlternativeTextUIResult(const String& result);
921 #endif
922
923     void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data*);
924     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&);
925 #if PLATFORM(COCOA)
926     void savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
927     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&, const String& pdfUUID);
928     void openPDFFromTemporaryFolderWithNativeApplication(const String& pdfUUID);
929 #endif
930
931     WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
932
933     uint64_t renderTreeSize() const { return m_renderTreeSize; }
934
935     void printMainFrame();
936     
937     void setMediaVolume(float);
938     void setMuted(bool);
939     void setMayStartMediaWhenInWindow(bool);
940     bool mayStartMediaWhenInWindow() const { return m_mayStartMediaWhenInWindow; }
941         
942 #if ENABLE(MEDIA_SESSION)
943     bool hasMediaSessionWithActiveMediaElements() const { return m_hasMediaSessionWithActiveMediaElements; }
944     void handleMediaEvent(WebCore::MediaEventType);
945     void setVolumeOfMediaElement(double, uint64_t);
946 #endif
947
948     // WebPopupMenuProxy::Client
949     NativeWebMouseEvent* currentlyProcessedMouseDownEvent() override;
950
951     void setSuppressVisibilityUpdates(bool flag);
952     bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
953
954 #if PLATFORM(IOS)
955     void willStartUserTriggeredZooming();
956
957     void potentialTapAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
958     void commitPotentialTap();
959     void cancelPotentialTap();
960     void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
961     void handleTap(const WebCore::FloatPoint&);
962
963     void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
964     void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
965
966     void blurAssistedNode();
967 #endif
968
969     void postMessageToInjectedBundle(const String& messageName, API::Object* messageBody);
970
971 #if ENABLE(INPUT_TYPE_COLOR)
972     void setColorPickerColor(const WebCore::Color&);
973     void endColorPicker();
974 #endif
975
976     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
977     void setMinimumLayoutSize(const WebCore::IntSize&);
978
979     bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; }
980     void setAutoSizingShouldExpandToViewHeight(bool);
981
982     void didReceiveAuthenticationChallengeProxy(uint64_t frameID, PassRefPtr<AuthenticationChallengeProxy>);
983
984     int64_t spellDocumentTag();
985     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
986     void didCancelCheckingText(uint64_t requestID);
987
988     void connectionWillOpen(IPC::Connection&);
989     void webProcessWillShutDown();
990
991     void processDidFinishLaunching();
992
993     void didSaveToPageCache();
994         
995     void setScrollPinningBehavior(WebCore::ScrollPinningBehavior);
996     WebCore::ScrollPinningBehavior scrollPinningBehavior() const { return m_scrollPinningBehavior; }
997
998     void setOverlayScrollbarStyle(WTF::Optional<WebCore::ScrollbarOverlayStyle>);
999     WTF::Optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() const { return m_scrollbarOverlayStyle; }
1000
1001     bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; }
1002     void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; }
1003     void recordNavigationSnapshot();
1004     void recordNavigationSnapshot(WebBackForwardListItem&);
1005
1006 #if PLATFORM(COCOA)
1007     PassRefPtr<ViewSnapshot> takeViewSnapshot();
1008 #endif
1009
1010 #if ENABLE(SUBTLE_CRYPTO)
1011     void wrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1012     void unwrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1013 #endif
1014
1015     void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, std::function<void (const ShareableBitmap::Handle&, CallbackBase::Error)>);
1016
1017     void navigationGestureDidBegin();
1018     void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&);
1019     void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&);
1020     void navigationGestureDidEnd();
1021     void navigationGestureSnapshotWasRemoved();
1022     void willRecordNavigationSnapshot(WebBackForwardListItem&);
1023
1024     bool isShowingNavigationGestureSnapshot() const { return m_isShowingNavigationGestureSnapshot; }
1025
1026     bool isPlayingAudio() const { return !!(m_mediaState & WebCore::MediaProducer::IsPlayingAudio); }
1027     void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t);
1028     WebCore::MediaProducer::MediaStateFlags mediaStateFlags() const { return m_mediaState; }
1029
1030 #if PLATFORM(MAC)
1031     void videoControlsManagerDidChange();
1032     bool hasActiveVideoForControlsManager() const;
1033     bool isPlayingVideoInEnhancedFullscreen() const;
1034 #endif
1035
1036 #if ENABLE(MEDIA_SESSION)
1037     void hasMediaSessionWithActiveMediaElementsDidChange(bool);
1038     void mediaSessionMetadataDidChange(const WebCore::MediaSessionMetadata&);
1039     void focusedContentMediaElementDidChange(uint64_t);
1040 #endif
1041
1042 #if PLATFORM(MAC)
1043     void removeNavigationGestureSnapshot();
1044
1045     API::HitTestResult* lastMouseMoveHitTestResult() const { return m_lastMouseMoveHitTestResult.get(); }
1046     void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
1047
1048     void immediateActionDidUpdate();
1049     void immediateActionDidCancel();
1050     void immediateActionDidComplete();
1051
1052     void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>);
1053
1054     void installViewStateChangeCompletionHandler(void(^completionHandler)());
1055
1056     void handleAcceptedCandidate(WebCore::TextCheckingResult);
1057     void didHandleAcceptedCandidate();
1058 #endif
1059
1060 #if PLATFORM(EFL) && HAVE(ACCESSIBILITY) && defined(HAVE_ECORE_X)
1061     bool accessibilityObjectReadByPoint(const WebCore::IntPoint&);
1062     bool accessibilityObjectReadPrevious();
1063     bool accessibilityObjectReadNext();
1064 #endif
1065
1066 #if USE(UNIFIED_TEXT_CHECKING)
1067     void checkTextOfParagraph(const String& text, uint64_t checkingTypes, int32_t insertionPoint, Vector<WebCore::TextCheckingResult>& results);
1068 #endif
1069     void getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses);
1070
1071     void setShouldDispatchFakeMouseMoveEvents(bool);
1072
1073     // Diagnostic messages logging.
1074     void logDiagnosticMessage(const String& message, const String& description, bool shouldSample);
1075     void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, bool shouldSample);
1076     void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, bool shouldSample);
1077     void logSampledDiagnosticMessage(const String& message, const String& description);
1078     void logSampledDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);
1079     void logSampledDiagnosticMessageWithValue(const String& message, const String& description, const String& value);
1080
1081 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1082     void addPlaybackTargetPickerClient(uint64_t);
1083     void removePlaybackTargetPickerClient(uint64_t);
1084     void showPlaybackTargetPicker(uint64_t, const WebCore::FloatRect&, bool hasVideo);
1085     void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags);
1086     void setMockMediaPlaybackTargetPickerEnabled(bool);
1087     void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State);
1088
1089     // WebMediaSessionManagerClient
1090     void setPlaybackTarget(uint64_t, Ref<WebCore::MediaPlaybackTarget>&&) override;
1091     void externalOutputDeviceAvailableDidChange(uint64_t, bool) override;
1092     void setShouldPlayToPlaybackTarget(uint64_t, bool) override;
1093 #endif
1094
1095     void didChangeBackgroundColor();
1096     void didLayoutForCustomContentProvider();
1097
1098     // For testing
1099     void clearWheelEventTestTrigger();
1100     void callAfterNextPresentationUpdate(std::function<void (CallbackBase::Error)>);
1101
1102     void didLayout(uint32_t layoutMilestones);
1103
1104     void didRestoreScrollPosition();
1105
1106     void setFocus(bool focused);
1107     void setWindowFrame(const WebCore::FloatRect&);
1108     void getWindowFrame(WebCore::FloatRect&);
1109
1110     bool isResourceCachingDisabled() const { return m_isResourceCachingDisabled; }
1111     void setResourceCachingDisabled(bool);
1112
1113     UserInterfaceLayoutDirection userInterfaceLayoutDirection();
1114
1115     bool hasHadSelectionChangesFromUserInteraction() const { return m_hasHadSelectionChangesFromUserInteraction; }
1116
1117 private:
1118     WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&);
1119     void platformInitialize();
1120
1121     void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
1122     void updateActivityToken();
1123     void updateProccessSuppressionState();
1124     void updateHiddenPageThrottlingAutoIncreases();
1125
1126     enum class ResetStateReason {
1127         PageInvalidated,
1128         WebProcessExited,
1129     };
1130     void resetState(ResetStateReason);
1131     void resetStateAfterProcessExited();
1132
1133     void setUserAgent(const String&);
1134
1135     // IPC::MessageReceiver
1136     // Implemented in generated WebPageProxyMessageReceiver.cpp
1137     void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
1138     void didReceiveSyncMessage(IPC::Connection&, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
1139
1140     // IPC::MessageSender
1141     bool sendMessage(std::unique_ptr<IPC::MessageEncoder>, unsigned messageSendFlags) override;
1142     IPC::Connection* messageSenderConnection() override;
1143     uint64_t messageSenderDestinationID() override;
1144
1145     // WebPopupMenuProxy::Client
1146     void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex) override;
1147     void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index) override;
1148 #if PLATFORM(GTK)
1149     void failedToShowPopupMenu() override;
1150 #endif
1151
1152     void didCreateMainFrame(uint64_t frameID);
1153     void didCreateSubframe(uint64_t frameID);
1154
1155     void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& url, const String& unreachableURL, const UserData&);
1156     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, const UserData&);
1157     void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String& url);
1158     void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
1159     void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, const UserData&);
1160     void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
1161     void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
1162     void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&);
1163     void didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, const String&, const UserData&);
1164     void didReceiveTitleForFrame(uint64_t frameID, const String&, const UserData&);
1165     void didFirstLayoutForFrame(uint64_t frameID, const UserData&);
1166     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, const UserData&);
1167     void didDisplayInsecureContentForFrame(uint64_t frameID, const UserData&);
1168     void didRunInsecureContentForFrame(uint64_t frameID, const UserData&);
1169     void didDetectXSSForFrame(uint64_t frameID, const UserData&);
1170     void mainFramePluginHandlesPageScaleGestureDidChange(bool);
1171     void frameDidBecomeFrameSet(uint64_t frameID, bool);
1172     void didStartProgress();
1173     void didChangeProgress(double);
1174     void didFinishProgress();
1175     void setNetworkRequestsInProgress(bool);
1176
1177     void didDestroyNavigation(uint64_t navigationID);
1178
1179     void decidePolicyForNavigationAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const NavigationActionData&, uint64_t originatingFrameID, const WebCore::SecurityOriginData& originatingFrameSecurityOrigin, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, uint64_t& newNavigationID, uint64_t& policyAction, DownloadID&);
1180     void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const NavigationActionData&, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, const UserData&);
1181     void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&);
1182     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, uint64_t& policyAction, DownloadID&);
1183     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&);
1184
1185     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&);
1186
1187     // History client
1188     void didNavigateWithNavigationData(const WebNavigationDataStore&, uint64_t frameID);
1189     void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);
1190     void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID);
1191     void didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID);
1192
1193     // UI client
1194     void createNewPage(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const NavigationActionData&, uint64_t& newPageID, WebPageCreationParameters&);
1195     void showPage();
1196     void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1197     void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1198     void runJavaScriptPrompt(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1199     void setStatusText(const String&);
1200     void mouseDidMoveOverElement(const WebHitTestResultData&, uint32_t modifiers, const UserData&);
1201
1202 #if ENABLE(NETSCAPE_PLUGIN_API)
1203     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
1204 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1205 #if ENABLE(WEBGL)
1206     void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1207     void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1208 #endif // ENABLE(WEBGL)
1209     void setToolbarsAreVisible(bool toolbarsAreVisible);
1210     void getToolbarsAreVisible(bool& toolbarsAreVisible);
1211     void setMenuBarIsVisible(bool menuBarIsVisible);
1212     void getMenuBarIsVisible(bool& menuBarIsVisible);
1213     void setStatusBarIsVisible(bool statusBarIsVisible);
1214     void getStatusBarIsVisible(bool& statusBarIsVisible);
1215     void setIsResizable(bool isResizable);
1216     void getIsResizable(bool& isResizable);
1217     void screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1218     void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1219 #if PLATFORM(IOS)
1220     void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1221     void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1222 #endif
1223     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, RefPtr<Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply>);
1224     void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1225     void pageDidScroll();
1226     void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&);
1227     void printFrame(uint64_t frameID);
1228     void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>);
1229     void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, PassRefPtr<Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply>);
1230     void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1231
1232     void requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, String userMediaDocumentOriginIdentifier, String topLevelDocumentOriginIdentifier, const Vector<String>& audioDeviceUIDs, const Vector<String>& videoDeviceUIDs);
1233     void checkUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, String userMediaDocumentOriginIdentifier, String topLevelDocumentOriginIdentifier);
1234
1235     void runModal();
1236     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1237     void recommendedScrollbarStyleDidChange(int32_t newStyle);
1238     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1239     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
1240     void didChangePageCount(unsigned);
1241     void pageExtendedBackgroundColorDidChange(const WebCore::Color&);
1242 #if ENABLE(NETSCAPE_PLUGIN_API)
1243     void didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString);
1244     void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured);
1245 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1246     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1247
1248     void reattachToWebProcess();
1249     RefPtr<API::Navigation> reattachToWebProcessForReload();
1250     RefPtr<API::Navigation> reattachToWebProcessWithItem(WebBackForwardListItem*);
1251
1252     void requestNotificationPermission(uint64_t notificationID, const String& originString);
1253     void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID);
1254     void cancelNotification(uint64_t notificationID);
1255     void clearNotifications(const Vector<uint64_t>& notificationIDs);
1256     void didDestroyNotification(uint64_t notificationID);
1257
1258 #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
1259     void pageDidRequestScroll(const WebCore::IntPoint&);
1260     void pageTransitionViewportReady();
1261     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1262 #endif
1263
1264     void didChangeContentSize(const WebCore::IntSize&);
1265
1266 #if ENABLE(INPUT_TYPE_COLOR)
1267     void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&);
1268     void didChooseColor(const WebCore::Color&) override;
1269     void didEndColorPicker() override;
1270 #endif
1271
1272     void editorStateChanged(const EditorState&);
1273     void compositionWasCanceled(const EditorState&);
1274     void setHasHadSelectionChangesFromUserInteraction(bool);
1275
1276     // Back/Forward list management
1277     void backForwardAddItem(uint64_t itemID);
1278     void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1279     void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1280     void backForwardBackListCount(int32_t& count);
1281     void backForwardForwardListCount(int32_t& count);
1282     void backForwardClear();
1283
1284     // Undo management
1285     void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1286     void registerInsertionUndoGrouping();
1287     void clearAllEditCommands();
1288     void canUndoRedo(uint32_t action, bool& result);
1289     void executeUndoRedo(uint32_t action, bool& result);
1290
1291     // Keyboard handling
1292 #if PLATFORM(COCOA)
1293     void executeSavedCommandBySelector(const String& selector, bool& handled);
1294 #endif
1295
1296 #if PLATFORM(GTK)
1297     void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1298     void bindAccessibilityTree(const String&);
1299 #endif
1300 #if PLATFORM(EFL)
1301     void getEditorCommandsForKeyEvent(Vector<String>&);
1302 #endif
1303
1304     // Popup Menu.
1305     void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1306     void hidePopupMenu();
1307
1308 #if ENABLE(CONTEXT_MENUS)
1309     void showContextMenu(const ContextMenuContextData&, const UserData&);
1310     void internalShowContextMenu(const ContextMenuContextData&, const UserData&);
1311 #endif
1312
1313 #if ENABLE(TELEPHONE_NUMBER_DETECTION)
1314 #if PLATFORM(MAC)
1315     void showTelephoneNumberMenu(const String& telephoneNumber, const WebCore::IntPoint&);
1316 #endif
1317 #endif
1318
1319     // Search popup results
1320     void saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&);
1321     void loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&);
1322
1323 #if PLATFORM(COCOA)
1324     // Speech.
1325     void getIsSpeaking(bool&);
1326     void speak(const String&);
1327     void stopSpeaking();
1328
1329     // Spotlight.
1330     void searchWithSpotlight(const String&);
1331         
1332     void searchTheWeb(const String&);
1333
1334     // Dictionary.
1335     void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&);
1336 #endif
1337
1338 #if PLATFORM(MAC)
1339     bool appleMailPaginationQuirkEnabled();
1340 #endif
1341
1342     // Spelling and grammar.
1343     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1344     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1345     void spellingUIIsShowing(bool&);
1346     void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1347     void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1348     void learnWord(const String& word);
1349     void ignoreWord(const String& word);
1350     void requestCheckingOfString(uint64_t requestID, const WebCore::TextCheckingRequestData&, int32_t insertionPoint);
1351
1352     void takeFocus(uint32_t direction);
1353     void setToolTip(const String&);
1354     void setCursor(const WebCore::Cursor&);
1355     void setCursorHiddenUntilMouseMoves(bool);
1356
1357     void didReceiveEvent(uint32_t opaqueType, bool handled);
1358     void stopResponsivenessTimer();
1359
1360     void voidCallback(uint64_t);
1361     void dataCallback(const IPC::DataReference&, uint64_t);
1362     void imageCallback(const ShareableBitmap::Handle&, uint64_t);
1363     void stringCallback(const String&, uint64_t);
1364     void scriptValueCallback(const IPC::DataReference&, bool hadException, const WebCore::ExceptionDetails&, uint64_t);
1365     void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1366     void validateCommandCallback(const String&, bool, int, uint64_t);
1367     void unsignedCallback(uint64_t, uint64_t);
1368     void editingRangeCallback(const EditingRange&, uint64_t);
1369 #if PLATFORM(COCOA)
1370     void machSendRightCallback(const WebCore::MachSendRight&, uint64_t);
1371 #endif
1372     void rectForCharacterRangeCallback(const WebCore::IntRect&, const EditingRange&, uint64_t);
1373 #if PLATFORM(MAC)
1374     void attributedStringForCharacterRangeCallback(const AttributedString&, const EditingRange&, uint64_t);
1375     void fontAtSelectionCallback(const String&, double, bool, uint64_t);
1376 #endif
1377 #if PLATFORM(IOS)
1378     void gestureCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, uint64_t);
1379     void touchesCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint64_t);
1380     void autocorrectionDataCallback(const Vector<WebCore::FloatRect>&, const String&, float, uint64_t, uint64_t);
1381     void autocorrectionContextCallback(const String&, const String&, const String&, const String&, uint64_t, uint64_t, uint64_t);
1382     void selectionContextCallback(const String&, const String&, const String&, uint64_t);
1383     void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
1384     void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect);
1385 #endif
1386 #if PLATFORM(GTK)
1387     void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1388 #endif
1389
1390     void focusedFrameChanged(uint64_t frameID);
1391     void frameSetLargestFrameChanged(uint64_t frameID);
1392
1393     void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
1394     void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1395
1396     void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&);
1397
1398 #if PLATFORM(COCOA)
1399     void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1400     void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1401 #endif
1402
1403     bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
1404
1405 #if PLATFORM(MAC)
1406     void substitutionsPanelIsShowing(bool&);
1407     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1408     void dismissCorrectionPanel(int32_t reason);
1409     void dismissCorrectionPanelSoon(int32_t reason, String& result);
1410     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1411
1412 #if USE(DICTATION_ALTERNATIVES)
1413     void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1414     void removeDictationAlternatives(uint64_t dictationContext);
1415     void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1416 #endif
1417 #endif // PLATFORM(MAC)
1418
1419 #if PLATFORM(IOS)
1420     WebCore::FloatSize screenSize();
1421     WebCore::FloatSize availableScreenSize();
1422     float textAutosizingWidth();
1423
1424     void dynamicViewportUpdateChangedTarget(double newTargetScale, const WebCore::FloatPoint& newScrollPosition, uint64_t dynamicViewportSizeUpdateID);
1425     void couldNotRestorePageState();
1426     void restorePageState(const WebCore::FloatPoint& scrollPosition, const WebCore::FloatPoint& scrollOrigin, const WebCore::FloatSize& obscuredInsetOnSave, double scale);
1427     void restorePageCenterAndScale(const WebCore::FloatPoint&, double scale);
1428
1429     void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& geometries, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius);
1430
1431     void startAssistingNode(const AssistedNodeInformation&, bool userIsInteracting, bool blurPreviousNode, const UserData&);
1432     void stopAssistingNode();
1433
1434     void showInspectorHighlight(const WebCore::Highlight&);
1435     void hideInspectorHighlight();
1436
1437     void showInspectorIndication();
1438     void hideInspectorIndication();
1439
1440     void enableInspectorNodeSearch();
1441     void disableInspectorNodeSearch();
1442 #endif // PLATFORM(IOS)
1443
1444 #if ENABLE(DATA_DETECTION)
1445     RetainPtr<NSArray> m_dataDetectionResults;
1446 #endif
1447
1448     void clearLoadDependentCallbacks();
1449
1450     void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1451
1452     void updateBackingStoreDiscardableState();
1453
1454     void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1455
1456 #if PLUGIN_ARCHITECTURE(X11)
1457     void createPluginContainer(uint64_t& windowID);
1458     void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1459     void windowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID);
1460 #endif
1461
1462     void processNextQueuedWheelEvent();
1463     void sendWheelEvent(const WebWheelEvent&);
1464
1465 #if ENABLE(TOUCH_EVENTS)
1466     bool shouldStartTrackingTouchEvents(const WebTouchEvent&) const;
1467 #endif
1468
1469 #if ENABLE(NETSCAPE_PLUGIN_API)
1470     void findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, uint64_t& pluginProcessToken, String& newMIMEType, uint32_t& pluginLoadPolicy, String& unavailabilityDescription);
1471 #endif
1472
1473 #if USE(QUICK_LOOK)
1474     void didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti);
1475     void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&);
1476 #endif
1477
1478 #if ENABLE(CONTENT_FILTERING)
1479     void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, uint64_t frameID);
1480 #endif
1481
1482     uint64_t generateNavigationID();
1483
1484     WebPreferencesStore preferencesStore() const;
1485
1486     void dispatchViewStateChange();
1487     void viewDidLeaveWindow();
1488     void viewDidEnterWindow();
1489
1490 #if PLATFORM(MAC)
1491     void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, const UserData&);
1492 #endif
1493
1494     void useFixedLayoutDidChange(bool useFixedLayout) { m_useFixedLayout = useFixedLayout; }
1495     void fixedLayoutSizeDidChange(WebCore::IntSize fixedLayoutSize) { m_fixedLayoutSize = fixedLayoutSize; }
1496
1497     void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
1498 #if ENABLE(VIDEO)
1499 #if USE(GSTREAMER)
1500     void requestInstallMissingMediaPlugins(const String& details, const String& description);
1501 #endif
1502 #endif
1503
1504     void handleAutoFillButtonClick(const UserData&);
1505
1506     void finishInitializingWebPageAfterProcessLaunch();
1507
1508     void handleMessage(IPC::Connection&, const String& messageName, const UserData& messageBody);
1509     void handleSynchronousMessage(IPC::Connection&, const String& messageName, const UserData& messageBody, UserData& returnUserData);
1510
1511     PageClient& m_pageClient;
1512     Ref<API::PageConfiguration> m_configuration;
1513
1514     std::unique_ptr<API::LoaderClient> m_loaderClient;
1515     std::unique_ptr<API::PolicyClient> m_policyClient;
1516     std::unique_ptr<API::NavigationClient> m_navigationClient;
1517     std::unique_ptr<API::HistoryClient> m_historyClient;
1518     std::unique_ptr<API::FormClient> m_formClient;
1519     std::unique_ptr<API::UIClient> m_uiClient;
1520     std::unique_ptr<API::FindClient> m_findClient;
1521     std::unique_ptr<API::FindMatchesClient> m_findMatchesClient;
1522     std::unique_ptr<API::DiagnosticLoggingClient> m_diagnosticLoggingClient;
1523 #if ENABLE(CONTEXT_MENUS)
1524     std::unique_ptr<API::ContextMenuClient> m_contextMenuClient;
1525 #endif
1526     std::unique_ptr<WebPageInjectedBundleClient> m_injectedBundleClient;
1527
1528     std::unique_ptr<WebNavigationState> m_navigationState;
1529     String m_failingProvisionalLoadURL;
1530     bool m_isLoadingAlternateHTMLStringForFailingProvisionalLoad { false };
1531
1532     std::unique_ptr<DrawingAreaProxy> m_drawingArea;
1533 #if ENABLE(ASYNC_SCROLLING)
1534     std::unique_ptr<RemoteScrollingCoordinatorProxy> m_scrollingCoordinatorProxy;
1535 #endif
1536
1537     Ref<WebProcessProxy> m_process;
1538     Ref<WebPageGroup> m_pageGroup;
1539     Ref<WebPreferences> m_preferences;
1540
1541     WebProcessLifetimeTracker m_webProcessLifetimeTracker { *this };
1542
1543     Ref<WebUserContentControllerProxy> m_userContentController;
1544     Ref<VisitedLinkStore> m_visitedLinkStore;
1545     Ref<WebsiteDataStore> m_websiteDataStore;
1546
1547     RefPtr<WebFrameProxy> m_mainFrame;
1548     RefPtr<WebFrameProxy> m_focusedFrame;
1549     RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1550
1551     String m_userAgent;
1552     String m_applicationNameForUserAgent;
1553     String m_customUserAgent;
1554     String m_customTextEncodingName;
1555
1556     bool m_treatsSHA1CertificatesAsInsecure;
1557
1558     RefPtr<WebInspectorProxy> m_inspector;
1559
1560 #if ENABLE(FULLSCREEN_API)
1561     RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1562 #endif
1563 #if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
1564     RefPtr<WebPlaybackSessionManagerProxy> m_playbackSessionManager;
1565     RefPtr<WebVideoFullscreenManagerProxy> m_videoFullscreenManager;
1566 #endif
1567 #if PLATFORM(IOS)
1568     VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
1569     bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad;
1570     uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad;
1571     int32_t m_deviceOrientation;
1572     bool m_dynamicViewportSizeUpdateWaitingForTarget;
1573     bool m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit;
1574     uint64_t m_dynamicViewportSizeUpdateLayerTreeTransactionID;
1575     uint64_t m_layerTreeTransactionIdAtLastTouchStart;
1576     uint64_t m_currentDynamicViewportSizeUpdateID { 0 };
1577     bool m_hasNetworkRequestsOnSuspended;
1578 #endif
1579
1580 #if ENABLE(VIBRATION)
1581     RefPtr<WebVibrationProxy> m_vibration;
1582 #endif
1583
1584 #if USE(APPLE_INTERNAL_SDK)
1585 #include <WebKitAdditions/WebPageProxyMembers.h>
1586 #endif
1587
1588     CallbackMap m_callbacks;
1589     HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1590
1591     HashSet<WebEditCommandProxy*> m_editCommandSet;
1592
1593 #if PLATFORM(COCOA)
1594     HashSet<String> m_knownKeypressCommandNames;
1595 #endif
1596
1597     RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1598 #if ENABLE(CONTEXT_MENUS)
1599     std::unique_ptr<WebContextMenuProxy> m_activeContextMenu;
1600     ContextMenuContextData m_activeContextMenuContextData;
1601 #endif
1602     RefPtr<API::HitTestResult> m_lastMouseMoveHitTestResult;
1603
1604     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1605     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1606     NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1607
1608     UserMediaPermissionRequestManagerProxy m_userMediaPermissionRequestManager;
1609
1610     WebCore::ViewState::Flags m_viewState;
1611     bool m_viewWasEverInWindow;
1612 #if PLATFORM(IOS)
1613     bool m_allowsMediaDocumentInlinePlayback { false };
1614     bool m_alwaysRunsAtForegroundPriority;
1615     ProcessThrottler::ForegroundActivityToken m_activityToken;
1616 #endif
1617         
1618     Ref<WebBackForwardList> m_backForwardList;
1619         
1620     bool m_maintainsInactiveSelection;
1621
1622     String m_toolTip;
1623
1624     EditorState m_editorState;
1625     bool m_isEditable;
1626
1627     double m_textZoomFactor;
1628     double m_pageZoomFactor;
1629     double m_pageScaleFactor;
1630     double m_pluginZoomFactor;
1631     double m_pluginScaleFactor;
1632     double m_viewScaleFactor { 1 };
1633     float m_intrinsicDeviceScaleFactor;
1634     float m_customDeviceScaleFactor;
1635     float m_topContentInset;
1636
1637     LayerHostingMode m_layerHostingMode;
1638
1639     bool m_drawsBackground;
1640
1641     WebCore::Color m_underlayColor;
1642     WebCore::Color m_pageExtendedBackgroundColor;
1643
1644     bool m_useFixedLayout;
1645     WebCore::IntSize m_fixedLayoutSize;
1646
1647     bool m_suppressScrollbarAnimations;
1648
1649     WebCore::Pagination::Mode m_paginationMode;
1650     bool m_paginationBehavesLikeColumns;
1651     double m_pageLength;
1652     double m_gapBetweenPages;
1653     bool m_paginationLineGridEnabled;
1654         
1655     // If the process backing the web page is alive and kicking.
1656     bool m_isValid;
1657
1658     // Whether WebPageProxy::close() has been called on this page.
1659     bool m_isClosed;
1660
1661     // Whether it can run modal child web pages.
1662     bool m_canRunModal;
1663
1664     bool m_needsToFinishInitializingWebPageAfterProcessLaunch { false };
1665
1666     bool m_isInPrintingMode;
1667     bool m_isPerformingDOMPrintOperation;
1668
1669     bool m_inDecidePolicyForResponseSync;
1670     const WebCore::ResourceRequest* m_decidePolicyForResponseRequest;
1671     bool m_syncMimeTypePolicyActionIsValid;
1672     WebCore::PolicyAction m_syncMimeTypePolicyAction;
1673     DownloadID m_syncMimeTypePolicyDownloadID;
1674
1675     bool m_inDecidePolicyForNavigationAction;
1676     bool m_syncNavigationActionPolicyActionIsValid;
1677     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1678     DownloadID m_syncNavigationActionPolicyDownloadID;
1679     bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
1680
1681     Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1682     Deque<NativeWebWheelEvent> m_wheelEventQueue;
1683     Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1684 #if ENABLE(MAC_GESTURE_EVENTS)
1685     Deque<NativeWebGestureEvent> m_gestureEventQueue;
1686 #endif
1687
1688     bool m_processingMouseMoveEvent;
1689     std::unique_ptr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1690     std::unique_ptr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1691
1692 #if ENABLE(TOUCH_EVENTS)
1693     bool m_isTrackingTouchEvents;
1694 #endif
1695 #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
1696     Deque<QueuedTouchEvents> m_touchEventQueue;
1697 #endif
1698
1699 #if ENABLE(INPUT_TYPE_COLOR)
1700     RefPtr<WebColorPicker> m_colorPicker;
1701 #endif
1702
1703     const uint64_t m_pageID;
1704     WebCore::SessionID m_sessionID;
1705
1706     bool m_isPageSuspended;
1707     bool m_addsVisitedLinks;
1708
1709     bool m_controlledByAutomation { false };
1710
1711 #if ENABLE(REMOTE_INSPECTOR)
1712     bool m_allowsRemoteInspection;
1713     String m_remoteInspectionNameOverride;
1714 #endif
1715
1716 #if PLATFORM(COCOA)
1717     bool m_isSmartInsertDeleteEnabled;
1718 #endif
1719
1720 #if PLATFORM(GTK)
1721     String m_accessibilityPlugID;
1722     WebCore::Color m_backgroundColor;
1723 #endif
1724
1725     int64_t m_spellDocumentTag;
1726     bool m_hasSpellDocumentTag;
1727     unsigned m_pendingLearnOrIgnoreWordMessageCount;
1728
1729     bool m_mainFrameHasCustomContentProvider;
1730
1731 #if ENABLE(DRAG_SUPPORT)
1732     // Current drag destination details are delivered as an asynchronous response,
1733     // so we preserve them to be used when the next dragging delegate call is made.
1734     WebCore::DragOperation m_currentDragOperation;
1735     bool m_currentDragIsOverFileInput;
1736     unsigned m_currentDragNumberOfFilesToBeAccepted;
1737 #endif
1738
1739     PageLoadState m_pageLoadState;
1740     
1741     bool m_delegatesScrolling;
1742
1743     bool m_mainFrameHasHorizontalScrollbar;
1744     bool m_mainFrameHasVerticalScrollbar;
1745
1746     // Whether horizontal wheel events can be handled directly for swiping purposes.
1747     bool m_canShortCircuitHorizontalWheelEvents;
1748
1749     bool m_mainFrameIsPinnedToLeftSide;
1750     bool m_mainFrameIsPinnedToRightSide;
1751     bool m_mainFrameIsPinnedToTopSide;
1752     bool m_mainFrameIsPinnedToBottomSide;
1753
1754     bool m_shouldUseImplicitRubberBandControl;
1755     bool m_rubberBandsAtLeft;
1756     bool m_rubberBandsAtRight;
1757     bool m_rubberBandsAtTop;
1758     bool m_rubberBandsAtBottom;
1759         
1760     bool m_enableVerticalRubberBanding;
1761     bool m_enableHorizontalRubberBanding;
1762
1763     bool m_backgroundExtendsBeyondPage;
1764
1765     bool m_shouldRecordNavigationSnapshots;
1766     bool m_isShowingNavigationGestureSnapshot;
1767
1768     bool m_mainFramePluginHandlesPageScaleGesture { false };
1769
1770     unsigned m_pageCount;
1771
1772     WebCore::IntRect m_visibleScrollerThumbRect;
1773
1774     uint64_t m_renderTreeSize;
1775     uint64_t m_sessionRestorationRenderTreeSize;
1776     bool m_wantsSessionRestorationRenderTreeSizeThresholdEvent;
1777     bool m_hitRenderTreeSizeThreshold;
1778
1779     bool m_suppressVisibilityUpdates;
1780     bool m_autoSizingShouldExpandToViewHeight;
1781     WebCore::IntSize m_minimumLayoutSize;
1782
1783     float m_mediaVolume;
1784     bool m_muted;
1785     bool m_mayStartMediaWhenInWindow;
1786
1787     bool m_waitingForDidUpdateViewState;
1788
1789     bool m_shouldScaleViewToFitDocument { false };
1790     bool m_suppressNavigationSnapshotting { false };
1791
1792 #if PLATFORM(COCOA)
1793     HashMap<String, String> m_temporaryPDFFiles;
1794     std::unique_ptr<WebCore::RunLoopObserver> m_viewStateChangeDispatcher;
1795
1796     std::unique_ptr<RemoteLayerTreeScrollingPerformanceData> m_scrollingPerformanceData;
1797     bool m_scrollPerformanceDataCollectionEnabled;
1798 #endif
1799     UserObservablePageCounter::Token m_pageIsUserObservableCount;
1800     ProcessSuppressionDisabledToken m_preventProcessSuppressionCount;
1801     HiddenPageThrottlingAutoIncreasesCounter::Token m_hiddenPageDOMTimerThrottlingAutoIncreasesCount;
1802         
1803     WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1804     WTF::Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
1805
1806     uint64_t m_navigationID;
1807
1808     WebPreferencesStore::ValueMap m_configurationPreferenceValues;
1809     WebCore::ViewState::Flags m_potentiallyChangedViewStateFlags;
1810     bool m_viewStateChangeWantsSynchronousReply;
1811     Vector<uint64_t> m_nextViewStateChangeCallbacks;
1812
1813     WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying };
1814
1815     bool m_isResourceCachingDisabled { false };
1816
1817     bool m_hasHadSelectionChangesFromUserInteraction { false };
1818
1819 #if ENABLE(MEDIA_SESSION)
1820     bool m_hasMediaSessionWithActiveMediaElements { false };
1821 #endif
1822
1823 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
1824     bool m_requiresTargetMonitoring { false };
1825 #endif
1826
1827 #if PLATFORM(IOS)
1828     bool m_hasDeferredStartAssistingNode { false };
1829     std::unique_ptr<NodeAssistanceArguments> m_deferredNodeAssistanceArguments;
1830 #endif
1831
1832 #if ENABLE(DOWNLOAD_ATTRIBUTE)
1833     bool m_syncNavigationActionHasDownloadAttribute { false };
1834 #endif
1835 };
1836
1837 } // namespace WebKit