be7e84b17c392a9d125cf135909c0cfe17d3846c
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.h
1 /*
2  * Copyright (C) 2010, 2011, 2013 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #ifndef WebPage_h
27 #define WebPage_h
28
29 #include "APIObject.h"
30 #include "DrawingArea.h"
31 #include "FindController.h"
32 #include "GeolocationPermissionRequestManager.h"
33 #include "ImageOptions.h"
34 #include "ImmutableArray.h"
35 #if ENABLE(CONTEXT_MENUS)
36 #include "InjectedBundlePageContextMenuClient.h"
37 #endif
38 #include "InjectedBundlePageDiagnosticLoggingClient.h"
39 #include "InjectedBundlePageEditorClient.h"
40 #include "InjectedBundlePageFormClient.h"
41 #include "InjectedBundlePageFullScreenClient.h"
42 #include "InjectedBundlePageLoaderClient.h"
43 #include "InjectedBundlePagePolicyClient.h"
44 #include "InjectedBundlePageResourceLoadClient.h"
45 #include "InjectedBundlePageUIClient.h"
46 #include "MessageReceiver.h"
47 #include "MessageSender.h"
48 #include "TapHighlightController.h"
49 #include "Plugin.h"
50 #include "SandboxExtension.h"
51 #include "ShareableBitmap.h"
52 #include "WebUndoStep.h"
53 #include <WebCore/DictationAlternative.h>
54 #include <WebCore/DragData.h>
55 #include <WebCore/Editor.h>
56 #include <WebCore/FrameLoaderTypes.h>
57 #include <WebCore/IntRect.h>
58 #include <WebCore/Page.h>
59 #include <WebCore/PageVisibilityState.h>
60 #include <WebCore/PlatformScreen.h>
61 #include <WebCore/ScrollTypes.h>
62 #include <WebCore/TextChecking.h>
63 #include <WebCore/WebCoreKeyboardUIMode.h>
64 #include <wtf/HashMap.h>
65 #include <wtf/OwnPtr.h>
66 #include <wtf/PassRefPtr.h>
67 #include <wtf/RefPtr.h>
68 #include <wtf/text/WTFString.h>
69
70 #if PLATFORM(QT)
71 #include "ArgumentCodersQt.h"
72 #include "QtNetworkAccessManager.h"
73 #include "QtNetworkReply.h"
74 #include "QtNetworkReplyData.h"
75 #include "QtNetworkRequestData.h"
76 #include <QNetworkReply>
77 #include <QNetworkRequest>
78 #endif
79
80 #if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
81 #include "WebPageAccessibilityObject.h"
82 #include <wtf/gobject/GRefPtr.h>
83 #endif
84
85 #if PLATFORM(GTK)
86 #include "ArgumentCodersGtk.h"
87 #include "WebPrintOperationGtk.h"
88 #endif
89
90 #if ENABLE(TOUCH_EVENTS)
91 #include <WebCore/PlatformTouchEvent.h>
92 #endif
93
94 #if PLATFORM(MAC)
95 #include "DictionaryPopupInfo.h"
96 #include "LayerHostingContext.h"
97 #include <wtf/RetainPtr.h>
98 OBJC_CLASS CALayer;
99 OBJC_CLASS NSDictionary;
100 OBJC_CLASS NSObject;
101 OBJC_CLASS WKAccessibilityWebPageObject;
102
103 #define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
104 #endif
105
106 namespace CoreIPC {
107     class ArgumentDecoder;
108     class Connection;
109 }
110
111 namespace WebCore {
112     class GraphicsContext;
113     class Frame;
114     class FrameView;
115     class HTMLPlugInElement;
116     class KeyboardEvent;
117     class Page;
118     class PrintContext;
119     class Range;
120     class ResourceResponse;
121     class ResourceRequest;
122     class SharedBuffer;
123     class TextCheckingRequest;
124     class VisibleSelection;
125     struct KeypressCommand;
126     struct TextCheckingResult;
127 }
128
129 namespace WebKit {
130
131 class DrawingArea;
132 class InjectedBundleBackForwardList;
133 class NotificationPermissionRequestManager;
134 class PageBanner;
135 class PageOverlay;
136 class PluginView;
137 class SessionState;
138 class WebColorChooser;
139 class WebContextMenu;
140 class WebContextMenuItemData;
141 class WebEvent;
142 class WebFrame;
143 class WebFullScreenManager;
144 class WebImage;
145 class WebInspector;
146 class WebInspectorClient;
147 class WebKeyboardEvent;
148 class WebMouseEvent;
149 class WebNotificationClient;
150 class WebOpenPanelResultListener;
151 class WebPageGroupProxy;
152 class WebPopupMenu;
153 class WebWheelEvent;
154 struct AttributedString;
155 struct EditorState;
156 struct PrintInfo;
157 struct WebPageCreationParameters;
158 struct WebPreferencesStore;
159
160 #if ENABLE(GESTURE_EVENTS)
161 class WebGestureEvent;
162 #endif
163
164 #if ENABLE(TOUCH_EVENTS)
165 class WebTouchEvent;
166 #endif
167
168 typedef Vector<RefPtr<PageOverlay>> PageOverlayList;
169
170 class WebPage : public TypedAPIObject<APIObject::TypeBundlePage>, public CoreIPC::MessageReceiver, public CoreIPC::MessageSender {
171 public:
172     static PassRefPtr<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
173     virtual ~WebPage();
174
175     void close();
176
177     static WebPage* fromCorePage(WebCore::Page*);
178
179     WebCore::Page* corePage() const { return m_page.get(); }
180     uint64_t pageID() const { return m_pageID; }
181
182     void setSize(const WebCore::IntSize&);
183     const WebCore::IntSize& size() const { return m_viewSize; }
184     WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
185     
186     InjectedBundleBackForwardList* backForwardList();
187     DrawingArea* drawingArea() const { return m_drawingArea.get(); }
188
189     WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
190
191     void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
192
193     void scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity);
194
195     void centerSelectionInVisibleArea();
196
197 #if ENABLE(INSPECTOR)
198     WebInspector* inspector();
199 #endif
200
201 #if ENABLE(FULLSCREEN_API)
202     WebFullScreenManager* fullScreenManager();
203 #endif
204
205     // -- Called by the DrawingArea.
206     // FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
207     void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
208     void drawPageOverlay(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect&);
209     void layoutIfNeeded();
210
211     // -- Called from WebCore clients.
212 #if PLATFORM(MAC)
213     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*, bool saveCommands);
214 #elif !PLATFORM(GTK)
215     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
216 #endif
217
218     void didStartPageTransition();
219     void didCompletePageTransition();
220     void didCommitLoad(WebFrame*);
221     void didFinishLoad(WebFrame*);
222     void show();
223     String userAgent() const { return m_userAgent; }
224     WebCore::IntRect windowResizerRect() const;
225     WebCore::KeyboardUIMode keyboardUIMode();
226
227     WebUndoStep* webUndoStep(uint64_t);
228     void addWebUndoStep(uint64_t, WebUndoStep*);
229     void removeWebEditCommand(uint64_t);
230     bool isInRedo() const { return m_isInRedo; }
231
232     void setActivePopupMenu(WebPopupMenu*);
233
234 #if ENABLE(INPUT_TYPE_COLOR)
235     WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
236     void setActiveColorChooser(WebColorChooser*);
237     void didChooseColor(const WebCore::Color&);
238     void didEndColorPicker();
239 #endif
240
241     WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
242     void setActiveOpenPanelResultListener(PassRefPtr<WebOpenPanelResultListener>);
243
244     void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
245     void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
246
247     // -- InjectedBundle methods
248 #if ENABLE(CONTEXT_MENUS)
249     void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient*);
250 #endif
251     void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*);
252     void initializeInjectedBundleFormClient(WKBundlePageFormClient*);
253     void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient*);
254     void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClient*);
255     void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClient*);
256     void initializeInjectedBundleUIClient(WKBundlePageUIClient*);
257 #if ENABLE(FULLSCREEN_API)
258     void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClient*);
259 #endif
260     void initializeInjectedBundleDiagnosticLoggingClient(WKBundlePageDiagnosticLoggingClient*);
261
262 #if ENABLE(CONTEXT_MENUS)
263     InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; }
264 #endif
265     InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
266     InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
267     InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
268     InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
269     InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
270     InjectedBundlePageUIClient& injectedBundleUIClient() { return m_uiClient; }
271     InjectedBundlePageDiagnosticLoggingClient& injectedBundleDiagnosticLoggingClient() { return m_logDiagnosticMessageClient; }
272 #if ENABLE(FULLSCREEN_API)
273     InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
274 #endif
275
276     bool findStringFromInjectedBundle(const String&, FindOptions);
277
278     WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
279
280     WebCore::Frame* mainFrame() const; // May return 0.
281     WebCore::FrameView* mainFrameView() const; // May return 0.
282
283     PassRefPtr<WebCore::Range> currentSelectionAsRange();
284
285 #if ENABLE(NETSCAPE_PLUGIN_API)
286     PassRefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
287 #endif
288
289     EditorState editorState() const;
290
291     String renderTreeExternalRepresentation() const;
292     String renderTreeExternalRepresentationForPrinting() const;
293     uint64_t renderTreeSize() const;
294
295     void setTracksRepaints(bool);
296     bool isTrackingRepaints() const;
297     void resetTrackedRepaints();
298     PassRefPtr<ImmutableArray> trackedRepaintRects();
299
300     void executeEditingCommand(const String& commandName, const String& argument);
301     bool isEditingCommandEnabled(const String& commandName);
302     void clearMainFrameName();
303     void sendClose();
304
305     void sendSetWindowFrame(const WebCore::FloatRect&);
306
307     double textZoomFactor() const;
308     void setTextZoomFactor(double);
309     double pageZoomFactor() const;
310     void setPageZoomFactor(double);
311     void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
312     void windowScreenDidChange(uint64_t);
313
314     void scalePage(double scale, const WebCore::IntPoint& origin);
315     double pageScaleFactor() const;
316
317     void setUseFixedLayout(bool);
318     bool useFixedLayout() const { return m_useFixedLayout; }
319     void setFixedLayoutSize(const WebCore::IntSize&);
320
321     void listenForLayoutMilestones(uint32_t /* LayoutMilestones */);
322
323     void setSuppressScrollbarAnimations(bool);
324
325     void setRubberBandsAtBottom(bool);
326     void setRubberBandsAtTop(bool);
327
328     void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
329     void setPaginationBehavesLikeColumns(bool);
330     void setPageLength(double);
331     void setGapBetweenPages(double);
332
333     void postInjectedBundleMessage(const String& messageName, CoreIPC::MessageDecoder&);
334
335     bool drawsBackground() const { return m_drawsBackground; }
336     bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
337
338     void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; }
339     WebCore::Color underlayColor() const { return m_underlayColor; }
340
341     void stopLoading();
342     void stopLoadingFrame(uint64_t frameID);
343     void setDefersLoading(bool deferLoading);
344
345 #if USE(ACCELERATED_COMPOSITING)
346     void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
347     void exitAcceleratedCompositingMode();
348 #endif
349
350     void addPluginView(PluginView*);
351     void removePluginView(PluginView*);
352
353 #if PLATFORM(MAC)
354     LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
355     void setLayerHostingMode(LayerHostingMode);
356
357     bool windowIsVisible() const { return m_windowIsVisible; }
358     void updatePluginsActiveAndFocusedState();
359     const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
360     const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
361     const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
362
363     bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
364
365     void setTopOverhangImage(PassRefPtr<WebImage>);
366     void setBottomOverhangImage(PassRefPtr<WebImage>);
367
368     void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
369 #endif // PLATFORM(MAC)
370
371     bool windowIsFocused() const;
372     bool windowAndWebPageAreFocused() const;
373     void installPageOverlay(PassRefPtr<PageOverlay>, bool shouldFadeIn = false);
374     void uninstallPageOverlay(PageOverlay*, bool shouldFadeOut = false);
375     bool hasPageOverlay() const { return m_pageOverlays.size(); }
376     PageOverlayList& pageOverlays() { return m_pageOverlays; }
377
378     void setHeaderPageBanner(PassRefPtr<PageBanner>);
379     PageBanner* headerPageBanner();
380     void setFooterPageBanner(PassRefPtr<PageBanner>);
381     PageBanner* footerPageBanner();
382
383     void hidePageBanners();
384     void showPageBanners();
385
386     WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
387     WebCore::IntRect windowToScreen(const WebCore::IntRect&);
388
389     PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double scaleFactor, SnapshotOptions);
390
391     static const WebEvent* currentEvent();
392
393     FindController& findController() { return m_findController; }
394 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
395     TapHighlightController& tapHighlightController() { return m_tapHighlightController; }
396 #endif
397
398 #if ENABLE(GEOLOCATION)
399     GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
400 #endif
401
402     NotificationPermissionRequestManager* notificationPermissionRequestManager();
403
404     void pageDidScroll();
405 #if USE(TILED_BACKING_STORE)
406     void pageDidRequestScroll(const WebCore::IntPoint&);
407     void setFixedVisibleContentRect(const WebCore::IntRect&);
408     void sendViewportAttributesChanged();
409 #endif
410
411 #if ENABLE(CONTEXT_MENUS)
412     WebContextMenu* contextMenu();
413     WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
414 #endif
415     
416     bool hasLocalDataForURL(const WebCore::KURL&);
417     String cachedResponseMIMETypeForURL(const WebCore::KURL&);
418     String cachedSuggestedFilenameForURL(const WebCore::KURL&);
419     PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::KURL&);
420
421     static bool canHandleRequest(const WebCore::ResourceRequest&);
422
423     class SandboxExtensionTracker {
424     public:
425         ~SandboxExtensionTracker();
426
427         void invalidate();
428
429         void beginLoad(WebFrame*, const SandboxExtension::Handle& handle);
430         void willPerformLoadDragDestinationAction(PassRefPtr<SandboxExtension> pendingDropSandboxExtension);
431         void didStartProvisionalLoad(WebFrame*);
432         void didCommitProvisionalLoad(WebFrame*);
433         void didFailProvisionalLoad(WebFrame*);
434
435     private:
436         void setPendingProvisionalSandboxExtension(PassRefPtr<SandboxExtension>);
437
438         RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
439         RefPtr<SandboxExtension> m_provisionalSandboxExtension;
440         RefPtr<SandboxExtension> m_committedSandboxExtension;
441     };
442
443     SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
444
445 #if PLATFORM(EFL)
446     void setThemePath(const String&);
447 #endif
448
449 #if USE(TILED_BACKING_STORE)
450     void commitPageTransitionViewport();
451 #endif
452
453 #if PLATFORM(QT) || PLATFORM(GTK)
454     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
455     void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
456     void cancelComposition();
457 #endif
458
459     void didChangeSelection();
460
461 #if PLATFORM(MAC)
462     void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken);
463     WKAccessibilityWebPageObject* accessibilityRemoteObject();
464     NSObject *accessibilityObjectForMainFramePlugin();
465     const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; }
466     
467     void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
468
469     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, EditorState& newState);
470     void confirmComposition(EditorState& newState);
471     void cancelComposition(EditorState& newState);
472     void insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool& handled, EditorState& newState);
473     void getMarkedRange(uint64_t& location, uint64_t& length);
474     void getSelectedRange(uint64_t& location, uint64_t& length);
475     void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
476     void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
477     void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
478     void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState);
479     void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result);
480     void getStringSelectionForPasteboard(WTF::String& stringValue);
481     void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size);
482     void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result);
483     void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result);
484     bool performNonEditingBehaviorForSelector(const String&);
485     void insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool& handled, EditorState& newState);
486 #elif PLATFORM(EFL)
487     void confirmComposition(const String& compositionString);
488     void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
489     void cancelComposition();
490 #elif PLATFORM(GTK)
491 #if USE(TEXTURE_MAPPER_GL)
492     void setAcceleratedCompositingWindowId(int64_t nativeWindowHandle);
493 #endif
494 #endif
495
496 #if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
497     void updateAccessibilityTree();
498 #endif
499
500     void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length);
501     bool hasCompositionForTesting();
502     void confirmCompositionForTesting(const String& compositionString);
503
504     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
505     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
506     void dummy(bool&);
507
508 #if PLATFORM(MAC)
509     void performDictionaryLookupForSelection(WebCore::Frame*, const WebCore::VisibleSelection&);
510
511     bool isSpeaking();
512     void speak(const String&);
513     void stopSpeaking();
514
515 #endif
516
517     bool isSmartInsertDeleteEnabled();
518     void setSmartInsertDeleteEnabled(bool);
519
520     bool isSelectTrailingWhitespaceEnabled();
521     void setSelectTrailingWhitespaceEnabled(bool);
522
523     void replaceSelectionWithText(WebCore::Frame*, const String&);
524     void clearSelection();
525
526 #if ENABLE(DRAG_SUPPORT)
527 #if PLATFORM(QT) || PLATFORM(GTK)
528     void performDragControllerAction(uint64_t action, WebCore::DragData);
529 #else
530     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
531 #endif
532     void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
533
534     void willPerformLoadDragDestinationAction();
535     void mayPerformUploadDragDestinationAction();
536 #endif // ENABLE(DRAG_SUPPORT)
537
538     void beginPrinting(uint64_t frameID, const PrintInfo&);
539     void endPrinting();
540     void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
541 #if PLATFORM(MAC)
542     void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, uint64_t callbackID);
543     void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, uint64_t callbackID);
544 #elif PLATFORM(GTK)
545     void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
546 #endif
547
548     void setMediaVolume(float);
549     void setMayStartMediaWhenInWindow(bool);
550
551     void didChangeScrollOffsetForMainFrame();
552
553     void mainFrameDidLayout();
554
555     bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
556     void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
557
558     bool canRunModal() const { return m_canRunModal; }
559     void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
560
561     void runModal();
562
563     void setDeviceScaleFactor(float);
564     float deviceScaleFactor() const;
565
566     void setMemoryCacheMessagesEnabled(bool);
567
568     void forceRepaintWithoutCallback();
569
570     void unmarkAllMisspellings();
571     void unmarkAllBadGrammar();
572 #if PLATFORM(MAC)
573     void handleAlternativeTextUIResult(const String&);
574 #endif
575
576     // For testing purpose.
577     void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
578     void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
579     void simulateMouseMotion(WebCore::IntPoint, double time);
580
581 #if ENABLE(CONTEXT_MENUS)
582     void contextMenuShowing() { m_isShowingContextMenu = true; }
583 #endif
584
585 #if PLATFORM(QT)
586     void registerApplicationScheme(const String& scheme);
587     void applicationSchemeReply(const QtNetworkReplyData&);
588     void receivedApplicationSchemeRequest(const QNetworkRequest&, QtNetworkReply*);
589     void setUserScripts(const Vector<String>&);
590 #endif
591     void wheelEvent(const WebWheelEvent&);
592 #if ENABLE(GESTURE_EVENTS)
593     void gestureEvent(const WebGestureEvent&);
594 #endif
595
596     void numWheelEventHandlersChanged(unsigned);
597     void recomputeShortCircuitHorizontalWheelEventsState();
598
599     bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; }
600
601 #if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
602     void setVisibilityState(uint32_t /* WebCore::PageVisibilityState */, bool isInitialState);
603 #endif
604     void setThrottled(bool isThrottled);
605
606 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
607     uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
608 #endif
609
610     bool canPluginHandleResponse(const WebCore::ResourceResponse& response);
611
612     bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
613     void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
614     bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; }
615     void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
616     bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
617     void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
618     void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; }
619     bool tabToLinksEnabled() const { return m_tabToLinks; }
620
621     bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
622     void setScrollingPerformanceLoggingEnabled(bool);
623
624 #if PLATFORM(MAC)
625     bool shouldUsePDFPlugin() const;
626     bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
627     void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; }
628 #endif
629
630     void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size);
631 #if PLATFORM(MAC)
632     void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
633 #endif
634
635     bool mainFrameIsScrollable() const { return m_mainFrameIsScrollable; }
636
637     void setMinimumLayoutSize(const WebCore::IntSize&);
638     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
639
640     void setAutoSizingShouldExpandToViewHeight(bool shouldExpand);
641     bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; }
642
643     bool canShowMIMEType(const String& MIMEType) const;
644
645     void addTextCheckingRequest(uint64_t requestID, PassRefPtr<WebCore::TextCheckingRequest>);
646     void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
647     void didCancelCheckingText(uint64_t requestID);
648
649 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
650     void determinePrimarySnapshottedPlugIn();
651     void determinePrimarySnapshottedPlugInTimerFired();
652     void resetPrimarySnapshottedPlugIn();
653     bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const;
654 #endif
655
656     unsigned extendIncrementalRenderingSuppression();
657     void stopExtendingIncrementalRenderingSuppression(unsigned token);
658     bool shouldExtendIncrementalRenderingSuppression() { return !m_activeRenderingSuppressionTokens.isEmpty(); }
659
660     WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
661     void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
662
663     WKTypeRef pageOverlayCopyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter);
664     WKArrayRef pageOverlayCopyAccessibilityAttributesNames(bool parameterizedNames);
665     
666 private:
667     WebPage(uint64_t pageID, const WebPageCreationParameters&);
668
669     // CoreIPC::MessageSender
670     virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE;
671     virtual uint64_t messageSenderDestinationID() OVERRIDE;
672
673     void platformInitialize();
674
675     void didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
676     void didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&);
677
678 #if !PLATFORM(MAC)
679     static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
680 #endif
681     bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
682
683 #if PLATFORM(MAC)
684     bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
685 #endif
686
687     String sourceForFrame(WebFrame*);
688
689     void loadDataImpl(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::KURL& baseURL, const WebCore::KURL& failingURL, CoreIPC::MessageDecoder&);
690
691     bool platformHasLocalDataForURL(const WebCore::KURL&);
692
693     // Actions
694     void tryClose();
695     void loadURL(const String&, const SandboxExtension::Handle&, CoreIPC::MessageDecoder&);
696     void loadURLRequest(const WebCore::ResourceRequest&, const SandboxExtension::Handle&, CoreIPC::MessageDecoder&);
697     void loadData(const CoreIPC::DataReference&, const String& MIMEType, const String& encodingName, const String& baseURL, CoreIPC::MessageDecoder&);
698     void loadHTMLString(const String& htmlString, const String& baseURL, CoreIPC::MessageDecoder&);
699     void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, CoreIPC::MessageDecoder&);
700     void loadPlainTextString(const String&, CoreIPC::MessageDecoder&);
701     void loadWebArchiveData(const CoreIPC::DataReference&, CoreIPC::MessageDecoder&);
702     void linkClicked(const String& url, const WebMouseEvent&);
703     void reload(bool reloadFromOrigin, const SandboxExtension::Handle&);
704     void goForward(uint64_t);
705     void goBack(uint64_t);
706     void goToBackForwardItem(uint64_t);
707     void tryRestoreScrollPosition();
708     void setActive(bool);
709     void setFocused(bool);
710     void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
711     void setWindowResizerSize(const WebCore::IntSize&);
712     void setIsInWindow(bool isInWindow, bool wantsDidUpdateViewInWindowState = false);
713     void validateCommand(const String&, uint64_t);
714     void executeEditCommand(const String&);
715
716     void mouseEvent(const WebMouseEvent&);
717     void mouseEventSyncForTesting(const WebMouseEvent&, bool&);
718     void wheelEventSyncForTesting(const WebWheelEvent&, bool&);
719     void keyEvent(const WebKeyboardEvent&);
720     void keyEventSyncForTesting(const WebKeyboardEvent&, bool&);
721 #if ENABLE(TOUCH_EVENTS)
722     void touchEvent(const WebTouchEvent&);
723     void touchEventSyncForTesting(const WebTouchEvent&, bool& handled);
724 #if PLATFORM(QT)
725     void highlightPotentialActivation(const WebCore::IntPoint&, const WebCore::IntSize& area);
726 #endif
727 #endif
728 #if ENABLE(CONTEXT_MENUS)
729     void contextMenuHidden() { m_isShowingContextMenu = false; }
730 #endif
731
732     static void scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
733     static void logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
734
735     uint64_t restoreSession(const SessionState&);
736     void restoreSessionAndNavigateToCurrentItem(const SessionState&);
737
738     void didRemoveBackForwardItem(uint64_t);
739
740     void setWillGoToBackForwardItemCallbackEnabled(bool enabled) { m_willGoToBackForwardItemCallbackEnabled = enabled; }
741     
742     void setDrawsBackground(bool);
743     void setDrawsTransparentBackground(bool);
744
745     void viewWillStartLiveResize();
746     void viewWillEndLiveResize();
747
748     void getContentsAsString(uint64_t callbackID);
749 #if ENABLE(MHTML)
750     void getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding);
751 #endif
752     void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
753     void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
754     void getRenderTreeExternalRepresentation(uint64_t callbackID);
755     void getSelectionOrContentsAsString(uint64_t callbackID);
756     void getSelectionAsWebArchiveData(uint64_t callbackID);
757     void getSourceForFrame(uint64_t frameID, uint64_t callbackID);
758     void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
759     void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
760     void forceRepaint(uint64_t callbackID);
761
762     void preferencesDidChange(const WebPreferencesStore&);
763     void platformPreferencesDidChange(const WebPreferencesStore&);
764     void updatePreferences(const WebPreferencesStore&);
765
766     void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID);
767     void setUserAgent(const String&);
768     void setCustomTextEncodingName(const String&);
769     void suspendActiveDOMObjectsAndAnimations();
770     void resumeActiveDOMObjectsAndAnimations();
771
772 #if PLATFORM(MAC)
773     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
774     void performDictionaryLookupForRange(WebCore::Frame*, WebCore::Range*, NSDictionary *options);
775
776     void setWindowIsVisible(bool windowIsVisible);
777     void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
778
779     RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
780     void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
781     void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
782     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
783 #endif
784
785     void viewExposedRectChanged(const WebCore::FloatRect& exposedRect, bool clipsToExposedRect);
786     void setMainFrameIsScrollable(bool);
787
788     void unapplyEditCommand(uint64_t commandID);
789     void reapplyEditCommand(uint64_t commandID);
790     void didRemoveEditCommand(uint64_t commandID);
791
792     void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
793     void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
794     void getImageForFindMatch(uint32_t matchIndex);
795     void selectFindMatch(uint32_t matchIndex);
796     void hideFindUI();
797     void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
798
799 #if USE(COORDINATED_GRAPHICS)
800     void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area);
801 #endif
802
803     void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
804     void setTextForActivePopupMenu(int32_t index);
805
806 #if PLATFORM(GTK)
807     void failedToShowPopupMenu();
808 #endif
809 #if PLATFORM(QT)
810     void hidePopupMenu();
811     void selectedIndex(int32_t newIndex);
812 #endif
813
814     void didChooseFilesForOpenPanel(const Vector<String>&);
815     void didCancelForOpenPanel();
816 #if ENABLE(WEB_PROCESS_SANDBOX)
817     void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
818 #endif
819
820     void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
821
822     void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
823
824     void advanceToNextMisspelling(bool startBeforeSelection);
825     void changeSpellingToWord(const String& word);
826 #if USE(APPKIT)
827     void uppercaseWord();
828     void lowercaseWord();
829     void capitalizeWord();
830 #endif
831
832 #if ENABLE(CONTEXT_MENUS)
833     void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
834 #endif
835
836     void changeSelectedIndex(int32_t index);
837     void setCanStartMediaTimerFired();
838     void didUpdateInWindowStateTimerFired();
839
840     bool canHandleUserEvents() const;
841
842     void setMainFrameInViewSourceMode(bool);
843
844     static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
845
846     static PluginView* focusedPluginViewForFrame(WebCore::Frame*);
847     static PluginView* pluginViewForFrame(WebCore::Frame*);
848
849     void reportUsedFeatures();
850
851     OwnPtr<WebCore::Page> m_page;
852     RefPtr<WebFrame> m_mainFrame;
853     RefPtr<InjectedBundleBackForwardList> m_backForwardList;
854
855     RefPtr<WebPageGroupProxy> m_pageGroup;
856
857     String m_userAgent;
858
859     WebCore::IntSize m_viewSize;
860     OwnPtr<DrawingArea> m_drawingArea;
861
862     HashSet<PluginView*> m_pluginViews;
863
864     HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
865
866     bool m_useFixedLayout;
867
868     bool m_drawsBackground;
869     bool m_drawsTransparentBackground;
870
871     WebCore::Color m_underlayColor;
872
873     bool m_isInRedo;
874     bool m_isClosed;
875
876     bool m_tabToLinks;
877     
878     bool m_asynchronousPluginInitializationEnabled;
879     bool m_asynchronousPluginInitializationEnabledForAllPlugins;
880     bool m_artificialPluginInitializationDelayEnabled;
881
882     bool m_scrollingPerformanceLoggingEnabled;
883
884     bool m_mainFrameIsScrollable;
885
886 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
887     bool m_readyToFindPrimarySnapshottedPlugin;
888     bool m_didFindPrimarySnapshottedPlugin;
889     String m_primaryPlugInPageOrigin;
890     String m_primaryPlugInOrigin;
891     String m_primaryPlugInMimeType;
892     WebCore::RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer;
893 #endif
894
895 #if PLATFORM(MAC)
896     bool m_pdfPluginEnabled;
897
898     bool m_hasCachedWindowFrame;
899
900     // Whether the containing window is visible or not.
901     bool m_windowIsVisible;
902
903     // The frame of the containing window in screen coordinates.
904     WebCore::FloatRect m_windowFrameInScreenCoordinates;
905
906     // The frame of the containing window in unflipped screen coordinates.
907     WebCore::FloatRect m_windowFrameInUnflippedScreenCoordinates;
908
909     // The frame of the view in window coordinates.
910     WebCore::FloatRect m_viewFrameInWindowCoordinates;
911
912     // The accessibility position of the view.
913     WebCore::FloatPoint m_accessibilityPosition;
914     
915     // The layer hosting mode.
916     LayerHostingMode m_layerHostingMode;
917
918     RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
919
920     WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
921
922 #elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
923     GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
924
925 #if USE(TEXTURE_MAPPER_GL)
926     // Our view's window in the UI process.
927     uint64_t m_nativeWindowHandle;
928 #endif
929 #endif
930
931     RefPtr<PageBanner> m_headerBanner;
932     RefPtr<PageBanner> m_footerBanner;
933
934     WebCore::RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
935     WebCore::RunLoop::Timer<WebPage> m_sendDidUpdateInWindowStateTimer;
936     bool m_mayStartMediaWhenInWindow;
937
938     HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap;
939
940     WebCore::IntSize m_windowResizerSize;
941
942 #if ENABLE(CONTEXT_MENUS)
943     InjectedBundlePageContextMenuClient m_contextMenuClient;
944 #endif
945     InjectedBundlePageEditorClient m_editorClient;
946     InjectedBundlePageFormClient m_formClient;
947     InjectedBundlePageLoaderClient m_loaderClient;
948     InjectedBundlePagePolicyClient m_policyClient;
949     InjectedBundlePageResourceLoadClient m_resourceLoadClient;
950     InjectedBundlePageUIClient m_uiClient;
951 #if ENABLE(FULLSCREEN_API)
952     InjectedBundlePageFullScreenClient m_fullScreenClient;
953 #endif
954     InjectedBundlePageDiagnosticLoggingClient m_logDiagnosticMessageClient;
955
956     FindController m_findController;
957 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
958     TapHighlightController m_tapHighlightController;
959 #endif
960     PageOverlayList m_pageOverlays;
961
962 #if ENABLE(INSPECTOR)
963     RefPtr<WebInspector> m_inspector;
964 #endif
965 #if ENABLE(FULLSCREEN_API)
966     RefPtr<WebFullScreenManager> m_fullScreenManager;
967 #endif
968     RefPtr<WebPopupMenu> m_activePopupMenu;
969 #if ENABLE(CONTEXT_MENUS)
970     RefPtr<WebContextMenu> m_contextMenu;
971 #endif
972 #if ENABLE(INPUT_TYPE_COLOR)
973     WebColorChooser* m_activeColorChooser;
974 #endif
975     RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
976     RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
977
978 #if ENABLE(GEOLOCATION)
979     GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
980 #endif
981
982     OwnPtr<WebCore::PrintContext> m_printContext;
983 #if PLATFORM(GTK)
984     RefPtr<WebPrintOperationGtk> m_printOperation;
985 #endif
986
987     SandboxExtensionTracker m_sandboxExtensionTracker;
988     uint64_t m_pageID;
989
990     RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
991     Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
992
993     bool m_canRunBeforeUnloadConfirmPanel;
994
995     bool m_canRunModal;
996     bool m_isRunningModal;
997
998     bool m_cachedMainFrameIsPinnedToLeftSide;
999     bool m_cachedMainFrameIsPinnedToRightSide;
1000     bool m_cachedMainFrameIsPinnedToTopSide;
1001     bool m_cachedMainFrameIsPinnedToBottomSide;
1002     bool m_canShortCircuitHorizontalWheelEvents;
1003     unsigned m_numWheelEventHandlers;
1004
1005     unsigned m_cachedPageCount;
1006
1007     WebCore::IntSize m_minimumLayoutSize;
1008     bool m_autoSizingShouldExpandToViewHeight;
1009
1010 #if ENABLE(CONTEXT_MENUS)
1011     bool m_isShowingContextMenu;
1012 #endif
1013     
1014     bool m_willGoToBackForwardItemCallbackEnabled;
1015     
1016 #if PLATFORM(QT)
1017     HashMap<String, QtNetworkReply*> m_applicationSchemeReplies;
1018 #endif
1019 #if ENABLE(PAGE_VISIBILITY_API)
1020     WebCore::PageVisibilityState m_visibilityState;
1021 #endif
1022     WebInspectorClient* m_inspectorClient;
1023
1024     WebCore::Color m_backgroundColor;
1025
1026     HashSet<unsigned> m_activeRenderingSuppressionTokens;
1027     unsigned m_maximumRenderingSuppressionToken;
1028     
1029     WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
1030 };
1031
1032 } // namespace WebKit
1033
1034 #endif // WebPage_h