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