1 | /* |
2 | * Copyright (C) 2010-2019 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
7 | * 1. Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. |
9 | * 2. Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. |
12 | * |
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 | * THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ |
25 | |
26 | #pragma once |
27 | |
28 | #include "APIObject.h" |
29 | #include "Connection.h" |
30 | #include "ContextMenuContextData.h" |
31 | #include "DownloadID.h" |
32 | #include "DragControllerAction.h" |
33 | #include "EditingRange.h" |
34 | #include "EditorState.h" |
35 | #include "FocusedElementInformation.h" |
36 | #include "GeolocationPermissionRequestManagerProxy.h" |
37 | #include "HiddenPageThrottlingAutoIncreasesCounter.h" |
38 | #include "LayerTreeContext.h" |
39 | #include "MessageSender.h" |
40 | #include "NotificationPermissionRequestManagerProxy.h" |
41 | #include "PageLoadState.h" |
42 | #include "ProcessTerminationReason.h" |
43 | #include "ProcessThrottler.h" |
44 | #include "SandboxExtension.h" |
45 | #include "ShareSheetCallbackID.h" |
46 | #include "ShareableBitmap.h" |
47 | #include "SuspendedPageProxy.h" |
48 | #include "SyntheticEditingCommandType.h" |
49 | #include "SystemPreviewController.h" |
50 | #include "UserMediaPermissionRequestManagerProxy.h" |
51 | #include "VisibleContentRectUpdateInfo.h" |
52 | #include "VisibleWebPageCounter.h" |
53 | #include "WKBase.h" |
54 | #include "WKPagePrivate.h" |
55 | #include "WebColorPicker.h" |
56 | #include "WebContextMenuItemData.h" |
57 | #include "WebCoreArgumentCoders.h" |
58 | #include "WebDataListSuggestionsDropdown.h" |
59 | #include "WebFrameProxy.h" |
60 | #include "WebPageCreationParameters.h" |
61 | #include "WebPageDiagnosticLoggingClient.h" |
62 | #include "WebPageInjectedBundleClient.h" |
63 | #include "WebPaymentCoordinatorProxy.h" |
64 | #include "WebPreferences.h" |
65 | #include "WebPageProxyMessages.h" |
66 | #include "WebPopupMenuProxy.h" |
67 | #include "WebProcessLifetimeTracker.h" |
68 | #include "WebUndoStepID.h" |
69 | #include "WebsitePoliciesData.h" |
70 | #include <WebCore/ActivityState.h> |
71 | #include <WebCore/AutoplayEvent.h> |
72 | #include <WebCore/Color.h> |
73 | #include <WebCore/DiagnosticLoggingClient.h> |
74 | #include <WebCore/DragActions.h> |
75 | #include <WebCore/EventTrackingRegions.h> |
76 | #include <WebCore/FontAttributes.h> |
77 | #include <WebCore/FrameLoaderTypes.h> |
78 | #include <WebCore/FrameView.h> // FIXME: Move LayoutViewportConstraint to its own file and stop including this. |
79 | #include <WebCore/InputMode.h> |
80 | #include <WebCore/LayoutPoint.h> |
81 | #include <WebCore/LayoutSize.h> |
82 | #include <WebCore/MediaPlaybackTargetContext.h> |
83 | #include <WebCore/MediaProducer.h> |
84 | #include <WebCore/PageIdentifier.h> |
85 | #include <WebCore/PlatformEvent.h> |
86 | #include <WebCore/PlatformScreen.h> |
87 | #include <WebCore/PlatformSpeechSynthesisUtterance.h> |
88 | #include <WebCore/PlatformSpeechSynthesizer.h> |
89 | #include <WebCore/PointerID.h> |
90 | #include <WebCore/RegistrableDomain.h> |
91 | #include <WebCore/ScrollTypes.h> |
92 | #include <WebCore/SearchPopupMenu.h> |
93 | #include <WebCore/TextChecking.h> |
94 | #include <WebCore/TextGranularity.h> |
95 | #include <WebCore/UserInterfaceLayoutDirection.h> |
96 | #include <WebCore/ViewportArguments.h> |
97 | #include <memory> |
98 | #include <wtf/CompletionHandler.h> |
99 | #include <wtf/HashMap.h> |
100 | #include <wtf/HashSet.h> |
101 | #include <wtf/Logger.h> |
102 | #include <wtf/MonotonicTime.h> |
103 | #include <wtf/Optional.h> |
104 | #include <wtf/ProcessID.h> |
105 | #include <wtf/Ref.h> |
106 | #include <wtf/RefPtr.h> |
107 | #include <wtf/RunLoop.h> |
108 | #include <wtf/URL.h> |
109 | #include <wtf/UniqueRef.h> |
110 | #include <wtf/Vector.h> |
111 | #include <wtf/text/WTFString.h> |
112 | |
113 | #if PLATFORM(IOS_FAMILY) |
114 | #include "WebAutocorrectionContext.h" |
115 | #endif |
116 | |
117 | OBJC_CLASS NSView; |
118 | OBJC_CLASS _WKRemoteObjectRegistry; |
119 | |
120 | #if ENABLE(DRAG_SUPPORT) |
121 | #include <WebCore/DragActions.h> |
122 | #endif |
123 | |
124 | #if ENABLE(TOUCH_EVENTS) |
125 | #include "NativeWebTouchEvent.h" |
126 | #endif |
127 | |
128 | #if PLATFORM(COCOA) |
129 | #include "DynamicViewportSizeUpdate.h" |
130 | #include "RemoteLayerTreeNode.h" |
131 | #include "TouchBarMenuData.h" |
132 | #include "TouchBarMenuItemData.h" |
133 | #endif |
134 | |
135 | #if PLATFORM(GTK) |
136 | #include "ArgumentCodersGtk.h" |
137 | #endif |
138 | |
139 | #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY) |
140 | #include <WebCore/MediaPlaybackTargetPicker.h> |
141 | #include <WebCore/WebMediaSessionManagerClient.h> |
142 | #endif |
143 | |
144 | #if USE(APPLE_INTERNAL_SDK) |
145 | #include <WebKitAdditions/WebPageProxyAdditions.h> |
146 | #endif |
147 | |
148 | #if ENABLE(MEDIA_SESSION) |
149 | namespace WebCore { |
150 | class MediaSessionMetadata; |
151 | } |
152 | #endif |
153 | |
154 | namespace API { |
155 | class Attachment; |
156 | class ; |
157 | class FindClient; |
158 | class FindMatchesClient; |
159 | class FormClient; |
160 | class FullscreenClient; |
161 | class HistoryClient; |
162 | class IconLoadingClient; |
163 | class LoaderClient; |
164 | class Navigation; |
165 | class NavigationClient; |
166 | class PolicyClient; |
167 | class UIClient; |
168 | class URLRequest; |
169 | } |
170 | |
171 | namespace IPC { |
172 | class Decoder; |
173 | } |
174 | |
175 | namespace WebCore { |
176 | class AuthenticationChallenge; |
177 | class CertificateInfo; |
178 | class Cursor; |
179 | class DragData; |
180 | class FloatRect; |
181 | class FontAttributeChanges; |
182 | class FontChanges; |
183 | class GraphicsLayer; |
184 | class IntSize; |
185 | class ProtectionSpace; |
186 | class RunLoopObserver; |
187 | class SharedBuffer; |
188 | class TextIndicator; |
189 | class ValidationBubble; |
190 | |
191 | enum SelectionDirection : uint8_t; |
192 | |
193 | enum class AutoplayEvent : uint8_t; |
194 | enum class DOMPasteAccessResponse : uint8_t; |
195 | enum class LockBackForwardList : bool; |
196 | enum class HasInsecureContent : bool; |
197 | enum class NotificationDirection : uint8_t; |
198 | enum class ShouldSample : bool; |
199 | enum class ShouldTreatAsContinuingLoad : bool; |
200 | enum class WritingDirection : uint8_t; |
201 | |
202 | struct ApplicationManifest; |
203 | struct BackForwardItemIdentifier; |
204 | struct ContentRuleListResults; |
205 | struct DataListSuggestionInformation; |
206 | struct ; |
207 | struct ExceptionDetails; |
208 | struct FileChooserSettings; |
209 | struct GlobalWindowIdentifier; |
210 | struct MediaStreamRequest; |
211 | struct PrewarmInformation; |
212 | struct SecurityOriginData; |
213 | struct ShareData; |
214 | struct TextAlternativeWithRange; |
215 | struct TextCheckingResult; |
216 | struct ViewportAttributes; |
217 | struct WindowFeatures; |
218 | |
219 | template <typename> class RectEdges; |
220 | using FloatBoxExtent = RectEdges<float>; |
221 | } |
222 | |
223 | #if PLATFORM(GTK) |
224 | typedef GtkWidget* PlatformWidget; |
225 | #endif |
226 | |
227 | #if PLATFORM(WPE) |
228 | struct wpe_view_backend; |
229 | #endif |
230 | |
231 | #if PLATFORM(GTK) || PLATFORM(WPE) |
232 | typedef struct OpaqueJSContext* JSGlobalContextRef; |
233 | #endif |
234 | |
235 | #if PLATFORM(WIN) |
236 | typedef HWND PlatformWidget; |
237 | #endif |
238 | |
239 | namespace WebKit { |
240 | class DrawingAreaProxy; |
241 | class EditableImageController; |
242 | class GamepadData; |
243 | class NativeWebGestureEvent; |
244 | class NativeWebKeyboardEvent; |
245 | class NativeWebMouseEvent; |
246 | class NativeWebWheelEvent; |
247 | class PageClient; |
248 | class ProvisionalPageProxy; |
249 | class RemoteLayerTreeHost; |
250 | class RemoteLayerTreeScrollingPerformanceData; |
251 | class RemoteLayerTreeTransaction; |
252 | class RemoteScrollingCoordinatorProxy; |
253 | class SecKeyProxyStore; |
254 | class SharedBufferDataReference; |
255 | class UserData; |
256 | class ViewSnapshot; |
257 | class VisitedLinkStore; |
258 | class WebBackForwardList; |
259 | class WebBackForwardListItem; |
260 | class ; |
261 | class WebEditCommandProxy; |
262 | class WebFullScreenManagerProxy; |
263 | class PlaybackSessionManagerProxy; |
264 | class WebNavigationState; |
265 | class VideoFullscreenManagerProxy; |
266 | class WebAuthenticatorCoordinatorProxy; |
267 | class WebKeyboardEvent; |
268 | class WebURLSchemeHandler; |
269 | class WebMouseEvent; |
270 | class WebOpenPanelResultListenerProxy; |
271 | class WebPageDebuggable; |
272 | class WebPageGroup; |
273 | class WebPageInspectorController; |
274 | class WebProcessProxy; |
275 | class WebUserContentControllerProxy; |
276 | class WebWheelEvent; |
277 | class WebsiteDataStore; |
278 | class WebViewDidMoveToWindowObserver; |
279 | |
280 | struct AttributedString; |
281 | struct ColorSpaceData; |
282 | struct DocumentEditingContext; |
283 | struct DocumentEditingContextRequest; |
284 | struct EditingRange; |
285 | struct EditorState; |
286 | struct FrameInfoData; |
287 | struct InsertTextOptions; |
288 | struct InteractionInformationRequest; |
289 | struct LoadParameters; |
290 | struct ; |
291 | struct PrintInfo; |
292 | struct TextInputContext; |
293 | struct WebAutocorrectionData; |
294 | struct ; |
295 | struct URLSchemeTaskParameters; |
296 | |
297 | enum class ProcessSwapRequestedByClient; |
298 | enum class UndoOrRedo : bool; |
299 | enum class WebContentMode : uint8_t; |
300 | |
301 | #if USE(QUICK_LOOK) |
302 | class QuickLookDocumentData; |
303 | #endif |
304 | |
305 | typedef GenericCallback<uint64_t> UnsignedCallback; |
306 | typedef GenericCallback<EditingRange> EditingRangeCallback; |
307 | typedef GenericCallback<const String&> StringCallback; |
308 | typedef GenericCallback<API::SerializedScriptValue*, bool, const WebCore::ExceptionDetails&> ScriptValueCallback; |
309 | typedef GenericCallback<const WebCore::FontAttributes&> FontAttributesCallback; |
310 | typedef GenericCallback<const String&, const String&, const String&> SelectionContextCallback; |
311 | |
312 | #if HAVE(VISIBILITY_PROPAGATION_VIEW) |
313 | using LayerHostingContextID = uint32_t; |
314 | #endif |
315 | |
316 | #if PLATFORM(GTK) |
317 | typedef GenericCallback<API::Error*> PrintFinishedCallback; |
318 | #endif |
319 | |
320 | #if ENABLE(TOUCH_EVENTS) |
321 | struct QueuedTouchEvents { |
322 | QueuedTouchEvents(const NativeWebTouchEvent& event) |
323 | : forwardedEvent(event) |
324 | { |
325 | } |
326 | NativeWebTouchEvent forwardedEvent; |
327 | Vector<NativeWebTouchEvent> deferredTouchEvents; |
328 | }; |
329 | #endif |
330 | |
331 | typedef GenericCallback<const String&, bool, int32_t> ValidateCommandCallback; |
332 | typedef GenericCallback<const WebCore::IntRect&, const EditingRange&> RectForCharacterRangeCallback; |
333 | |
334 | #if ENABLE(APPLICATION_MANIFEST) |
335 | typedef GenericCallback<const Optional<WebCore::ApplicationManifest>&> ApplicationManifestCallback; |
336 | #endif |
337 | |
338 | #if PLATFORM(MAC) |
339 | typedef GenericCallback<const AttributedString&, const EditingRange&> AttributedStringForCharacterRangeCallback; |
340 | typedef GenericCallback<const String&, double, bool> FontAtSelectionCallback; |
341 | #endif |
342 | |
343 | #if PLATFORM(IOS_FAMILY) |
344 | typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t> GestureCallback; |
345 | typedef GenericCallback<const WebCore::IntPoint&, uint32_t, uint32_t> TouchesCallback; |
346 | typedef GenericCallback<const Vector<WebCore::SelectionRect>&> SelectionRectsCallback; |
347 | typedef GenericCallback<const FocusedElementInformation&> FocusedElementInformationCallback; |
348 | struct ElementDidFocusArguments { |
349 | WTF_MAKE_FAST_ALLOCATED; |
350 | public: |
351 | FocusedElementInformation information; |
352 | bool userIsInteracting; |
353 | bool blurPreviousNode; |
354 | OptionSet<WebCore::ActivityState::Flag> activityStateChanges; |
355 | RefPtr<API::Object> userData; |
356 | }; |
357 | |
358 | using DrawToPDFCallback = GenericCallback<const IPC::DataReference&>; |
359 | #endif |
360 | |
361 | #if PLATFORM(COCOA) |
362 | typedef GenericCallback<const WTF::MachSendRight&> MachSendRightCallback; |
363 | typedef GenericCallback<bool, bool, String, double, double, uint64_t> NowPlayingInfoCallback; |
364 | #endif |
365 | |
366 | using SpellDocumentTag = int64_t; |
367 | |
368 | class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page> |
369 | #if ENABLE(INPUT_TYPE_COLOR) |
370 | , public WebColorPicker::Client |
371 | #endif |
372 | #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY) |
373 | , public WebCore::WebMediaSessionManagerClient |
374 | #endif |
375 | #if ENABLE(APPLE_PAY) |
376 | , public WebPaymentCoordinatorProxy::Client |
377 | #endif |
378 | , public WebPopupMenuProxy::Client |
379 | , public IPC::MessageReceiver |
380 | , public IPC::MessageSender |
381 | #if ENABLE(SPEECH_SYNTHESIS) |
382 | , public WebCore::PlatformSpeechSynthesisUtteranceClient |
383 | , public WebCore::PlatformSpeechSynthesizerClient |
384 | #endif |
385 | , public CanMakeWeakPtr<WebPageProxy> { |
386 | public: |
387 | static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, WebCore::PageIdentifier, Ref<API::PageConfiguration>&&); |
388 | virtual ~WebPageProxy(); |
389 | |
390 | static void forMostVisibleWebPageIfAny(PAL::SessionID, const WebCore::SecurityOriginData&, CompletionHandler<void(WebPageProxy*)>&&); |
391 | |
392 | const API::PageConfiguration& configuration() const; |
393 | |
394 | WebCore::PageIdentifier pageID() const { return m_pageID; } |
395 | |
396 | PAL::SessionID sessionID() const; |
397 | |
398 | WebFrameProxy* mainFrame() const { return m_mainFrame.get(); } |
399 | WebFrameProxy* focusedFrame() const { return m_focusedFrame.get(); } |
400 | WebFrameProxy* frameSetLargestFrame() const { return m_frameSetLargestFrame.get(); } |
401 | |
402 | DrawingAreaProxy* drawingArea() const { return m_drawingArea.get(); } |
403 | DrawingAreaProxy* provisionalDrawingArea() const; |
404 | |
405 | WebNavigationState& navigationState() { return *m_navigationState.get(); } |
406 | |
407 | WebsiteDataStore& websiteDataStore() { return m_websiteDataStore; } |
408 | |
409 | void addPreviouslyVisitedPath(const String&); |
410 | |
411 | WebProcessLifetimeTracker& webProcessLifetimeTracker() { return m_webProcessLifetimeTracker; } |
412 | |
413 | #if ENABLE(DATA_DETECTION) |
414 | NSArray *dataDetectionResults() { return m_dataDetectionResults.get(); } |
415 | void detectDataInAllFrames(WebCore::DataDetectorTypes, CompletionHandler<void(const DataDetectionResult&)>&&); |
416 | void removeDataDetectedLinks(CompletionHandler<void(const DataDetectionResult&)>&&); |
417 | #endif |
418 | |
419 | #if ENABLE(ASYNC_SCROLLING) && PLATFORM(COCOA) |
420 | RemoteScrollingCoordinatorProxy* scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy.get(); } |
421 | #endif |
422 | |
423 | WebBackForwardList& backForwardList() { return m_backForwardList; } |
424 | |
425 | bool addsVisitedLinks() const { return m_addsVisitedLinks; } |
426 | void setAddsVisitedLinks(bool addsVisitedLinks) { m_addsVisitedLinks = addsVisitedLinks; } |
427 | VisitedLinkStore& visitedLinkStore() { return m_visitedLinkStore; } |
428 | |
429 | void exitFullscreenImmediately(); |
430 | void fullscreenMayReturnToInline(); |
431 | void didEnterFullscreen(); |
432 | void didExitFullscreen(); |
433 | |
434 | WebInspectorProxy* inspector() const; |
435 | |
436 | void didChangeInspectorFrontendCount(unsigned count) { m_inspectorFrontendCount = count; } |
437 | unsigned inspectorFrontendCount() const { return m_inspectorFrontendCount; } |
438 | bool hasInspectorFrontend() const { return m_inspectorFrontendCount > 0; } |
439 | |
440 | bool isControlledByAutomation() const { return m_controlledByAutomation; } |
441 | void setControlledByAutomation(bool); |
442 | |
443 | WebPageInspectorController& inspectorController() { return *m_inspectorController; } |
444 | |
445 | #if PLATFORM(IOS_FAMILY) |
446 | void showInspectorIndication(); |
447 | void hideInspectorIndication(); |
448 | #endif |
449 | |
450 | void createInspectorTarget(const String& targetId, Inspector::InspectorTargetType); |
451 | void destroyInspectorTarget(const String& targetId); |
452 | void sendMessageToInspectorFrontend(const String& targetId, const String& message); |
453 | |
454 | #if ENABLE(REMOTE_INSPECTOR) |
455 | void setIndicating(bool); |
456 | bool allowsRemoteInspection() const; |
457 | void setAllowsRemoteInspection(bool); |
458 | String remoteInspectionNameOverride() const; |
459 | void setRemoteInspectionNameOverride(const String&); |
460 | void remoteInspectorInformationDidChange(); |
461 | #endif |
462 | |
463 | #if ENABLE(FULLSCREEN_API) |
464 | WebFullScreenManagerProxy* fullScreenManager(); |
465 | |
466 | API::FullscreenClient& fullscreenClient() const { return *m_fullscreenClient; } |
467 | void setFullscreenClient(std::unique_ptr<API::FullscreenClient>&&); |
468 | #endif |
469 | #if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) |
470 | PlaybackSessionManagerProxy* playbackSessionManager(); |
471 | VideoFullscreenManagerProxy* videoFullscreenManager(); |
472 | #endif |
473 | |
474 | #if PLATFORM(IOS_FAMILY) |
475 | bool allowsMediaDocumentInlinePlayback() const; |
476 | void setAllowsMediaDocumentInlinePlayback(bool); |
477 | #endif |
478 | |
479 | #if USE(SYSTEM_PREVIEW) |
480 | SystemPreviewController* systemPreviewController() { return m_systemPreviewController.get(); } |
481 | #endif |
482 | |
483 | #if ENABLE(CONTEXT_MENUS) |
484 | API::ContextMenuClient& () { return *m_contextMenuClient; } |
485 | void (std::unique_ptr<API::ContextMenuClient>&&); |
486 | #endif |
487 | API::FindClient& findClient() { return *m_findClient; } |
488 | void setFindClient(std::unique_ptr<API::FindClient>&&); |
489 | API::FindMatchesClient& findMatchesClient() { return *m_findMatchesClient; } |
490 | void setFindMatchesClient(std::unique_ptr<API::FindMatchesClient>&&); |
491 | API::DiagnosticLoggingClient* diagnosticLoggingClient() { return m_diagnosticLoggingClient.get(); } |
492 | void setDiagnosticLoggingClient(std::unique_ptr<API::DiagnosticLoggingClient>&&); |
493 | void setFormClient(std::unique_ptr<API::FormClient>&&); |
494 | void setNavigationClient(UniqueRef<API::NavigationClient>&&); |
495 | void setHistoryClient(UniqueRef<API::HistoryClient>&&); |
496 | void setLoaderClient(std::unique_ptr<API::LoaderClient>&&); |
497 | void setPolicyClient(std::unique_ptr<API::PolicyClient>&&); |
498 | void setInjectedBundleClient(const WKPageInjectedBundleClientBase*); |
499 | WebPageInjectedBundleClient* injectedBundleClient() { return m_injectedBundleClient.get(); } |
500 | |
501 | API::UIClient& uiClient() { return *m_uiClient; } |
502 | void setUIClient(std::unique_ptr<API::UIClient>&&); |
503 | |
504 | API::IconLoadingClient& iconLoadingClient() { return *m_iconLoadingClient; } |
505 | void setIconLoadingClient(std::unique_ptr<API::IconLoadingClient>&&); |
506 | |
507 | void initializeWebPage(); |
508 | void setDrawingArea(std::unique_ptr<DrawingAreaProxy>&&); |
509 | |
510 | WeakPtr<SecKeyProxyStore> secKeyProxyStore(const WebCore::AuthenticationChallenge&); |
511 | |
512 | void close(); |
513 | bool tryClose(); |
514 | bool isClosed() const { return m_isClosed; } |
515 | |
516 | void setOpenedByDOM() { m_openedByDOM = true; } |
517 | bool openedByDOM() const { return m_openedByDOM; } |
518 | |
519 | bool hasCommittedAnyProvisionalLoads() const { return m_hasCommittedAnyProvisionalLoads; } |
520 | |
521 | bool allowsFastClicksEverywhere() const { return m_allowsFastClicksEverywhere; } |
522 | |
523 | void setIsUsingHighPerformanceWebGL(bool value) { m_isUsingHighPerformanceWebGL = value; } |
524 | bool isUsingHighPerformanceWebGL() const { return m_isUsingHighPerformanceWebGL; } |
525 | |
526 | void didExceedInactiveMemoryLimitWhileActive(); |
527 | void didExceedBackgroundCPULimitWhileInForeground(); |
528 | |
529 | void closePage(bool stopResponsivenessTimer); |
530 | |
531 | void addPlatformLoadParameters(LoadParameters&); |
532 | RefPtr<API::Navigation> loadRequest(WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes, API::Object* userData = nullptr); |
533 | RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr); |
534 | RefPtr<API::Navigation> loadData(const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr); |
535 | void loadAlternateHTML(const IPC::DataReference&, const String& encoding, const URL& baseURL, const URL& unreachableURL, API::Object* userData = nullptr); |
536 | void loadWebArchiveData(API::Data*, API::Object* userData = nullptr); |
537 | void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint); |
538 | |
539 | void simulateDeviceOrientationChange(double alpha, double beta, double gamma); |
540 | |
541 | void stopLoading(); |
542 | RefPtr<API::Navigation> reload(OptionSet<WebCore::ReloadOption>); |
543 | |
544 | RefPtr<API::Navigation> goForward(); |
545 | RefPtr<API::Navigation> goBack(); |
546 | |
547 | RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem&); |
548 | void tryRestoreScrollPosition(); |
549 | void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<Ref<WebBackForwardListItem>>&& removed); |
550 | void willGoToBackForwardListItem(const WebCore::BackForwardItemIdentifier&, bool inPageCache); |
551 | |
552 | bool shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem&); |
553 | |
554 | bool willHandleHorizontalScrollEvents() const; |
555 | |
556 | void updateWebsitePolicies(WebsitePoliciesData&&); |
557 | |
558 | bool canShowMIMEType(const String& mimeType); |
559 | |
560 | String currentURL() const; |
561 | |
562 | float topContentInset() const { return m_topContentInset; } |
563 | void setTopContentInset(float); |
564 | |
565 | WebCore::Color underlayColor() const { return m_underlayColor; } |
566 | void setUnderlayColor(const WebCore::Color&); |
567 | |
568 | // At this time, m_pageExtendedBackgroundColor can be set via pageExtendedBackgroundColorDidChange() which is a message |
569 | // from the UIProcess, or by didCommitLayerTree(). When PLATFORM(MAC) adopts UI side compositing, we should get rid of |
570 | // the message entirely. |
571 | WebCore::Color pageExtendedBackgroundColor() const { return m_pageExtendedBackgroundColor; } |
572 | |
573 | void viewWillStartLiveResize(); |
574 | void viewWillEndLiveResize(); |
575 | |
576 | void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, WTF::Function<void (CallbackBase::Error)>&&); |
577 | |
578 | void clearSelection(); |
579 | void restoreSelectionInFocusedEditableElement(); |
580 | |
581 | PageClient& pageClient() const; |
582 | |
583 | void setViewNeedsDisplay(const WebCore::Region&); |
584 | void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin); |
585 | |
586 | WebCore::FloatPoint viewScrollPosition() const; |
587 | |
588 | void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; } |
589 | bool delegatesScrolling() const { return m_delegatesScrolling; } |
590 | |
591 | enum class ActivityStateChangeDispatchMode { Deferrable, Immediate }; |
592 | void activityStateDidChange(OptionSet<WebCore::ActivityState::Flag> mayHaveChanged, bool wantsSynchronousReply = false, ActivityStateChangeDispatchMode = ActivityStateChangeDispatchMode::Deferrable); |
593 | bool isInWindow() const { return m_activityState.contains(WebCore::ActivityState::IsInWindow); } |
594 | void waitForDidUpdateActivityState(ActivityStateChangeID); |
595 | void didUpdateActivityState() { m_waitingForDidUpdateActivityState = false; } |
596 | |
597 | void layerHostingModeDidChange(); |
598 | |
599 | WebCore::IntSize viewSize() const; |
600 | bool isViewVisible() const { return m_activityState.contains(WebCore::ActivityState::IsVisible); } |
601 | bool isViewFocused() const { return m_activityState.contains(WebCore::ActivityState::IsFocused); } |
602 | bool isViewWindowActive() const { return m_activityState.contains(WebCore::ActivityState::WindowIsActive); } |
603 | |
604 | void addMIMETypeWithCustomContentProvider(const String& mimeType); |
605 | |
606 | void selectAll(); |
607 | void executeEditCommand(const String& commandName, const String& argument = String()); |
608 | void validateCommand(const String& commandName, WTF::Function<void (const String&, bool, int32_t, CallbackBase::Error)>&&); |
609 | |
610 | const EditorState& editorState() const { return m_editorState; } |
611 | bool canDelete() const { return hasSelectedRange() && isContentEditable(); } |
612 | bool hasSelectedRange() const { return m_editorState.selectionIsRange; } |
613 | bool isContentEditable() const { return m_editorState.isContentEditable; } |
614 | |
615 | void increaseListLevel(); |
616 | void decreaseListLevel(); |
617 | void changeListType(); |
618 | |
619 | void setBaseWritingDirection(WebCore::WritingDirection); |
620 | |
621 | Optional<WebCore::FontAttributes> cachedFontAttributesAtSelectionStart() const { return m_cachedFontAttributesAtSelectionStart; } |
622 | |
623 | #if PLATFORM(COCOA) |
624 | const TouchBarMenuData& touchBarMenuData() const { return m_touchBarMenuData; } |
625 | #endif |
626 | |
627 | bool maintainsInactiveSelection() const; |
628 | void setMaintainsInactiveSelection(bool); |
629 | void setEditable(bool); |
630 | bool isEditable() const { return m_isEditable; } |
631 | |
632 | void activateMediaStreamCaptureInPage(); |
633 | bool isMediaStreamCaptureMuted() const { return m_mutedState & WebCore::MediaProducer::MediaStreamCaptureIsMuted; } |
634 | void setMediaStreamCaptureMuted(bool); |
635 | void executeEditCommand(const String& commandName, const String& argument, WTF::Function<void(CallbackBase::Error)>&&); |
636 | |
637 | void requestFontAttributesAtSelectionStart(Function<void(const WebCore::FontAttributes&, CallbackBase::Error)>&&); |
638 | void fontAttributesCallback(const WebCore::FontAttributes&, CallbackID); |
639 | |
640 | void textInputContextsInRect(WebCore::FloatRect, CompletionHandler<void(const Vector<TextInputContext>&)>&&); |
641 | void focusTextInputContext(const TextInputContext&, CompletionHandler<void(bool)>&&); |
642 | |
643 | #if PLATFORM(IOS_FAMILY) |
644 | double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); } |
645 | const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); } |
646 | const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); } |
647 | bool inStableState() const { return m_lastVisibleContentRectUpdate.inStableState(); } |
648 | const WebCore::FloatRect& unobscuredContentRectRespectingInputViewBounds() const { return m_lastVisibleContentRectUpdate.unobscuredContentRectRespectingInputViewBounds(); } |
649 | // When visual viewports are enabled, this is the layout viewport rect. |
650 | const WebCore::FloatRect& customFixedPositionRect() const { return m_lastVisibleContentRectUpdate.customFixedPositionRect(); } |
651 | |
652 | void updateVisibleContentRects(const VisibleContentRectUpdateInfo&); |
653 | void resendLastVisibleContentRects(); |
654 | |
655 | WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatRect& unobscuredContentRectRespectingInputViewBounds, const WebCore::FloatRect& currentCustomFixedPositionRect, double displayedContentScale, WebCore::FrameView::LayoutViewportConstraint = WebCore::FrameView::LayoutViewportConstraint::Unconstrained) const; |
656 | |
657 | void scrollingNodeScrollViewWillStartPanGesture(); |
658 | void scrollingNodeScrollViewDidScroll(); |
659 | void scrollingNodeScrollWillStartScroll(); |
660 | void scrollingNodeScrollDidEndScroll(); |
661 | |
662 | void dynamicViewportSizeUpdate(const WebCore::FloatSize& viewLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, const WebCore::FloatBoxExtent& unobscuredSafeAreaInsets, double targetScale, int32_t deviceOrientation, DynamicViewportSizeUpdateID); |
663 | |
664 | void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double minimumEffectiveDeviceWidth); |
665 | void setMaximumUnobscuredSize(const WebCore::FloatSize&); |
666 | void setDeviceOrientation(int32_t); |
667 | int32_t deviceOrientation() const { return m_deviceOrientation; } |
668 | void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&); |
669 | void willCommitLayerTree(uint64_t transactionID); |
670 | |
671 | void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithFocusedElement, WTF::Function<void(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>&&); |
672 | void updateSelectionWithTouches(const WebCore::IntPoint, uint32_t touches, bool baseIsStart, WTF::Function<void (const WebCore::IntPoint&, uint32_t, uint32_t, CallbackBase::Error)>&&); |
673 | void selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, WTF::Function<void (const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>&&); |
674 | void extendSelection(WebCore::TextGranularity); |
675 | void selectWordBackward(); |
676 | void moveSelectionByOffset(int32_t offset, WTF::Function<void (CallbackBase::Error)>&&); |
677 | void selectTextWithGranularityAtPoint(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithFocusedElement, WTF::Function<void(CallbackBase::Error)>&&); |
678 | void selectPositionAtPoint(const WebCore::IntPoint, bool isInteractingWithFocusedElement, WTF::Function<void(CallbackBase::Error)>&&); |
679 | void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint, WebCore::TextGranularity, WebCore::SelectionDirection, bool isInteractingWithFocusedElement, WTF::Function<void(CallbackBase::Error)>&&); |
680 | void moveSelectionAtBoundaryWithDirection(WebCore::TextGranularity, WebCore::SelectionDirection, WTF::Function<void(CallbackBase::Error)>&&); |
681 | void beginSelectionInDirection(WebCore::SelectionDirection, WTF::Function<void (uint64_t, CallbackBase::Error)>&&); |
682 | void updateSelectionWithExtentPoint(const WebCore::IntPoint, bool isInteractingWithFocusedElement, WTF::Function<void(uint64_t, CallbackBase::Error)>&&); |
683 | void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint, WebCore::TextGranularity, bool isInteractingWithFocusedElement, WTF::Function<void(uint64_t, CallbackBase::Error)>&&); |
684 | void requestAutocorrectionData(const String& textForAutocorrection, CompletionHandler<void(WebAutocorrectionData)>&&); |
685 | void applyAutocorrection(const String& correction, const String& originalText, WTF::Function<void (const String&, CallbackBase::Error)>&&); |
686 | bool applyAutocorrection(const String& correction, const String& originalText); |
687 | void requestAutocorrectionContext(); |
688 | void handleAutocorrectionContext(const WebAutocorrectionContext&); |
689 | void requestDictationContext(WTF::Function<void (const String&, const String&, const String&, CallbackBase::Error)>&&); |
690 | void replaceDictatedText(const String& oldText, const String& newText); |
691 | void replaceSelectedText(const String& oldText, const String& newText); |
692 | void didReceivePositionInformation(const InteractionInformationAtPosition&); |
693 | void requestPositionInformation(const InteractionInformationRequest&); |
694 | void startInteractionWithElementAtPosition(const WebCore::IntPoint&); |
695 | void stopInteraction(); |
696 | void performActionOnElement(uint32_t action); |
697 | void saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize); |
698 | void focusNextFocusedElement(bool isForward, WTF::Function<void (CallbackBase::Error)>&& = [] (auto) { }); |
699 | void setFocusedElementValue(const String&); |
700 | void setFocusedElementValueAsNumber(double); |
701 | void setFocusedElementSelectedIndex(uint32_t index, bool allowMultipleSelection = false); |
702 | void applicationDidEnterBackground(); |
703 | void applicationDidFinishSnapshottingAfterEnteringBackground(); |
704 | void applicationWillEnterForeground(); |
705 | void applicationWillResignActive(); |
706 | void applicationDidBecomeActive(); |
707 | void commitPotentialTapFailed(); |
708 | void didNotHandleTapAsClick(const WebCore::IntPoint&); |
709 | void didCompleteSyntheticClick(); |
710 | void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID); |
711 | void handleSmartMagnificationInformationForPotentialTap(uint64_t requestID, const WebCore::FloatRect& renderRect, bool fitEntireRect, double viewportMinimumScale, double viewportMaximumScale); |
712 | void contentSizeCategoryDidChange(const String& contentSizeCategory); |
713 | void getSelectionContext(WTF::Function<void(const String&, const String&, const String&, CallbackBase::Error)>&&); |
714 | void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t requestID); |
715 | void handleStylusSingleTapAtPoint(const WebCore::IntPoint&, uint64_t requestID); |
716 | void setForceAlwaysUserScalable(bool); |
717 | bool forceAlwaysUserScalable() const { return m_forceAlwaysUserScalable; } |
718 | double layoutSizeScaleFactor() const { return m_viewportConfigurationLayoutSizeScaleFactor; } |
719 | double minimumEffectiveDeviceWidth() const { return m_viewportConfigurationMinimumEffectiveDeviceWidth; } |
720 | void setIsScrollingOrZooming(bool); |
721 | void requestRectsForGranularityWithSelectionOffset(WebCore::TextGranularity, uint32_t offset, WTF::Function<void(const Vector<WebCore::SelectionRect>&, CallbackBase::Error)>&&); |
722 | void requestRectsAtSelectionOffsetWithText(int32_t offset, const String&, WTF::Function<void(const Vector<WebCore::SelectionRect>&, CallbackBase::Error)>&&); |
723 | void autofillLoginCredentials(const String& username, const String& password); |
724 | void storeSelectionForAccessibility(bool); |
725 | void startAutoscrollAtPosition(const WebCore::FloatPoint& positionInWindow); |
726 | void cancelAutoscroll(); |
727 | void hardwareKeyboardAvailabilityChanged(bool keyboardIsAttached); |
728 | bool isScrollingOrZooming() const { return m_isScrollingOrZooming; } |
729 | void requestEvasionRectsAboveSelection(CompletionHandler<void(const Vector<WebCore::FloatRect>&)>&&); |
730 | void updateSelectionWithDelta(int64_t locationDelta, int64_t lengthDelta, CompletionHandler<void()>&&); |
731 | void requestDocumentEditingContext(WebKit::DocumentEditingContextRequest, CompletionHandler<void(WebKit::DocumentEditingContext)>&&); |
732 | void generateSyntheticEditingCommand(SyntheticEditingCommandType); |
733 | #if ENABLE(DRAG_SUPPORT) |
734 | void didHandleDragStartRequest(bool started); |
735 | void didHandleAdditionalDragItemsRequest(bool added); |
736 | void requestDragStart(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, WebCore::DragSourceAction allowedActions); |
737 | void requestAdditionalItemsForDragSession(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, WebCore::DragSourceAction allowedActions); |
738 | void willReceiveEditDragSnapshot(); |
739 | void didReceiveEditDragSnapshot(Optional<WebCore::TextIndicatorData>); |
740 | void didConcludeDrop(); |
741 | #endif |
742 | #endif // PLATFORM(IOS_FAMILY) |
743 | #if ENABLE(DATA_DETECTION) |
744 | void setDataDetectionResult(const DataDetectionResult&); |
745 | #endif |
746 | void didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction&); |
747 | void layerTreeCommitComplete(); |
748 | |
749 | bool updateLayoutViewportParameters(const WebKit::RemoteLayerTreeTransaction&); |
750 | |
751 | #if PLATFORM(GTK) |
752 | void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd); |
753 | void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength); |
754 | void cancelComposition(); |
755 | #endif |
756 | |
757 | #if PLATFORM(GTK) |
758 | void setInputMethodState(bool enabled); |
759 | #endif |
760 | |
761 | #if PLATFORM (GTK) && HAVE(GTK_GESTURES) |
762 | void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center); |
763 | #endif |
764 | |
765 | #if PLATFORM(COCOA) |
766 | void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates); |
767 | void setMainFrameIsScrollable(bool); |
768 | |
769 | void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput); |
770 | bool shouldDelayWindowOrderingForEvent(const WebMouseEvent&); |
771 | bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&); |
772 | |
773 | void setRemoteLayerTreeRootNode(RemoteLayerTreeNode*); |
774 | CALayer *acceleratedCompositingRootLayer() const; |
775 | |
776 | void setTextAsync(const String&); |
777 | void insertTextAsync(const String& text, const EditingRange& replacementRange, InsertTextOptions&&); |
778 | void hasMarkedText(CompletionHandler<void(bool)>&&); |
779 | void getMarkedRangeAsync(WTF::Function<void (EditingRange, CallbackBase::Error)>&&); |
780 | void getSelectedRangeAsync(WTF::Function<void (EditingRange, CallbackBase::Error)>&&); |
781 | void characterIndexForPointAsync(const WebCore::IntPoint&, WTF::Function<void (uint64_t, CallbackBase::Error)>&&); |
782 | void firstRectForCharacterRangeAsync(const EditingRange&, WTF::Function<void (const WebCore::IntRect&, const EditingRange&, CallbackBase::Error)>&&); |
783 | void setCompositionAsync(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange); |
784 | void confirmCompositionAsync(); |
785 | |
786 | void setScrollPerformanceDataCollectionEnabled(bool); |
787 | bool scrollPerformanceDataCollectionEnabled() const { return m_scrollPerformanceDataCollectionEnabled; } |
788 | RemoteLayerTreeScrollingPerformanceData* scrollingPerformanceData() { return m_scrollingPerformanceData.get(); } |
789 | #endif // PLATFORM(COCOA) |
790 | |
791 | void changeFontAttributes(WebCore::FontAttributeChanges&&); |
792 | void changeFont(WebCore::FontChanges&&); |
793 | |
794 | #if PLATFORM(MAC) |
795 | void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives, bool registerUndoGroup); |
796 | void attributedSubstringForCharacterRangeAsync(const EditingRange&, WTF::Function<void (const AttributedString&, const EditingRange&, CallbackBase::Error)>&&); |
797 | void fontAtSelection(WTF::Function<void (const String&, double, bool, CallbackBase::Error)>&&); |
798 | |
799 | void startWindowDrag(); |
800 | NSWindow *platformWindow(); |
801 | void rootViewToWindow(const WebCore::IntRect& viewRect, WebCore::IntRect& windowRect); |
802 | |
803 | NSView *inspectorAttachmentView(); |
804 | _WKRemoteObjectRegistry *remoteObjectRegistry(); |
805 | |
806 | CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const; |
807 | #endif // PLATFORM(MAC) |
808 | |
809 | #if PLATFORM(GTK) |
810 | PlatformWidget viewWidget(); |
811 | bool makeGLContextCurrent(); |
812 | #endif |
813 | |
814 | const Optional<WebCore::Color>& backgroundColor() const { return m_backgroundColor; } |
815 | void setBackgroundColor(const Optional<WebCore::Color>&); |
816 | |
817 | #if PLATFORM(WIN) |
818 | PlatformWidget viewWidget(); |
819 | #endif |
820 | #if PLATFORM(WPE) |
821 | struct wpe_view_backend* viewBackend(); |
822 | #endif |
823 | |
824 | bool isProcessingMouseEvents() const; |
825 | void processNextQueuedMouseEvent(); |
826 | void handleMouseEvent(const NativeWebMouseEvent&); |
827 | |
828 | void handleWheelEvent(const NativeWebWheelEvent&); |
829 | |
830 | bool isProcessingKeyboardEvents() const; |
831 | void handleKeyboardEvent(const NativeWebKeyboardEvent&); |
832 | |
833 | #if ENABLE(MAC_GESTURE_EVENTS) |
834 | void handleGestureEvent(const NativeWebGestureEvent&); |
835 | #endif |
836 | |
837 | #if ENABLE(IOS_TOUCH_EVENTS) |
838 | void handleTouchEventSynchronously(NativeWebTouchEvent&); |
839 | void handleTouchEventAsynchronously(const NativeWebTouchEvent&); |
840 | |
841 | #elif ENABLE(TOUCH_EVENTS) |
842 | void handleTouchEvent(const NativeWebTouchEvent&); |
843 | #endif |
844 | |
845 | #if ENABLE(POINTER_EVENTS) |
846 | void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&); |
847 | void touchWithIdentifierWasRemoved(WebCore::PointerID); |
848 | #endif |
849 | |
850 | void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity); |
851 | void centerSelectionInVisibleArea(); |
852 | |
853 | const String& toolTip() const { return m_toolTip; } |
854 | |
855 | const String& userAgent() const { return m_userAgent; } |
856 | void setApplicationNameForUserAgent(const String&); |
857 | const String& applicationNameForUserAgent() const { return m_applicationNameForUserAgent; } |
858 | void setApplicationNameForDesktopUserAgent(const String& applicationName) { m_applicationNameForDesktopUserAgent = applicationName; } |
859 | const String& applicationNameForDesktopUserAgent() const { return m_applicationNameForDesktopUserAgent; } |
860 | void setCustomUserAgent(const String&); |
861 | const String& customUserAgent() const { return m_customUserAgent; } |
862 | static String standardUserAgent(const String& applicationName = String()); |
863 | |
864 | bool supportsTextEncoding() const; |
865 | void setCustomTextEncodingName(const String&); |
866 | String customTextEncodingName() const { return m_customTextEncodingName; } |
867 | |
868 | bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; } |
869 | void resumeActiveDOMObjectsAndAnimations(); |
870 | void suspendActiveDOMObjectsAndAnimations(); |
871 | |
872 | double estimatedProgress() const; |
873 | |
874 | SessionState sessionState(WTF::Function<bool (WebBackForwardListItem&)>&& = nullptr) const; |
875 | RefPtr<API::Navigation> restoreFromSessionState(SessionState, bool navigate); |
876 | |
877 | bool supportsTextZoom() const; |
878 | double textZoomFactor() const { return m_textZoomFactor; } |
879 | void setTextZoomFactor(double); |
880 | double pageZoomFactor() const; |
881 | void setPageZoomFactor(double); |
882 | void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor); |
883 | |
884 | void scalePage(double scale, const WebCore::IntPoint& origin); |
885 | void scalePageInViewCoordinates(double scale, const WebCore::IntPoint& centerInViewCoordinates); |
886 | double pageScaleFactor() const; |
887 | double viewScaleFactor() const { return m_viewScaleFactor; } |
888 | void scaleView(double scale); |
889 | void setShouldScaleViewToFitDocument(bool); |
890 | |
891 | float deviceScaleFactor() const; |
892 | void setIntrinsicDeviceScaleFactor(float); |
893 | void setCustomDeviceScaleFactor(float); |
894 | void windowScreenDidChange(WebCore::PlatformDisplayID); |
895 | void accessibilitySettingsDidChange(); |
896 | |
897 | void setUseFixedLayout(bool); |
898 | void setFixedLayoutSize(const WebCore::IntSize&); |
899 | bool useFixedLayout() const { return m_useFixedLayout; }; |
900 | const WebCore::IntSize& fixedLayoutSize() const { return m_fixedLayoutSize; }; |
901 | |
902 | void setAlwaysShowsHorizontalScroller(bool); |
903 | void setAlwaysShowsVerticalScroller(bool); |
904 | bool alwaysShowsHorizontalScroller() const { return m_alwaysShowsHorizontalScroller; } |
905 | bool alwaysShowsVerticalScroller() const { return m_alwaysShowsVerticalScroller; } |
906 | |
907 | void listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone>); |
908 | |
909 | bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; } |
910 | bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; } |
911 | |
912 | void setSuppressScrollbarAnimations(bool); |
913 | bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; } |
914 | |
915 | bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; } |
916 | bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; } |
917 | bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; } |
918 | bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; } |
919 | |
920 | bool rubberBandsAtLeft() const; |
921 | void setRubberBandsAtLeft(bool); |
922 | bool rubberBandsAtRight() const; |
923 | void setRubberBandsAtRight(bool); |
924 | bool rubberBandsAtTop() const; |
925 | void setRubberBandsAtTop(bool); |
926 | bool rubberBandsAtBottom() const; |
927 | void setRubberBandsAtBottom(bool); |
928 | |
929 | void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; } |
930 | bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; } |
931 | |
932 | void setEnableVerticalRubberBanding(bool); |
933 | bool verticalRubberBandingIsEnabled() const; |
934 | void setEnableHorizontalRubberBanding(bool); |
935 | bool horizontalRubberBandingIsEnabled() const; |
936 | |
937 | void setBackgroundExtendsBeyondPage(bool); |
938 | bool backgroundExtendsBeyondPage() const; |
939 | |
940 | void (WebCore::Pagination::Mode); |
941 | WebCore::Pagination::Mode () const { return m_paginationMode; } |
942 | void setPaginationBehavesLikeColumns(bool); |
943 | bool paginationBehavesLikeColumns() const { return m_paginationBehavesLikeColumns; } |
944 | void setPageLength(double); |
945 | double pageLength() const { return m_pageLength; } |
946 | void setGapBetweenPages(double); |
947 | double gapBetweenPages() const { return m_gapBetweenPages; } |
948 | void (bool); |
949 | bool () const { return m_paginationLineGridEnabled; } |
950 | unsigned pageCount() const { return m_pageCount; } |
951 | |
952 | void isJITEnabled(CompletionHandler<void(bool)>&&); |
953 | |
954 | #if PLATFORM(MAC) |
955 | void setUseSystemAppearance(bool); |
956 | bool useSystemAppearance() const { return m_useSystemAppearance; } |
957 | #endif |
958 | |
959 | void effectiveAppearanceDidChange(); |
960 | bool useDarkAppearance() const; |
961 | bool useInactiveAppearance() const; |
962 | |
963 | #if PLATFORM(COCOA) |
964 | // Called by the web process through a message. |
965 | void registerWebProcessAccessibilityToken(const IPC::DataReference&); |
966 | // Called by the UI process when it is ready to send its tokens to the web process. |
967 | void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken); |
968 | bool readSelectionFromPasteboard(const String& pasteboardName); |
969 | String stringSelectionForPasteboard(); |
970 | RefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType); |
971 | void makeFirstResponder(); |
972 | void assistiveTechnologyMakeFirstResponder(); |
973 | |
974 | ColorSpaceData colorSpace(); |
975 | #endif |
976 | |
977 | #if ENABLE(SERVICE_CONTROLS) |
978 | void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&); |
979 | #endif |
980 | |
981 | void pageScaleFactorDidChange(double); |
982 | void pluginScaleFactorDidChange(double); |
983 | void pluginZoomFactorDidChange(double); |
984 | |
985 | // Find. |
986 | void findString(const String&, FindOptions, unsigned maxMatchCount); |
987 | void findStringMatches(const String&, FindOptions, unsigned maxMatchCount); |
988 | void getImageForFindMatch(int32_t matchIndex); |
989 | void selectFindMatch(int32_t matchIndex); |
990 | void didGetImageForFindMatch(const ShareableBitmap::Handle& contentImageHandle, uint32_t matchIndex); |
991 | void hideFindUI(); |
992 | void countStringMatches(const String&, FindOptions, unsigned maxMatchCount); |
993 | void replaceMatches(Vector<uint32_t>&& matchIndices, const String& replacementText, bool selectionOnly, Function<void(uint64_t, CallbackBase::Error)>&&); |
994 | void didCountStringMatches(const String&, uint32_t matchCount); |
995 | void setTextIndicator(const WebCore::TextIndicatorData&, uint64_t /* WebCore::TextIndicatorWindowLifetime */ lifetime = 0 /* Permanent */); |
996 | void setTextIndicatorAnimationProgress(float); |
997 | void clearTextIndicator(); |
998 | void didFindString(const String&, const Vector<WebCore::IntRect>&, uint32_t matchCount, int32_t matchIndex, bool didWrapAround); |
999 | void didFailToFindString(const String&); |
1000 | void didFindStringMatches(const String&, const Vector<Vector<WebCore::IntRect>>& matchRects, int32_t firstIndexAfterSelection); |
1001 | |
1002 | void getContentsAsString(WTF::Function<void (const String&, CallbackBase::Error)>&&); |
1003 | #if PLATFORM(COCOA) |
1004 | void getContentsAsAttributedString(CompletionHandler<void(const AttributedString&)>&&); |
1005 | #endif |
1006 | void getBytecodeProfile(WTF::Function<void (const String&, CallbackBase::Error)>&&); |
1007 | void getSamplingProfilerOutput(WTF::Function<void (const String&, CallbackBase::Error)>&&); |
1008 | |
1009 | #if ENABLE(MHTML) |
1010 | void getContentsAsMHTMLData(Function<void (API::Data*, CallbackBase::Error)>&&); |
1011 | #endif |
1012 | void getMainResourceDataOfFrame(WebFrameProxy*, Function<void (API::Data*, CallbackBase::Error)>&&); |
1013 | void getResourceDataFromFrame(WebFrameProxy*, API::URL*, Function<void (API::Data*, CallbackBase::Error)>&&); |
1014 | void getRenderTreeExternalRepresentation(WTF::Function<void (const String&, CallbackBase::Error)>&&); |
1015 | void getSelectionOrContentsAsString(WTF::Function<void (const String&, CallbackBase::Error)>&&); |
1016 | void getSelectionAsWebArchiveData(Function<void (API::Data*, CallbackBase::Error)>&&); |
1017 | void getSourceForFrame(WebFrameProxy*, WTF::Function<void (const String&, CallbackBase::Error)>&&); |
1018 | void getWebArchiveOfFrame(WebFrameProxy*, Function<void (API::Data*, CallbackBase::Error)>&&); |
1019 | void runJavaScriptInMainFrame(const String&, bool, WTF::Function<void (API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)>&& callbackFunction); |
1020 | void runJavaScriptInMainFrameScriptWorld(const String&, bool, const Optional<String>& worldName, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)>&& callbackFunction); |
1021 | // For sub frames. |
1022 | void runJavaScriptInFrame(uint64_t frameID, const String& script, bool forceUserGesture, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const WebCore::ExceptionDetails&, CallbackBase::Error)>&& callbackFunction); |
1023 | void forceRepaint(RefPtr<VoidCallback>&&); |
1024 | |
1025 | float (WebFrameProxy&); |
1026 | float (WebFrameProxy&); |
1027 | void (WebFrameProxy&, WebCore::FloatRect&&); |
1028 | void (WebFrameProxy&, WebCore::FloatRect&&); |
1029 | |
1030 | #if PLATFORM(COCOA) |
1031 | // Dictionary. |
1032 | void performDictionaryLookupAtLocation(const WebCore::FloatPoint&); |
1033 | void performDictionaryLookupOfCurrentSelection(); |
1034 | #endif |
1035 | |
1036 | class PolicyDecisionSender; |
1037 | enum class WillContinueLoadInNewProcess : bool { No, Yes }; |
1038 | void receivedPolicyDecision(WebCore::PolicyAction, API::Navigation*, Optional<WebsitePoliciesData>&&, Ref<PolicyDecisionSender>&&, WillContinueLoadInNewProcess = WillContinueLoadInNewProcess::No); |
1039 | void receivedNavigationPolicyDecision(WebCore::PolicyAction, API::Navigation*, ProcessSwapRequestedByClient, WebFrameProxy&, API::WebsitePolicies*, Ref<PolicyDecisionSender>&&); |
1040 | |
1041 | void backForwardRemovedItem(const WebCore::BackForwardItemIdentifier&); |
1042 | |
1043 | #if ENABLE(DRAG_SUPPORT) |
1044 | // Drag and drop support. |
1045 | void dragEntered(WebCore::DragData&, const String& dragStorageName = String()); |
1046 | void dragUpdated(WebCore::DragData&, const String& dragStorageName = String()); |
1047 | void dragExited(WebCore::DragData&, const String& dragStorageName = String()); |
1048 | void performDragOperation(WebCore::DragData&, const String& dragStorageName, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&); |
1049 | void didPerformDragOperation(bool handled); |
1050 | |
1051 | void didPerformDragControllerAction(uint64_t dragOperation, WebCore::DragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const WebCore::IntRect& insertionRect, const WebCore::IntRect& editableElementRect); |
1052 | void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation); |
1053 | void didStartDrag(); |
1054 | void dragCancelled(); |
1055 | void setDragCaretRect(const WebCore::IntRect&); |
1056 | #if PLATFORM(COCOA) |
1057 | void startDrag(const WebCore::DragItem&, const ShareableBitmap::Handle& dragImageHandle); |
1058 | void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension, |
1059 | const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize); |
1060 | #endif |
1061 | #if PLATFORM(GTK) |
1062 | void startDrag(WebSelectionData&&, uint64_t dragOperation, const ShareableBitmap::Handle& dragImage); |
1063 | #endif |
1064 | #endif |
1065 | |
1066 | void processDidBecomeUnresponsive(); |
1067 | void processDidBecomeResponsive(); |
1068 | void processDidTerminate(ProcessTerminationReason); |
1069 | void provisionalProcessDidTerminate(); |
1070 | void dispatchProcessDidTerminate(ProcessTerminationReason); |
1071 | void willChangeProcessIsResponsive(); |
1072 | void didChangeProcessIsResponsive(); |
1073 | |
1074 | #if PLATFORM(IOS_FAMILY) |
1075 | void processWillBecomeSuspended(); |
1076 | void processWillBecomeForeground(); |
1077 | #endif |
1078 | |
1079 | #if HAVE(VISIBILITY_PROPAGATION_VIEW) |
1080 | void didCreateContextForVisibilityPropagation(LayerHostingContextID); |
1081 | LayerHostingContextID contextIDForVisibilityPropagation() const { return m_contextIDForVisibilityPropagation; } |
1082 | #endif |
1083 | |
1084 | virtual void enterAcceleratedCompositingMode(const LayerTreeContext&); |
1085 | virtual void exitAcceleratedCompositingMode(); |
1086 | virtual void updateAcceleratedCompositingMode(const LayerTreeContext&); |
1087 | |
1088 | void addEditCommand(WebEditCommandProxy&); |
1089 | void removeEditCommand(WebEditCommandProxy&); |
1090 | void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo); |
1091 | |
1092 | bool canUndo(); |
1093 | bool canRedo(); |
1094 | |
1095 | #if PLATFORM(COCOA) |
1096 | void registerKeypressCommandName(const String& name) { m_knownKeypressCommandNames.add(name); } |
1097 | bool isValidKeypressCommandName(const String& name) const { return m_knownKeypressCommandNames.contains(name); } |
1098 | #endif |
1099 | |
1100 | WebProcessProxy& ensureRunningProcess(); |
1101 | WebProcessProxy& process() { return m_process; } |
1102 | ProcessID processIdentifier() const; |
1103 | |
1104 | WebPreferences& preferences() { return m_preferences; } |
1105 | void setPreferences(WebPreferences&); |
1106 | |
1107 | WebPageGroup& pageGroup() { return m_pageGroup; } |
1108 | |
1109 | bool hasRunningProcess() const; |
1110 | void launchInitialProcessIfNecessary(); |
1111 | |
1112 | #if ENABLE(DRAG_SUPPORT) |
1113 | WebCore::DragOperation currentDragOperation() const { return m_currentDragOperation; } |
1114 | WebCore::DragHandlingMethod currentDragHandlingMethod() const { return m_currentDragHandlingMethod; } |
1115 | bool currentDragIsOverFileInput() const { return m_currentDragIsOverFileInput; } |
1116 | unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; } |
1117 | WebCore::IntRect currentDragCaretRect() const { return m_currentDragCaretRect; } |
1118 | WebCore::IntRect currentDragCaretEditableElementRect() const { return m_currentDragCaretEditableElementRect; } |
1119 | void resetCurrentDragInformation(); |
1120 | void didEndDragging(); |
1121 | #endif |
1122 | |
1123 | void preferencesDidChange(); |
1124 | |
1125 | #if ENABLE(CONTEXT_MENUS) |
1126 | // Called by the WebContextMenuProxy. |
1127 | void (const WebContextMenuItemData&); |
1128 | void handleContextMenuKeyEvent(); |
1129 | #endif |
1130 | |
1131 | // Called by the WebOpenPanelResultListenerProxy. |
1132 | #if PLATFORM(IOS_FAMILY) |
1133 | void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const API::Data* iconData); |
1134 | #endif |
1135 | void didChooseFilesForOpenPanel(const Vector<String>&); |
1136 | void didCancelForOpenPanel(); |
1137 | |
1138 | WebPageCreationParameters creationParameters(WebProcessProxy&, DrawingAreaProxy&); |
1139 | |
1140 | void handleDownloadRequest(DownloadProxy&); |
1141 | |
1142 | void advanceToNextMisspelling(bool startBeforeSelection); |
1143 | void changeSpellingToWord(const String& word); |
1144 | #if USE(APPKIT) |
1145 | void uppercaseWord(); |
1146 | void lowercaseWord(); |
1147 | void capitalizeWord(); |
1148 | #endif |
1149 | |
1150 | #if PLATFORM(COCOA) |
1151 | bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; } |
1152 | void setSmartInsertDeleteEnabled(bool); |
1153 | #endif |
1154 | |
1155 | void setCanRunModal(bool); |
1156 | bool canRunModal(); |
1157 | |
1158 | void beginPrinting(WebFrameProxy*, const PrintInfo&); |
1159 | void endPrinting(); |
1160 | void computePagesForPrinting(WebFrameProxy*, const PrintInfo&, Ref<ComputedPagesCallback>&&); |
1161 | #if PLATFORM(COCOA) |
1162 | void drawRectToImage(WebFrameProxy*, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, Ref<ImageCallback>&&); |
1163 | void drawPagesToPDF(WebFrameProxy*, const PrintInfo&, uint32_t first, uint32_t count, Ref<DataCallback>&&); |
1164 | #if PLATFORM(IOS_FAMILY) |
1165 | uint32_t computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, DrawToPDFCallback::CallbackFunction&&); |
1166 | void drawToPDFCallback(const IPC::DataReference& pdfData, WebKit::CallbackID); |
1167 | #endif |
1168 | #elif PLATFORM(GTK) |
1169 | void drawPagesForPrinting(WebFrameProxy*, const PrintInfo&, Ref<PrintFinishedCallback>&&); |
1170 | #endif |
1171 | |
1172 | PageLoadState& pageLoadState() { return m_pageLoadState; } |
1173 | |
1174 | #if PLATFORM(COCOA) |
1175 | void handleAlternativeTextUIResult(const String& result); |
1176 | #endif |
1177 | |
1178 | void saveDataToFileInDownloadsFolder(String&& suggestedFilename, String&& mimeType, URL&& originatingURL, API::Data&); |
1179 | void savePDFToFileInDownloadsFolder(String&& suggestedFilename, URL&& originatingURL, const IPC::DataReference&); |
1180 | #if PLATFORM(COCOA) |
1181 | void savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID); |
1182 | void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const IPC::DataReference&, const String& pdfUUID); |
1183 | void openPDFFromTemporaryFolderWithNativeApplication(const String& pdfUUID); |
1184 | #endif |
1185 | |
1186 | #if ENABLE(PDFKIT_PLUGIN) |
1187 | void showPDFContextMenu(const WebKit::PDFContextMenu&, CompletionHandler<void(Optional<int32_t>&&)>&&); |
1188 | #endif |
1189 | WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; } |
1190 | |
1191 | uint64_t renderTreeSize() const { return m_renderTreeSize; } |
1192 | |
1193 | void setMediaVolume(float); |
1194 | void setMuted(WebCore::MediaProducer::MutedStateFlags); |
1195 | void setMayStartMediaWhenInWindow(bool); |
1196 | bool mayStartMediaWhenInWindow() const { return m_mayStartMediaWhenInWindow; } |
1197 | void setMediaCaptureEnabled(bool); |
1198 | bool mediaCaptureEnabled() const { return m_mediaCaptureEnabled; } |
1199 | void stopMediaCapture(); |
1200 | |
1201 | void stopAllMediaPlayback(); |
1202 | void suspendAllMediaPlayback(); |
1203 | void resumeAllMediaPlayback(); |
1204 | |
1205 | #if ENABLE(MEDIA_SESSION) |
1206 | bool hasMediaSessionWithActiveMediaElements() const { return m_hasMediaSessionWithActiveMediaElements; } |
1207 | void handleMediaEvent(WebCore::MediaEventType); |
1208 | void setVolumeOfMediaElement(double, uint64_t); |
1209 | #endif |
1210 | |
1211 | #if ENABLE(POINTER_LOCK) |
1212 | void didAllowPointerLock(); |
1213 | void didDenyPointerLock(); |
1214 | #endif |
1215 | |
1216 | // WebPopupMenuProxy::Client |
1217 | NativeWebMouseEvent* currentlyProcessedMouseDownEvent() override; |
1218 | |
1219 | void setSuppressVisibilityUpdates(bool flag); |
1220 | bool suppressVisibilityUpdates() { return m_suppressVisibilityUpdates; } |
1221 | |
1222 | #if PLATFORM(IOS_FAMILY) |
1223 | void willStartUserTriggeredZooming(); |
1224 | |
1225 | void potentialTapAtPosition(const WebCore::FloatPoint&, bool shouldRequestMagnificationInformation, uint64_t& requestID); |
1226 | void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, uint64_t layerTreeTransactionIdAtLastTouchStart, WebCore::PointerID); |
1227 | void cancelPotentialTap(); |
1228 | void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID); |
1229 | void handleTap(const WebCore::FloatPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t layerTreeTransactionIdAtLastTouchStart); |
1230 | void didRecognizeLongPress(); |
1231 | |
1232 | void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&); |
1233 | void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&); |
1234 | |
1235 | void blurFocusedElement(); |
1236 | void setIsShowingInputViewForFocusedElement(bool); |
1237 | #endif |
1238 | |
1239 | void postMessageToInjectedBundle(const String& messageName, API::Object* messageBody); |
1240 | |
1241 | #if ENABLE(INPUT_TYPE_COLOR) |
1242 | void setColorPickerColor(const WebCore::Color&); |
1243 | void endColorPicker(); |
1244 | #endif |
1245 | |
1246 | WebCore::IntSize viewLayoutSize() const { return m_viewLayoutSize; } |
1247 | void setViewLayoutSize(const WebCore::IntSize&); |
1248 | |
1249 | bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; } |
1250 | void setAutoSizingShouldExpandToViewHeight(bool); |
1251 | |
1252 | void setViewportSizeForCSSViewportUnits(const WebCore::IntSize&); |
1253 | WebCore::IntSize viewportSizeForCSSViewportUnits() const { return m_viewportSizeForCSSViewportUnits.valueOr(WebCore::IntSize()); } |
1254 | |
1255 | void didReceiveAuthenticationChallengeProxy(uint64_t frameID, Ref<AuthenticationChallengeProxy>&&); |
1256 | |
1257 | SpellDocumentTag spellDocumentTag(); |
1258 | |
1259 | void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&); |
1260 | void didCancelCheckingText(uint64_t requestID); |
1261 | |
1262 | void connectionWillOpen(IPC::Connection&); |
1263 | void webProcessWillShutDown(); |
1264 | |
1265 | void didSaveToPageCache(); |
1266 | |
1267 | void setScrollPinningBehavior(WebCore::ScrollPinningBehavior); |
1268 | WebCore::ScrollPinningBehavior scrollPinningBehavior() const { return m_scrollPinningBehavior; } |
1269 | |
1270 | void setOverlayScrollbarStyle(Optional<WebCore::ScrollbarOverlayStyle>); |
1271 | Optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() const { return m_scrollbarOverlayStyle; } |
1272 | |
1273 | // When the state of the window changes such that the WebPage needs immediate update, the UIProcess sends a new |
1274 | // ActivityStateChangeID to the WebProcess through the SetActivityState message. The UIProcess will wait till it |
1275 | // receives a CommitLayerTree which has an ActivityStateChangeID equal to or greater than the one it sent. |
1276 | ActivityStateChangeID takeNextActivityStateChangeID() { return ++m_currentActivityStateChangeID; } |
1277 | |
1278 | bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; } |
1279 | void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; } |
1280 | void recordAutomaticNavigationSnapshot(); |
1281 | void suppressNextAutomaticNavigationSnapshot() { m_shouldSuppressNextAutomaticNavigationSnapshot = true; } |
1282 | void recordNavigationSnapshot(WebBackForwardListItem&); |
1283 | void requestFocusedElementInformation(Function<void(const FocusedElementInformation&, CallbackBase::Error)>&&); |
1284 | |
1285 | #if PLATFORM(COCOA) || PLATFORM(GTK) |
1286 | RefPtr<ViewSnapshot> takeViewSnapshot(); |
1287 | #endif |
1288 | |
1289 | #if ENABLE(WEB_CRYPTO) |
1290 | void wrapCryptoKey(const Vector<uint8_t>&, CompletionHandler<void(bool, Vector<uint8_t>&&)>&&); |
1291 | void unwrapCryptoKey(const Vector<uint8_t>&, CompletionHandler<void(bool, Vector<uint8_t>&&)>&&); |
1292 | #endif |
1293 | |
1294 | void signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL&, CompletionHandler<void(String)>&&); |
1295 | |
1296 | void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, WTF::Function<void (const ShareableBitmap::Handle&, CallbackBase::Error)>&&); |
1297 | |
1298 | void navigationGestureDidBegin(); |
1299 | void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&); |
1300 | void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&); |
1301 | void navigationGestureDidEnd(); |
1302 | void navigationGestureSnapshotWasRemoved(); |
1303 | void willRecordNavigationSnapshot(WebBackForwardListItem&); |
1304 | |
1305 | bool isShowingNavigationGestureSnapshot() const { return m_isShowingNavigationGestureSnapshot; } |
1306 | |
1307 | bool isPlayingAudio() const { return !!(m_mediaState & WebCore::MediaProducer::IsPlayingAudio); } |
1308 | void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t); |
1309 | void updatePlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags); |
1310 | bool isCapturingAudio() const { return m_mediaState & WebCore::MediaProducer::AudioCaptureMask; } |
1311 | bool isCapturingVideo() const { return m_mediaState & WebCore::MediaProducer::VideoCaptureMask; } |
1312 | bool hasActiveAudioStream() const { return m_mediaState & WebCore::MediaProducer::HasActiveAudioCaptureDevice; } |
1313 | bool hasActiveVideoStream() const { return m_mediaState & WebCore::MediaProducer::HasActiveVideoCaptureDevice; } |
1314 | WebCore::MediaProducer::MediaStateFlags mediaStateFlags() const { return m_mediaState; } |
1315 | void handleAutoplayEvent(WebCore::AutoplayEvent, OptionSet<WebCore::AutoplayEventFlags>); |
1316 | |
1317 | void videoControlsManagerDidChange(); |
1318 | bool hasActiveVideoForControlsManager() const; |
1319 | void requestControlledElementID() const; |
1320 | void handleControlledElementIDResponse(const String&) const; |
1321 | bool isPlayingVideoInEnhancedFullscreen() const; |
1322 | |
1323 | #if PLATFORM(COCOA) |
1324 | void requestActiveNowPlayingSessionInfo(Ref<NowPlayingInfoCallback>&&); |
1325 | void nowPlayingInfoCallback(bool, bool, const String&, double, double, uint64_t, CallbackID); |
1326 | #endif |
1327 | |
1328 | #if ENABLE(MEDIA_SESSION) |
1329 | void hasMediaSessionWithActiveMediaElementsDidChange(bool); |
1330 | void mediaSessionMetadataDidChange(const WebCore::MediaSessionMetadata&); |
1331 | void focusedContentMediaElementDidChange(uint64_t); |
1332 | #endif |
1333 | |
1334 | #if PLATFORM(MAC) |
1335 | API::HitTestResult* lastMouseMoveHitTestResult() const { return m_lastMouseMoveHitTestResult.get(); } |
1336 | void performImmediateActionHitTestAtLocation(WebCore::FloatPoint); |
1337 | |
1338 | void immediateActionDidUpdate(); |
1339 | void immediateActionDidCancel(); |
1340 | void immediateActionDidComplete(); |
1341 | |
1342 | NSObject *immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>); |
1343 | |
1344 | void handleAcceptedCandidate(WebCore::TextCheckingResult); |
1345 | void didHandleAcceptedCandidate(); |
1346 | |
1347 | void setHeaderBannerHeightForTesting(int); |
1348 | void setFooterBannerHeightForTesting(int); |
1349 | #endif |
1350 | |
1351 | bool scrollingUpdatesDisabledForTesting(); |
1352 | |
1353 | void installActivityStateChangeCompletionHandler(Function<void()>&&); |
1354 | |
1355 | #if USE(UNIFIED_TEXT_CHECKING) |
1356 | void checkTextOfParagraph(const String& text, OptionSet<WebCore::TextCheckingType> checkingTypes, int32_t insertionPoint, CompletionHandler<void(Vector<WebCore::TextCheckingResult>&&)>&&); |
1357 | #endif |
1358 | void getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, CompletionHandler<void(Vector<String>&&)>&&); |
1359 | |
1360 | void setShouldDispatchFakeMouseMoveEvents(bool); |
1361 | |
1362 | // Diagnostic messages logging. |
1363 | void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample); |
1364 | void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, WebCore::ShouldSample); |
1365 | void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample); |
1366 | void logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, WebCore::ShouldSample); |
1367 | void logDiagnosticMessageWithValueDictionary(const String& message, const String& description, const WebCore::DiagnosticLoggingClient::ValueDictionary&, WebCore::ShouldSample); |
1368 | |
1369 | // Performance logging. |
1370 | void logScrollingEvent(uint32_t eventType, MonotonicTime, uint64_t); |
1371 | |
1372 | // Form validation messages. |
1373 | void showValidationMessage(const WebCore::IntRect& anchorClientRect, const String& message); |
1374 | void hideValidationMessage(); |
1375 | #if PLATFORM(COCOA) |
1376 | WebCore::ValidationBubble* validationBubble() const { return m_validationBubble.get(); } // For testing. |
1377 | #endif |
1378 | |
1379 | #if PLATFORM(IOS_FAMILY) |
1380 | void setIsKeyboardAnimatingIn(bool isKeyboardAnimatingIn) { m_isKeyboardAnimatingIn = isKeyboardAnimatingIn; } |
1381 | #endif |
1382 | |
1383 | #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY) |
1384 | void addPlaybackTargetPickerClient(uint64_t); |
1385 | void removePlaybackTargetPickerClient(uint64_t); |
1386 | void showPlaybackTargetPicker(uint64_t, const WebCore::FloatRect&, bool hasVideo); |
1387 | void playbackTargetPickerClientStateDidChange(uint64_t, WebCore::MediaProducer::MediaStateFlags); |
1388 | void setMockMediaPlaybackTargetPickerEnabled(bool); |
1389 | void setMockMediaPlaybackTargetPickerState(const String&, WebCore::MediaPlaybackTargetContext::State); |
1390 | |
1391 | // WebMediaSessionManagerClient |
1392 | void setPlaybackTarget(uint64_t, Ref<WebCore::MediaPlaybackTarget>&&) override; |
1393 | void externalOutputDeviceAvailableDidChange(uint64_t, bool) override; |
1394 | void setShouldPlayToPlaybackTarget(uint64_t, bool) override; |
1395 | #endif |
1396 | |
1397 | void didChangeBackgroundColor(); |
1398 | void didLayoutForCustomContentProvider(); |
1399 | |
1400 | // For testing |
1401 | void clearWheelEventTestTrigger(); |
1402 | void callAfterNextPresentationUpdate(WTF::Function<void (CallbackBase::Error)>&&); |
1403 | |
1404 | void didReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone>); |
1405 | |
1406 | void didRestoreScrollPosition(); |
1407 | |
1408 | void getLoadDecisionForIcon(const WebCore::LinkIcon&, WebKit::CallbackID); |
1409 | void finishedLoadingIcon(WebKit::CallbackID, const IPC::DataReference&); |
1410 | |
1411 | void setFocus(bool focused); |
1412 | void setWindowFrame(const WebCore::FloatRect&); |
1413 | void getWindowFrame(Messages::WebPageProxy::GetWindowFrame::DelayedReply&&); |
1414 | void getWindowFrameWithCallback(Function<void(WebCore::FloatRect)>&&); |
1415 | |
1416 | bool isResourceCachingDisabled() const { return m_isResourceCachingDisabled; } |
1417 | void setResourceCachingDisabled(bool); |
1418 | |
1419 | WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection(); |
1420 | void setUserInterfaceLayoutDirection(WebCore::UserInterfaceLayoutDirection); |
1421 | |
1422 | bool hasHadSelectionChangesFromUserInteraction() const { return m_hasHadSelectionChangesFromUserInteraction; } |
1423 | bool isTouchBarUpdateSupressedForHiddenContentEditable() const { return m_isTouchBarUpdateSupressedForHiddenContentEditable; } |
1424 | bool isNeverRichlyEditableForTouchBar() const { return m_isNeverRichlyEditableForTouchBar; } |
1425 | |
1426 | bool isAlwaysOnLoggingAllowed() const; |
1427 | |
1428 | #if ENABLE(GAMEPAD) |
1429 | void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible); |
1430 | #endif |
1431 | |
1432 | void isLoadingChanged() { activityStateDidChange(WebCore::ActivityState::IsLoading); } |
1433 | |
1434 | void clearUserMediaState(); |
1435 | |
1436 | void setShouldSkipWaitingForPaintAfterNextViewDidMoveToWindow(bool shouldSkip) { m_shouldSkipWaitingForPaintAfterNextViewDidMoveToWindow = shouldSkip; } |
1437 | |
1438 | void setURLSchemeHandlerForScheme(Ref<WebURLSchemeHandler>&&, const String& scheme); |
1439 | WebURLSchemeHandler* urlSchemeHandlerForScheme(const String& scheme); |
1440 | |
1441 | #if PLATFORM(COCOA) |
1442 | void createSandboxExtensionsIfNeeded(const Vector<String>& files, SandboxExtension::Handle& fileReadHandle, SandboxExtension::HandleArray& fileUploadHandles); |
1443 | #endif |
1444 | void editorStateChanged(const EditorState&); |
1445 | void updateEditorState(const EditorState&); |
1446 | void scheduleFullEditorStateUpdate(); |
1447 | void dispatchDidReceiveEditorStateAfterFocus(); |
1448 | |
1449 | #if PLATFORM(COCOA) |
1450 | void touchBarMenuDataRemoved(); |
1451 | void touchBarMenuDataChanged(const TouchBarMenuData&); |
1452 | void touchBarMenuItemDataAdded(const TouchBarMenuItemData&); |
1453 | void touchBarMenuItemDataRemoved(const TouchBarMenuItemData&); |
1454 | #endif |
1455 | |
1456 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1457 | void requestStorageAccessConfirm(const WebCore::RegistrableDomain& subFrameDomain, const WebCore::RegistrableDomain& topFrameDomain, uint64_t frameID, CompletionHandler<void(bool)>&&); |
1458 | void didCommitCrossSiteLoadWithDataTransferFromPrevalentResource(); |
1459 | #endif |
1460 | |
1461 | #if ENABLE(DEVICE_ORIENTATION) |
1462 | void shouldAllowDeviceOrientationAndMotionAccess(uint64_t frameID, WebCore::SecurityOriginData&&, bool mayPrompt, CompletionHandler<void(WebCore::DeviceOrientationOrMotionPermissionState)>&&); |
1463 | #endif |
1464 | |
1465 | static WebPageProxy* nonEphemeralWebPageProxy(); |
1466 | |
1467 | #if ENABLE(ATTACHMENT_ELEMENT) |
1468 | RefPtr<API::Attachment> attachmentForIdentifier(const String& identifier) const; |
1469 | void insertAttachment(Ref<API::Attachment>&&, Function<void(CallbackBase::Error)>&&); |
1470 | void updateAttachmentAttributes(const API::Attachment&, Function<void(CallbackBase::Error)>&&); |
1471 | void serializedAttachmentDataForIdentifiers(const Vector<String>&, CompletionHandler<void(Vector<WebCore::SerializedAttachmentData>&&)>&&); |
1472 | void registerAttachmentIdentifier(const String&); |
1473 | void didInvalidateDataForAttachment(API::Attachment&); |
1474 | |
1475 | enum class ShouldUpdateAttachmentAttributes : bool { No, Yes }; |
1476 | ShouldUpdateAttachmentAttributes willUpdateAttachmentAttributes(const API::Attachment&); |
1477 | #endif |
1478 | |
1479 | #if ENABLE(APPLICATION_MANIFEST) |
1480 | void getApplicationManifest(Function<void(const Optional<WebCore::ApplicationManifest>&, CallbackBase::Error)>&&); |
1481 | #endif |
1482 | |
1483 | WebPreferencesStore preferencesStore() const; |
1484 | |
1485 | void setDefersLoadingForTesting(bool); |
1486 | |
1487 | bool isPageOpenedByDOMShowingInitialEmptyDocument() const; |
1488 | |
1489 | WebCore::IntRect syncRootViewToScreen(const WebCore::IntRect& viewRect); |
1490 | |
1491 | #if ENABLE(DATALIST_ELEMENT) |
1492 | void didSelectOption(const String&); |
1493 | void didCloseSuggestions(); |
1494 | #endif |
1495 | |
1496 | void updateCurrentModifierState(); |
1497 | |
1498 | #if HAVE(PENCILKIT) |
1499 | EditableImageController& editableImageController() { return *m_editableImageController; } |
1500 | #endif |
1501 | |
1502 | ProvisionalPageProxy* provisionalPageProxy() const { return m_provisionalPage.get(); } |
1503 | void commitProvisionalPage(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&); |
1504 | |
1505 | // Logic shared between the WebPageProxy and the ProvisionalPageProxy. |
1506 | void didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&); |
1507 | void didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&); |
1508 | void didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&); |
1509 | void didPerformServerRedirectShared(Ref<WebProcessProxy>&&, const String& sourceURLString, const String& destinationURLString, uint64_t frameID); |
1510 | void didPerformClientRedirectShared(Ref<WebProcessProxy>&&, const String& sourceURLString, const String& destinationURLString, uint64_t frameID); |
1511 | void didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&&, const WebNavigationDataStore&, uint64_t frameID); |
1512 | void didChangeProvisionalURLForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, URL&&); |
1513 | void decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier, |
1514 | uint64_t navigationID, NavigationActionData&&, FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, |
1515 | IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); |
1516 | void decidePolicyForResponseShared(Ref<WebProcessProxy>&&, uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, WebCore::PolicyCheckIdentifier, |
1517 | uint64_t navigationID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); |
1518 | void startURLSchemeTaskShared(Ref<WebProcessProxy>&&, URLSchemeTaskParameters&&); |
1519 | void loadDataWithNavigationShared(Ref<WebProcessProxy>&&, API::Navigation&, const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& = WTF::nullopt); |
1520 | void loadRequestWithNavigationShared(Ref<WebProcessProxy>&&, API::Navigation&, WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& = WTF::nullopt); |
1521 | void backForwardGoToItemShared(Ref<WebProcessProxy>&&, const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); |
1522 | void decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, |
1523 | FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, |
1524 | WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); |
1525 | #if USE(QUICK_LOOK) |
1526 | void didRequestPasswordForQuickLookDocumentInMainFrameShared(Ref<WebProcessProxy>&&, const String& fileName); |
1527 | #endif |
1528 | #if ENABLE(CONTENT_FILTERING) |
1529 | void contentFilterDidBlockLoadForFrameShared(Ref<WebProcessProxy>&&, const WebCore::ContentFilterUnblockHandler&, uint64_t frameID); |
1530 | #endif |
1531 | |
1532 | void dumpAdClickAttribution(CompletionHandler<void(const String&)>&&); |
1533 | void clearAdClickAttribution(CompletionHandler<void()>&&); |
1534 | void setAdClickAttributionOverrideTimerForTesting(bool value, CompletionHandler<void()>&&); |
1535 | void setAdClickAttributionConversionURLForTesting(const URL&, CompletionHandler<void()>&&); |
1536 | void markAdClickAttributionsAsExpiredForTesting(CompletionHandler<void()>&&); |
1537 | |
1538 | #if ENABLE(SPEECH_SYNTHESIS) |
1539 | void speechSynthesisVoiceList(CompletionHandler<void(Vector<WebSpeechSynthesisVoice>&&)>&&); |
1540 | void speechSynthesisSpeak(const String&, const String&, float volume, float rate, float pitch, MonotonicTime startTime, const String& voiceURI, const String& voiceName, const String& voiceLang, bool localService, bool defaultVoice, CompletionHandler<void()>&&); |
1541 | void speechSynthesisCancel(); |
1542 | void speechSynthesisPause(CompletionHandler<void()>&&); |
1543 | void speechSynthesisResume(CompletionHandler<void()>&&); |
1544 | #endif |
1545 | |
1546 | void configureLoggingChannel(const String&, WTFLogChannelState, WTFLogLevel); |
1547 | |
1548 | void addObserver(WebViewDidMoveToWindowObserver&); |
1549 | void removeObserver(WebViewDidMoveToWindowObserver&); |
1550 | void webViewDidMoveToWindow(); |
1551 | |
1552 | #if HAVE(LOAD_OPTIMIZER) |
1553 | WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_1 |
1554 | #endif |
1555 | |
1556 | Logger& logger(); |
1557 | |
1558 | // IPC::MessageReceiver |
1559 | // Implemented in generated WebPageProxyMessageReceiver.cpp |
1560 | void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; |
1561 | void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; |
1562 | |
1563 | void requestStorageSpace(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, WTF::CompletionHandler<void(uint64_t)>&&); |
1564 | |
1565 | private: |
1566 | WebPageProxy(PageClient&, WebProcessProxy&, WebCore::PageIdentifier, Ref<API::PageConfiguration>&&); |
1567 | void platformInitialize(); |
1568 | |
1569 | void notifyProcessPoolToPrewarm(); |
1570 | |
1571 | RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem&, WebCore::FrameLoadType); |
1572 | |
1573 | void updateActivityState(OptionSet<WebCore::ActivityState::Flag> flagsToUpdate = WebCore::ActivityState::allFlags()); |
1574 | void updateThrottleState(); |
1575 | void updateHiddenPageThrottlingAutoIncreases(); |
1576 | |
1577 | bool suspendCurrentPageIfPossible(API::Navigation&, Optional<uint64_t> mainFrameID, ProcessSwapRequestedByClient, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode); |
1578 | |
1579 | enum class ResetStateReason { |
1580 | PageInvalidated, |
1581 | WebProcessExited, |
1582 | NavigationSwap, |
1583 | }; |
1584 | void resetState(ResetStateReason); |
1585 | void resetStateAfterProcessExited(ProcessTerminationReason); |
1586 | |
1587 | void setUserAgent(String&&); |
1588 | |
1589 | // IPC::MessageSender |
1590 | bool sendMessage(std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>) override; |
1591 | IPC::Connection* messageSenderConnection() const override; |
1592 | uint64_t messageSenderDestinationID() const override; |
1593 | |
1594 | // WebPopupMenuProxy::Client |
1595 | void (WebPopupMenuProxy*, int32_t newSelectedIndex) override; |
1596 | void (WebPopupMenuProxy*, int32_t index) override; |
1597 | #if PLATFORM(GTK) |
1598 | void () override; |
1599 | #endif |
1600 | |
1601 | #if ENABLE(POINTER_LOCK) |
1602 | void requestPointerLock(); |
1603 | void requestPointerUnlock(); |
1604 | #endif |
1605 | |
1606 | void didCreateMainFrame(uint64_t frameID); |
1607 | void didCreateSubframe(uint64_t frameID); |
1608 | void didCreateWindow(uint64_t frameID, WebCore::GlobalWindowIdentifier&&); |
1609 | |
1610 | void didStartProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, URL&&, URL&& unreachableURL, const UserData&); |
1611 | void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceRequest&&, const UserData&); |
1612 | void willPerformClientRedirectForFrame(uint64_t frameID, const String& url, double delay, WebCore::LockBackForwardList); |
1613 | void didCancelClientRedirectForFrame(uint64_t frameID); |
1614 | void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, URL&&); |
1615 | void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, WebCore::WillContinueLoading, const UserData&); |
1616 | void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&); |
1617 | void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&); |
1618 | void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&); |
1619 | void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&); |
1620 | void didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, URL&&, const UserData&); |
1621 | void didChangeMainDocument(uint64_t frameID); |
1622 | void didExplicitOpenForFrame(uint64_t frameID, URL&&); |
1623 | |
1624 | void didReceiveTitleForFrame(uint64_t frameID, const String&, const UserData&); |
1625 | void didFirstLayoutForFrame(uint64_t frameID, const UserData&); |
1626 | void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, const UserData&); |
1627 | void didDisplayInsecureContentForFrame(uint64_t frameID, const UserData&); |
1628 | void didRunInsecureContentForFrame(uint64_t frameID, const UserData&); |
1629 | void didDetectXSSForFrame(uint64_t frameID, const UserData&); |
1630 | void mainFramePluginHandlesPageScaleGestureDidChange(bool); |
1631 | void frameDidBecomeFrameSet(uint64_t frameID, bool); |
1632 | void didStartProgress(); |
1633 | void didChangeProgress(double); |
1634 | void didFinishProgress(); |
1635 | void setNetworkRequestsInProgress(bool); |
1636 | |
1637 | void hasInsecureContent(CompletionHandler<void(WebCore::HasInsecureContent)>&&); |
1638 | |
1639 | void didDestroyNavigation(uint64_t navigationID); |
1640 | |
1641 | void decidePolicyForNavigationAction(Ref<WebProcessProxy>&&, WebFrameProxy&, WebCore::SecurityOriginData&&, uint64_t navigationID, NavigationActionData&&, |
1642 | FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, |
1643 | WebCore::ResourceResponse&& redirectResponse, const UserData&, Ref<PolicyDecisionSender>&&); |
1644 | void decidePolicyForNavigationActionAsync(uint64_t frameID, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, |
1645 | FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, |
1646 | WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); |
1647 | void decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, |
1648 | FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, |
1649 | WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); |
1650 | void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, NavigationActionData&&, |
1651 | WebCore::ResourceRequest&&, const String& frameName, uint64_t listenerID, const UserData&); |
1652 | void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, |
1653 | const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); |
1654 | void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&); |
1655 | void beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListenerProxy&); |
1656 | |
1657 | WebContentMode effectiveContentModeAfterAdjustingPolicies(API::WebsitePolicies&, const WebCore::ResourceRequest&); |
1658 | |
1659 | void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&); |
1660 | |
1661 | void contentRuleListNotification(URL&&, WebCore::ContentRuleListResults&&); |
1662 | |
1663 | // History client |
1664 | void didNavigateWithNavigationData(const WebNavigationDataStore&, uint64_t frameID); |
1665 | void didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID); |
1666 | void didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID); |
1667 | void didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID); |
1668 | |
1669 | // UI client |
1670 | void createNewPage(const FrameInfoData&, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest&&, WebCore::WindowFeatures&&, NavigationActionData&&, Messages::WebPageProxy::CreateNewPage::DelayedReply&&); |
1671 | void showPage(); |
1672 | void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply&&); |
1673 | void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply&&); |
1674 | void runJavaScriptPrompt(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply&&); |
1675 | void setStatusText(const String&); |
1676 | void mouseDidMoveOverElement(WebHitTestResultData&&, uint32_t modifiers, UserData&&); |
1677 | |
1678 | #if ENABLE(NETSCAPE_PLUGIN_API) |
1679 | void unavailablePluginButtonClicked(uint32_t opaquePluginUnavailabilityReason, const String& mimeType, const String& pluginURLString, const String& pluginsPageURLString, const String& frameURLString, const String& pageURLString); |
1680 | #endif // ENABLE(NETSCAPE_PLUGIN_API) |
1681 | #if ENABLE(WEBGL) |
1682 | void webGLPolicyForURL(URL&&, Messages::WebPageProxy::WebGLPolicyForURL::DelayedReply&&); |
1683 | void resolveWebGLPolicyForURL(URL&&, Messages::WebPageProxy::ResolveWebGLPolicyForURL::DelayedReply&&); |
1684 | #endif // ENABLE(WEBGL) |
1685 | void setToolbarsAreVisible(bool toolbarsAreVisible); |
1686 | void getToolbarsAreVisible(Messages::WebPageProxy::GetToolbarsAreVisible::DelayedReply&&); |
1687 | void (bool ); |
1688 | void getMenuBarIsVisible(Messages::WebPageProxy::GetMenuBarIsVisible::DelayedReply&&); |
1689 | void setStatusBarIsVisible(bool statusBarIsVisible); |
1690 | void getStatusBarIsVisible(Messages::WebPageProxy::GetStatusBarIsVisible::DelayedReply&&); |
1691 | void getIsViewVisible(bool&); |
1692 | void setIsResizable(bool isResizable); |
1693 | void screenToRootView(const WebCore::IntPoint& screenPoint, Messages::WebPageProxy::ScreenToRootView::DelayedReply&&); |
1694 | void rootViewToScreen(const WebCore::IntRect& viewRect, Messages::WebPageProxy::RootViewToScreen::DelayedReply&&); |
1695 | void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, CompletionHandler<void(WebCore::IntPoint)>&&); |
1696 | void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, CompletionHandler<void(WebCore::IntRect)>&&); |
1697 | void runBeforeUnloadConfirmPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&&); |
1698 | void didChangeViewportProperties(const WebCore::ViewportAttributes&); |
1699 | void pageDidScroll(); |
1700 | void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&); |
1701 | void showShareSheet(const WebCore::ShareDataWithParsedURL&, ShareSheetCallbackID); |
1702 | void printFrame(uint64_t frameID, CompletionHandler<void()>&&); |
1703 | void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&&); |
1704 | void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply&&); |
1705 | void requestGeolocationPermissionForFrame(uint64_t geolocationID, uint64_t frameID, String originIdentifier); |
1706 | |
1707 | #if ENABLE(MEDIA_STREAM) |
1708 | UserMediaPermissionRequestManagerProxy& userMediaPermissionRequestManager(); |
1709 | #endif |
1710 | void requestUserMediaPermissionForFrame(uint64_t userMediaID, uint64_t frameID, const WebCore::SecurityOriginData& userMediaDocumentOriginIdentifier, const WebCore::SecurityOriginData& topLevelDocumentOriginIdentifier, WebCore::MediaStreamRequest&&); |
1711 | void enumerateMediaDevicesForFrame(uint64_t userMediaID, uint64_t frameID, const WebCore::SecurityOriginData& userMediaDocumentOriginData, const WebCore::SecurityOriginData& topLevelDocumentOriginData); |
1712 | void beginMonitoringCaptureDevices(); |
1713 | |
1714 | void runModal(); |
1715 | void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&); |
1716 | void recommendedScrollbarStyleDidChange(int32_t newStyle); |
1717 | void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar); |
1718 | void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide); |
1719 | void didChangePageCount(unsigned); |
1720 | void pageExtendedBackgroundColorDidChange(const WebCore::Color&); |
1721 | #if ENABLE(NETSCAPE_PLUGIN_API) |
1722 | void didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString); |
1723 | void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured); |
1724 | #endif // ENABLE(NETSCAPE_PLUGIN_API) |
1725 | void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; } |
1726 | |
1727 | void launchProcess(const WebCore::RegistrableDomain&); |
1728 | void swapToWebProcess(Ref<WebProcessProxy>&&, std::unique_ptr<DrawingAreaProxy>&&, RefPtr<WebFrameProxy>&& mainFrame); |
1729 | void didFailToSuspendAfterProcessSwap(); |
1730 | void didSuspendAfterProcessSwap(); |
1731 | |
1732 | enum class IsProcessSwap { No, Yes }; |
1733 | void finishAttachingToWebProcess(IsProcessSwap); |
1734 | |
1735 | RefPtr<API::Navigation> launchProcessForReload(); |
1736 | RefPtr<API::Navigation> launchProcessWithItem(WebBackForwardListItem&); |
1737 | |
1738 | void requestNotificationPermission(uint64_t notificationID, const String& originString); |
1739 | void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, WebCore::NotificationDirection, const String& originString, uint64_t notificationID); |
1740 | void cancelNotification(uint64_t notificationID); |
1741 | void clearNotifications(const Vector<uint64_t>& notificationIDs); |
1742 | void didDestroyNotification(uint64_t notificationID); |
1743 | |
1744 | void didChangeContentSize(const WebCore::IntSize&); |
1745 | void didChangeIntrinsicContentSize(const WebCore::IntSize&); |
1746 | |
1747 | #if ENABLE(INPUT_TYPE_COLOR) |
1748 | void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&, Vector<WebCore::Color>&&); |
1749 | void didChooseColor(const WebCore::Color&) override; |
1750 | void didEndColorPicker() override; |
1751 | #endif |
1752 | |
1753 | #if ENABLE(DATALIST_ELEMENT) |
1754 | void showDataListSuggestions(WebCore::DataListSuggestionInformation&&); |
1755 | void handleKeydownInDataList(const String&); |
1756 | void endDataListSuggestions(); |
1757 | #endif |
1758 | |
1759 | void closeOverlayedViews(); |
1760 | |
1761 | void compositionWasCanceled(); |
1762 | void setHasHadSelectionChangesFromUserInteraction(bool); |
1763 | void setIsTouchBarUpdateSupressedForHiddenContentEditable(bool); |
1764 | void setIsNeverRichlyEditableForTouchBar(bool); |
1765 | |
1766 | void requestDOMPasteAccess(const WebCore::IntRect&, const String&, CompletionHandler<void(WebCore::DOMPasteAccessResponse)>&&); |
1767 | |
1768 | // Back/Forward list management |
1769 | void backForwardAddItem(BackForwardListItemState&&); |
1770 | void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); |
1771 | void backForwardItemAtIndex(int32_t index, CompletionHandler<void(Optional<WebCore::BackForwardItemIdentifier>&&)>&&); |
1772 | void backForwardBackListCount(CompletionHandler<void(uint32_t)>&&); |
1773 | void backForwardForwardListCount(CompletionHandler<void(uint32_t)>&&); |
1774 | void backForwardClear(); |
1775 | |
1776 | // Undo management |
1777 | void registerEditCommandForUndo(WebUndoStepID commandID, const String& label); |
1778 | void registerInsertionUndoGrouping(); |
1779 | void clearAllEditCommands(); |
1780 | void canUndoRedo(UndoOrRedo, CompletionHandler<void(bool)>&&); |
1781 | void executeUndoRedo(UndoOrRedo, CompletionHandler<void()>&&); |
1782 | |
1783 | // Keyboard handling |
1784 | #if PLATFORM(COCOA) |
1785 | void executeSavedCommandBySelector(const String& selector, CompletionHandler<void(bool)>&&); |
1786 | #endif |
1787 | |
1788 | #if PLATFORM(GTK) |
1789 | void getEditorCommandsForKeyEvent(const AtomString&, Vector<String>&); |
1790 | #endif |
1791 | |
1792 | #if USE(ATK) |
1793 | void bindAccessibilityTree(const String&); |
1794 | void showEmojiPicker(const WebCore::IntRect&, CompletionHandler<void(String)>&&); |
1795 | #endif |
1796 | |
1797 | // Popup Menu. |
1798 | void (const WebCore::IntRect& rect, uint64_t textDirection, const Vector<WebPopupItem>& items, int32_t selectedIndex, const PlatformPopupMenuData&); |
1799 | void (); |
1800 | |
1801 | #if ENABLE(CONTEXT_MENUS) |
1802 | void (ContextMenuContextData&&, const UserData&); |
1803 | #endif |
1804 | |
1805 | #if ENABLE(TELEPHONE_NUMBER_DETECTION) |
1806 | #if PLATFORM(MAC) |
1807 | void showTelephoneNumberMenu(const String& telephoneNumber, const WebCore::IntPoint&); |
1808 | #endif |
1809 | #endif |
1810 | |
1811 | // Search popup results |
1812 | void saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&); |
1813 | void loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&&); |
1814 | |
1815 | #if PLATFORM(COCOA) |
1816 | // Speech. |
1817 | void getIsSpeaking(CompletionHandler<void(bool)>&&); |
1818 | void speak(const String&); |
1819 | void stopSpeaking(); |
1820 | |
1821 | // Spotlight. |
1822 | void searchWithSpotlight(const String&); |
1823 | |
1824 | void searchTheWeb(const String&); |
1825 | |
1826 | // Dictionary. |
1827 | void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&); |
1828 | #endif |
1829 | |
1830 | #if PLATFORM(MAC) |
1831 | bool appleMailPaginationQuirkEnabled(); |
1832 | #endif |
1833 | |
1834 | #if PLATFORM(MAC) |
1835 | // FIXME: Need to support iOS too, but there is no isAppleMail for iOS. |
1836 | bool appleMailLinesClampEnabled(); |
1837 | #endif |
1838 | |
1839 | // Spelling and grammar. |
1840 | void checkSpellingOfString(const String& text, CompletionHandler<void(int32_t misspellingLocation, int32_t misspellingLength)>&&); |
1841 | void checkGrammarOfString(const String& text, CompletionHandler<void(Vector<WebCore::GrammarDetail>&&, int32_t badGrammarLocation, int32_t badGrammarLength)>&&); |
1842 | void spellingUIIsShowing(CompletionHandler<void(bool)>&&); |
1843 | void updateSpellingUIWithMisspelledWord(const String& misspelledWord); |
1844 | void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&); |
1845 | void learnWord(const String& word); |
1846 | void ignoreWord(const String& word); |
1847 | void requestCheckingOfString(uint64_t requestID, const WebCore::TextCheckingRequestData&, int32_t insertionPoint); |
1848 | |
1849 | void takeFocus(uint32_t direction); |
1850 | void setToolTip(const String&); |
1851 | void setCursor(const WebCore::Cursor&); |
1852 | void setCursorHiddenUntilMouseMoves(bool); |
1853 | |
1854 | void didReceiveEvent(uint32_t opaqueType, bool handled); |
1855 | |
1856 | void voidCallback(CallbackID); |
1857 | void dataCallback(const IPC::DataReference&, CallbackID); |
1858 | void imageCallback(const ShareableBitmap::Handle&, CallbackID); |
1859 | void stringCallback(const String&, CallbackID); |
1860 | void invalidateStringCallback(CallbackID); |
1861 | void scriptValueCallback(const IPC::DataReference&, bool hadException, const WebCore::ExceptionDetails&, CallbackID); |
1862 | void computedPagesCallback(const Vector<WebCore::IntRect>&, double totalScaleFactorForPrinting, const WebCore::FloatBoxExtent& computedPageMargin, CallbackID); |
1863 | void validateCommandCallback(const String&, bool, int, CallbackID); |
1864 | void unsignedCallback(uint64_t, CallbackID); |
1865 | void editingRangeCallback(const EditingRange&, CallbackID); |
1866 | #if ENABLE(APPLICATION_MANIFEST) |
1867 | void applicationManifestCallback(const Optional<WebCore::ApplicationManifest>&, CallbackID); |
1868 | #endif |
1869 | #if PLATFORM(COCOA) |
1870 | void machSendRightCallback(const WTF::MachSendRight&, CallbackID); |
1871 | #endif |
1872 | void rectForCharacterRangeCallback(const WebCore::IntRect&, const EditingRange&, CallbackID); |
1873 | #if PLATFORM(MAC) |
1874 | void attributedStringForCharacterRangeCallback(const AttributedString&, const EditingRange&, CallbackID); |
1875 | void fontAtSelectionCallback(const String&, double, bool, CallbackID); |
1876 | #endif |
1877 | #if PLATFORM(IOS_FAMILY) |
1878 | void gestureCallback(const WebCore::IntPoint&, uint32_t gestureType, uint32_t gestureState, uint32_t flags, CallbackID); |
1879 | void touchesCallback(const WebCore::IntPoint&, uint32_t touches, uint32_t flags, CallbackID); |
1880 | void selectionContextCallback(const String& selectedText, const String& beforeText, const String& afterText, CallbackID); |
1881 | void interpretKeyEvent(const EditorState&, bool isCharEvent, CompletionHandler<void(bool)>&&); |
1882 | void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect, WebCore::RouteSharingPolicy, const String&); |
1883 | void selectionRectsCallback(const Vector<WebCore::SelectionRect>&, CallbackID); |
1884 | |
1885 | void updateStringForFind(const String&); |
1886 | #endif |
1887 | #if PLATFORM(GTK) |
1888 | void printFinishedCallback(const WebCore::ResourceError&, CallbackID); |
1889 | #endif |
1890 | |
1891 | void focusedFrameChanged(uint64_t frameID); |
1892 | void frameSetLargestFrameChanged(uint64_t frameID); |
1893 | |
1894 | void didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference&); |
1895 | |
1896 | #if PLATFORM(COCOA) |
1897 | void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus); |
1898 | void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState); |
1899 | #endif |
1900 | |
1901 | bool maybeInitializeSandboxExtensionHandle(WebProcessProxy&, const URL&, SandboxExtension::Handle&); |
1902 | |
1903 | #if USE(AUTOMATIC_TEXT_REPLACEMENT) |
1904 | void toggleSmartInsertDelete(); |
1905 | void toggleAutomaticQuoteSubstitution(); |
1906 | void toggleAutomaticLinkDetection(); |
1907 | void toggleAutomaticDashSubstitution(); |
1908 | void toggleAutomaticTextReplacement(); |
1909 | #endif |
1910 | |
1911 | #if PLATFORM(MAC) |
1912 | void substitutionsPanelIsShowing(CompletionHandler<void(bool)>&&); |
1913 | void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings); |
1914 | void dismissCorrectionPanel(int32_t reason); |
1915 | void dismissCorrectionPanelSoon(int32_t reason, CompletionHandler<void(String)>&&); |
1916 | void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString); |
1917 | |
1918 | #if USE(DICTATION_ALTERNATIVES) |
1919 | void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext); |
1920 | void removeDictationAlternatives(uint64_t dictationContext); |
1921 | void dictationAlternatives(uint64_t dictationContext, CompletionHandler<void(Vector<String>&&)>&&); |
1922 | #endif |
1923 | |
1924 | void setEditableElementIsFocused(bool); |
1925 | #endif // PLATFORM(MAC) |
1926 | |
1927 | #if PLATFORM(IOS_FAMILY) |
1928 | WebCore::FloatSize screenSize(); |
1929 | WebCore::FloatSize availableScreenSize(); |
1930 | WebCore::FloatSize overrideScreenSize(); |
1931 | float textAutosizingWidth(); |
1932 | |
1933 | void couldNotRestorePageState(); |
1934 | void restorePageState(Optional<WebCore::FloatPoint> scrollPosition, const WebCore::FloatPoint& scrollOrigin, const WebCore::FloatBoxExtent& obscuredInsetsOnSave, double scale); |
1935 | void restorePageCenterAndScale(Optional<WebCore::FloatPoint>, double scale); |
1936 | |
1937 | void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& geometries, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius, bool nodeHasBuiltInClickHandling); |
1938 | |
1939 | void elementDidFocus(const FocusedElementInformation&, bool userIsInteracting, bool blurPreviousNode, OptionSet<WebCore::ActivityState::Flag> activityStateChanges, const UserData&); |
1940 | void elementDidBlur(); |
1941 | void focusedElementDidChangeInputMode(WebCore::InputMode); |
1942 | void didReceiveEditorStateUpdateAfterFocus(); |
1943 | |
1944 | void showInspectorHighlight(const WebCore::Highlight&); |
1945 | void hideInspectorHighlight(); |
1946 | |
1947 | void enableInspectorNodeSearch(); |
1948 | void disableInspectorNodeSearch(); |
1949 | void focusedElementInformationCallback(const FocusedElementInformation&, CallbackID); |
1950 | #endif // PLATFORM(IOS_FAMILY) |
1951 | |
1952 | #if ENABLE(DATA_DETECTION) |
1953 | RetainPtr<NSArray> m_dataDetectionResults; |
1954 | #endif |
1955 | |
1956 | void clearLoadDependentCallbacks(); |
1957 | |
1958 | void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&); |
1959 | |
1960 | void updateBackingStoreDiscardableState(); |
1961 | |
1962 | void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; } |
1963 | |
1964 | #if PLATFORM(X11) |
1965 | void createPluginContainer(CompletionHandler<void(uint64_t)>&&); |
1966 | void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID); |
1967 | void windowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID); |
1968 | #endif |
1969 | |
1970 | void processNextQueuedWheelEvent(); |
1971 | void sendWheelEvent(const WebWheelEvent&); |
1972 | bool shouldProcessWheelEventNow(const WebWheelEvent&) const; |
1973 | |
1974 | #if ENABLE(TOUCH_EVENTS) |
1975 | void updateTouchEventTracking(const WebTouchEvent&); |
1976 | WebCore::TrackingType touchEventTrackingType(const WebTouchEvent&) const; |
1977 | #endif |
1978 | |
1979 | #if ENABLE(NETSCAPE_PLUGIN_API) |
1980 | void findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, Messages::WebPageProxy::FindPlugin::DelayedReply&&); |
1981 | #endif |
1982 | |
1983 | #if USE(QUICK_LOOK) |
1984 | void didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti); |
1985 | void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&); |
1986 | void didRequestPasswordForQuickLookDocumentInMainFrame(const String& fileName); |
1987 | #endif |
1988 | |
1989 | #if ENABLE(CONTENT_FILTERING) |
1990 | void contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler&, uint64_t frameID); |
1991 | #endif |
1992 | |
1993 | void tryReloadAfterProcessTermination(); |
1994 | void resetRecentCrashCountSoon(); |
1995 | void resetRecentCrashCount(); |
1996 | |
1997 | API::DiagnosticLoggingClient* effectiveDiagnosticLoggingClient(WebCore::ShouldSample); |
1998 | |
1999 | void dispatchActivityStateChange(); |
2000 | void viewDidLeaveWindow(); |
2001 | void viewDidEnterWindow(); |
2002 | |
2003 | #if PLATFORM(MAC) |
2004 | void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, const UserData&); |
2005 | #endif |
2006 | |
2007 | void useFixedLayoutDidChange(bool useFixedLayout) { m_useFixedLayout = useFixedLayout; } |
2008 | void fixedLayoutSizeDidChange(WebCore::IntSize fixedLayoutSize) { m_fixedLayoutSize = fixedLayoutSize; } |
2009 | |
2010 | void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&); |
2011 | #if ENABLE(VIDEO) && USE(GSTREAMER) |
2012 | void requestInstallMissingMediaPlugins(const String& details, const String& description); |
2013 | #endif |
2014 | |
2015 | void startURLSchemeTask(URLSchemeTaskParameters&&); |
2016 | void stopURLSchemeTask(uint64_t handlerIdentifier, uint64_t taskIdentifier); |
2017 | void loadSynchronousURLSchemeTask(URLSchemeTaskParameters&&, Messages::WebPageProxy::LoadSynchronousURLSchemeTask::DelayedReply&&); |
2018 | |
2019 | bool checkURLReceivedFromCurrentOrPreviousWebProcess(WebProcessProxy&, const String&); |
2020 | bool checkURLReceivedFromCurrentOrPreviousWebProcess(WebProcessProxy&, const URL&); |
2021 | void willAcquireUniversalFileReadSandboxExtension(WebProcessProxy&); |
2022 | |
2023 | void handleAutoFillButtonClick(const UserData&); |
2024 | |
2025 | void didResignInputElementStrongPasswordAppearance(const UserData&); |
2026 | |
2027 | void handleMessage(IPC::Connection&, const String& messageName, const UserData& messageBody); |
2028 | void handleSynchronousMessage(IPC::Connection&, const String& messageName, const UserData& messageBody, CompletionHandler<void(UserData&&)>&&); |
2029 | |
2030 | void viewIsBecomingVisible(); |
2031 | |
2032 | void stopAllURLSchemeTasks(WebProcessProxy* = nullptr); |
2033 | |
2034 | void clearInspectorTargets(); |
2035 | void createInspectorTargets(); |
2036 | |
2037 | #if ENABLE(ATTACHMENT_ELEMENT) |
2038 | void registerAttachmentIdentifierFromData(const String&, const String& contentType, const String& preferredFileName, const IPC::DataReference&); |
2039 | void registerAttachmentIdentifierFromFilePath(const String&, const String& contentType, const String& filePath); |
2040 | void registerAttachmentsFromSerializedData(Vector<WebCore::SerializedAttachmentData>&&); |
2041 | void cloneAttachmentData(const String& fromIdentifier, const String& toIdentifier); |
2042 | |
2043 | void platformRegisterAttachment(Ref<API::Attachment>&&, const String& preferredFileName, const IPC::DataReference&); |
2044 | void platformRegisterAttachment(Ref<API::Attachment>&&, const String& filePath); |
2045 | void platformCloneAttachment(Ref<API::Attachment>&& fromAttachment, Ref<API::Attachment>&& toAttachment); |
2046 | |
2047 | void didInsertAttachmentWithIdentifier(const String& identifier, const String& source, bool hasEnclosingImage); |
2048 | void didRemoveAttachmentWithIdentifier(const String& identifier); |
2049 | void didRemoveAttachment(API::Attachment&); |
2050 | Ref<API::Attachment> ensureAttachment(const String& identifier); |
2051 | void invalidateAllAttachments(); |
2052 | #endif |
2053 | |
2054 | void reportPageLoadResult(const WebCore::ResourceError& = { }); |
2055 | |
2056 | void continueNavigationInNewProcess(API::Navigation&, std::unique_ptr<SuspendedPageProxy>&&, Ref<WebProcessProxy>&&, ProcessSwapRequestedByClient, Optional<WebsitePoliciesData>&&); |
2057 | |
2058 | void setNeedsFontAttributes(bool); |
2059 | void updateFontAttributesAfterEditorStateChange(); |
2060 | |
2061 | void didAttachToRunningProcess(); |
2062 | |
2063 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
2064 | void logFrameNavigation(const WebFrameProxy&, const URL& pageURL, const WebCore::ResourceRequest&, const URL& redirectURL); |
2065 | #endif |
2066 | |
2067 | // WebPaymentCoordinatorProxy::Client |
2068 | #if ENABLE(APPLE_PAY) |
2069 | IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) final; |
2070 | const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; |
2071 | const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; |
2072 | const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; |
2073 | void paymentCoordinatorAddMessageReceiver(WebPaymentCoordinatorProxy&, const IPC::StringReference&, IPC::MessageReceiver&) final; |
2074 | void paymentCoordinatorRemoveMessageReceiver(WebPaymentCoordinatorProxy&, const IPC::StringReference&) final; |
2075 | #endif |
2076 | #if ENABLE(APPLE_PAY) && PLATFORM(IOS_FAMILY) |
2077 | UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final; |
2078 | const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&, PAL::SessionID) final; |
2079 | std::unique_ptr<PaymentAuthorizationPresenter> paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy&, PKPaymentRequest *) final; |
2080 | #endif |
2081 | #if ENABLE(APPLE_PAY) && PLATFORM(MAC) |
2082 | NSWindow *paymentCoordinatorPresentingWindow(const WebPaymentCoordinatorProxy&) final; |
2083 | #endif |
2084 | |
2085 | #if ENABLE(SPEECH_SYNTHESIS) |
2086 | void didStartSpeaking(WebCore::PlatformSpeechSynthesisUtterance&) override; |
2087 | void didFinishSpeaking(WebCore::PlatformSpeechSynthesisUtterance&) override; |
2088 | void didPauseSpeaking(WebCore::PlatformSpeechSynthesisUtterance&) override; |
2089 | void didResumeSpeaking(WebCore::PlatformSpeechSynthesisUtterance&) override; |
2090 | void speakingErrorOccurred(WebCore::PlatformSpeechSynthesisUtterance&) override; |
2091 | void boundaryEventOccurred(WebCore::PlatformSpeechSynthesisUtterance&, WebCore::SpeechBoundary, unsigned charIndex) override; |
2092 | void voicesDidChange() override; |
2093 | |
2094 | struct SpeechSynthesisData; |
2095 | SpeechSynthesisData& speechSynthesisData(); |
2096 | #endif |
2097 | |
2098 | #if PLATFORM(IOS_FAMILY) |
2099 | static bool isInHardwareKeyboardMode(); |
2100 | #endif |
2101 | |
2102 | void makeStorageSpaceRequest(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&&); |
2103 | |
2104 | WeakPtr<PageClient> m_pageClient; |
2105 | Ref<API::PageConfiguration> m_configuration; |
2106 | |
2107 | std::unique_ptr<API::LoaderClient> m_loaderClient; |
2108 | std::unique_ptr<API::PolicyClient> m_policyClient; |
2109 | UniqueRef<API::NavigationClient> m_navigationClient; |
2110 | UniqueRef<API::HistoryClient> m_historyClient; |
2111 | std::unique_ptr<API::IconLoadingClient> m_iconLoadingClient; |
2112 | std::unique_ptr<API::FormClient> m_formClient; |
2113 | std::unique_ptr<API::UIClient> m_uiClient; |
2114 | std::unique_ptr<API::FindClient> m_findClient; |
2115 | std::unique_ptr<API::FindMatchesClient> m_findMatchesClient; |
2116 | std::unique_ptr<API::DiagnosticLoggingClient> m_diagnosticLoggingClient; |
2117 | #if ENABLE(CONTEXT_MENUS) |
2118 | std::unique_ptr<API::ContextMenuClient> ; |
2119 | #endif |
2120 | std::unique_ptr<WebPageInjectedBundleClient> m_injectedBundleClient; |
2121 | |
2122 | std::unique_ptr<WebNavigationState> m_navigationState; |
2123 | String m_failingProvisionalLoadURL; |
2124 | bool m_isLoadingAlternateHTMLStringForFailingProvisionalLoad { false }; |
2125 | |
2126 | std::unique_ptr<DrawingAreaProxy> m_drawingArea; |
2127 | #if PLATFORM(COCOA) |
2128 | std::unique_ptr<RemoteLayerTreeHost> m_frozenRemoteLayerTreeHost; |
2129 | #if ENABLE(ASYNC_SCROLLING) |
2130 | std::unique_ptr<RemoteScrollingCoordinatorProxy> m_scrollingCoordinatorProxy; |
2131 | #endif |
2132 | #endif |
2133 | Ref<WebProcessProxy> m_process; |
2134 | Ref<WebPageGroup> m_pageGroup; |
2135 | Ref<WebPreferences> m_preferences; |
2136 | |
2137 | WebProcessLifetimeTracker m_webProcessLifetimeTracker { *this }; |
2138 | |
2139 | Ref<WebUserContentControllerProxy> m_userContentController; |
2140 | Ref<VisitedLinkStore> m_visitedLinkStore; |
2141 | Ref<WebsiteDataStore> m_websiteDataStore; |
2142 | |
2143 | RefPtr<WebFrameProxy> m_mainFrame; |
2144 | |
2145 | RefPtr<WebFrameProxy> m_focusedFrame; |
2146 | RefPtr<WebFrameProxy> m_frameSetLargestFrame; |
2147 | |
2148 | String m_userAgent; |
2149 | String m_applicationNameForUserAgent; |
2150 | String m_applicationNameForDesktopUserAgent; |
2151 | String m_customUserAgent; |
2152 | String m_customTextEncodingName; |
2153 | String m_overrideContentSecurityPolicy; |
2154 | |
2155 | bool m_treatsSHA1CertificatesAsInsecure { true }; |
2156 | |
2157 | RefPtr<WebInspectorProxy> m_inspector; |
2158 | |
2159 | #if ENABLE(FULLSCREEN_API) |
2160 | std::unique_ptr<WebFullScreenManagerProxy> m_fullScreenManager; |
2161 | std::unique_ptr<API::FullscreenClient> m_fullscreenClient; |
2162 | #endif |
2163 | |
2164 | #if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) |
2165 | RefPtr<PlaybackSessionManagerProxy> m_playbackSessionManager; |
2166 | RefPtr<VideoFullscreenManagerProxy> m_videoFullscreenManager; |
2167 | #endif |
2168 | |
2169 | #if PLATFORM(IOS_FAMILY) |
2170 | Optional<WebCore::ViewportArguments> m_overrideViewportArguments; |
2171 | VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate; |
2172 | uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad { 0 }; |
2173 | int32_t m_deviceOrientation { 0 }; |
2174 | bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad { true }; |
2175 | bool m_hasNetworkRequestsOnSuspended { false }; |
2176 | bool m_isKeyboardAnimatingIn { false }; |
2177 | bool m_isScrollingOrZooming { false }; |
2178 | #endif |
2179 | |
2180 | #if PLATFORM(MAC) |
2181 | bool m_useSystemAppearance { false }; |
2182 | #endif |
2183 | |
2184 | #if ENABLE(APPLE_PAY) |
2185 | std::unique_ptr<WebPaymentCoordinatorProxy> m_paymentCoordinator; |
2186 | #endif |
2187 | |
2188 | #if USE(SYSTEM_PREVIEW) |
2189 | std::unique_ptr<SystemPreviewController> m_systemPreviewController; |
2190 | #endif |
2191 | |
2192 | #if ENABLE(WEB_AUTHN) |
2193 | std::unique_ptr<WebAuthenticatorCoordinatorProxy> m_credentialsMessenger; |
2194 | #endif |
2195 | |
2196 | CallbackMap m_callbacks; |
2197 | HashSet<CallbackID> m_loadDependentStringCallbackIDs; |
2198 | |
2199 | HashSet<WebEditCommandProxy*> m_editCommandSet; |
2200 | |
2201 | #if PLATFORM(COCOA) |
2202 | HashSet<String> m_knownKeypressCommandNames; |
2203 | #endif |
2204 | |
2205 | RefPtr<WebPopupMenuProxy> ; |
2206 | #if ENABLE(CONTEXT_MENUS) |
2207 | RefPtr<WebContextMenuProxy> ; |
2208 | ContextMenuContextData ; |
2209 | #endif |
2210 | RefPtr<API::HitTestResult> m_lastMouseMoveHitTestResult; |
2211 | |
2212 | RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener; |
2213 | GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager; |
2214 | NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager; |
2215 | |
2216 | #if ENABLE(MEDIA_STREAM) |
2217 | std::unique_ptr<UserMediaPermissionRequestManagerProxy> m_userMediaPermissionRequestManager; |
2218 | #endif |
2219 | |
2220 | OptionSet<WebCore::ActivityState::Flag> m_activityState; |
2221 | bool m_viewWasEverInWindow { false }; |
2222 | #if PLATFORM(IOS_FAMILY) |
2223 | bool m_allowsMediaDocumentInlinePlayback { false }; |
2224 | bool m_alwaysRunsAtForegroundPriority { false }; |
2225 | ProcessThrottler::ForegroundActivityToken m_activityToken; |
2226 | #endif |
2227 | bool m_initialCapitalizationEnabled { false }; |
2228 | Optional<double> m_cpuLimit; |
2229 | Ref<WebBackForwardList> m_backForwardList; |
2230 | |
2231 | bool m_maintainsInactiveSelection { false }; |
2232 | |
2233 | bool m_waitsForPaintAfterViewDidMoveToWindow { false }; |
2234 | bool m_shouldSkipWaitingForPaintAfterNextViewDidMoveToWindow { false }; |
2235 | |
2236 | String m_toolTip; |
2237 | |
2238 | EditorState m_editorState; |
2239 | bool m_isEditable { false }; |
2240 | |
2241 | #if PLATFORM(COCOA) |
2242 | TouchBarMenuData m_touchBarMenuData; |
2243 | #endif |
2244 | |
2245 | double m_textZoomFactor { 1 }; |
2246 | double m_pageZoomFactor { 1 }; |
2247 | double m_pageScaleFactor { 1 }; |
2248 | double m_pluginZoomFactor { 1 }; |
2249 | double m_pluginScaleFactor { 1 }; |
2250 | double m_viewScaleFactor { 1 }; |
2251 | float m_intrinsicDeviceScaleFactor { 1 }; |
2252 | Optional<float> m_customDeviceScaleFactor; |
2253 | float m_topContentInset { 0 }; |
2254 | |
2255 | LayerHostingMode m_layerHostingMode { LayerHostingMode::InProcess }; |
2256 | |
2257 | WebCore::Color m_underlayColor; |
2258 | WebCore::Color m_pageExtendedBackgroundColor; |
2259 | |
2260 | bool m_useFixedLayout { false }; |
2261 | WebCore::IntSize m_fixedLayoutSize; |
2262 | |
2263 | bool m_alwaysShowsHorizontalScroller { false }; |
2264 | bool m_alwaysShowsVerticalScroller { false }; |
2265 | |
2266 | OptionSet<WebCore::LayoutMilestone> m_observedLayoutMilestones; |
2267 | |
2268 | bool m_suppressScrollbarAnimations { false }; |
2269 | |
2270 | WebCore::Pagination::Mode { WebCore::Pagination::Unpaginated }; |
2271 | bool m_paginationBehavesLikeColumns { false }; |
2272 | double m_pageLength { 0 }; |
2273 | double m_gapBetweenPages { 0 }; |
2274 | bool { false }; |
2275 | |
2276 | // If the process backing the web page is alive and kicking. |
2277 | bool m_hasRunningProcess { false }; |
2278 | |
2279 | // Whether WebPageProxy::close() has been called on this page. |
2280 | bool m_isClosed { false }; |
2281 | |
2282 | // Whether it can run modal child web pages. |
2283 | bool m_canRunModal { false }; |
2284 | |
2285 | bool m_isInPrintingMode { false }; |
2286 | bool m_isPerformingDOMPrintOperation { false }; |
2287 | |
2288 | WebCore::ResourceRequest m_decidePolicyForResponseRequest; |
2289 | bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false }; |
2290 | |
2291 | #if HAVE(LOAD_OPTIMIZER) |
2292 | WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_2 |
2293 | #endif |
2294 | |
2295 | Deque<NativeWebMouseEvent> m_mouseEventQueue; |
2296 | Deque<NativeWebKeyboardEvent> m_keyEventQueue; |
2297 | Deque<NativeWebWheelEvent> m_wheelEventQueue; |
2298 | Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents; |
2299 | #if ENABLE(MAC_GESTURE_EVENTS) |
2300 | Deque<NativeWebGestureEvent> m_gestureEventQueue; |
2301 | #endif |
2302 | |
2303 | #if ENABLE(TOUCH_EVENTS) |
2304 | struct TouchEventTracking { |
2305 | WebCore::TrackingType touchForceChangedTracking { WebCore::TrackingType::NotTracking }; |
2306 | WebCore::TrackingType touchStartTracking { WebCore::TrackingType::NotTracking }; |
2307 | WebCore::TrackingType touchMoveTracking { WebCore::TrackingType::NotTracking }; |
2308 | WebCore::TrackingType touchEndTracking { WebCore::TrackingType::NotTracking }; |
2309 | |
2310 | bool isTrackingAnything() const |
2311 | { |
2312 | return touchForceChangedTracking != WebCore::TrackingType::NotTracking |
2313 | || touchStartTracking != WebCore::TrackingType::NotTracking |
2314 | || touchMoveTracking != WebCore::TrackingType::NotTracking |
2315 | || touchEndTracking != WebCore::TrackingType::NotTracking; |
2316 | } |
2317 | |
2318 | void reset() |
2319 | { |
2320 | touchForceChangedTracking = WebCore::TrackingType::NotTracking; |
2321 | touchStartTracking = WebCore::TrackingType::NotTracking; |
2322 | touchMoveTracking = WebCore::TrackingType::NotTracking; |
2323 | touchEndTracking = WebCore::TrackingType::NotTracking; |
2324 | } |
2325 | }; |
2326 | TouchEventTracking m_touchAndPointerEventTracking; |
2327 | #endif |
2328 | #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS) |
2329 | Deque<QueuedTouchEvents> m_touchEventQueue; |
2330 | #endif |
2331 | |
2332 | #if ENABLE(INPUT_TYPE_COLOR) |
2333 | RefPtr<WebColorPicker> m_colorPicker; |
2334 | #endif |
2335 | #if ENABLE(DATALIST_ELEMENT) |
2336 | RefPtr<WebDataListSuggestionsDropdown> m_dataListSuggestionsDropdown; |
2337 | #endif |
2338 | #if PLATFORM(COCOA) |
2339 | RefPtr<WebCore::ValidationBubble> m_validationBubble; |
2340 | #endif |
2341 | |
2342 | const WebCore::PageIdentifier m_pageID; |
2343 | |
2344 | bool m_isPageSuspended { false }; |
2345 | bool m_addsVisitedLinks { true }; |
2346 | |
2347 | bool m_controlledByAutomation { false }; |
2348 | |
2349 | unsigned m_inspectorFrontendCount { 0 }; |
2350 | |
2351 | #if PLATFORM(COCOA) |
2352 | bool m_isSmartInsertDeleteEnabled { false }; |
2353 | #endif |
2354 | |
2355 | Optional<WebCore::Color> m_backgroundColor; |
2356 | |
2357 | unsigned m_pendingLearnOrIgnoreWordMessageCount { 0 }; |
2358 | |
2359 | bool m_mainFrameHasCustomContentProvider { false }; |
2360 | |
2361 | #if ENABLE(DRAG_SUPPORT) |
2362 | // Current drag destination details are delivered as an asynchronous response, |
2363 | // so we preserve them to be used when the next dragging delegate call is made. |
2364 | WebCore::DragOperation m_currentDragOperation { WebCore::DragOperationNone }; |
2365 | WebCore::DragHandlingMethod m_currentDragHandlingMethod { WebCore::DragHandlingMethod::None }; |
2366 | bool m_currentDragIsOverFileInput { false }; |
2367 | unsigned m_currentDragNumberOfFilesToBeAccepted { 0 }; |
2368 | WebCore::IntRect m_currentDragCaretRect; |
2369 | WebCore::IntRect m_currentDragCaretEditableElementRect; |
2370 | #endif |
2371 | |
2372 | PageLoadState m_pageLoadState; |
2373 | |
2374 | bool m_delegatesScrolling { false }; |
2375 | |
2376 | bool m_mainFrameHasHorizontalScrollbar { false }; |
2377 | bool m_mainFrameHasVerticalScrollbar { false }; |
2378 | |
2379 | // Whether horizontal wheel events can be handled directly for swiping purposes. |
2380 | bool m_canShortCircuitHorizontalWheelEvents { true }; |
2381 | |
2382 | bool m_mainFrameIsPinnedToLeftSide { true }; |
2383 | bool m_mainFrameIsPinnedToRightSide { true }; |
2384 | bool m_mainFrameIsPinnedToTopSide { true }; |
2385 | bool m_mainFrameIsPinnedToBottomSide { true }; |
2386 | |
2387 | bool m_shouldUseImplicitRubberBandControl { false }; |
2388 | bool m_rubberBandsAtLeft { true }; |
2389 | bool m_rubberBandsAtRight { true }; |
2390 | bool m_rubberBandsAtTop { true }; |
2391 | bool m_rubberBandsAtBottom { true }; |
2392 | |
2393 | bool m_enableVerticalRubberBanding { true }; |
2394 | bool m_enableHorizontalRubberBanding { true }; |
2395 | |
2396 | bool m_backgroundExtendsBeyondPage { true }; |
2397 | |
2398 | bool m_shouldRecordNavigationSnapshots { false }; |
2399 | bool m_isShowingNavigationGestureSnapshot { false }; |
2400 | |
2401 | bool m_mainFramePluginHandlesPageScaleGesture { false }; |
2402 | |
2403 | unsigned m_pageCount { 0 }; |
2404 | |
2405 | WebCore::IntRect m_visibleScrollerThumbRect; |
2406 | |
2407 | uint64_t m_renderTreeSize { 0 }; |
2408 | uint64_t m_sessionRestorationRenderTreeSize { 0 }; |
2409 | bool m_hitRenderTreeSizeThreshold { false }; |
2410 | |
2411 | bool m_suppressVisibilityUpdates { false }; |
2412 | bool m_autoSizingShouldExpandToViewHeight { false }; |
2413 | WebCore::IntSize m_viewLayoutSize; |
2414 | Optional<WebCore::IntSize> m_viewportSizeForCSSViewportUnits; |
2415 | |
2416 | // Visual viewports |
2417 | WebCore::LayoutSize m_baseLayoutViewportSize; |
2418 | WebCore::LayoutPoint m_minStableLayoutViewportOrigin; |
2419 | WebCore::LayoutPoint m_maxStableLayoutViewportOrigin; |
2420 | |
2421 | float m_mediaVolume { 1 }; |
2422 | WebCore::MediaProducer::MutedStateFlags m_mutedState { WebCore::MediaProducer::NoneMuted }; |
2423 | bool m_mayStartMediaWhenInWindow { true }; |
2424 | bool m_mediaPlaybackIsSuspended { false }; |
2425 | bool m_mediaCaptureEnabled { true }; |
2426 | |
2427 | bool m_waitingForDidUpdateActivityState { false }; |
2428 | |
2429 | bool m_shouldScaleViewToFitDocument { false }; |
2430 | bool m_shouldSuppressNextAutomaticNavigationSnapshot { false }; |
2431 | |
2432 | #if PLATFORM(COCOA) |
2433 | HashMap<String, String> m_temporaryPDFFiles; |
2434 | std::unique_ptr<WebCore::RunLoopObserver> m_activityStateChangeDispatcher; |
2435 | |
2436 | std::unique_ptr<RemoteLayerTreeScrollingPerformanceData> m_scrollingPerformanceData; |
2437 | bool m_scrollPerformanceDataCollectionEnabled { false }; |
2438 | #endif |
2439 | UserObservablePageCounter::Token m_pageIsUserObservableCount; |
2440 | ProcessSuppressionDisabledToken m_preventProcessSuppressionCount; |
2441 | HiddenPageThrottlingAutoIncreasesCounter::Token m_hiddenPageDOMTimerThrottlingAutoIncreasesCount; |
2442 | VisibleWebPageToken m_visiblePageToken; |
2443 | |
2444 | WebCore::ScrollPinningBehavior m_scrollPinningBehavior { WebCore::DoNotPin }; |
2445 | Optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle; |
2446 | |
2447 | ActivityStateChangeID m_currentActivityStateChangeID { ActivityStateChangeAsynchronous }; |
2448 | |
2449 | WebPreferencesStore::ValueMap m_configurationPreferenceValues; |
2450 | OptionSet<WebCore::ActivityState::Flag> m_potentiallyChangedActivityStateFlags; |
2451 | bool m_activityStateChangeWantsSynchronousReply { false }; |
2452 | Vector<CallbackID> m_nextActivityStateChangeCallbacks; |
2453 | |
2454 | WebCore::MediaProducer::MediaStateFlags m_mediaState { WebCore::MediaProducer::IsNotPlaying }; |
2455 | |
2456 | bool m_isResourceCachingDisabled { false }; |
2457 | |
2458 | bool m_hasHadSelectionChangesFromUserInteraction { false }; |
2459 | bool m_isTouchBarUpdateSupressedForHiddenContentEditable { false }; |
2460 | bool m_isNeverRichlyEditableForTouchBar { false }; |
2461 | |
2462 | #if ENABLE(MEDIA_SESSION) |
2463 | bool m_hasMediaSessionWithActiveMediaElements { false }; |
2464 | #endif |
2465 | |
2466 | #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY) |
2467 | bool m_requiresTargetMonitoring { false }; |
2468 | #endif |
2469 | |
2470 | #if PLATFORM(IOS_FAMILY) |
2471 | std::unique_ptr<ElementDidFocusArguments> m_deferredElementDidFocusArguments; |
2472 | bool m_waitingForPostLayoutEditorStateUpdateAfterFocusingElement { false }; |
2473 | bool m_forceAlwaysUserScalable { false }; |
2474 | WebCore::FloatSize m_viewportConfigurationViewLayoutSize; |
2475 | double m_viewportConfigurationLayoutSizeScaleFactor { 1 }; |
2476 | double m_viewportConfigurationMinimumEffectiveDeviceWidth { 0 }; |
2477 | WebCore::FloatSize m_maximumUnobscuredSize; |
2478 | #endif |
2479 | |
2480 | Optional<WebCore::FontAttributes> m_cachedFontAttributesAtSelectionStart; |
2481 | |
2482 | #if ENABLE(POINTER_LOCK) |
2483 | bool m_isPointerLockPending { false }; |
2484 | bool m_isPointerLocked { false }; |
2485 | #endif |
2486 | |
2487 | bool m_isUsingHighPerformanceWebGL { false }; |
2488 | bool m_openedByDOM { false }; |
2489 | bool m_hasCommittedAnyProvisionalLoads { false }; |
2490 | bool m_allowsFastClicksEverywhere { false }; |
2491 | |
2492 | HashMap<String, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByScheme; |
2493 | HashMap<uint64_t, Ref<WebURLSchemeHandler>> m_urlSchemeHandlersByIdentifier; |
2494 | |
2495 | #if ENABLE(ATTACHMENT_ELEMENT) |
2496 | HashMap<String, Ref<API::Attachment>> m_attachmentIdentifierToAttachmentMap; |
2497 | #endif |
2498 | |
2499 | const std::unique_ptr<WebPageInspectorController> m_inspectorController; |
2500 | #if ENABLE(REMOTE_INSPECTOR) |
2501 | std::unique_ptr<WebPageDebuggable> m_inspectorDebuggable; |
2502 | #endif |
2503 | |
2504 | Optional<SpellDocumentTag> m_spellDocumentTag; |
2505 | |
2506 | Optional<MonotonicTime> m_pageLoadStart; |
2507 | HashSet<String> m_previouslyVisitedPaths; |
2508 | |
2509 | RunLoop::Timer<WebPageProxy> m_resetRecentCrashCountTimer; |
2510 | unsigned m_recentCrashCount { 0 }; |
2511 | |
2512 | bool m_needsFontAttributes { false }; |
2513 | bool m_mayHaveUniversalFileReadSandboxExtension { false }; |
2514 | |
2515 | std::unique_ptr<ProvisionalPageProxy> m_provisionalPage; |
2516 | WeakPtr<SuspendedPageProxy> m_lastSuspendedPage; |
2517 | |
2518 | #if HAVE(PENCILKIT) |
2519 | std::unique_ptr<EditableImageController> m_editableImageController; |
2520 | #endif |
2521 | |
2522 | #if HAVE(VISIBILITY_PROPAGATION_VIEW) |
2523 | LayerHostingContextID m_contextIDForVisibilityPropagation { 0 }; |
2524 | #endif |
2525 | |
2526 | HashMap<WebViewDidMoveToWindowObserver*, WeakPtr<WebViewDidMoveToWindowObserver>> m_webViewDidMoveToWindowObservers; |
2527 | |
2528 | mutable RefPtr<Logger> m_logger; |
2529 | |
2530 | #if ENABLE(SPEECH_SYNTHESIS) |
2531 | struct SpeechSynthesisData { |
2532 | std::unique_ptr<WebCore::PlatformSpeechSynthesizer> synthesizer; |
2533 | RefPtr<WebCore::PlatformSpeechSynthesisUtterance> utterance; |
2534 | CompletionHandler<void()> speakingFinishedCompletionHandler; |
2535 | CompletionHandler<void()> speakingPausedCompletionHandler; |
2536 | CompletionHandler<void()> speakingResumedCompletionHandler; |
2537 | }; |
2538 | Optional<SpeechSynthesisData> m_speechSynthesisData; |
2539 | #endif |
2540 | bool m_isQuotaIncreaseDenied { false }; |
2541 | }; |
2542 | |
2543 | } // namespace WebKit |
2544 | |