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> 98OBJC_CLASS CALayer; 99OBJC_CLASS NSDictionary; 100OBJC_CLASS NSObject; 101OBJC_CLASS WKAccessibilityWebPageObject; 102 103#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1 104#endif 105 106namespace CoreIPC { 107 class ArgumentDecoder; 108 class Connection; 109} 110 111namespace 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 129namespace WebKit { 130 131class DrawingArea; 132class InjectedBundleBackForwardList; 133class NotificationPermissionRequestManager; 134class PageBanner; 135class PageOverlay; 136class PluginView; 137class SessionState; 138class WebColorChooser; 139class WebContextMenu; 140class WebContextMenuItemData; 141class WebEvent; 142class WebFrame; 143class WebFullScreenManager; 144class WebImage; 145class WebInspector; 146class WebInspectorClient; 147class WebKeyboardEvent; 148class WebMouseEvent; 149class WebNotificationClient; 150class WebOpenPanelResultListener; 151class WebPageGroupProxy; 152class WebPopupMenu; 153class WebWheelEvent; 154struct AttributedString; 155struct EditorState; 156struct PrintInfo; 157struct WebPageCreationParameters; 158struct WebPreferencesStore; 159 160#if ENABLE(GESTURE_EVENTS) 161class WebGestureEvent; 162#endif 163 164#if ENABLE(TOUCH_EVENTS) 165class WebTouchEvent; 166#endif 167 168typedef Vector<RefPtr<PageOverlay>> PageOverlayList; 169 170class WebPage : public TypedAPIObject<APIObject::TypeBundlePage>, public CoreIPC::MessageReceiver, public CoreIPC::MessageSender { 171public: 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 bool 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 didEndColorChooser(); 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 void setUnderlayPage(PassRefPtr<WebPage> underlayPage) { m_underlayPage = underlayPage; } 277 278 bool findStringFromInjectedBundle(const String&, FindOptions); 279 280 WebFrame* mainWebFrame() const { return m_mainFrame.get(); } 281 282 WebCore::Frame* mainFrame() const; // May return 0. 283 WebCore::FrameView* mainFrameView() const; // May return 0. 284 285 PassRefPtr<WebCore::Range> currentSelectionAsRange(); 286 287#if ENABLE(NETSCAPE_PLUGIN_API) 288 PassRefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType); 289#endif 290 291 EditorState editorState() const; 292 293 String renderTreeExternalRepresentation() const; 294 String renderTreeExternalRepresentationForPrinting() const; 295 uint64_t renderTreeSize() const; 296 297 void setTracksRepaints(bool); 298 bool isTrackingRepaints() const; 299 void resetTrackedRepaints(); 300 PassRefPtr<ImmutableArray> trackedRepaintRects(); 301 302 void executeEditingCommand(const String& commandName, const String& argument); 303 bool isEditingCommandEnabled(const String& commandName); 304 void clearMainFrameName(); 305 void sendClose(); 306 307 void sendSetWindowFrame(const WebCore::FloatRect&); 308 309 double textZoomFactor() const; 310 void setTextZoomFactor(double); 311 double pageZoomFactor() const; 312 void setPageZoomFactor(double); 313 void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor); 314 void windowScreenDidChange(uint64_t); 315 316 void scalePage(double scale, const WebCore::IntPoint& origin); 317 double pageScaleFactor() const; 318 319 void setUseFixedLayout(bool); 320 bool useFixedLayout() const { return m_useFixedLayout; } 321 void setFixedLayoutSize(const WebCore::IntSize&); 322 323 void listenForLayoutMilestones(uint32_t /* LayoutMilestones */); 324 325 void setSuppressScrollbarAnimations(bool); 326 327 void setRubberBandsAtBottom(bool); 328 void setRubberBandsAtTop(bool); 329 330 void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */); 331 void setPaginationBehavesLikeColumns(bool); 332 void setPageLength(double); 333 void setGapBetweenPages(double); 334 335 void postInjectedBundleMessage(const String& messageName, CoreIPC::MessageDecoder&); 336 337 bool drawsBackground() const { return m_drawsBackground; } 338 bool drawsTransparentBackground() const { return m_drawsTransparentBackground; } 339 340 void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; } 341 WebCore::Color underlayColor() const { return m_underlayColor; } 342 343 void stopLoading(); 344 void stopLoadingFrame(uint64_t frameID); 345 void setDefersLoading(bool deferLoading); 346 347#if USE(ACCELERATED_COMPOSITING) 348 void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*); 349 void exitAcceleratedCompositingMode(); 350#endif 351 352 void addPluginView(PluginView*); 353 void removePluginView(PluginView*); 354 355#if PLATFORM(MAC) 356 LayerHostingMode layerHostingMode() const { return m_layerHostingMode; } 357 void setLayerHostingMode(LayerHostingMode); 358 359 bool windowIsVisible() const { return m_windowIsVisible; } 360 void updatePluginsActiveAndFocusedState(); 361 const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; } 362 const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; } 363 const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; } 364 365 bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; } 366 367 void setTopOverhangImage(PassRefPtr<WebImage>); 368 void setBottomOverhangImage(PassRefPtr<WebImage>); 369 370 void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor); 371#endif // PLATFORM(MAC) 372 373 bool windowIsFocused() const; 374 bool windowAndWebPageAreFocused() const; 375 void installPageOverlay(PassRefPtr<PageOverlay>, bool shouldFadeIn = false); 376 void uninstallPageOverlay(PageOverlay*, bool shouldFadeOut = false); 377 bool hasPageOverlay() const { return m_pageOverlays.size(); } 378 PageOverlayList& pageOverlays() { return m_pageOverlays; } 379 380 void setHeaderPageBanner(PassRefPtr<PageBanner>); 381 PageBanner* headerPageBanner(); 382 void setFooterPageBanner(PassRefPtr<PageBanner>); 383 PageBanner* footerPageBanner(); 384 385 void hidePageBanners(); 386 void showPageBanners(); 387 388 WebCore::IntPoint screenToWindow(const WebCore::IntPoint&); 389 WebCore::IntRect windowToScreen(const WebCore::IntRect&); 390 391 PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double scaleFactor, SnapshotOptions); 392 393 static const WebEvent* currentEvent(); 394 395 FindController& findController() { return m_findController; } 396#if ENABLE(TOUCH_EVENTS) && PLATFORM(QT) 397 TapHighlightController& tapHighlightController() { return m_tapHighlightController; } 398#endif 399 400#if ENABLE(GEOLOCATION) 401 GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; } 402#endif 403 404 NotificationPermissionRequestManager* notificationPermissionRequestManager(); 405 406 void pageDidScroll(); 407#if USE(TILED_BACKING_STORE) 408 void pageDidRequestScroll(const WebCore::IntPoint&); 409 void setFixedVisibleContentRect(const WebCore::IntRect&); 410 void sendViewportAttributesChanged(); 411#endif 412 413#if ENABLE(CONTEXT_MENUS) 414 WebContextMenu* contextMenu(); 415 WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&); 416#endif 417 418 bool hasLocalDataForURL(const WebCore::KURL&); 419 String cachedResponseMIMETypeForURL(const WebCore::KURL&); 420 String cachedSuggestedFilenameForURL(const WebCore::KURL&); 421 PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::KURL&); 422 423 static bool canHandleRequest(const WebCore::ResourceRequest&); 424 425 class SandboxExtensionTracker { 426 public: 427 ~SandboxExtensionTracker(); 428 429 void invalidate(); 430 431 void beginLoad(WebFrame*, const SandboxExtension::Handle& handle); 432 void willPerformLoadDragDestinationAction(PassRefPtr<SandboxExtension> pendingDropSandboxExtension); 433 void didStartProvisionalLoad(WebFrame*); 434 void didCommitProvisionalLoad(WebFrame*); 435 void didFailProvisionalLoad(WebFrame*); 436 437 private: 438 void setPendingProvisionalSandboxExtension(PassRefPtr<SandboxExtension>); 439 440 RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension; 441 RefPtr<SandboxExtension> m_provisionalSandboxExtension; 442 RefPtr<SandboxExtension> m_committedSandboxExtension; 443 }; 444 445 SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; } 446 447#if PLATFORM(EFL) 448 void setThemePath(const String&); 449#endif 450 451#if USE(TILED_BACKING_STORE) 452 void commitPageTransitionViewport(); 453#endif 454 455#if PLATFORM(QT) || PLATFORM(GTK) 456 void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd); 457 void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength); 458 void cancelComposition(); 459#endif 460 461 void didChangeSelection(); 462 463#if PLATFORM(MAC) 464 void registerUIProcessAccessibilityTokens(const CoreIPC::DataReference& elemenToken, const CoreIPC::DataReference& windowToken); 465 WKAccessibilityWebPageObject* accessibilityRemoteObject(); 466 NSObject *accessibilityObjectForMainFramePlugin(); 467 const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; } 468 469 void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput); 470 471 void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, EditorState& newState); 472 void confirmComposition(EditorState& newState); 473 void cancelComposition(EditorState& newState); 474 void insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool& handled, EditorState& newState); 475 void getMarkedRange(uint64_t& location, uint64_t& length); 476 void getSelectedRange(uint64_t& location, uint64_t& length); 477 void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&); 478 void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result); 479 void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect); 480 void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState); 481 void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result); 482 void getStringSelectionForPasteboard(WTF::String& stringValue); 483 void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size); 484 void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result); 485 void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result); 486 bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*); 487 void insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool& handled, EditorState& newState); 488#elif PLATFORM(EFL) 489 void confirmComposition(const String& compositionString); 490 void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition); 491 void cancelComposition(); 492#elif PLATFORM(GTK) 493#if USE(TEXTURE_MAPPER_GL) 494 void setAcceleratedCompositingWindowId(int64_t nativeWindowHandle); 495#endif 496#endif 497 498#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL)) 499 void updateAccessibilityTree(); 500#endif 501 502 void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length); 503 bool hasCompositionForTesting(); 504 void confirmCompositionForTesting(const String& compositionString); 505 506 // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require 507 // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed. 508 void dummy(bool&); 509 510#if PLATFORM(MAC) 511 void performDictionaryLookupForSelection(WebCore::Frame*, const WebCore::VisibleSelection&); 512 513 bool isSpeaking(); 514 void speak(const String&); 515 void stopSpeaking(); 516 517#endif 518 519 bool isSmartInsertDeleteEnabled(); 520 void setSmartInsertDeleteEnabled(bool); 521 522 bool isSelectTrailingWhitespaceEnabled(); 523 void setSelectTrailingWhitespaceEnabled(bool); 524 525 void replaceSelectionWithText(WebCore::Frame*, const String&); 526 void clearSelection(); 527 528#if ENABLE(DRAG_SUPPORT) 529#if PLATFORM(QT) || PLATFORM(GTK) 530 void performDragControllerAction(uint64_t action, WebCore::DragData); 531#else 532 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&); 533#endif 534 void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation); 535 536 void willPerformLoadDragDestinationAction(); 537 void mayPerformUploadDragDestinationAction(); 538#endif // ENABLE(DRAG_SUPPORT) 539 540 void beginPrinting(uint64_t frameID, const PrintInfo&); 541 void endPrinting(); 542 void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID); 543#if PLATFORM(MAC) 544 void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, uint64_t callbackID); 545 void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, uint64_t callbackID); 546#elif PLATFORM(GTK) 547 void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID); 548#endif 549 550 void setMediaVolume(float); 551 void setMayStartMediaWhenInWindow(bool); 552 553 bool mainFrameHasCustomRepresentation() const; 554 555 void didChangeScrollOffsetForMainFrame(); 556 557 void mainFrameDidLayout(); 558 559 bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; } 560 void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; } 561 562 bool canRunModal() const { return m_canRunModal; } 563 void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; } 564 565 void runModal(); 566 567 void setDeviceScaleFactor(float); 568 float deviceScaleFactor() const; 569 570 void setMemoryCacheMessagesEnabled(bool); 571 572 void forceRepaintWithoutCallback(); 573 574 void unmarkAllMisspellings(); 575 void unmarkAllBadGrammar(); 576#if PLATFORM(MAC) 577 void handleAlternativeTextUIResult(const String&); 578#endif 579 580 // For testing purpose. 581 void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time); 582 void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time); 583 void simulateMouseMotion(WebCore::IntPoint, double time); 584 585#if ENABLE(CONTEXT_MENUS) 586 void contextMenuShowing() { m_isShowingContextMenu = true; } 587#endif 588 589#if PLATFORM(QT) 590 void registerApplicationScheme(const String& scheme); 591 void applicationSchemeReply(const QtNetworkReplyData&); 592 void receivedApplicationSchemeRequest(const QNetworkRequest&, QtNetworkReply*); 593 void setUserScripts(const Vector<String>&); 594#endif 595 void wheelEvent(const WebWheelEvent&); 596#if ENABLE(GESTURE_EVENTS) 597 void gestureEvent(const WebGestureEvent&); 598#endif 599 600 void numWheelEventHandlersChanged(unsigned); 601 void recomputeShortCircuitHorizontalWheelEventsState(); 602 603 bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; } 604 605#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING) 606 void setVisibilityState(uint32_t /* WebCore::PageVisibilityState */, bool isInitialState); 607#endif 608 void setThrottled(bool isThrottled); 609 610#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL) 611 uint64_t nativeWindowHandle() { return m_nativeWindowHandle; } 612#endif 613 614 bool shouldUseCustomRepresentationForResponse(const WebCore::ResourceResponse&); 615 bool canPluginHandleResponse(const WebCore::ResourceResponse& response); 616 617 bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; } 618 void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; } 619 bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; } 620 void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; } 621 bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; } 622 void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; } 623 void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; } 624 bool tabToLinksEnabled() const { return m_tabToLinks; } 625 626 bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; } 627 void setScrollingPerformanceLoggingEnabled(bool); 628 629#if PLATFORM(MAC) 630 bool shouldUsePDFPlugin() const; 631 bool pdfPluginEnabled() const { return m_pdfPluginEnabled; } 632 void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; } 633#endif 634 635 void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size); 636#if PLATFORM(MAC) 637 void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID); 638#endif 639 640 bool mainFrameIsScrollable() const { return m_mainFrameIsScrollable; } 641 642 void setMinimumLayoutSize(const WebCore::IntSize&); 643 WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; } 644 645 void setAutoSizingShouldExpandToViewHeight(bool shouldExpand); 646 bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; } 647 648 bool canShowMIMEType(const String& MIMEType) const; 649 650 void addTextCheckingRequest(uint64_t requestID, PassRefPtr<WebCore::TextCheckingRequest>); 651 void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&); 652 void didCancelCheckingText(uint64_t requestID); 653 654#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC) 655 void determinePrimarySnapshottedPlugIn(); 656 void determinePrimarySnapshottedPlugInTimerFired(); 657 void resetPrimarySnapshottedPlugIn(); 658 bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const; 659#endif 660 661 unsigned extendIncrementalRenderingSuppression(); 662 void stopExtendingIncrementalRenderingSuppression(unsigned token); 663 bool shouldExtendIncrementalRenderingSuppression() { return !m_activeRenderingSuppressionTokens.isEmpty(); } 664 665 WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; } 666 void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning); 667 668 WKTypeRef pageOverlayCopyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter); 669 WKArrayRef pageOverlayCopyAccessibilityAttributesNames(bool parameterizedNames); 670 671private: 672 WebPage(uint64_t pageID, const WebPageCreationParameters&); 673 674 // CoreIPC::MessageSender 675 virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE; 676 virtual uint64_t messageSenderDestinationID() OVERRIDE; 677 678 void platformInitialize(); 679 680 void didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&); 681 void didReceiveSyncWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&); 682 683#if !PLATFORM(MAC) 684 static const char* interpretKeyEvent(const WebCore::KeyboardEvent*); 685#endif 686 bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&); 687 688#if PLATFORM(MAC) 689 bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*); 690#endif 691 692 String sourceForFrame(WebFrame*); 693 694 void loadDataImpl(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::KURL& baseURL, const WebCore::KURL& failingURL, CoreIPC::MessageDecoder&); 695 696 bool platformHasLocalDataForURL(const WebCore::KURL&); 697 698 // Actions 699 void tryClose(); 700 void loadURL(const String&, const SandboxExtension::Handle&, CoreIPC::MessageDecoder&); 701 void loadURLRequest(const WebCore::ResourceRequest&, const SandboxExtension::Handle&, CoreIPC::MessageDecoder&); 702 void loadData(const CoreIPC::DataReference&, const String& MIMEType, const String& encodingName, const String& baseURL, CoreIPC::MessageDecoder&); 703 void loadHTMLString(const String& htmlString, const String& baseURL, CoreIPC::MessageDecoder&); 704 void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, CoreIPC::MessageDecoder&); 705 void loadPlainTextString(const String&, CoreIPC::MessageDecoder&); 706 void loadWebArchiveData(const CoreIPC::DataReference&, CoreIPC::MessageDecoder&); 707 void linkClicked(const String& url, const WebMouseEvent&); 708 void reload(bool reloadFromOrigin, const SandboxExtension::Handle&); 709 void goForward(uint64_t); 710 void goBack(uint64_t); 711 void goToBackForwardItem(uint64_t); 712 void tryRestoreScrollPosition(); 713 void setActive(bool); 714 void setFocused(bool); 715 void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&); 716 void setWindowResizerSize(const WebCore::IntSize&); 717 void setIsInWindow(bool isInWindow, bool wantsDidUpdateViewInWindowState = false); 718 void validateCommand(const String&, uint64_t); 719 void executeEditCommand(const String&); 720 721 void mouseEvent(const WebMouseEvent&); 722 void mouseEventSyncForTesting(const WebMouseEvent&, bool&); 723 void wheelEventSyncForTesting(const WebWheelEvent&, bool&); 724 void keyEvent(const WebKeyboardEvent&); 725 void keyEventSyncForTesting(const WebKeyboardEvent&, bool&); 726#if ENABLE(TOUCH_EVENTS) 727 void touchEvent(const WebTouchEvent&); 728 void touchEventSyncForTesting(const WebTouchEvent&, bool& handled); 729#if PLATFORM(QT) 730 void highlightPotentialActivation(const WebCore::IntPoint&, const WebCore::IntSize& area); 731#endif 732#endif 733#if ENABLE(CONTEXT_MENUS) 734 void contextMenuHidden() { m_isShowingContextMenu = false; } 735#endif 736 737 static bool scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity); 738 static bool logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity); 739 740 uint64_t restoreSession(const SessionState&); 741 void restoreSessionAndNavigateToCurrentItem(const SessionState&); 742 743 void didRemoveBackForwardItem(uint64_t); 744 745 void setWillGoToBackForwardItemCallbackEnabled(bool enabled) { m_willGoToBackForwardItemCallbackEnabled = enabled; } 746 747 void setDrawsBackground(bool); 748 void setDrawsTransparentBackground(bool); 749 750 void viewWillStartLiveResize(); 751 void viewWillEndLiveResize(); 752 753 void getContentsAsString(uint64_t callbackID); 754#if ENABLE(MHTML) 755 void getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding); 756#endif 757 void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID); 758 void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID); 759 void getRenderTreeExternalRepresentation(uint64_t callbackID); 760 void getSelectionOrContentsAsString(uint64_t callbackID); 761 void getSelectionAsWebArchiveData(uint64_t callbackID); 762 void getSourceForFrame(uint64_t frameID, uint64_t callbackID); 763 void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID); 764 void runJavaScriptInMainFrame(const String&, uint64_t callbackID); 765 void forceRepaint(uint64_t callbackID); 766 767 void preferencesDidChange(const WebPreferencesStore&); 768 void platformPreferencesDidChange(const WebPreferencesStore&); 769 void updatePreferences(const WebPreferencesStore&); 770 771 void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID); 772 void setUserAgent(const String&); 773 void setCustomTextEncodingName(const String&); 774 void suspendActiveDOMObjectsAndAnimations(); 775 void resumeActiveDOMObjectsAndAnimations(); 776 777#if PLATFORM(MAC) 778 void performDictionaryLookupAtLocation(const WebCore::FloatPoint&); 779 void performDictionaryLookupForRange(WebCore::Frame*, WebCore::Range*, NSDictionary *options); 780 781 void setWindowIsVisible(bool windowIsVisible); 782 void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates); 783 784 RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*); 785 void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects); 786 void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&); 787 void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count); 788#endif 789 790 void viewExposedRectChanged(const WebCore::FloatRect& exposedRect, bool clipsToExposedRect); 791 void setMainFrameIsScrollable(bool); 792 793 void unapplyEditCommand(uint64_t commandID); 794 void reapplyEditCommand(uint64_t commandID); 795 void didRemoveEditCommand(uint64_t commandID); 796 797 void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount); 798 void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount); 799 void getImageForFindMatch(uint32_t matchIndex); 800 void selectFindMatch(uint32_t matchIndex); 801 void hideFindUI(); 802 void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount); 803 804#if PLATFORM(QT) 805 void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area); 806#endif 807 808 void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex); 809 void setTextForActivePopupMenu(int32_t index); 810 811#if PLATFORM(GTK) 812 void failedToShowPopupMenu(); 813#endif 814#if PLATFORM(QT) 815 void hidePopupMenu(); 816 void selectedIndex(int32_t newIndex); 817#endif 818 819 void didChooseFilesForOpenPanel(const Vector<String>&); 820 void didCancelForOpenPanel(); 821#if ENABLE(WEB_PROCESS_SANDBOX) 822 void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&); 823#endif 824 825 void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed); 826 827 void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed); 828 829 void advanceToNextMisspelling(bool startBeforeSelection); 830 void changeSpellingToWord(const String& word); 831#if USE(APPKIT) 832 void uppercaseWord(); 833 void lowercaseWord(); 834 void capitalizeWord(); 835#endif 836 837#if ENABLE(CONTEXT_MENUS) 838 void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&); 839#endif 840 841 void changeSelectedIndex(int32_t index); 842 void setCanStartMediaTimerFired(); 843 void didUpdateInWindowStateTimerFired(); 844 845 bool canHandleUserEvents() const; 846 847 void setMainFrameInViewSourceMode(bool); 848 849 static bool platformCanHandleRequest(const WebCore::ResourceRequest&); 850 851 static PluginView* focusedPluginViewForFrame(WebCore::Frame*); 852 static PluginView* pluginViewForFrame(WebCore::Frame*); 853 854 void reportUsedFeatures(); 855 856 OwnPtr<WebCore::Page> m_page; 857 RefPtr<WebFrame> m_mainFrame; 858 RefPtr<InjectedBundleBackForwardList> m_backForwardList; 859 860 RefPtr<WebPageGroupProxy> m_pageGroup; 861 862 String m_userAgent; 863 864 WebCore::IntSize m_viewSize; 865 OwnPtr<DrawingArea> m_drawingArea; 866 867 HashSet<PluginView*> m_pluginViews; 868 bool m_hasSeenPlugin; 869 870 HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap; 871 872 bool m_useFixedLayout; 873 874 bool m_drawsBackground; 875 bool m_drawsTransparentBackground; 876 877 WebCore::Color m_underlayColor; 878 879 bool m_isInRedo; 880 bool m_isClosed; 881 882 bool m_tabToLinks; 883 884 bool m_asynchronousPluginInitializationEnabled; 885 bool m_asynchronousPluginInitializationEnabledForAllPlugins; 886 bool m_artificialPluginInitializationDelayEnabled; 887 888 bool m_scrollingPerformanceLoggingEnabled; 889 890 bool m_mainFrameIsScrollable; 891 892#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC) 893 bool m_readyToFindPrimarySnapshottedPlugin; 894 bool m_didFindPrimarySnapshottedPlugin; 895 unsigned m_numberOfPrimarySnapshotDetectionAttempts; 896 String m_primaryPlugInPageOrigin; 897 String m_primaryPlugInOrigin; 898 String m_primaryPlugInMimeType; 899 WebCore::RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer; 900#endif 901 902#if PLATFORM(MAC) 903 bool m_pdfPluginEnabled; 904 905 bool m_hasCachedWindowFrame; 906 907 // Whether the containing window is visible or not. 908 bool m_windowIsVisible; 909 910 // The frame of the containing window in screen coordinates. 911 WebCore::FloatRect m_windowFrameInScreenCoordinates; 912 913 // The frame of the containing window in unflipped screen coordinates. 914 WebCore::FloatRect m_windowFrameInUnflippedScreenCoordinates; 915 916 // The frame of the view in window coordinates. 917 WebCore::FloatRect m_viewFrameInWindowCoordinates; 918 919 // The accessibility position of the view. 920 WebCore::FloatPoint m_accessibilityPosition; 921 922 // The layer hosting mode. 923 LayerHostingMode m_layerHostingMode; 924 925 RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement; 926 927 WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted; 928 929#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL)) 930 GRefPtr<WebPageAccessibilityObject> m_accessibilityObject; 931 932#if USE(TEXTURE_MAPPER_GL) 933 // Our view's window in the UI process. 934 uint64_t m_nativeWindowHandle; 935#endif 936#endif 937 938 RefPtr<PageBanner> m_headerBanner; 939 RefPtr<PageBanner> m_footerBanner; 940 941 WebCore::RunLoop::Timer<WebPage> m_setCanStartMediaTimer; 942 WebCore::RunLoop::Timer<WebPage> m_sendDidUpdateInWindowStateTimer; 943 bool m_mayStartMediaWhenInWindow; 944 945 HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap; 946 947 WebCore::IntSize m_windowResizerSize; 948 949#if ENABLE(CONTEXT_MENUS) 950 InjectedBundlePageContextMenuClient m_contextMenuClient; 951#endif 952 InjectedBundlePageEditorClient m_editorClient; 953 InjectedBundlePageFormClient m_formClient; 954 InjectedBundlePageLoaderClient m_loaderClient; 955 InjectedBundlePagePolicyClient m_policyClient; 956 InjectedBundlePageResourceLoadClient m_resourceLoadClient; 957 InjectedBundlePageUIClient m_uiClient; 958#if ENABLE(FULLSCREEN_API) 959 InjectedBundlePageFullScreenClient m_fullScreenClient; 960#endif 961 InjectedBundlePageDiagnosticLoggingClient m_logDiagnosticMessageClient; 962 963 FindController m_findController; 964#if ENABLE(TOUCH_EVENTS) && PLATFORM(QT) 965 TapHighlightController m_tapHighlightController; 966#endif 967 PageOverlayList m_pageOverlays; 968 969 RefPtr<WebPage> m_underlayPage; 970 971#if ENABLE(INSPECTOR) 972 RefPtr<WebInspector> m_inspector; 973#endif 974#if ENABLE(FULLSCREEN_API) 975 RefPtr<WebFullScreenManager> m_fullScreenManager; 976#endif 977 RefPtr<WebPopupMenu> m_activePopupMenu; 978#if ENABLE(CONTEXT_MENUS) 979 RefPtr<WebContextMenu> m_contextMenu; 980#endif 981#if ENABLE(INPUT_TYPE_COLOR) 982 WebColorChooser* m_activeColorChooser; 983#endif 984 RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener; 985 RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager; 986 987#if ENABLE(GEOLOCATION) 988 GeolocationPermissionRequestManager m_geolocationPermissionRequestManager; 989#endif 990 991 OwnPtr<WebCore::PrintContext> m_printContext; 992#if PLATFORM(GTK) 993 RefPtr<WebPrintOperationGtk> m_printOperation; 994#endif 995 996 SandboxExtensionTracker m_sandboxExtensionTracker; 997 uint64_t m_pageID; 998 999 RefPtr<SandboxExtension> m_pendingDropSandboxExtension; 1000 Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload; 1001 1002 bool m_canRunBeforeUnloadConfirmPanel; 1003 1004 bool m_canRunModal; 1005 bool m_isRunningModal; 1006 1007 bool m_cachedMainFrameIsPinnedToLeftSide; 1008 bool m_cachedMainFrameIsPinnedToRightSide; 1009 bool m_cachedMainFrameIsPinnedToTopSide; 1010 bool m_cachedMainFrameIsPinnedToBottomSide; 1011 bool m_canShortCircuitHorizontalWheelEvents; 1012 unsigned m_numWheelEventHandlers; 1013 1014 unsigned m_cachedPageCount; 1015 1016 WebCore::IntSize m_minimumLayoutSize; 1017 bool m_autoSizingShouldExpandToViewHeight; 1018 1019#if ENABLE(CONTEXT_MENUS) 1020 bool m_isShowingContextMenu; 1021#endif 1022 1023 bool m_willGoToBackForwardItemCallbackEnabled; 1024 1025#if PLATFORM(QT) 1026 HashMap<String, QtNetworkReply*> m_applicationSchemeReplies; 1027#endif 1028#if ENABLE(PAGE_VISIBILITY_API) 1029 WebCore::PageVisibilityState m_visibilityState; 1030#endif 1031 WebInspectorClient* m_inspectorClient; 1032 1033 HashSet<String, CaseFoldingHash> m_mimeTypesWithCustomRepresentations; 1034 WebCore::Color m_backgroundColor; 1035 1036 HashSet<unsigned> m_activeRenderingSuppressionTokens; 1037 unsigned m_maximumRenderingSuppressionToken; 1038 1039 WebCore::ScrollPinningBehavior m_scrollPinningBehavior; 1040}; 1041 1042} // namespace WebKit 1043 1044#endif // WebPage_h 1045