Implement contentInset for Mac WebKit2
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.h
1 /*
2  * Copyright (C) 2010, 2011, 2014 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #ifndef WebPageProxy_h
27 #define WebPageProxy_h
28
29 #include "APIObject.h"
30 #include "APISession.h"
31 #include "AssistedNodeInformation.h"
32 #include "AutoCorrectionCallback.h"
33 #include "Connection.h"
34 #include "ContextMenuContextData.h"
35 #include "DragControllerAction.h"
36 #include "DrawingAreaProxy.h"
37 #include "EditingRange.h"
38 #include "EditorState.h"
39 #include "GeolocationPermissionRequestManagerProxy.h"
40 #include "InteractionInformationAtPosition.h"
41 #include "LayerTreeContext.h"
42 #include "MessageSender.h"
43 #include "NotificationPermissionRequestManagerProxy.h"
44 #include "PageLoadState.h"
45 #include "PlatformProcessIdentifier.h"
46 #include "SandboxExtension.h"
47 #include "ShareableBitmap.h"
48 #include "VisibleContentRectUpdateInfo.h"
49 #include "WKBase.h"
50 #include "WKPagePrivate.h"
51 #include "WebColorPicker.h"
52 #include "WebContextMenuItemData.h"
53 #include "WebCoreArgumentCoders.h"
54 #include "WebFindClient.h"
55 #include "WebFormClient.h"
56 #include "WebFrameProxy.h"
57 #include "WebPageContextMenuClient.h"
58 #include "WebPageCreationParameters.h"
59 #include "WebPreferences.h"
60 #include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES.
61 #include "WebPageProxyMessages.h"
62 #include "WebPopupMenuProxy.h"
63 #include <WebCore/Color.h>
64 #include <WebCore/DragActions.h>
65 #include <WebCore/DragSession.h>
66 #include <WebCore/HitTestResult.h>
67 #include <WebCore/Page.h>
68 #include <WebCore/PlatformScreen.h>
69 #include <WebCore/ScrollTypes.h>
70 #include <WebCore/TextChecking.h>
71 #include <WebCore/TextGranularity.h>
72 #include <WebCore/ViewState.h>
73 #include <wtf/HashMap.h>
74 #include <wtf/HashSet.h>
75 #include <wtf/OwnPtr.h>
76 #include <wtf/PassOwnPtr.h>
77 #include <wtf/PassRefPtr.h>
78 #include <wtf/Ref.h>
79 #include <wtf/RefPtr.h>
80 #include <wtf/Vector.h>
81 #include <wtf/text/WTFString.h>
82
83 #if ENABLE(DRAG_SUPPORT)
84 #include <WebCore/DragActions.h>
85 #include <WebCore/DragSession.h>
86 #endif
87
88 #if ENABLE(TOUCH_EVENTS)
89 #include "NativeWebTouchEvent.h"
90 #endif
91
92 #if PLATFORM(EFL)
93 #include "WKPageEfl.h"
94 #include "WebUIPopupMenuClient.h"
95 #include <Evas.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 namespace API {
107 class LoaderClient;
108 class PolicyClient;
109 class UIClient;
110 class URLRequest;
111 }
112
113 namespace IPC {
114 class ArgumentDecoder;
115 class Connection;
116 }
117
118 namespace WebCore {
119 class AuthenticationChallenge;
120 class Cursor;
121 class DragData;
122 class FloatRect;
123 class GraphicsLayer;
124 class IntSize;
125 class ProtectionSpace;
126 class SharedBuffer;
127 struct FileChooserSettings;
128 struct TextAlternativeWithRange;
129 struct TextCheckingResult;
130 struct ViewportAttributes;
131 struct WindowFeatures;
132 }
133
134 #if USE(APPKIT)
135 OBJC_CLASS WKView;
136 #endif
137
138 #if PLATFORM(GTK)
139 typedef GtkWidget* PlatformWidget;
140 #endif
141
142 namespace WebKit {
143
144 class CertificateInfo;
145 class NativeWebKeyboardEvent;
146 class NativeWebMouseEvent;
147 class NativeWebWheelEvent;
148 class PageClient;
149 class RemoteLayerTreeTransaction;
150 class RemoteScrollingCoordinatorProxy;
151 class StringPairVector;
152 class VisitedLinkProvider;
153 class WebBackForwardList;
154 class WebBackForwardListItem;
155 class WebContextMenuProxy;
156 class WebEditCommandProxy;
157 class WebFullScreenManagerProxy;
158 class WebVideoFullscreenManagerProxy;
159 class WebKeyboardEvent;
160 class WebMouseEvent;
161 class WebOpenPanelResultListenerProxy;
162 class WebPageGroup;
163 class WebProcessProxy;
164 class WebWheelEvent;
165 struct AttributedString;
166 struct ColorSpaceData;
167 struct DictionaryPopupInfo;
168 struct EditingRange;
169 struct EditorState;
170 struct PlatformPopupMenuData;
171 struct PrintInfo;
172 struct WebPopupItem;
173
174 #if ENABLE(VIBRATION)
175 class WebVibrationProxy;
176 #endif
177
178 typedef GenericCallback<uint64_t> UnsignedCallback;
179 typedef GenericCallback<EditingRange> EditingRangeCallback;
180 typedef GenericCallback<StringImpl*> StringCallback;
181 typedef GenericCallback<WebSerializedScriptValue*> ScriptValueCallback;
182
183 #if PLATFORM(GTK)
184 typedef GenericCallback<API::Error*> PrintFinishedCallback;
185 #endif
186
187 #if ENABLE(TOUCH_EVENTS)
188 struct QueuedTouchEvents {
189     QueuedTouchEvents(const NativeWebTouchEvent& event)
190         : forwardedEvent(event)
191     {
192     }
193     NativeWebTouchEvent forwardedEvent;
194     Vector<NativeWebTouchEvent> deferredTouchEvents;
195 };
196 #endif
197
198 // FIXME: Make a version of CallbackBase with three arguments, and define ValidateCommandCallback as a specialization.
199 class ValidateCommandCallback : public CallbackBase {
200 public:
201     typedef std::function<void (bool, StringImpl*, bool, int32_t)> CallbackFunction;
202
203     static PassRefPtr<ValidateCommandCallback> create(CallbackFunction callback)
204     {
205         return adoptRef(new ValidateCommandCallback(callback));
206     }
207
208     virtual ~ValidateCommandCallback()
209     {
210         ASSERT(!m_callback);
211     }
212
213     void performCallbackWithReturnValue(StringImpl* returnValue1, bool returnValue2, int returnValue3)
214     {
215         ASSERT(m_callback);
216
217         m_callback(false, returnValue1, returnValue2, returnValue3);
218
219         m_callback = 0;
220     }
221     
222     void invalidate()
223     {
224         ASSERT(m_callback);
225
226         m_callback(true, 0, 0, 0);
227         
228         m_callback = 0;
229     }
230
231 private:
232
233     ValidateCommandCallback(CallbackFunction callback)
234         : m_callback(callback)
235     {
236     }
237
238     CallbackFunction m_callback;
239 };
240
241 // FIXME: Make a version of CallbackBase with two arguments, and define RectForCharacterRangeCallback as a specialization.
242 class RectForCharacterRangeCallback : public CallbackBase {
243 public:
244     typedef std::function<void (bool, const WebCore::IntRect&, const EditingRange&)> CallbackFunction;
245
246     static PassRefPtr<RectForCharacterRangeCallback> create(CallbackFunction callback)
247     {
248         return adoptRef(new RectForCharacterRangeCallback(callback));
249     }
250
251     virtual ~RectForCharacterRangeCallback()
252     {
253         ASSERT(!m_callback);
254     }
255
256     void performCallbackWithReturnValue(const WebCore::IntRect& rect, const EditingRange& range)
257     {
258         ASSERT(m_callback);
259
260         m_callback(false, rect, range);
261
262         m_callback = 0;
263     }
264     
265     void invalidate()
266     {
267         ASSERT(m_callback);
268
269         m_callback(true, WebCore::IntRect(), EditingRange());
270
271         m_callback = 0;
272     }
273
274 private:
275
276     RectForCharacterRangeCallback(CallbackFunction callback)
277         : m_callback(callback)
278     {
279     }
280
281     CallbackFunction m_callback;
282 };
283
284 #if PLATFORM(MAC)
285
286 // FIXME: Make a version of CallbackBase with two arguments, and define AttributedStringForCharacterRangeCallback as a specialization.
287 class AttributedStringForCharacterRangeCallback : public CallbackBase {
288 public:
289     typedef std::function<void (bool, const AttributedString&, const EditingRange&)> CallbackFunction;
290
291     static PassRefPtr<AttributedStringForCharacterRangeCallback> create(CallbackFunction callback)
292     {
293         return adoptRef(new AttributedStringForCharacterRangeCallback(callback));
294     }
295
296     virtual ~AttributedStringForCharacterRangeCallback()
297     {
298         ASSERT(!m_callback);
299     }
300
301     void performCallbackWithReturnValue(const AttributedString& string, const EditingRange& range)
302     {
303         ASSERT(m_callback);
304
305         m_callback(false, string, range);
306
307         m_callback = 0;
308     }
309     
310     void invalidate()
311     {
312         ASSERT(m_callback);
313
314         m_callback(true, AttributedString(), EditingRange());
315
316         m_callback = 0;
317     }
318
319 private:
320
321     AttributedStringForCharacterRangeCallback(CallbackFunction callback)
322         : m_callback(callback)
323     {
324     }
325
326     CallbackFunction m_callback;
327 };
328
329 #endif
330
331 #if PLATFORM(IOS)
332 class GestureCallback : public CallbackBase {
333 public:
334     typedef std::function<void (bool, const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t)> CallbackFunction;
335
336     static PassRefPtr<GestureCallback> create(CallbackFunction callback)
337     {
338         return adoptRef(new GestureCallback(callback));
339     }
340
341     virtual ~GestureCallback()
342     {
343         ASSERT(!m_callback);
344     }
345
346     void performCallbackWithReturnValue(const WebCore::IntPoint& returnValue1, uint32_t returnValue2, uint32_t returnValue3, uint32_t returnValue4)
347     {
348         ASSERT(m_callback);
349
350         m_callback(false, returnValue1, returnValue2, returnValue3, returnValue4);
351
352         m_callback = 0;
353     }
354
355     void invalidate()
356     {
357         ASSERT(m_callback);
358
359         m_callback(true, WebCore::IntPoint(), 0, 0, 0);
360
361         m_callback = 0;
362     }
363
364 private:
365
366     GestureCallback(CallbackFunction callback)
367         : m_callback(callback)
368     {
369         ASSERT(m_callback);
370     }
371
372     CallbackFunction m_callback;
373 };
374
375 class TouchesCallback : public CallbackBase {
376 public:
377     typedef std::function<void(bool, const WebCore::IntPoint&, uint32_t)> CallbackFunction;
378
379     static PassRefPtr<TouchesCallback> create(CallbackFunction callback)
380     {
381         return adoptRef(new TouchesCallback(callback));
382     }
383
384     virtual ~TouchesCallback()
385     {
386         ASSERT(!m_callback);
387     }
388
389     void performCallbackWithReturnValue(const WebCore::IntPoint& returnValue1, uint32_t returnValue2)
390     {
391         ASSERT(m_callback);
392
393         m_callback(false, returnValue1, returnValue2);
394
395         m_callback = 0;
396     }
397
398     void invalidate()
399     {
400         ASSERT(m_callback);
401
402         RefPtr<API::Error> error = API::Error::create();
403         m_callback(true, WebCore::IntPoint(), 0);
404         
405         m_callback = 0;
406     }
407     
408 private:
409     
410     TouchesCallback(CallbackFunction callback)
411         : m_callback(callback)
412     {
413         ASSERT(m_callback);
414     }
415     
416     CallbackFunction m_callback;
417 };
418 #endif
419
420 struct WebPageConfiguration {
421     WebPageGroup* pageGroup = nullptr;
422     WebPreferences* preferences = nullptr;
423     VisitedLinkProvider* visitedLinkProvider = nullptr;
424     API::Session* session = nullptr;
425     WebPageProxy* relatedPage = nullptr;
426 };
427
428 class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page>
429 #if ENABLE(INPUT_TYPE_COLOR)
430     , public WebColorPicker::Client
431 #endif
432     , public WebPopupMenuProxy::Client
433     , public IPC::MessageReceiver
434     , public IPC::MessageSender {
435 public:
436     static PassRefPtr<WebPageProxy> create(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
437     virtual ~WebPageProxy();
438
439     void setSession(API::Session&);
440
441     uint64_t pageID() const { return m_pageID; }
442     WebCore::SessionID sessionID() const { return m_session->getID(); }
443
444     WebFrameProxy* mainFrame() const { return m_mainFrame.get(); }
445     WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); }
446     WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); }
447
448     DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); }
449     
450 #if ENABLE(ASYNC_SCROLLING)
451     RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); }
452 #endif
453
454     WebBackForwardList& backForwardList() { return m_backForwardList.get(); }
455
456 #if ENABLE(INSPECTOR)
457     WebInspectorProxy* inspector();
458 #endif
459
460 #if ENABLE(REMOTE_INSPECTOR)
461     bool allowsRemoteInspection() const { return m_allowsRemoteInspection; }
462     void setAllowsRemoteInspection(bool);
463 #endif
464
465 #if ENABLE(VIBRATION)
466     WebVibrationProxy* vibration() { return m_vibration.get(); }
467 #endif
468
469 #if ENABLE(FULLSCREEN_API)
470     WebFullScreenManagerProxy* fullScreenManager();
471 #endif
472 #if PLATFORM(IOS)
473     RefPtr<WebVideoFullscreenManagerProxy> videoFullscreenManager();
474 #endif
475
476 #if ENABLE(CONTEXT_MENUS)
477     void initializeContextMenuClient(const WKPageContextMenuClientBase*);
478 #endif
479     void initializeFindClient(const WKPageFindClientBase*);
480     void initializeFindMatchesClient(const WKPageFindMatchesClientBase*);
481     void initializeFormClient(const WKPageFormClientBase*);
482     void setLoaderClient(std::unique_ptr<API::LoaderClient>);
483     void setPolicyClient(std::unique_ptr<API::PolicyClient>);
484
485     API::UIClient& uiClient() { return *m_uiClient; }
486     void setUIClient(std::unique_ptr<API::UIClient>);
487 #if PLATFORM(EFL)
488     void initializeUIPopupMenuClient(const WKPageUIPopupMenuClientBase*);
489 #endif
490
491     void initializeWebPage();
492
493     void close();
494     bool tryClose();
495     bool isClosed() const { return m_isClosed; }
496
497     uint64_t loadRequest(const WebCore::ResourceRequest&, API::Object* userData = nullptr);
498     void loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
499     void loadData(API::Data*, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
500     void loadHTMLString(const String& htmlString, const String& baseURL, API::Object* userData = nullptr);
501     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, API::Object* userData = nullptr);
502     void loadPlainTextString(const String&, API::Object* userData = nullptr);
503     void loadWebArchiveData(API::Data*, API::Object* userData = nullptr);
504
505     void stopLoading();
506     void reload(bool reloadFromOrigin);
507
508     void goForward();
509     void goBack();
510
511     void goToBackForwardItem(WebBackForwardListItem*);
512     void tryRestoreScrollPosition();
513     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<WebBackForwardListItem>> removed);
514     void willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder&);
515
516     bool willHandleHorizontalScrollEvents() const;
517
518     bool canShowMIMEType(const String& mimeType);
519
520     bool drawsBackground() const { return m_drawsBackground; }
521     void setDrawsBackground(bool);
522
523     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
524     void setDrawsTransparentBackground(bool);
525
526     float topContentInset() const { return m_topContentInset; }
527     void setTopContentInset(float);
528
529     WebCore::Color underlayColor() const { return m_underlayColor; }
530     void setUnderlayColor(const WebCore::Color&);
531
532     // At this time, m_pageExtendedBackgroundColor can be set via pageExtendedBackgroundColorDidChange() which is a message
533     // from the UIProcess, or by didCommitLayerTree(). When PLATFORM(MAC) adopts UI side compositing, we should get rid of
534     // the message entirely.
535     WebCore::Color pageExtendedBackgroundColor() const { return m_pageExtendedBackgroundColor; }
536
537     void viewWillStartLiveResize();
538     void viewWillEndLiveResize();
539
540     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
541     void setWindowResizerSize(const WebCore::IntSize&);
542     
543     void clearSelection();
544
545     void setViewNeedsDisplay(const WebCore::IntRect&);
546     void displayView();
547     bool canScrollView();
548     void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
549     
550     void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
551     bool delegatesScrolling() const { return m_delegatesScrolling; }
552
553     enum class WantsReplyOrNot { DoesNotWantReply, DoesWantReply };
554     void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, WantsReplyOrNot = WantsReplyOrNot::DoesNotWantReply);
555     bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
556     void waitForDidUpdateViewState();
557
558     WebCore::IntSize viewSize() const;
559     bool isViewVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
560     bool isViewWindowActive() const;
561     bool isProcessSuppressible() const;
562
563     void addMIMETypeWithCustomContentProvider(const String& mimeType);
564
565     void executeEditCommand(const String& commandName);
566     void validateCommand(const String& commandName, PassRefPtr<ValidateCommandCallback>);
567 #if PLATFORM(IOS)
568     double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
569     const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
570     const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
571
572     bool updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
573     uint64_t nextVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID() + 1; }
574     uint64_t lastVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID(); }
575     
576     void setViewportConfigurationMinimumLayoutSize(const WebCore::IntSize&);
577     void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&);
578
579     void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback>);
580     void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, PassRefPtr<TouchesCallback>);
581     void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback>);
582     void updateBlockSelectionWithTouch(const WebCore::IntPoint, uint32_t touch, uint32_t handlePosition);
583     void extendSelection(WebCore::TextGranularity);
584     void requestAutocorrectionData(const String& textForAutocorrection, PassRefPtr<AutocorrectionDataCallback>);
585     void applyAutocorrection(const String& correction, const String& originalText, PassRefPtr<StringCallback>);
586     bool applyAutocorrection(const String& correction, const String& originalText);
587     void requestAutocorrectionContext(PassRefPtr<AutocorrectionContextCallback>);
588     void getAutocorrectionContext(String& contextBefore, String& markedText, String& selectedText, String& contextAfter, uint64_t& location, uint64_t& length);
589     void didReceivePositionInformation(const InteractionInformationAtPosition&);
590     void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
591     void requestPositionInformation(const WebCore::IntPoint&);
592     void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
593     void stopInteraction();
594     void performActionOnElement(uint32_t action);
595     void saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize);
596     void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
597     void focusNextAssistedNode(bool isForward);
598     void setAssistedNodeValue(const String&);
599     void setAssistedNodeValueAsNumber(double);
600     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection = false);
601     void applicationWillEnterForeground();
602     void applicationWillResignActive();
603     void applicationDidBecomeActive();
604 #endif
605
606     const EditorState& editorState() const { return m_editorState; }
607     bool canDelete() const { return hasSelectedRange() && isContentEditable(); }
608     bool hasSelectedRange() const { return m_editorState.selectionIsRange; }
609     bool isContentEditable() const { return m_editorState.isContentEditable; }
610     
611     bool maintainsInactiveSelection() const { return m_maintainsInactiveSelection; }
612     void setMaintainsInactiveSelection(bool);
613 #if USE(TILED_BACKING_STORE) 
614     void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
615 #endif
616 #if PLATFORM(EFL)
617     void setThemePath(const String&);
618 #endif
619
620 #if PLATFORM(GTK)
621     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
622     void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength);
623     void cancelComposition();
624 #endif
625
626 #if PLATFORM(GTK)
627     void setInputMethodState(bool enabled);
628 #endif
629
630 #if PLATFORM(COCOA)
631     void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
632     void setMainFrameIsScrollable(bool);
633
634     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
635     bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&);
636     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&);
637
638     void setAcceleratedCompositingRootLayer(LayerOrView*);
639     LayerOrView* acceleratedCompositingRootLayer() const;
640
641     void insertTextAsync(const String& text, const EditingRange& replacementRange);
642     void getMarkedRangeAsync(PassRefPtr<EditingRangeCallback>);
643     void getSelectedRangeAsync(PassRefPtr<EditingRangeCallback>);
644     void characterIndexForPointAsync(const WebCore::IntPoint&, PassRefPtr<UnsignedCallback>);
645     void firstRectForCharacterRangeAsync(const EditingRange&, PassRefPtr<RectForCharacterRangeCallback>);
646     void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
647     void confirmCompositionAsync();
648
649     void cancelComposition();
650
651 #if PLATFORM(MAC)
652     void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
653     void attributedSubstringForCharacterRangeAsync(const EditingRange&, PassRefPtr<AttributedStringForCharacterRangeCallback>);
654
655 #if !USE(ASYNC_NSTEXTINPUTCLIENT)
656     bool insertText(const String& text, const EditingRange& replacementRange);
657     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
658     void confirmComposition();
659     bool insertDictatedText(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
660     void getAttributedSubstringFromRange(const EditingRange&, AttributedString&);
661     void getMarkedRange(EditingRange&);
662     void getSelectedRange(EditingRange&);
663     uint64_t characterIndexForPoint(const WebCore::IntPoint);
664     WebCore::IntRect firstRectForCharacterRange(const EditingRange&);
665     bool executeKeypressCommands(const Vector<WebCore::KeypressCommand>&);
666 #endif
667
668     WKView* wkView() const;
669     void intrinsicContentSizeDidChange(const WebCore::IntSize& intrinsicContentSize);
670 #endif
671 #endif // PLATFORM(COCOA)
672 #if PLATFORM(EFL)
673     void handleInputMethodKeydown(bool& handled);
674     void confirmComposition(const String&);
675     void setComposition(const String&, Vector<WebCore::CompositionUnderline>&, int);
676     void cancelComposition();
677 #endif
678 #if PLATFORM(GTK)
679     PlatformWidget viewWidget();
680 #endif
681 #if USE(TILED_BACKING_STORE)
682     void commitPageTransitionViewport();
683 #endif
684
685     void handleMouseEvent(const NativeWebMouseEvent&);
686     void handleWheelEvent(const NativeWebWheelEvent&);
687     void handleKeyboardEvent(const NativeWebKeyboardEvent&);
688 #if ENABLE(TOUCH_EVENTS)
689     void handleTouchEvent(const NativeWebTouchEvent&);
690 #endif
691
692     void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity);
693     void centerSelectionInVisibleArea();
694
695     const String& toolTip() const { return m_toolTip; }
696
697     const String& userAgent() const { return m_userAgent; }
698     void setApplicationNameForUserAgent(const String&);
699     const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; }
700     void setCustomUserAgent(const String&);
701     const String& customUserAgent() const { return m_customUserAgent; }
702     static String standardUserAgent(const String& applicationName = String());
703
704     bool supportsTextEncoding() const;
705     void setCustomTextEncodingName(const String&);
706     String customTextEncodingName() const { return m_customTextEncodingName; }
707
708     bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; }
709     void resumeActiveDOMObjectsAndAnimations();
710     void suspendActiveDOMObjectsAndAnimations();
711
712     double estimatedProgress() const;
713
714     void terminateProcess();
715
716     typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void* context);
717     PassRefPtr<API::Data> sessionStateData(WebPageProxySessionStateFilterCallback, void* context) const;
718     void restoreFromSessionStateData(API::Data*);
719
720     bool supportsTextZoom() const;
721     double textZoomFactor() const { return m_textZoomFactor; }
722     void setTextZoomFactor(double);
723     double pageZoomFactor() const { return m_pageZoomFactor; }
724     void setPageZoomFactor(double);
725     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
726
727     void scalePage(double scale, const WebCore::IntPoint& origin);
728     double pageScaleFactor() const { return m_pageScaleFactor; }
729
730     float deviceScaleFactor() const;
731     void setIntrinsicDeviceScaleFactor(float);
732     void setCustomDeviceScaleFactor(float);
733     void windowScreenDidChange(PlatformDisplayID);
734
735     void setUseFixedLayout(bool);
736     void setFixedLayoutSize(const WebCore::IntSize&);
737     bool useFixedLayout() const { return m_useFixedLayout; };
738     const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; };
739
740     void listenForLayoutMilestones(WebCore::LayoutMilestones);
741
742     void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
743
744     bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
745     bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
746
747     void setSuppressScrollbarAnimations(bool);
748     bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
749
750     bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
751     bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
752     bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; }
753     bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
754
755     bool rubberBandsAtLeft() const;
756     void setRubberBandsAtLeft(bool);
757     bool rubberBandsAtRight() const;
758     void setRubberBandsAtRight(bool);
759     bool rubberBandsAtTop() const;
760     void setRubberBandsAtTop(bool);
761     bool rubberBandsAtBottom() const;
762     void setRubberBandsAtBottom(bool);
763
764     void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
765     bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; }
766
767     void setBackgroundExtendsBeyondPage(bool);
768     bool backgroundExtendsBeyondPage() const;
769
770     void setPaginationMode(WebCore::Pagination::Mode);
771     WebCore::Pagination::Mode paginationMode() const { return m_paginationMode; }
772     void setPaginationBehavesLikeColumns(bool);
773     bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; }
774     void setPageLength(double);
775     double pageLength() const { return m_pageLength; }
776     void setGapBetweenPages(double);
777     double gapBetweenPages() const { return m_gapBetweenPages; }
778     unsigned pageCount() const { return m_pageCount; }
779
780 #if PLATFORM(COCOA)
781     // Called by the web process through a message.
782     void registerWebProcessAccessibilityToken(const IPC::DataReference&);
783     // Called by the UI process when it is ready to send its tokens to the web process.
784     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
785     bool readSelectionFromPasteboard(const String& pasteboardName);
786     String stringSelectionForPasteboard();
787     PassRefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
788     void makeFirstResponder();
789
790     ColorSpaceData colorSpace();
791 #endif
792
793     void pageScaleFactorDidChange(double);
794     void pageZoomFactorDidChange(double);
795
796     void setMemoryCacheClientCallsEnabled(bool);
797
798     // Find.
799     void findString(const String&, FindOptions, unsigned maxMatchCount);
800     void findStringMatches(const String&, FindOptions, unsigned maxMatchCount);
801     void getImageForFindMatch(int32_t matchIndex);
802     void selectFindMatch(int32_t matchIndex);
803     void didGetImageForFindMatch(const ShareableBitmap::Handle& contentImageHandle, uint32_t matchIndex);
804     void hideFindUI();
805     void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
806     void didCountStringMatches(const String&, uint32_t matchCount);
807     void setFindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, float contentImageScaleFactor, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut, bool animate);
808     void didFindString(const String&, uint32_t matchCount);
809     void didFailToFindString(const String&);
810     void didFindStringMatches(const String&, Vector<Vector<WebCore::IntRect>> matchRects, int32_t firstIndexAfterSelection);
811
812     void getContentsAsString(PassRefPtr<StringCallback>);
813     void getBytecodeProfile(PassRefPtr<StringCallback>);
814
815 #if ENABLE(MHTML)
816     void getContentsAsMHTMLData(PassRefPtr<DataCallback>, bool useBinaryEncoding);
817 #endif
818     void getMainResourceDataOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
819     void getResourceDataFromFrame(WebFrameProxy*, API::URL*, PassRefPtr<DataCallback>);
820     void getRenderTreeExternalRepresentation(PassRefPtr<StringCallback>);
821     void getSelectionOrContentsAsString(PassRefPtr<StringCallback>);
822     void getSelectionAsWebArchiveData(PassRefPtr<DataCallback>);
823     void getSourceForFrame(WebFrameProxy*, PassRefPtr<StringCallback>);
824     void getWebArchiveOfFrame(WebFrameProxy*, PassRefPtr<DataCallback>);
825     void runJavaScriptInMainFrame(const String&, PassRefPtr<ScriptValueCallback>);
826     void forceRepaint(PassRefPtr<VoidCallback>);
827
828     float headerHeight(WebFrameProxy*);
829     float footerHeight(WebFrameProxy*);
830     void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
831     void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
832
833 #if PLATFORM(COCOA)
834     // Dictionary.
835     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
836 #endif
837
838     void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID);
839
840     void backForwardRemovedItem(uint64_t itemID);
841
842 #if ENABLE(DRAG_SUPPORT)    
843     // Drag and drop support.
844     void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
845     void dragUpdated(WebCore::DragData&, const String& dragStorageName = String());
846     void dragExited(WebCore::DragData&, const String& dragStorageName = String());
847     void performDrag(WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
848
849     void didPerformDragControllerAction(WebCore::DragSession);
850     void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
851 #if PLATFORM(COCOA)
852     void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
853     void setPromisedData(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
854                          const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
855 #endif
856 #if PLATFORM(GTK)
857     void startDrag(const WebCore::DragData&, const ShareableBitmap::Handle& dragImage);
858 #endif
859 #endif
860
861     void processDidBecomeUnresponsive();
862     void interactionOccurredWhileProcessUnresponsive();
863     void processDidBecomeResponsive();
864     void processDidCrash();
865
866     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
867     virtual void exitAcceleratedCompositingMode();
868     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&);
869     
870     void didDraw();
871
872     enum UndoOrRedo { Undo, Redo };
873     void addEditCommand(WebEditCommandProxy*);
874     void removeEditCommand(WebEditCommandProxy*);
875     bool isValidEditCommand(WebEditCommandProxy*);
876     void registerEditCommand(PassRefPtr<WebEditCommandProxy>, UndoOrRedo);
877
878 #if PLATFORM(COCOA)
879     void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); }
880     bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); }
881 #endif
882
883     WebProcessProxy& process() { return m_process.get(); }
884     PlatformProcessIdentifier processIdentifier() const;
885
886     WebPreferences& preferences() { return m_preferences.get(); }
887     void setPreferences(WebPreferences&);
888
889     WebPageGroup& pageGroup() { return m_pageGroup.get(); }
890
891     bool isValid() const;
892
893     PassRefPtr<API::Array> relatedPages() const;
894
895     const String& urlAtProcessExit() const { return m_urlAtProcessExit; }
896     FrameLoadState::State loadStateAtProcessExit() const { return m_loadStateAtProcessExit; }
897
898 #if ENABLE(DRAG_SUPPORT)
899     WebCore::DragSession dragSession() const { return m_currentDragSession; }
900     void resetDragOperation() { m_currentDragSession = WebCore::DragSession(); }
901 #endif
902
903     void preferencesDidChange();
904
905 #if ENABLE(CONTEXT_MENUS)
906     // Called by the WebContextMenuProxy.
907     void contextMenuItemSelected(const WebContextMenuItemData&);
908 #endif
909
910     // Called by the WebOpenPanelResultListenerProxy.
911     void didChooseFilesForOpenPanel(const Vector<String>&);
912     void didCancelForOpenPanel();
913
914     WebPageCreationParameters creationParameters();
915
916 #if USE(COORDINATED_GRAPHICS)
917     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize&);
918 #endif
919
920 #if PLATFORM(EFL) || PLATFORM(GTK)
921     void handleDownloadRequest(DownloadProxy*);
922 #endif
923
924     void advanceToNextMisspelling(bool startBeforeSelection);
925     void changeSpellingToWord(const String& word);
926 #if USE(APPKIT)
927     void uppercaseWord();
928     void lowercaseWord();
929     void capitalizeWord();
930 #endif
931
932 #if PLATFORM(COCOA)
933     bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
934     void setSmartInsertDeleteEnabled(bool);
935 #endif
936
937 #if PLATFORM(GTK)
938     String accessibilityPlugID() const { return m_accessibilityPlugID; }
939 #endif
940
941     void setCanRunModal(bool);
942     bool canRunModal();
943
944     void beginPrinting(WebFrameProxy*, const PrintInfo&);
945     void endPrinting();
946     void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<ComputedPagesCallback>);
947 #if PLATFORM(COCOA)
948     void drawRectToImage(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, PassRefPtr<ImageCallback>);
949     void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, PassRefPtr<DataCallback>);
950 #elif PLATFORM(GTK)
951     void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, PassRefPtr<PrintFinishedCallback>);
952 #endif
953
954     PageLoadState& pageLoadState() { return m_pageLoadState; }
955
956 #if PLATFORM(COCOA)
957     void handleAlternativeTextUIResult(const String& result);
958 #endif
959
960     void saveDataToFileInDownloadsFolder(const String& suggestedFilename, const String& mimeType, const String& originatingURLString, API::Data*);
961     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&);
962 #if PLATFORM(COCOA)
963     void savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
964     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&, const String& pdfUUID);
965     void openPDFFromTemporaryFolderWithNativeApplication(const String& pdfUUID);
966 #endif
967
968     WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
969
970     uint64_t renderTreeSize() const { return m_renderTreeSize; }
971
972     void setShouldSendEventsSynchronously(bool sync) { m_shouldSendEventsSynchronously = sync; };
973
974     void printMainFrame();
975     
976     void setMediaVolume(float);
977     void setMayStartMediaWhenInWindow(bool);
978     bool mayStartMediaWhenInWindow() const { return m_mayStartMediaWhenInWindow; }
979
980     // WebPopupMenuProxy::Client
981     virtual NativeWebMouseEvent* currentlyProcessedMouseDownEvent();
982
983 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
984     void setAcceleratedCompositingWindowId(uint64_t nativeWindowId);
985 #endif
986
987     void setSuppressVisibilityUpdates(bool flag) { m_suppressVisibilityUpdates = flag; }
988     bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; }
989
990 #if PLATFORM(IOS)
991     void willStartUserTriggeredZooming();
992
993     void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
994
995     void blurAssistedNode();
996 #endif
997
998     void postMessageToInjectedBundle(const String& messageName, API::Object* messageBody);
999
1000 #if ENABLE(INPUT_TYPE_COLOR)
1001     void setColorPickerColor(const WebCore::Color&);
1002     void endColorPicker();
1003 #endif
1004
1005     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
1006     void setMinimumLayoutSize(const WebCore::IntSize&);
1007
1008     bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; }
1009     void setAutoSizingShouldExpandToViewHeight(bool);
1010
1011     void didReceiveAuthenticationChallengeProxy(uint64_t frameID, PassRefPtr<AuthenticationChallengeProxy>);
1012
1013     int64_t spellDocumentTag();
1014     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
1015     void didCancelCheckingText(uint64_t requestID);
1016
1017     void connectionWillOpen(IPC::Connection*);
1018     void connectionWillClose(IPC::Connection*);
1019
1020     void didSaveToPageCache();
1021         
1022     void setScrollPinningBehavior(WebCore::ScrollPinningBehavior);
1023     WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
1024
1025     bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; }
1026     void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; }
1027     void recordNavigationSnapshot();
1028
1029 #if PLATFORM(COCOA)
1030     RetainPtr<CGImageRef> takeViewSnapshot();
1031 #endif
1032
1033 #if ENABLE(SUBTLE_CRYPTO)
1034     void wrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1035     void unwrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
1036 #endif
1037
1038     void setThumbnailScale(double);
1039
1040     void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, ImageCallback::CallbackFunction);
1041
1042 #if ENABLE(IMAGE_CONTROLS)
1043     void replaceControlledImage(PassRefPtr<ShareableBitmap>);
1044 #endif
1045
1046 private:
1047     WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&);
1048     void platformInitialize();
1049
1050     void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
1051
1052     void resetState();
1053     void resetStateAfterProcessExited();
1054
1055     void setUserAgent(const String&);
1056
1057     // IPC::MessageReceiver
1058     virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
1059     virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
1060
1061     // IPC::MessageSender
1062     virtual bool sendMessage(std::unique_ptr<IPC::MessageEncoder>, unsigned messageSendFlags) override;
1063     virtual IPC::Connection* messageSenderConnection() override;
1064     virtual uint64_t messageSenderDestinationID() override;
1065
1066     // WebPopupMenuProxy::Client
1067     virtual void valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex);
1068     virtual void setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index);
1069 #if PLATFORM(GTK)
1070     virtual void failedToShowPopupMenu();
1071 #endif
1072
1073     // Implemented in generated WebPageProxyMessageReceiver.cpp
1074     void didReceiveWebPageProxyMessage(IPC::Connection*, IPC::MessageDecoder&);
1075     void didReceiveSyncWebPageProxyMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
1076
1077     void didCreateMainFrame(uint64_t frameID);
1078     void didCreateSubframe(uint64_t frameID);
1079
1080     void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& url, const String& unreachableURL, IPC::MessageDecoder&);
1081     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, IPC::MessageDecoder&);
1082     void didFailProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, IPC::MessageDecoder&);
1083     void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, IPC::MessageDecoder&);
1084     void didFinishDocumentLoadForFrame(uint64_t frameID, IPC::MessageDecoder&);
1085     void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, IPC::MessageDecoder&);
1086     void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, IPC::MessageDecoder&);
1087     void didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t sameDocumentNavigationType, const String&, IPC::MessageDecoder&);
1088     void didReceiveTitleForFrame(uint64_t frameID, const String&, IPC::MessageDecoder&);
1089     void didFirstLayoutForFrame(uint64_t frameID, IPC::MessageDecoder&);
1090     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, IPC::MessageDecoder&);
1091     void didLayout(uint32_t layoutMilestones, IPC::MessageDecoder&);
1092     void didRemoveFrameFromHierarchy(uint64_t frameID, IPC::MessageDecoder&);
1093     void didDisplayInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder&);
1094     void didRunInsecureContentForFrame(uint64_t frameID, IPC::MessageDecoder&);
1095     void didDetectXSSForFrame(uint64_t frameID, IPC::MessageDecoder&);
1096     void frameDidBecomeFrameSet(uint64_t frameID, bool);
1097     void didStartProgress();
1098     void didChangeProgress(double);
1099     void didFinishProgress();
1100
1101     void decidePolicyForNavigationAction(uint64_t frameID, const NavigationActionData&, uint64_t originatingFrameID, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, uint64_t listenerID, IPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
1102     void decidePolicyForNewWindowAction(uint64_t frameID, const NavigationActionData&, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, IPC::MessageDecoder&);
1103     void decidePolicyForResponse(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, IPC::MessageDecoder&);
1104     void decidePolicyForResponseSync(uint64_t frameID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, IPC::MessageDecoder&, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
1105     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, IPC::MessageDecoder&);
1106
1107     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, IPC::MessageDecoder&);
1108
1109     // UI client
1110     void createNewPage(const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
1111     void showPage();
1112     void closePage(bool stopResponsivenessTimer);
1113     void runJavaScriptAlert(uint64_t frameID, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
1114     void runJavaScriptConfirm(uint64_t frameID, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
1115     void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
1116     void shouldInterruptJavaScript(bool& result);
1117     void setStatusText(const String&);
1118     void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, IPC::MessageDecoder&);
1119 #if ENABLE(NETSCAPE_PLUGIN_API)
1120     void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString);
1121 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1122 #if ENABLE(WEBGL)
1123     void webGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1124     void resolveWebGLPolicyForURL(const String& url, uint32_t& loadPolicy);
1125 #endif // ENABLE(WEBGL)
1126     void setToolbarsAreVisible(bool toolbarsAreVisible);
1127     void getToolbarsAreVisible(bool& toolbarsAreVisible);
1128     void setMenuBarIsVisible(bool menuBarIsVisible);
1129     void getMenuBarIsVisible(bool& menuBarIsVisible);
1130     void setStatusBarIsVisible(bool statusBarIsVisible);
1131     void getStatusBarIsVisible(bool& statusBarIsVisible);
1132     void setIsResizable(bool isResizable);
1133     void getIsResizable(bool& isResizable);
1134     void setWindowFrame(const WebCore::FloatRect&);
1135     void getWindowFrame(WebCore::FloatRect&);
1136     void screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
1137     void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
1138     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
1139     void didChangeViewportProperties(const WebCore::ViewportAttributes&);
1140     void pageDidScroll();
1141     void runOpenPanel(uint64_t frameID, const WebCore::FileChooserSettings&);
1142     void printFrame(uint64_t frameID);
1143     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>);
1144     void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier);
1145     void runModal();
1146     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
1147     void recommendedScrollbarStyleDidChange(int32_t newStyle);
1148     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
1149     void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
1150     void didChangePageCount(unsigned);
1151     void pageExtendedBackgroundColorDidChange(WebCore::Color);
1152 #if ENABLE(NETSCAPE_PLUGIN_API)
1153     void didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString);
1154     void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured);
1155 #endif // ENABLE(NETSCAPE_PLUGIN_API)
1156     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
1157
1158     void reattachToWebProcess();
1159     void reattachToWebProcessWithItem(WebBackForwardListItem*);
1160
1161     void requestNotificationPermission(uint64_t notificationID, const String& originString);
1162     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);
1163     void cancelNotification(uint64_t notificationID);
1164     void clearNotifications(const Vector<uint64_t>& notificationIDs);
1165     void didDestroyNotification(uint64_t notificationID);
1166
1167 #if USE(TILED_BACKING_STORE)
1168     void pageDidRequestScroll(const WebCore::IntPoint&);
1169     void pageTransitionViewportReady();
1170 #endif
1171 #if USE(COORDINATED_GRAPHICS)
1172     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
1173 #endif
1174 #if PLATFORM(EFL)
1175     void didChangeContentSize(const WebCore::IntSize&);
1176 #endif
1177
1178 #if ENABLE(INPUT_TYPE_COLOR)
1179     void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&);
1180     void didChooseColor(const WebCore::Color&);
1181     void didEndColorPicker();
1182 #endif
1183
1184     void editorStateChanged(const EditorState&);
1185
1186     // Back/Forward list management
1187     void backForwardAddItem(uint64_t itemID);
1188     void backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle&);
1189     void backForwardItemAtIndex(int32_t index, uint64_t& itemID);
1190     void backForwardBackListCount(int32_t& count);
1191     void backForwardForwardListCount(int32_t& count);
1192     void backForwardClear();
1193
1194     // Undo management
1195     void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction);
1196     void clearAllEditCommands();
1197     void canUndoRedo(uint32_t action, bool& result);
1198     void executeUndoRedo(uint32_t action, bool& result);
1199
1200     // Keyboard handling
1201 #if PLATFORM(COCOA)
1202     void executeSavedCommandBySelector(const String& selector, bool& handled);
1203 #endif
1204
1205 #if PLATFORM(GTK)
1206     void getEditorCommandsForKeyEvent(const AtomicString&, Vector<String>&);
1207     void bindAccessibilityTree(const String&);
1208 #endif
1209 #if PLATFORM(EFL)
1210     void getEditorCommandsForKeyEvent(Vector<String>&);
1211 #endif
1212
1213     // Popup Menu.
1214     void showPopupMenu(const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&);
1215     void hidePopupMenu();
1216
1217 #if ENABLE(CONTEXT_MENUS)
1218     // Context Menu.
1219     void showContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuContextData&, const Vector<WebContextMenuItemData>&, IPC::MessageDecoder&);
1220     void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuContextData&, const Vector<WebContextMenuItemData>&, IPC::MessageDecoder&);
1221 #endif
1222
1223     // Search popup results
1224     void saveRecentSearches(const String&, const Vector<String>&);
1225     void loadRecentSearches(const String&, Vector<String>&);
1226
1227 #if PLATFORM(COCOA)
1228     // Speech.
1229     void getIsSpeaking(bool&);
1230     void speak(const String&);
1231     void stopSpeaking();
1232
1233     // Spotlight.
1234     void searchWithSpotlight(const String&);
1235         
1236     void searchTheWeb(const String&);
1237
1238     // Dictionary.
1239     void didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&);
1240 #endif
1241
1242     // Spelling and grammar.
1243 #if USE(UNIFIED_TEXT_CHECKING)
1244     void checkTextOfParagraph(const String& text, uint64_t checkingTypes, Vector<WebCore::TextCheckingResult>& results);
1245 #endif
1246     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
1247     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
1248     void spellingUIIsShowing(bool&);
1249     void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
1250     void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
1251     void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
1252     void learnWord(const String& word);
1253     void ignoreWord(const String& word);
1254     void requestCheckingOfString(uint64_t requestID, const WebCore::TextCheckingRequestData&);
1255
1256     void setFocus(bool focused);
1257     void takeFocus(uint32_t direction);
1258     void setToolTip(const String&);
1259     void setCursor(const WebCore::Cursor&);
1260     void setCursorHiddenUntilMouseMoves(bool);
1261
1262     void didReceiveEvent(uint32_t opaqueType, bool handled);
1263     void stopResponsivenessTimer();
1264
1265     void voidCallback(uint64_t);
1266     void dataCallback(const IPC::DataReference&, uint64_t);
1267     void imageCallback(const ShareableBitmap::Handle&, uint64_t);
1268     void stringCallback(const String&, uint64_t);
1269     void scriptValueCallback(const IPC::DataReference&, uint64_t);
1270     void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, uint64_t);
1271     void validateCommandCallback(const String&, bool, int, uint64_t);
1272     void unsignedCallback(uint64_t, uint64_t);
1273     void editingRangeCallback(const EditingRange&, uint64_t);
1274     void rectForCharacterRangeCallback(const WebCore::IntRect&, const EditingRange&, uint64_t);
1275 #if PLATFORM(MAC)
1276     void attributedStringForCharacterRangeCallback(const AttributedString&, const EditingRange&, uint64_t);
1277 #endif
1278 #if PLATFORM(IOS)
1279     void gestureCallback(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, uint64_t);
1280     void touchesCallback(const WebCore::IntPoint&, uint32_t, uint64_t);
1281     void autocorrectionDataCallback(const Vector<WebCore::FloatRect>&, const String&, float, uint64_t, uint64_t);
1282     void autocorrectionContextCallback(const String&, const String&, const String&, const String&, uint64_t, uint64_t, uint64_t);
1283     void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
1284 #endif
1285 #if PLATFORM(GTK)
1286     void printFinishedCallback(const WebCore::ResourceError&, uint64_t);
1287 #endif
1288
1289     void focusedFrameChanged(uint64_t frameID);
1290     void frameSetLargestFrameChanged(uint64_t frameID);
1291
1292     void canAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, const WebCore::ProtectionSpace&, bool& canAuthenticate);
1293     void didReceiveAuthenticationChallenge(uint64_t frameID, const WebCore::AuthenticationChallenge&, uint64_t challengeID);
1294
1295     void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&);
1296
1297 #if PLATFORM(COCOA)
1298     void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus);
1299     void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState);
1300 #endif
1301
1302     bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
1303
1304 #if PLATFORM(MAC)
1305     void substitutionsPanelIsShowing(bool&);
1306     void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
1307     void dismissCorrectionPanel(int32_t reason);
1308     void dismissCorrectionPanelSoon(int32_t reason, String& result);
1309     void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
1310
1311 #if USE(DICTATION_ALTERNATIVES)
1312     void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
1313     void removeDictationAlternatives(uint64_t dictationContext);
1314     void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
1315 #endif
1316 #endif // PLATFORM(MAC)
1317
1318 #if PLATFORM(IOS)
1319     WebCore::FloatSize viewportScreenSize();
1320
1321     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);
1322
1323     void startAssistingNode(const AssistedNodeInformation&);
1324     void stopAssistingNode();
1325     void notifyRevealedSelection();
1326 #endif // PLATFORM(IOS)
1327
1328 #if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
1329     void didReceiveURIRequest(String uriString, uint64_t requestID);
1330 #endif
1331
1332     void clearLoadDependentCallbacks();
1333
1334     void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
1335
1336     void updateBackingStoreDiscardableState();
1337
1338     void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
1339
1340 #if PLUGIN_ARCHITECTURE(X11)
1341     void createPluginContainer(uint64_t& windowID);
1342     void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
1343 #endif
1344
1345     void processNextQueuedWheelEvent();
1346     void sendWheelEvent(const WebWheelEvent&);
1347
1348 #if ENABLE(TOUCH_EVENTS)
1349     bool shouldStartTrackingTouchEvents(const WebTouchEvent&) const;
1350 #endif
1351
1352 #if ENABLE(NETSCAPE_PLUGIN_API)
1353     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);
1354 #endif
1355
1356     uint64_t generateNavigationID();
1357
1358     PageClient& m_pageClient;
1359     std::unique_ptr<API::LoaderClient> m_loaderClient;
1360     std::unique_ptr<API::PolicyClient> m_policyClient;
1361     WebFormClient m_formClient;
1362     std::unique_ptr<API::UIClient> m_uiClient;
1363 #if PLATFORM(EFL)
1364     WebUIPopupMenuClient m_uiPopupMenuClient;
1365 #endif
1366     WebFindClient m_findClient;
1367     WebFindMatchesClient m_findMatchesClient;
1368 #if ENABLE(CONTEXT_MENUS)
1369     WebPageContextMenuClient m_contextMenuClient;
1370 #endif
1371
1372     std::unique_ptr<DrawingAreaProxy> m_drawingArea;
1373 #if ENABLE(ASYNC_SCROLLING)
1374     std::unique_ptr<RemoteScrollingCoordinatorProxy> m_scrollingCoordinatorProxy;
1375 #endif
1376
1377     Ref<WebProcessProxy> m_process;
1378     Ref<WebPageGroup> m_pageGroup;
1379     Ref<WebPreferences> m_preferences;
1380     Ref<VisitedLinkProvider> m_visitedLinkProvider;
1381
1382     RefPtr<WebFrameProxy> m_mainFrame;
1383     RefPtr<WebFrameProxy> m_focusedFrame;
1384     RefPtr<WebFrameProxy> m_frameSetLargestFrame;
1385
1386     String m_userAgent;
1387     String m_applicationNameForUserAgent;
1388     String m_customUserAgent;
1389     String m_customTextEncodingName;
1390
1391 #if ENABLE(INSPECTOR)
1392     RefPtr<WebInspectorProxy> m_inspector;
1393 #endif
1394
1395 #if ENABLE(FULLSCREEN_API)
1396     RefPtr<WebFullScreenManagerProxy> m_fullScreenManager;
1397 #endif
1398 #if PLATFORM(IOS)
1399     RefPtr<WebVideoFullscreenManagerProxy> m_videoFullscreenManager;
1400     VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
1401 #endif
1402
1403 #if ENABLE(VIBRATION)
1404     RefPtr<WebVibrationProxy> m_vibration;
1405 #endif
1406
1407     HashMap<uint64_t, RefPtr<VoidCallback>> m_voidCallbacks;
1408     HashMap<uint64_t, RefPtr<DataCallback>> m_dataCallbacks;
1409     HashMap<uint64_t, RefPtr<ImageCallback>> m_imageCallbacks;
1410     HashMap<uint64_t, RefPtr<StringCallback>> m_stringCallbacks;
1411     HashSet<uint64_t> m_loadDependentStringCallbackIDs;
1412     HashMap<uint64_t, RefPtr<ScriptValueCallback>> m_scriptValueCallbacks;
1413     HashMap<uint64_t, RefPtr<ComputedPagesCallback>> m_computedPagesCallbacks;
1414     HashMap<uint64_t, RefPtr<ValidateCommandCallback>> m_validateCommandCallbacks;
1415     HashMap<uint64_t, RefPtr<UnsignedCallback>> m_unsignedCallbacks;
1416     HashMap<uint64_t, RefPtr<EditingRangeCallback>> m_editingRangeCallbacks;
1417     HashMap<uint64_t, RefPtr<RectForCharacterRangeCallback>> m_rectForCharacterRangeCallbacks;
1418 #if PLATFORM(MAC)
1419     HashMap<uint64_t, RefPtr<AttributedStringForCharacterRangeCallback>> m_attributedStringForCharacterRangeCallbacks;
1420 #endif
1421 #if PLATFORM(IOS)
1422     HashMap<uint64_t, RefPtr<GestureCallback>> m_gestureCallbacks;
1423     HashMap<uint64_t, RefPtr<TouchesCallback>> m_touchesCallbacks;
1424     HashMap<uint64_t, RefPtr<AutocorrectionDataCallback>> m_autocorrectionCallbacks;
1425     HashMap<uint64_t, RefPtr<AutocorrectionContextCallback>> m_autocorrectionContextCallbacks;
1426 #endif
1427 #if PLATFORM(GTK)
1428     HashMap<uint64_t, RefPtr<PrintFinishedCallback>> m_printFinishedCallbacks;
1429 #endif
1430
1431     HashSet<WebEditCommandProxy*> m_editCommandSet;
1432
1433 #if PLATFORM(COCOA)
1434     HashSet<String> m_knownKeypressCommandNames;
1435 #endif
1436
1437     RefPtr<WebPopupMenuProxy> m_activePopupMenu;
1438 #if ENABLE(CONTEXT_MENUS)
1439     RefPtr<WebContextMenuProxy> m_activeContextMenu;
1440     ContextMenuContextData m_activeContextMenuContextData;
1441 #endif
1442     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
1443     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
1444     NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
1445
1446     WebCore::ViewState::Flags m_viewState;
1447
1448     bool m_canGoBack;
1449     bool m_canGoForward;
1450     Ref<WebBackForwardList> m_backForwardList;
1451     
1452     bool m_maintainsInactiveSelection;
1453
1454     String m_toolTip;
1455
1456     String m_urlAtProcessExit;
1457     FrameLoadState::State m_loadStateAtProcessExit;
1458
1459     EditorState m_editorState;
1460     bool m_temporarilyClosedComposition; // Editor state changed from hasComposition to !hasComposition, but that was only with shouldIgnoreCompositionSelectionChange yet.
1461
1462     double m_textZoomFactor;
1463     double m_pageZoomFactor;
1464     double m_pageScaleFactor;
1465     float m_intrinsicDeviceScaleFactor;
1466     float m_customDeviceScaleFactor;
1467     float m_topContentInset;
1468
1469     LayerHostingMode m_layerHostingMode;
1470
1471     bool m_drawsBackground;
1472     bool m_drawsTransparentBackground;
1473
1474     WebCore::Color m_underlayColor;
1475     WebCore::Color m_pageExtendedBackgroundColor;
1476
1477     bool m_areMemoryCacheClientCallsEnabled;
1478
1479     bool m_useFixedLayout;
1480     WebCore::IntSize m_fixedLayoutSize;
1481
1482     bool m_suppressScrollbarAnimations;
1483
1484     WebCore::Pagination::Mode m_paginationMode;
1485     bool m_paginationBehavesLikeColumns;
1486     double m_pageLength;
1487     double m_gapBetweenPages;
1488
1489     // If the process backing the web page is alive and kicking.
1490     bool m_isValid;
1491
1492     // Whether WebPageProxy::close() has been called on this page.
1493     bool m_isClosed;
1494
1495     // Whether it can run modal child web pages.
1496     bool m_canRunModal;
1497
1498     bool m_isInPrintingMode;
1499     bool m_isPerformingDOMPrintOperation;
1500
1501     bool m_inDecidePolicyForResponseSync;
1502     const WebCore::ResourceRequest* m_decidePolicyForResponseRequest;
1503     bool m_syncMimeTypePolicyActionIsValid;
1504     WebCore::PolicyAction m_syncMimeTypePolicyAction;
1505     uint64_t m_syncMimeTypePolicyDownloadID;
1506
1507     bool m_inDecidePolicyForNavigationAction;
1508     bool m_syncNavigationActionPolicyActionIsValid;
1509     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
1510     uint64_t m_syncNavigationActionPolicyDownloadID;
1511
1512     Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1513     Deque<NativeWebWheelEvent> m_wheelEventQueue;
1514     Deque<OwnPtr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1515
1516     bool m_processingMouseMoveEvent;
1517     OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1518     OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1519
1520 #if ENABLE(TOUCH_EVENTS)
1521     bool m_isTrackingTouchEvents;
1522     Deque<QueuedTouchEvents> m_touchEventQueue;
1523 #endif
1524 #if ENABLE(INPUT_TYPE_COLOR)
1525     RefPtr<WebColorPicker> m_colorPicker;
1526 #endif
1527
1528     uint64_t m_pageID;
1529     Ref<API::Session> m_session;
1530
1531     bool m_isPageSuspended;
1532
1533 #if ENABLE(REMOTE_INSPECTOR)
1534     bool m_allowsRemoteInspection;
1535 #endif
1536
1537 #if PLATFORM(COCOA)
1538     bool m_isSmartInsertDeleteEnabled;
1539 #endif
1540
1541 #if PLATFORM(GTK)
1542     String m_accessibilityPlugID;
1543 #endif
1544
1545     int64_t m_spellDocumentTag;
1546     bool m_hasSpellDocumentTag;
1547     unsigned m_pendingLearnOrIgnoreWordMessageCount;
1548
1549     bool m_mainFrameHasCustomContentProvider;
1550
1551 #if ENABLE(DRAG_SUPPORT)
1552     WebCore::DragSession m_currentDragSession;
1553 #endif
1554
1555     PageLoadState m_pageLoadState;
1556     
1557     bool m_delegatesScrolling;
1558
1559     bool m_mainFrameHasHorizontalScrollbar;
1560     bool m_mainFrameHasVerticalScrollbar;
1561
1562     // Whether horizontal wheel events can be handled directly for swiping purposes.
1563     bool m_canShortCircuitHorizontalWheelEvents;
1564
1565     bool m_mainFrameIsPinnedToLeftSide;
1566     bool m_mainFrameIsPinnedToRightSide;
1567     bool m_mainFrameIsPinnedToTopSide;
1568     bool m_mainFrameIsPinnedToBottomSide;
1569
1570     bool m_shouldUseImplicitRubberBandControl;
1571     bool m_rubberBandsAtLeft;
1572     bool m_rubberBandsAtRight;
1573     bool m_rubberBandsAtTop;
1574     bool m_rubberBandsAtBottom;
1575
1576     bool m_backgroundExtendsBeyondPage;
1577
1578     bool m_shouldRecordNavigationSnapshots;
1579
1580     unsigned m_pageCount;
1581
1582     WebCore::IntRect m_visibleScrollerThumbRect;
1583
1584     uint64_t m_renderTreeSize;
1585
1586     bool m_shouldSendEventsSynchronously;
1587
1588     bool m_suppressVisibilityUpdates;
1589     bool m_autoSizingShouldExpandToViewHeight;
1590     WebCore::IntSize m_minimumLayoutSize;
1591
1592     float m_mediaVolume;
1593     bool m_mayStartMediaWhenInWindow;
1594
1595     bool m_waitingForDidUpdateViewState;
1596
1597 #if PLATFORM(COCOA)
1598     HashMap<String, String> m_temporaryPDFFiles;
1599 #endif
1600         
1601     WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1602
1603     uint64_t m_navigationID;
1604 };
1605
1606 } // namespace WebKit
1607
1608 #endif // WebPageProxy_h