summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.h')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.h1034
1 files changed, 749 insertions, 285 deletions
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h
index 7f50290b6..346d32dc2 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,51 +23,64 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebPage_h
-#define WebPage_h
+#pragma once
+#include "APIInjectedBundleEditorClient.h"
+#include "APIInjectedBundleFormClient.h"
+#include "APIInjectedBundlePageContextMenuClient.h"
+#include "APIInjectedBundlePageUIClient.h"
#include "APIObject.h"
-#include "DrawingArea.h"
+#include "Download.h"
+#include "EditingRange.h"
#include "FindController.h"
#include "GeolocationPermissionRequestManager.h"
#include "ImageOptions.h"
-#include "InjectedBundlePageDiagnosticLoggingClient.h"
-#include "InjectedBundlePageEditorClient.h"
-#include "InjectedBundlePageFormClient.h"
#include "InjectedBundlePageFullScreenClient.h"
#include "InjectedBundlePageLoaderClient.h"
#include "InjectedBundlePagePolicyClient.h"
#include "InjectedBundlePageResourceLoadClient.h"
-#include "InjectedBundlePageUIClient.h"
+#include "LayerTreeContext.h"
#include "MessageReceiver.h"
#include "MessageSender.h"
-#include "TapHighlightController.h"
#include "Plugin.h"
#include "SandboxExtension.h"
#include "ShareableBitmap.h"
-#include "WebUndoStep.h"
+#include "UserData.h"
+#include "UserMediaPermissionRequestManager.h"
+#include <WebCore/ActivityState.h>
#include <WebCore/DictationAlternative.h>
+#include <WebCore/DictionaryPopupInfo.h>
#include <WebCore/DragData.h>
#include <WebCore/Editor.h>
#include <WebCore/FrameLoaderTypes.h>
+#include <WebCore/HitTestResult.h>
+#include <WebCore/HysteresisActivity.h>
#include <WebCore/IntRect.h>
+#include <WebCore/IntSizeHash.h>
#include <WebCore/Page.h>
+#include <WebCore/PageOverlay.h>
#include <WebCore/PageVisibilityState.h>
-#include <WebCore/PlatformScreen.h>
+#include <WebCore/PlatformMouseEvent.h>
#include <WebCore/ScrollTypes.h>
#include <WebCore/TextChecking.h>
+#include <WebCore/TextIndicator.h>
#include <WebCore/UserActivity.h>
-#include <WebCore/ViewState.h>
+#include <WebCore/UserContentTypes.h>
+#include <WebCore/UserInterfaceLayoutDirection.h>
+#include <WebCore/UserScriptTypes.h>
+#include <WebCore/ViewportConfiguration.h>
#include <WebCore/WebCoreKeyboardUIMode.h>
+#include <memory>
#include <wtf/HashMap.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
+#include <wtf/MonotonicTime.h>
#include <wtf/RefPtr.h>
+#include <wtf/RunLoop.h>
+#include <wtf/Seconds.h>
#include <wtf/text/WTFString.h>
-#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+#if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
#include "WebPageAccessibilityObject.h"
-#include <wtf/gobject/GRefPtr.h>
+#include <wtf/glib/GRefPtr.h>
#endif
#if PLATFORM(GTK)
@@ -75,29 +88,33 @@
#include "WebPrintOperationGtk.h"
#endif
-#if ENABLE(TOUCH_EVENTS)
#if PLATFORM(IOS)
+#include "GestureTypes.h"
+#import "WebPageMessages.h"
+#endif
+
+#if ENABLE(IOS_TOUCH_EVENTS)
#include <WebKitAdditions/PlatformTouchEventIOS.h>
-#else
+#elif ENABLE(TOUCH_EVENTS)
#include <WebCore/PlatformTouchEvent.h>
#endif
+
+#if ENABLE(MAC_GESTURE_EVENTS)
+#include <WebKitAdditions/PlatformGestureEventMac.h>
#endif
#if ENABLE(CONTEXT_MENUS)
#include "InjectedBundlePageContextMenuClient.h"
#endif
-#if PLATFORM(MAC)
-#include "DictionaryPopupInfo.h"
-#include "LayerHostingContext.h"
+#if PLATFORM(COCOA)
#include "ViewGestureGeometryCollector.h"
#include <wtf/RetainPtr.h>
OBJC_CLASS CALayer;
+OBJC_CLASS NSArray;
OBJC_CLASS NSDictionary;
OBJC_CLASS NSObject;
OBJC_CLASS WKAccessibilityWebPageObject;
-
-#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
#endif
namespace API {
@@ -105,75 +122,101 @@ class Array;
}
namespace IPC {
- class ArgumentDecoder;
- class Connection;
+class Decoder;
+class Connection;
}
namespace WebCore {
- class GraphicsContext;
- class Frame;
- class FrameView;
- class HTMLPlugInElement;
- class IntPoint;
- class KeyboardEvent;
- class Page;
- class PrintContext;
- class Range;
- class ResourceResponse;
- class ResourceRequest;
- class SharedBuffer;
- class SubstituteData;
- class TextCheckingRequest;
- class URL;
- class VisibleSelection;
- struct KeypressCommand;
- struct TextCheckingResult;
+class DocumentLoader;
+class GraphicsContext;
+class Frame;
+class FrameView;
+class HTMLPlugInElement;
+class HTMLPlugInImageElement;
+class IntPoint;
+class KeyboardEvent;
+class MediaPlaybackTargetContext;
+class Page;
+class PrintContext;
+class Range;
+class ResourceResponse;
+class ResourceRequest;
+class SharedBuffer;
+class SubstituteData;
+class TextCheckingRequest;
+class URL;
+class VisibleSelection;
+struct Highlight;
+struct KeypressCommand;
+struct TextCheckingResult;
+
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+class MediaPlayerRequestInstallMissingPluginsCallback;
+#endif
}
namespace WebKit {
-
class DrawingArea;
class InjectedBundleBackForwardList;
class NotificationPermissionRequestManager;
+class PDFPlugin;
class PageBanner;
-class PageOverlay;
class PluginView;
-class SessionState;
+class RemoteWebInspectorUI;
+class VisibleContentRectUpdateInfo;
class WebColorChooser;
class WebContextMenu;
class WebContextMenuItemData;
+class WebDocumentLoader;
class WebEvent;
class WebFrame;
class WebFullScreenManager;
class WebImage;
class WebInspector;
class WebInspectorClient;
+class WebInspectorUI;
+class WebGestureEvent;
class WebKeyboardEvent;
class WebMouseEvent;
class WebNotificationClient;
class WebOpenPanelResultListener;
class WebPageGroupProxy;
+class WebPageOverlay;
+class WebPlaybackSessionManager;
class WebPopupMenu;
+class WebUndoStep;
+class WebUserContentController;
+class WebVideoFullscreenManager;
class WebWheelEvent;
+struct AssistedNodeInformation;
struct AttributedString;
+struct BackForwardListItemState;
+struct EditingRange;
struct EditorState;
+class GamepadData;
struct InteractionInformationAtPosition;
+struct InteractionInformationRequest;
+struct LoadParameters;
struct PrintInfo;
+struct WebsitePolicies;
struct WebPageCreationParameters;
struct WebPreferencesStore;
+struct WebSelectionData;
+
+#if PLATFORM(COCOA)
+class RemoteLayerTreeTransaction;
+#endif
#if ENABLE(TOUCH_EVENTS)
class WebTouchEvent;
#endif
-typedef Vector<RefPtr<PageOverlay>> PageOverlayList;
-
class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender {
public:
- static PassRefPtr<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
+ static Ref<WebPage> create(uint64_t pageID, WebPageCreationParameters&&);
virtual ~WebPage();
- void reinitializeWebPage(const WebPageCreationParameters&);
+ void reinitializeWebPage(WebPageCreationParameters&&);
void close();
@@ -181,8 +224,10 @@ public:
WebCore::Page* corePage() const { return m_page.get(); }
uint64_t pageID() const { return m_pageID; }
- uint64_t sessionID() const;
- void setSessionID(uint64_t sessionID) { m_sessionID = sessionID; }
+ WebCore::SessionID sessionID() const { return m_page->sessionID(); }
+ bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); }
+
+ void setSessionID(WebCore::SessionID);
void setSize(const WebCore::IntSize&);
const WebCore::IntSize& size() const { return m_viewSize; }
@@ -202,8 +247,25 @@ public:
void centerSelectionInVisibleArea();
-#if ENABLE(INSPECTOR)
- WebInspector* inspector();
+#if PLATFORM(COCOA)
+ void willCommitLayerTree(RemoteLayerTreeTransaction&);
+ void didFlushLayerTreeAtTime(MonotonicTime);
+#endif
+
+ enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
+
+ WebInspector* inspector(LazyCreationPolicy = LazyCreationPolicy::CreateIfNeeded);
+ WebInspectorUI* inspectorUI();
+ RemoteWebInspectorUI* remoteInspectorUI();
+ bool isInspectorPage() { return !!m_inspectorUI || !!m_remoteInspectorUI; }
+
+#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+ WebPlaybackSessionManager& playbackSessionManager();
+ WebVideoFullscreenManager& videoFullscreenManager();
+#endif
+#if PLATFORM(IOS)
+ void setAllowsMediaDocumentInlinePlayback(bool);
+ bool allowsMediaDocumentInlinePlayback() const { return m_allowsMediaDocumentInlinePlayback; }
#endif
#if ENABLE(FULLSCREEN_API)
@@ -213,33 +275,38 @@ public:
// -- Called by the DrawingArea.
// FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
- void drawPageOverlay(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect&);
void layoutIfNeeded();
// -- Called from WebCore clients.
-#if PLATFORM(MAC)
- bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*, bool saveCommands);
-#elif !PLATFORM(GTK)
bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
-#endif
void didStartPageTransition();
void didCompletePageTransition();
void didCommitLoad(WebFrame*);
+ void willReplaceMultipartContent(const WebFrame&);
+ void didReplaceMultipartContent(const WebFrame&);
void didFinishLoad(WebFrame*);
void show();
String userAgent(const WebCore::URL&) const;
+ String userAgent(WebFrame*, const WebCore::URL&) const;
String platformUserAgent(const WebCore::URL&) const;
- WebCore::IntRect windowResizerRect() const;
WebCore::KeyboardUIMode keyboardUIMode();
+ const String& overrideContentSecurityPolicy() const { return m_overrideContentSecurityPolicy; }
+
WebUndoStep* webUndoStep(uint64_t);
void addWebUndoStep(uint64_t, WebUndoStep*);
void removeWebEditCommand(uint64_t);
bool isInRedo() const { return m_isInRedo; }
+ bool isAlwaysOnLoggingAllowed() const;
void setActivePopupMenu(WebPopupMenu*);
+ void setHiddenPageTimerThrottlingIncreaseLimit(std::chrono::milliseconds limit)
+ {
+ m_page->setTimerAlignmentIntervalIncreaseLimit(limit);
+ }
+
#if ENABLE(INPUT_TYPE_COLOR)
WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
void setActiveColorChooser(WebColorChooser*);
@@ -248,36 +315,34 @@ public:
#endif
WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
- void setActiveOpenPanelResultListener(PassRefPtr<WebOpenPanelResultListener>);
+ void setActiveOpenPanelResultListener(Ref<WebOpenPanelResultListener>&&);
- void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
- void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
+ void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
// -- InjectedBundle methods
#if ENABLE(CONTEXT_MENUS)
- void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClientBase*);
+ void setInjectedBundleContextMenuClient(std::unique_ptr<API::InjectedBundle::PageContextMenuClient>);
#endif
- void initializeInjectedBundleEditorClient(WKBundlePageEditorClientBase*);
- void initializeInjectedBundleFormClient(WKBundlePageFormClientBase*);
+ void setInjectedBundleEditorClient(std::unique_ptr<API::InjectedBundle::EditorClient>);
+ void setInjectedBundleFormClient(std::unique_ptr<API::InjectedBundle::FormClient>);
void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClientBase*);
void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClientBase*);
void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClientBase*);
- void initializeInjectedBundleUIClient(WKBundlePageUIClientBase*);
+ void setInjectedBundleUIClient(std::unique_ptr<API::InjectedBundle::PageUIClient>);
#if ENABLE(FULLSCREEN_API)
void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClientBase*);
#endif
- void initializeInjectedBundleDiagnosticLoggingClient(WKBundlePageDiagnosticLoggingClientBase*);
#if ENABLE(CONTEXT_MENUS)
- InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; }
+ API::InjectedBundle::PageContextMenuClient& injectedBundleContextMenuClient() { return *m_contextMenuClient.get(); }
#endif
- InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
- InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
+ API::InjectedBundle::EditorClient& injectedBundleEditorClient() { return *m_editorClient.get(); }
+ API::InjectedBundle::FormClient& injectedBundleFormClient() { return *m_formClient.get(); }
InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
- InjectedBundlePageUIClient& injectedBundleUIClient() { return m_uiClient; }
- InjectedBundlePageDiagnosticLoggingClient& injectedBundleDiagnosticLoggingClient() { return m_logDiagnosticMessageClient; }
+ API::InjectedBundle::PageUIClient& injectedBundleUIClient() { return *m_uiClient.get(); }
#if ENABLE(FULLSCREEN_API)
InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
#endif
@@ -286,20 +351,24 @@ public:
WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
- WebCore::Frame* mainFrame() const; // May return 0.
+ WebCore::MainFrame* mainFrame() const; // May return 0.
WebCore::FrameView* mainFrameView() const; // May return 0.
- PassRefPtr<WebCore::Range> currentSelectionAsRange();
+ RefPtr<WebCore::Range> currentSelectionAsRange();
#if ENABLE(NETSCAPE_PLUGIN_API)
- PassRefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
+ RefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
#endif
#if ENABLE(WEBGL)
WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const String&);
-#endif // ENABLE(WEBGL)
+ WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const String&);
+#endif
- EditorState editorState() const;
+ enum class IncludePostLayoutDataHint { No, Yes };
+ EditorState editorState(IncludePostLayoutDataHint = IncludePostLayoutDataHint::Yes) const;
+ void sendPostLayoutEditorStateIfNeeded();
+ void updateEditorStateAfterLayoutIfEditabilityChanged();
String renderTreeExternalRepresentation() const;
String renderTreeExternalRepresentationForPrinting() const;
@@ -308,7 +377,7 @@ public:
void setTracksRepaints(bool);
bool isTrackingRepaints() const;
void resetTrackedRepaints();
- PassRefPtr<API::Array> trackedRepaintRects();
+ Ref<API::Array> trackedRepaintRects();
void executeEditingCommand(const String& commandName, const String& argument);
bool isEditingCommandEnabled(const String& commandName);
@@ -322,52 +391,62 @@ public:
double pageZoomFactor() const;
void setPageZoomFactor(double);
void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
- void windowScreenDidChange(uint64_t);
+ void windowScreenDidChange(uint32_t);
+
+ void accessibilitySettingsDidChange();
void scalePage(double scale, const WebCore::IntPoint& origin);
+ void scalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates);
double pageScaleFactor() const;
+ double totalScaleFactor() const;
+ double viewScaleFactor() const;
+ void scaleView(double scale);
void setUseFixedLayout(bool);
bool useFixedLayout() const { return m_useFixedLayout; }
- void setFixedLayoutSize(const WebCore::IntSize&);
+ bool setFixedLayoutSize(const WebCore::IntSize&);
+ WebCore::IntSize fixedLayoutSize() const;
void listenForLayoutMilestones(uint32_t /* LayoutMilestones */);
void setSuppressScrollbarAnimations(bool);
-
+
+ void setEnableVerticalRubberBanding(bool);
+ void setEnableHorizontalRubberBanding(bool);
+
void setBackgroundExtendsBeyondPage(bool);
void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
void setPaginationBehavesLikeColumns(bool);
void setPageLength(double);
void setGapBetweenPages(double);
-
- void postInjectedBundleMessage(const String& messageName, IPC::MessageDecoder&);
+ void setPaginationLineGridEnabled(bool);
+
+ void postInjectedBundleMessage(const String& messageName, const UserData&);
bool drawsBackground() const { return m_drawsBackground; }
- bool drawsTransparentBackground() const { return m_drawsTransparentBackground; }
void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; }
WebCore::Color underlayColor() const { return m_underlayColor; }
void stopLoading();
void stopLoadingFrame(uint64_t frameID);
+ bool defersLoading() const;
void setDefersLoading(bool deferLoading);
-#if USE(ACCELERATED_COMPOSITING)
void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
void exitAcceleratedCompositingMode();
-#endif
void addPluginView(PluginView*);
void removePluginView(PluginView*);
- bool isVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
+ bool isVisible() const { return m_activityState & WebCore::ActivityState::IsVisible; }
+ bool isVisibleOrOccluded() const { return m_activityState & WebCore::ActivityState::IsVisibleOrOccluded; }
LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
- void setLayerHostingMode(unsigned);
+ void setLayerHostingMode(LayerHostingMode);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
void updatePluginsActiveAndFocusedState();
const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
@@ -375,35 +454,41 @@ public:
bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
-#if !PLATFORM(IOS)
- void setTopOverhangImage(PassRefPtr<WebImage>);
- void setBottomOverhangImage(PassRefPtr<WebImage>);
-#endif // !PLATFORM(IOS)
-
void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
-#endif // PLATFORM(MAC)
+#endif
+
+#if PLATFORM(MAC)
+ void setTopOverhangImage(WebImage*);
+ void setBottomOverhangImage(WebImage*);
+#endif
bool windowIsFocused() const;
bool windowAndWebPageAreFocused() const;
- void installPageOverlay(PassRefPtr<PageOverlay>, bool shouldFadeIn = false);
- void uninstallPageOverlay(PageOverlay*, bool shouldFadeOut = false);
- bool hasPageOverlay() const { return m_pageOverlays.size(); }
- PageOverlayList& pageOverlays() { return m_pageOverlays; }
#if !PLATFORM(IOS)
- void setHeaderPageBanner(PassRefPtr<PageBanner>);
+ void setHeaderPageBanner(PageBanner*);
PageBanner* headerPageBanner();
- void setFooterPageBanner(PassRefPtr<PageBanner>);
+ void setFooterPageBanner(PageBanner*);
PageBanner* footerPageBanner();
void hidePageBanners();
void showPageBanners();
-#endif // !PLATFORM(IOS)
-
- WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
- WebCore::IntRect windowToScreen(const WebCore::IntRect&);
+
+ void setHeaderBannerHeightForTesting(int);
+ void setFooterBannerHeightForTesting(int);
+#endif
- PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double scaleFactor, SnapshotOptions);
+ WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
+ WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
+
+#if PLATFORM(IOS)
+ WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&);
+ WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&);
+#endif
+
+ PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double additionalScaleFactor, SnapshotOptions);
+ PassRefPtr<WebImage> snapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
+ PassRefPtr<WebImage> snapshotNode(WebCore::Node&, SnapshotOptions, unsigned maximumPixelCount = std::numeric_limits<unsigned>::max());
static const WebEvent* currentEvent();
@@ -414,34 +499,115 @@ public:
#endif
#if PLATFORM(IOS)
- void handleTap(const WebCore::IntPoint&);
+ void savePageState(WebCore::HistoryItem&);
+ void restorePageState(const WebCore::HistoryItem&);
+#endif
+
+#if ENABLE(MEDIA_STREAM)
+ UserMediaPermissionRequestManager& userMediaPermissionRequestManager() { return m_userMediaPermissionRequestManager; }
+#endif
+
+ void elementDidFocus(WebCore::Node*);
+ void elementDidBlur(WebCore::Node*);
+ void resetAssistedNodeForFrame(WebFrame*);
+
+ void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
+
+#if PLATFORM(IOS)
+ WebCore::FloatSize screenSize() const;
+ WebCore::FloatSize availableScreenSize() const;
+ int32_t deviceOrientation() const { return m_deviceOrientation; }
+ void didReceiveMobileDocType(bool);
+
+ void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
+ bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
+
+ double minimumPageScaleFactor() const;
+ double maximumPageScaleFactor() const;
+ double maximumPageScaleFactorIgnoringAlwaysScalable() const;
+ bool allowsUserScaling() const;
+ bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; }
+
+ void handleTap(const WebCore::IntPoint&, uint64_t lastLayerTreeTransactionId);
+ void potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
+ void commitPotentialTap(uint64_t lastLayerTreeTransactionId);
+ void commitPotentialTapFailed();
+ void cancelPotentialTap();
+ void cancelPotentialTapInFrame(WebFrame&);
void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
+ void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
+ void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
+
void blurAssistedNode();
- void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
+ void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, uint64_t callbackID);
void updateSelectionWithTouches(const WebCore::IntPoint& point, uint32_t touches, bool baseIsStart, uint64_t callbackID);
+ void updateBlockSelectionWithTouch(const WebCore::IntPoint&, uint32_t touch, uint32_t handlePosition);
void selectWithTwoTouches(const WebCore::IntPoint& from, const WebCore::IntPoint& to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
void extendSelection(uint32_t granularity);
- void elementDidFocus(WebCore::Node*);
- void elementDidBlur(WebCore::Node*);
+ void selectWordBackward();
+ void moveSelectionByOffset(int32_t offset, uint64_t callbackID);
+ void selectTextWithGranularityAtPoint(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
+ void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&, uint32_t granularity, uint32_t direction, bool isInteractingWithAssistedNode, uint64_t callbackID);
+ void moveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, uint64_t callbackID);
+ void selectPositionAtPoint(const WebCore::IntPoint&, bool isInteractingWithAssistedNode, uint64_t callbackID);
+ void beginSelectionInDirection(uint32_t direction, uint64_t callbackID);
+ void updateSelectionWithExtentPoint(const WebCore::IntPoint&, bool isInteractingWithAssistedNode, uint64_t callbackID);
+ void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
+
+ void requestDictationContext(uint64_t callbackID);
+ void replaceDictatedText(const String& oldText, const String& newText);
+ void replaceSelectedText(const String& oldText, const String& newText);
void requestAutocorrectionData(const String& textForAutocorrection, uint64_t callbackID);
void applyAutocorrection(const String& correction, const String& originalText, uint64_t callbackID);
+ void syncApplyAutocorrection(const String& correction, const String& originalText, bool& correctionApplied);
void requestAutocorrectionContext(uint64_t callbackID);
void getAutocorrectionContext(String& beforeText, String& markedText, String& selectedText, String& afterText, uint64_t& location, uint64_t& length);
- void insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
- void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd);
- void confirmComposition();
- void getPositionInformation(const WebCore::IntPoint&, InteractionInformationAtPosition&);
- void requestPositionInformation(const WebCore::IntPoint&);
+ void getPositionInformation(const InteractionInformationRequest&, InteractionInformationAtPosition&);
+ void requestPositionInformation(const InteractionInformationRequest&);
+ void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
+ void stopInteraction();
+ void performActionOnElement(uint32_t action);
+ void focusNextAssistedNode(bool isForward, uint64_t callbackID);
+ void setAssistedNodeValue(const String&);
+ void setAssistedNodeValueAsNumber(double);
+ void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection);
+ WebCore::IntRect rectForElementAtInteractionLocation();
+ void updateSelectionAppearance();
+ void getSelectionContext(uint64_t callbackID);
+ void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, uint64_t requestID);
+ void getRectsForGranularityWithSelectionOffset(uint32_t, int32_t, uint64_t callbackID);
+ void getRectsAtSelectionOffsetWithText(int32_t, const String&, uint64_t callbackID);
+#if ENABLE(IOS_TOUCH_EVENTS)
+ void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
+#endif
+
+ void contentSizeCategoryDidChange(const String&);
+ void executeEditCommandWithCallback(const String&, uint64_t callbackID);
+
+ Seconds eventThrottlingDelay() const;
+
+ void showInspectorHighlight(const WebCore::Highlight&);
+ void hideInspectorHighlight();
+
+ void showInspectorIndication();
+ void hideInspectorIndication();
+
+ void enableInspectorNodeSearch();
+ void disableInspectorNodeSearch();
+
+ void setForceAlwaysUserScalable(bool);
#endif
+ void setLayerTreeStateIsFrozen(bool);
+ void markLayersVolatile(std::function<void ()> completionHandler = { });
+ void cancelMarkLayersVolatile();
+
NotificationPermissionRequestManager* notificationPermissionRequestManager();
void pageDidScroll();
-#if USE(TILED_BACKING_STORE)
+#if USE(COORDINATED_GRAPHICS)
void pageDidRequestScroll(const WebCore::IntPoint&);
- void setFixedVisibleContentRect(const WebCore::IntRect&);
- void sendViewportAttributesChanged();
#endif
#if ENABLE(CONTEXT_MENUS)
@@ -452,7 +618,7 @@ public:
bool hasLocalDataForURL(const WebCore::URL&);
String cachedResponseMIMETypeForURL(const WebCore::URL&);
String cachedSuggestedFilenameForURL(const WebCore::URL&);
- PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::URL&);
+ RefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::URL&);
static bool canHandleRequest(const WebCore::ResourceRequest&);
@@ -478,23 +644,24 @@ public:
SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
-#if PLATFORM(EFL)
- void setThemePath(const String&);
-#endif
-
-#if USE(TILED_BACKING_STORE)
- void commitPageTransitionViewport();
-#endif
-
#if PLATFORM(GTK)
- void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
+ void setComposition(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeLength);
void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
void cancelComposition();
+
+ void collapseSelectionInFrame(uint64_t frameID);
+#endif
+
+#if PLATFORM (GTK) && HAVE(GTK_GESTURES)
+ void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& result);
#endif
+ void didApplyStyle();
void didChangeSelection();
+ void discardedComposition();
+ void canceledComposition();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
WKAccessibilityWebPageObject* accessibilityRemoteObject();
NSObject *accessibilityObjectForMainFramePlugin();
@@ -502,36 +669,33 @@ public:
void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
- void cancelComposition(EditorState& newState);
-#if !PLATFORM(IOS)
- void insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool& handled, EditorState& newState);
- void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, EditorState& newState);
- void confirmComposition(EditorState& newState);
-#endif
- void getMarkedRange(uint64_t& location, uint64_t& length);
- void getSelectedRange(uint64_t& location, uint64_t& length);
- void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
- void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
- void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
- void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState);
+ void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false, uint32_t editingRangeIsRelativeTo = (uint32_t)EditingRangeIsRelativeTo::EditableRoot, bool suppressSelectionUpdate = false);
+ void getMarkedRangeAsync(uint64_t callbackID);
+ void getSelectedRangeAsync(uint64_t callbackID);
+ void characterIndexForPointAsync(const WebCore::IntPoint&, uint64_t callbackID);
+ void firstRectForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
+ void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
+ void confirmCompositionAsync();
+
+#if PLATFORM(MAC)
+ void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool registerUndoGroup = false);
+ void attributedSubstringForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
+ void fontAtSelection(uint64_t callbackID);
+#endif
+
void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result);
void getStringSelectionForPasteboard(WTF::String& stringValue);
void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size);
void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result);
void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result);
bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*);
- void insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool& handled, EditorState& newState);
-#elif PLATFORM(EFL)
- void confirmComposition(const String& compositionString);
- void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
- void cancelComposition();
-#elif PLATFORM(GTK)
-#if USE(TEXTURE_MAPPER_GL)
- void setAcceleratedCompositingWindowId(int64_t nativeWindowHandle);
+
+#if ENABLE(SERVICE_CONTROLS)
+ void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
#endif
#endif
-#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+#if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
void updateAccessibilityTree();
#endif
@@ -543,13 +707,12 @@ public:
// any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
void dummy(bool&);
-#if PLATFORM(MAC)
- void performDictionaryLookupForSelection(WebCore::Frame*, const WebCore::VisibleSelection&);
-
+#if PLATFORM(COCOA)
bool isSpeaking();
void speak(const String&);
void stopSpeaking();
+ void performDictionaryLookupForSelection(WebCore::Frame*, const WebCore::VisibleSelection&, WebCore::TextIndicatorPresentationTransition);
#endif
bool isSmartInsertDeleteEnabled();
@@ -560,35 +723,57 @@ public:
void replaceSelectionWithText(WebCore::Frame*, const String&);
void clearSelection();
+ void restoreSelectionInFocusedEditableElement();
#if ENABLE(DRAG_SUPPORT)
#if PLATFORM(GTK)
- void performDragControllerAction(uint64_t action, WebCore::DragData);
+ void performDragControllerAction(uint64_t action, const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t draggingSourceOperationMask, WebSelectionData&&, uint32_t flags);
#else
- 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&);
+ void performDragControllerAction(uint64_t action, const WebCore::DragData&, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
#endif
void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
void willPerformLoadDragDestinationAction();
void mayPerformUploadDragDestinationAction();
+
+ void willStartDrag() { ASSERT(!m_isStartingDrag); m_isStartingDrag = true; }
+ void didStartDrag() { ASSERT(m_isStartingDrag); m_isStartingDrag = false; }
+ void dragCancelled() { m_isStartingDrag = false; }
#endif // ENABLE(DRAG_SUPPORT)
void beginPrinting(uint64_t frameID, const PrintInfo&);
void endPrinting();
void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
-#if PLATFORM(MAC)
+ void computePagesForPrintingImpl(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor);
+#if PLATFORM(COCOA)
void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, uint64_t callbackID);
void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, uint64_t callbackID);
+ void drawPagesToPDFImpl(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData);
+#if PLATFORM(IOS)
+ void computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, uint64_t callbackID, PassRefPtr<Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply>);
+#endif
#elif PLATFORM(GTK)
void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
void didFinishPrintOperation(const WebCore::ResourceError&, uint64_t callbackID);
#endif
+ void addResourceRequest(unsigned long, const WebCore::ResourceRequest&);
+ void removeResourceRequest(unsigned long);
+
void setMediaVolume(float);
+ void setMuted(WebCore::MediaProducer::MutedStateFlags);
void setMayStartMediaWhenInWindow(bool);
+#if ENABLE(MEDIA_SESSION)
+ void handleMediaEvent(uint32_t /* WebCore::MediaEventType */);
+ void setVolumeOfMediaElement(double, uint64_t);
+#endif
+
void updateMainFrameScrollOffsetPinning();
+ bool mainFrameHasCustomContentProvider() const;
+ void addMIMETypeWithCustomContentProvider(const String&);
+
void mainFrameDidLayout();
bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
@@ -602,13 +787,11 @@ public:
void setDeviceScaleFactor(float);
float deviceScaleFactor() const;
- void setMemoryCacheMessagesEnabled(bool);
-
void forceRepaintWithoutCallback();
void unmarkAllMisspellings();
void unmarkAllBadGrammar();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
void handleAlternativeTextUIResult(const String&);
#endif
@@ -623,22 +806,42 @@ public:
void wheelEvent(const WebWheelEvent&);
- void numWheelEventHandlersChanged(unsigned);
+ void wheelEventHandlersChanged(bool);
void recomputeShortCircuitHorizontalWheelEventsState();
- void setVisibilityStatePrerender();
+#if ENABLE(MAC_GESTURE_EVENTS)
+ void gestureEvent(const WebGestureEvent&);
+#endif
+
void updateVisibilityState(bool isInitialState = false);
#if PLATFORM(IOS)
- void didFinishScrolling(const WebCore::FloatPoint& contentOffset);
- void didFinishZooming(float);
+ void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&);
+ void setMaximumUnobscuredSize(const WebCore::FloatSize&);
+ void setDeviceOrientation(int32_t);
+ void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double scale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID);
+ void synchronizeDynamicViewportUpdate(double& newTargetScale, WebCore::FloatPoint& newScrollPosition, uint64_t& nextValidLayerTreeTransactionID);
+ void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
+ bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
+ void willStartUserTriggeredZooming();
+ void applicationWillResignActive();
+ void applicationDidEnterBackground(bool isSuspendedUnderLock);
+ void applicationDidFinishSnapshottingAfterEnteringBackground();
+ void applicationWillEnterForeground(bool isSuspendedUnderLock);
+ void applicationDidBecomeActive();
+ void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
+ void completePendingSyntheticClickForContentChangeObserver();
+#endif
+
+#if ENABLE(IOS_TOUCH_EVENTS)
+ void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
#endif
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
#endif
- bool canPluginHandleResponse(const WebCore::ResourceResponse& response);
+ bool shouldUseCustomContentProviderForResponse(const WebCore::ResourceResponse&);
bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
@@ -652,14 +855,16 @@ public:
bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
void setScrollingPerformanceLoggingEnabled(bool);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
bool shouldUsePDFPlugin() const;
bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; }
+
+ NSDictionary *dataDetectionContext() const { return m_dataDetectionContext.get(); }
#endif
void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
#endif
@@ -682,6 +887,12 @@ public:
void determinePrimarySnapshottedPlugInTimerFired();
void resetPrimarySnapshottedPlugIn();
bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const;
+ bool plugInIntersectsSearchRect(WebCore::HTMLPlugInImageElement& pluginImageElement);
+ bool plugInIsPrimarySize(WebCore::HTMLPlugInImageElement& pluginImageElement, unsigned &pluginArea);
+#endif
+
+#if ENABLE(DATA_DETECTION)
+ void setDataDetectionResults(NSArray *);
#endif
unsigned extendIncrementalRenderingSuppression();
@@ -691,75 +902,164 @@ public:
WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
- WKTypeRef pageOverlayCopyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter);
- WKArrayRef pageOverlayCopyAccessibilityAttributesNames(bool parameterizedNames);
+ std::optional<WebCore::ScrollbarOverlayStyle> scrollbarOverlayStyle() { return m_scrollbarOverlayStyle; }
+ void setScrollbarOverlayStyle(std::optional<uint32_t /* WebCore::ScrollbarOverlayStyle */> scrollbarStyle);
- PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
+ Ref<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
+ void updateCachedDocumentLoader(WebDocumentLoader&, WebCore::Frame&);
+
+ void getBytecodeProfile(uint64_t callbackID);
+ void getSamplingProfilerOutput(uint64_t callbackID);
+
+#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
+ void handleTelephoneNumberClick(const String& number, const WebCore::IntPoint&);
+ void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&);
+#endif
+
+ void didChangeScrollOffsetForFrame(WebCore::Frame*);
+
+ void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
+ bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
+
+ void postMessage(const String& messageName, API::Object* messageBody);
+ void postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
+
+#if PLATFORM(GTK)
+ void setInputMethodState(bool);
+#endif
+
+ void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
+#if ENABLE(VIDEO)
+#if USE(GSTREAMER)
+ void requestInstallMissingMediaPlugins(const String& details, const String& description, WebCore::MediaPlayerRequestInstallMissingPluginsCallback&);
+#endif
+#endif
+
+ void addUserScript(const String& source, WebCore::UserContentInjectedFrames, WebCore::UserScriptInjectionTime);
+ void addUserStyleSheet(const String& source, WebCore::UserContentInjectedFrames);
+ void removeAllUserContent();
+
+ void dispatchDidReachLayoutMilestone(WebCore::LayoutMilestones);
+
+ void didRestoreScrollPosition();
+
+ bool isControlledByAutomation() const;
+ void setControlledByAutomation(bool);
+
+ void insertNewlineInQuotedContent();
+
+#if USE(OS_STATE)
+ std::chrono::system_clock::time_point loadCommitTime() const { return m_loadCommitTime; }
+#endif
+
+#if ENABLE(GAMEPAD)
+ void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible);
+#endif
+
+#if ENABLE(POINTER_LOCK)
+ void didAcquirePointerLock();
+ void didNotAcquirePointerLock();
+ void didLosePointerLock();
+#endif
+
+ void didGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID);
+ void setUseIconLoadingClient(bool);
private:
- WebPage(uint64_t pageID, const WebPageCreationParameters&);
+ WebPage(uint64_t pageID, WebPageCreationParameters&&);
+
+ void updateThrottleState();
+ void updateUserActivity();
// IPC::MessageSender
- virtual IPC::Connection* messageSenderConnection() override;
- virtual uint64_t messageSenderDestinationID() override;
+ IPC::Connection* messageSenderConnection() override;
+ uint64_t messageSenderDestinationID() override;
void platformInitialize();
+ void platformDetach();
+ void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
- void didReceiveWebPageMessage(IPC::Connection*, IPC::MessageDecoder&);
- void didReceiveSyncWebPageMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
+ void didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&);
+ void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
-#if !PLATFORM(MAC)
+#if PLATFORM(IOS)
+ void resetViewportDefaultConfiguration(WebFrame* mainFrame);
+ void viewportConfigurationChanged();
+ void updateViewportSizeForCSSViewportUnits();
+
+ static void convertSelectionRectsToRootView(WebCore::FrameView*, Vector<WebCore::SelectionRect>&);
+ PassRefPtr<WebCore::Range> rangeForWebSelectionAtPosition(const WebCore::IntPoint&, const WebCore::VisiblePosition&, SelectionFlags&);
+ PassRefPtr<WebCore::Range> rangeForBlockAtPoint(const WebCore::IntPoint&);
+ void computeExpandAndShrinkThresholdsForHandle(const WebCore::IntPoint&, SelectionHandlePosition, float& growThreshold, float& shrinkThreshold);
+ PassRefPtr<WebCore::Range> changeBlockSelection(const WebCore::IntPoint&, SelectionHandlePosition, float& growThreshold, float& shrinkThreshold, SelectionFlags&);
+ PassRefPtr<WebCore::Range> expandedRangeFromHandle(WebCore::Range*, SelectionHandlePosition);
+ PassRefPtr<WebCore::Range> contractedRangeFromHandle(WebCore::Range* currentRange, SelectionHandlePosition, SelectionFlags&);
+ void getAssistedNodeInformation(AssistedNodeInformation&);
+ void platformInitializeAccessibility();
+ void handleSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint& location);
+ void completeSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint& location, WebCore::SyntheticClickType);
+ void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
+ void resetTextAutosizing();
+ WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&, const WebCore::IntPoint&, bool isInteractingWithAssistedNode);
+ PassRefPtr<WebCore::Range> rangeForGranularityAtPoint(const WebCore::Frame&, const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode);
+ bool shouldSwitchToBlockModeForHandle(const WebCore::IntPoint& handlePoint, SelectionHandlePosition);
+ RefPtr<WebCore::Range> switchToBlockSelectionAtPoint(const WebCore::IntPoint&, SelectionHandlePosition);
+#if ENABLE(DATA_INTERACTION)
+ void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
+#endif
+#endif
+
+#if !PLATFORM(COCOA)
static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
#endif
+
bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
#if PLATFORM(MAC)
bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
#endif
+ bool markLayersVolatileImmediatelyIfPossible();
+ void layerVolatilityTimerFired();
+ void callVolatilityCompletionHandlers();
+
String sourceForFrame(WebFrame*);
- void loadDataImpl(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::URL& baseURL, const WebCore::URL& failingURL, IPC::MessageDecoder&);
- void loadString(const String&, const String& MIMEType, const WebCore::URL& baseURL, const WebCore::URL& failingURL, IPC::MessageDecoder&);
+ void loadDataImpl(uint64_t navigationID, PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::URL& baseURL, const WebCore::URL& failingURL, const UserData&);
+ void loadStringImpl(uint64_t navigationID, const String&, const String& MIMEType, const WebCore::URL& baseURL, const WebCore::URL& failingURL, const UserData&);
bool platformHasLocalDataForURL(const WebCore::URL&);
// Actions
void tryClose();
- void loadRequest(const WebCore::ResourceRequest&, const SandboxExtension::Handle&, IPC::MessageDecoder&);
- void loadData(const IPC::DataReference&, const String& MIMEType, const String& encodingName, const String& baseURL, IPC::MessageDecoder&);
- void loadHTMLString(const String& htmlString, const String& baseURL, IPC::MessageDecoder&);
- void loadAlternateHTMLString(const String& htmlString, const String& baseURL, const String& unreachableURL, IPC::MessageDecoder&);
- void loadPlainTextString(const String&, IPC::MessageDecoder&);
- void loadWebArchiveData(const IPC::DataReference&, IPC::MessageDecoder&);
- void reload(bool reloadFromOrigin, const SandboxExtension::Handle&);
- void goForward(uint64_t);
- void goBack(uint64_t);
- void goToBackForwardItem(uint64_t);
+ void platformDidReceiveLoadParameters(const LoadParameters&);
+ void loadRequest(const LoadParameters&);
+ void loadData(const LoadParameters&);
+ void loadString(const LoadParameters&);
+ void loadAlternateHTMLString(const LoadParameters&);
+ void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
+ void reload(uint64_t navigationID, bool reloadFromOrigin, bool contentBlockersEnabled, const SandboxExtension::Handle&);
+ void goForward(uint64_t navigationID, uint64_t);
+ void goBack(uint64_t navigationID, uint64_t);
+ void goToBackForwardItem(uint64_t navigationID, uint64_t);
void tryRestoreScrollPosition();
- void setActive(bool);
- void setFocused(bool);
- void setViewIsVisible(bool);
- void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&);
- void setWindowResizerSize(const WebCore::IntSize&);
- void setIsInWindow(bool);
- void setIsVisuallyIdle(bool);
- void setViewState(WebCore::ViewState::Flags, bool wantsDidUpdateViewState);
- void setViewStateInternal(WebCore::ViewState::Flags, bool isInitialState);
+ void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, uint64_t callbackID);
+ void updateIsInWindow(bool isInitialState = false);
+ void setActivityState(WebCore::ActivityState::Flags, bool wantsDidUpdateActivityState, const Vector<uint64_t>& callbackIDs);
void validateCommand(const String&, uint64_t);
- void executeEditCommand(const String&);
+ void executeEditCommand(const String&, const String&);
+ void setEditable(bool);
void mouseEvent(const WebMouseEvent&);
- void mouseEventSyncForTesting(const WebMouseEvent&, bool&);
- void wheelEventSyncForTesting(const WebWheelEvent&, bool&);
void keyEvent(const WebKeyboardEvent&);
- void keyEventSyncForTesting(const WebKeyboardEvent&, bool&);
-#if ENABLE(TOUCH_EVENTS)
+#if ENABLE(IOS_TOUCH_EVENTS)
+ void touchEventSync(const WebTouchEvent&, bool& handled);
+#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&);
- void touchEventSyncForTesting(const WebTouchEvent&, bool& handled);
#endif
#if ENABLE(CONTEXT_MENUS)
void contextMenuHidden() { m_isShowingContextMenu = false; }
+ void contextMenuForKeyEvent();
#endif
static bool scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
@@ -767,20 +1067,29 @@ private:
void loadURLInFrame(const String&, uint64_t frameID);
- uint64_t restoreSession(const SessionState&);
- void restoreSessionAndNavigateToCurrentItem(const SessionState&);
-
+ enum class WasRestoredByAPIRequest { No, Yes };
+ void restoreSessionInternal(const Vector<BackForwardListItemState>&, WasRestoredByAPIRequest);
+ void restoreSession(const Vector<BackForwardListItemState>&);
void didRemoveBackForwardItem(uint64_t);
+#if ENABLE(REMOTE_INSPECTOR)
+ void setAllowsRemoteInspection(bool);
+ void setRemoteInspectionNameOverride(const String&);
+#endif
+
void setDrawsBackground(bool);
- void setDrawsTransparentBackground(bool);
+
+#if HAVE(COREANIMATION_FENCES)
+ void setTopContentInsetFenced(float, IPC::Attachment);
+#endif
+ void setTopContentInset(float);
void viewWillStartLiveResize();
void viewWillEndLiveResize();
void getContentsAsString(uint64_t callbackID);
#if ENABLE(MHTML)
- void getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding);
+ void getContentsAsMHTMLData(uint64_t callbackID);
#endif
void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
@@ -791,20 +1100,26 @@ private:
void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
void forceRepaint(uint64_t callbackID);
+ void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, uint64_t callbackID);
void preferencesDidChange(const WebPreferencesStore&);
void platformPreferencesDidChange(const WebPreferencesStore&);
void updatePreferences(const WebPreferencesStore&);
- void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID);
+ void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t navigationID, DownloadID);
void setUserAgent(const String&);
void setCustomTextEncodingName(const String&);
void suspendActiveDOMObjectsAndAnimations();
void resumeActiveDOMObjectsAndAnimations();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
- void performDictionaryLookupForRange(WebCore::Frame*, WebCore::Range*, NSDictionary *options);
+ void performDictionaryLookupOfCurrentSelection();
+ void performDictionaryLookupForRange(WebCore::Frame*, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
+ WebCore::DictionaryPopupInfo dictionaryPopupInfoForRange(WebCore::Frame*, WebCore::Range&, NSDictionary **options, WebCore::TextIndicatorPresentationTransition);
+#if ENABLE(PDFKIT_PLUGIN)
+ WebCore::DictionaryPopupInfo dictionaryPopupInfoForSelectionInPDFPlugin(PDFSelection *, PDFPlugin&, NSDictionary **options, WebCore::TextIndicatorPresentationTransition);
+#endif
void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
@@ -828,7 +1143,7 @@ private:
void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
#if USE(COORDINATED_GRAPHICS)
- void findZoomableAreaForPoint(const WebCore::IntPoint&, const WebCore::IntSize& area);
+ void sendViewportAttributesChanged(const WebCore::ViewportArguments&);
#endif
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
@@ -838,9 +1153,12 @@ private:
void failedToShowPopupMenu();
#endif
+#if PLATFORM(IOS)
+ void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const IPC::DataReference& iconData);
+#endif
void didChooseFilesForOpenPanel(const Vector<String>&);
void didCancelForOpenPanel();
-#if ENABLE(WEB_PROCESS_SANDBOX)
+#if ENABLE(SANDBOX_EXTENSIONS)
void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
#endif
@@ -848,6 +1166,17 @@ private:
void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
+#if ENABLE(MEDIA_STREAM)
+ void userMediaAccessWasGranted(uint64_t userMediaID, const String& audioDeviceUID, const String& videoDeviceUID);
+ void userMediaAccessWasDenied(uint64_t userMediaID, uint64_t reason, String invalidConstraint);
+
+ void didCompleteMediaDeviceEnumeration(uint64_t userMediaID, const Vector<WebCore::CaptureDevice>& devices, const String& deviceIdentifierHashSalt, bool originHasPersistentAccess);
+#if ENABLE(SANDBOX_EXTENSIONS)
+ void grantUserMediaDeviceSandboxExtensions(const MediaDeviceSandboxExtensions&);
+ void revokeUserMediaDeviceSandboxExtensions(const Vector<String>&);
+#endif
+#endif
+
void advanceToNextMisspelling(bool startBeforeSelection);
void changeSpellingToWord(const String& word);
#if USE(APPKIT)
@@ -862,23 +1191,67 @@ private:
void changeSelectedIndex(int32_t index);
void setCanStartMediaTimerFired();
- void didUpdateViewStateTimerFired();
-
- bool canHandleUserEvents() const;
-
- void setMainFrameInViewSourceMode(bool);
static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
static PluginView* focusedPluginViewForFrame(WebCore::Frame&);
static PluginView* pluginViewForFrame(WebCore::Frame*);
+ static RefPtr<WebCore::Range> rangeFromEditingRange(WebCore::Frame&, const EditingRange&, EditingRangeIsRelativeTo = EditingRangeIsRelativeTo::EditableRoot);
+
void reportUsedFeatures();
+ void updateWebsitePolicies(const WebsitePolicies&);
+
+#if PLATFORM(MAC)
+ void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
+ RefPtr<WebCore::Range> lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
+ void immediateActionDidUpdate();
+ void immediateActionDidCancel();
+ void immediateActionDidComplete();
+ void setFont(const String& fontFamily, double fontSize, uint64_t fontTraits);
+
+ void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
+ void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
+ void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
+
+ void handleAcceptedCandidate(WebCore::TextCheckingResult);
+#endif
+
+#if PLATFORM(COCOA)
+ void requestActiveNowPlayingSessionInfo();
+#endif
+
+ void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
+
+#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
+ void playbackTargetSelected(uint64_t, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
+ void playbackTargetAvailabilityDidChange(uint64_t, bool);
+ void setShouldPlayToPlaybackTarget(uint64_t, bool);
+#endif
+
+ void clearWheelEventTestTrigger();
+
+ void setShouldScaleViewToFitDocument(bool);
+
+ void pageStoppedScrolling();
+
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+ void didEndRequestInstallMissingMediaPlugins(uint32_t result);
+#endif
+
+ void setResourceCachingDisabled(bool);
+ void setUserInterfaceLayoutDirection(uint32_t);
+
+ bool canPluginHandleResponse(const WebCore::ResourceResponse&);
+
+#if USE(QUICK_LOOK)
+ void didReceivePasswordForQuickLookDocument(const String&);
+#endif
+
uint64_t m_pageID;
- uint64_t m_sessionID;
- OwnPtr<WebCore::Page> m_page;
+ std::unique_ptr<WebCore::Page> m_page;
RefPtr<WebFrame> m_mainFrame;
RefPtr<InjectedBundleBackForwardList> m_backForwardList;
@@ -890,34 +1263,33 @@ private:
std::unique_ptr<DrawingArea> m_drawingArea;
HashSet<PluginView*> m_pluginViews;
- bool m_hasSeenPlugin;
+ bool m_hasSeenPlugin { false };
HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
- bool m_useFixedLayout;
-
- bool m_drawsBackground;
- bool m_drawsTransparentBackground;
+ bool m_useFixedLayout { false };
+ bool m_drawsBackground { true };
WebCore::Color m_underlayColor;
- bool m_isInRedo;
- bool m_isClosed;
-
- bool m_tabToLinks;
+ bool m_isInRedo { false };
+ bool m_isClosed { false };
+ bool m_tabToLinks { false };
- bool m_asynchronousPluginInitializationEnabled;
- bool m_asynchronousPluginInitializationEnabledForAllPlugins;
- bool m_artificialPluginInitializationDelayEnabled;
-
- bool m_scrollingPerformanceLoggingEnabled;
+ bool m_asynchronousPluginInitializationEnabled { false };
+ bool m_asynchronousPluginInitializationEnabledForAllPlugins { false };
+ bool m_artificialPluginInitializationDelayEnabled { false };
+ bool m_scrollingPerformanceLoggingEnabled { false };
+ bool m_mainFrameIsScrollable { true };
- bool m_mainFrameIsScrollable;
+#if PLATFORM(IOS)
+ bool m_ignoreViewportScalingConstraints { false };
+#endif
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
- bool m_readyToFindPrimarySnapshottedPlugin;
- bool m_didFindPrimarySnapshottedPlugin;
- unsigned m_numberOfPrimarySnapshotDetectionAttempts;
+ bool m_readyToFindPrimarySnapshottedPlugin { false };
+ bool m_didFindPrimarySnapshottedPlugin { false };
+ unsigned m_numberOfPrimarySnapshotDetectionAttempts { 0 };
String m_primaryPlugInPageOrigin;
String m_primaryPlugInOrigin;
String m_primaryPlugInMimeType;
@@ -927,10 +1299,9 @@ private:
// The layer hosting mode.
LayerHostingMode m_layerHostingMode;
-#if PLATFORM(MAC)
- bool m_pdfPluginEnabled;
-
- bool m_hasCachedWindowFrame;
+#if PLATFORM(COCOA)
+ bool m_pdfPluginEnabled { false };
+ bool m_hasCachedWindowFrame { false };
// The frame of the containing window in screen coordinates.
WebCore::FloatRect m_windowFrameInScreenCoordinates;
@@ -946,19 +1317,17 @@ private:
RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
- WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
-
-#if !PLATFORM(IOS)
ViewGestureGeometryCollector m_viewGestureGeometryCollector;
-#endif
-#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+ RetainPtr<NSDictionary> m_dataDetectionContext;
+
+#elif HAVE(ACCESSIBILITY) && PLATFORM(GTK)
GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
#endif
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
// Our view's window in the UI process.
- uint64_t m_nativeWindowHandle;
+ uint64_t m_nativeWindowHandle { 0 };
#endif
#if !PLATFORM(IOS)
@@ -967,32 +1336,35 @@ private:
#endif // !PLATFORM(IOS)
RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
- RunLoop::Timer<WebPage> m_sendDidUpdateViewStateTimer;
- bool m_mayStartMediaWhenInWindow;
+ bool m_mayStartMediaWhenInWindow { false };
HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap;
- WebCore::IntSize m_windowResizerSize;
-
#if ENABLE(CONTEXT_MENUS)
- InjectedBundlePageContextMenuClient m_contextMenuClient;
+ std::unique_ptr<API::InjectedBundle::PageContextMenuClient> m_contextMenuClient;
#endif
- InjectedBundlePageEditorClient m_editorClient;
- InjectedBundlePageFormClient m_formClient;
+ std::unique_ptr<API::InjectedBundle::EditorClient> m_editorClient;
+ std::unique_ptr<API::InjectedBundle::FormClient> m_formClient;
InjectedBundlePageLoaderClient m_loaderClient;
InjectedBundlePagePolicyClient m_policyClient;
InjectedBundlePageResourceLoadClient m_resourceLoadClient;
- InjectedBundlePageUIClient m_uiClient;
+ std::unique_ptr<API::InjectedBundle::PageUIClient> m_uiClient;
#if ENABLE(FULLSCREEN_API)
InjectedBundlePageFullScreenClient m_fullScreenClient;
#endif
- InjectedBundlePageDiagnosticLoggingClient m_logDiagnosticMessageClient;
FindController m_findController;
- PageOverlayList m_pageOverlays;
-#if ENABLE(INSPECTOR)
RefPtr<WebInspector> m_inspector;
+ RefPtr<WebInspectorUI> m_inspectorUI;
+ RefPtr<RemoteWebInspectorUI> m_remoteInspectorUI;
+
+#if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+ RefPtr<WebPlaybackSessionManager> m_playbackSessionManager;
+ RefPtr<WebVideoFullscreenManager> m_videoFullscreenManager;
+#endif
+#if PLATFORM(IOS)
+ bool m_allowsMediaDocumentInlinePlayback { false };
#endif
#if ENABLE(FULLSCREEN_API)
RefPtr<WebFullScreenManager> m_fullScreenManager;
@@ -1002,16 +1374,22 @@ private:
RefPtr<WebContextMenu> m_contextMenu;
#endif
#if ENABLE(INPUT_TYPE_COLOR)
- WebColorChooser* m_activeColorChooser;
+ WebColorChooser* m_activeColorChooser { nullptr };
#endif
RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
+ Ref<WebUserContentController> m_userContentController;
+
#if ENABLE(GEOLOCATION)
GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
#endif
- OwnPtr<WebCore::PrintContext> m_printContext;
+#if ENABLE(MEDIA_STREAM)
+ UserMediaPermissionRequestManager m_userMediaPermissionRequestManager;
+#endif
+
+ std::unique_ptr<WebCore::PrintContext> m_printContext;
#if PLATFORM(GTK)
RefPtr<WebPrintOperationGtk> m_printOperation;
#endif
@@ -1021,49 +1399,135 @@ private:
RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
- bool m_canRunBeforeUnloadConfirmPanel;
+ WebCore::HysteresisActivity m_pageScrolledHysteresis;
- bool m_canRunModal;
- bool m_isRunningModal;
+ bool m_canRunBeforeUnloadConfirmPanel { false };
- bool m_cachedMainFrameIsPinnedToLeftSide;
- bool m_cachedMainFrameIsPinnedToRightSide;
- bool m_cachedMainFrameIsPinnedToTopSide;
- bool m_cachedMainFrameIsPinnedToBottomSide;
- bool m_canShortCircuitHorizontalWheelEvents;
- unsigned m_numWheelEventHandlers;
+ bool m_canRunModal { false };
+ bool m_isRunningModal { false };
- unsigned m_cachedPageCount;
+#if ENABLE(DRAG_SUPPORT)
+ bool m_isStartingDrag { false };
+#endif
+
+ bool m_cachedMainFrameIsPinnedToLeftSide { true };
+ bool m_cachedMainFrameIsPinnedToRightSide { true };
+ bool m_cachedMainFrameIsPinnedToTopSide { true };
+ bool m_cachedMainFrameIsPinnedToBottomSide { true };
+ bool m_canShortCircuitHorizontalWheelEvents { false };
+ bool m_hasWheelEventHandlers { false };
+
+ unsigned m_cachedPageCount { 0 };
+
+ HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
WebCore::IntSize m_minimumLayoutSize;
- bool m_autoSizingShouldExpandToViewHeight;
+ bool m_autoSizingShouldExpandToViewHeight { false };
+
+ bool m_userIsInteracting { false };
+ bool m_isAssistingNodeDueToUserInteraction { false };
+ bool m_hasEverFocusedElementDueToUserInteractionSincePageTransition { false };
+ bool m_needsHiddenContentEditableQuirk { false };
+ bool m_needsPlainTextQuirk { false };
#if ENABLE(CONTEXT_MENUS)
- bool m_isShowingContextMenu;
+ bool m_isShowingContextMenu { false };
#endif
+
+ RefPtr<WebCore::Node> m_assistedNode;
+ bool m_hasPendingBlurNotification { false };
#if PLATFORM(IOS)
- RefPtr<WebCore::Node> m_assistedNode;
RefPtr<WebCore::Range> m_currentWordRange;
- bool m_shouldReturnWordAtSelection;
+ RefPtr<WebCore::Node> m_interactionNode;
+ WebCore::IntPoint m_lastInteractionLocation;
+
+ enum SelectionAnchor {
+ Start,
+ End
+ };
+ SelectionAnchor m_selectionAnchor { Start };
+
+ RefPtr<WebCore::Node> m_potentialTapNode;
+ WebCore::FloatPoint m_potentialTapLocation;
+
+ WebCore::ViewportConfiguration m_viewportConfiguration;
+ bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
+ bool m_scaleWasSetByUIProcess { false };
+ bool m_userHasChangedPageScaleFactor { false };
+ bool m_hasStablePageScaleFactor { true };
+ bool m_useTestingViewportConfiguration { false };
+ bool m_isInStableState { true };
+ bool m_forceAlwaysUserScalable { false };
+ MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
+ Seconds m_estimatedLatency { 0 };
+ WebCore::FloatSize m_screenSize;
+ WebCore::FloatSize m_availableScreenSize;
+ RefPtr<WebCore::Range> m_currentBlockSelection;
+ WebCore::IntRect m_blockRectForTextSelection;
+
+ RefPtr<WebCore::Range> m_initialSelection;
+ WebCore::IntSize m_blockSelectionDesiredSize;
+ WebCore::FloatSize m_maximumUnobscuredSize;
+ int32_t m_deviceOrientation { 0 };
+ bool m_inDynamicSizeUpdate { false };
+ HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
+ RefPtr<WebCore::Node> m_pendingSyntheticClickNode;
+ WebCore::FloatPoint m_pendingSyntheticClickLocation;
+ WebCore::FloatRect m_previousExposedContentRect;
+#endif
+
+ WebCore::Timer m_layerVolatilityTimer;
+ Vector<std::function<void ()>> m_markLayersAsVolatileCompletionHandlers;
+ bool m_isSuspendedUnderLock { false };
+
+ HashSet<String, ASCIICaseInsensitiveHash> m_mimeTypesWithCustomContentProviders;
+ WebCore::Color m_backgroundColor { WebCore::Color::white };
+
+ HashSet<unsigned> m_activeRenderingSuppressionTokens;
+ unsigned m_maximumRenderingSuppressionToken { 0 };
+
+ WebCore::ScrollPinningBehavior m_scrollPinningBehavior { WebCore::DoNotPin };
+ std::optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
+
+ bool m_useAsyncScrolling { false };
+
+ WebCore::ActivityState::Flags m_activityState;
+
+ bool m_processSuppressionEnabled;
+ UserActivity m_userActivity;
+ WebCore::HysteresisActivity m_userActivityHysteresis;
+
+ uint64_t m_pendingNavigationID { 0 };
+
+#if ENABLE(WEBGL)
+ WebCore::WebGLLoadPolicy m_systemWebGLPolicy { WebCore::WebGLAllowCreation };
#endif
- WebInspectorClient* m_inspectorClient;
+ bool m_mainFrameProgressCompleted { false };
+ bool m_shouldDispatchFakeMouseMoveEvents { true };
+ bool m_isEditorStateMissingPostLayoutData { false };
+ bool m_isSelectingTextWhileInsertingAsynchronously { false };
- WebCore::Color m_backgroundColor;
+ enum class EditorStateIsContentEditable { No, Yes, Unset };
+ mutable EditorStateIsContentEditable m_lastEditorStateWasContentEditable { EditorStateIsContentEditable::Unset };
- HashSet<unsigned> m_activeRenderingSuppressionTokens;
- unsigned m_maximumRenderingSuppressionToken;
-
- WebCore::ScrollPinningBehavior m_scrollPinningBehavior;
+#if PLATFORM(GTK)
+ bool m_inputMethodEnabled { false };
+#endif
- bool m_useAsyncScrolling;
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+ RefPtr<WebCore::MediaPlayerRequestInstallMissingPluginsCallback> m_installMediaPluginsCallback;
+#endif
+
+#if USE(OS_STATE)
+ std::chrono::system_clock::time_point m_loadCommitTime;
+#endif
- WebCore::ViewState::Flags m_viewState;
+ WebCore::UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { WebCore::UserInterfaceLayoutDirection::LTR };
- UserActivity m_processSuppressionDisabledByWebPreference;
+ const String m_overrideContentSecurityPolicy;
};
} // namespace WebKit
-#endif // WebPage_h