1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533
|
/*
* Copyright (C) 2010-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "APIInjectedBundleEditorClient.h"
#include "APIInjectedBundleFormClient.h"
#include "APIInjectedBundlePageContextMenuClient.h"
#include "APIInjectedBundlePageUIClient.h"
#include "APIObject.h"
#include "Download.h"
#include "EditingRange.h"
#include "FindController.h"
#include "GeolocationPermissionRequestManager.h"
#include "ImageOptions.h"
#include "InjectedBundlePageFullScreenClient.h"
#include "InjectedBundlePageLoaderClient.h"
#include "InjectedBundlePagePolicyClient.h"
#include "InjectedBundlePageResourceLoadClient.h"
#include "LayerTreeContext.h"
#include "MessageReceiver.h"
#include "MessageSender.h"
#include "Plugin.h"
#include "SandboxExtension.h"
#include "ShareableBitmap.h"
#include "UserData.h"
#include "UserMediaPermissionRequestManager.h"
#include <WebCore/ActivityState.h>
#include <WebCore/DictationAlternative.h>
#include <WebCore/DictionaryPopupInfo.h>
#include <WebCore/DragData.h>
#include <WebCore/Editor.h>
#include <WebCore/FrameLoaderTypes.h>
#include <WebCore/HitTestResult.h>
#include <WebCore/HysteresisActivity.h>
#include <WebCore/IntRect.h>
#include <WebCore/IntSizeHash.h>
#include <WebCore/Page.h>
#include <WebCore/PageOverlay.h>
#include <WebCore/PageVisibilityState.h>
#include <WebCore/PlatformMouseEvent.h>
#include <WebCore/ScrollTypes.h>
#include <WebCore/TextChecking.h>
#include <WebCore/TextIndicator.h>
#include <WebCore/UserActivity.h>
#include <WebCore/UserContentTypes.h>
#include <WebCore/UserInterfaceLayoutDirection.h>
#include <WebCore/UserScriptTypes.h>
#include <WebCore/ViewportConfiguration.h>
#include <WebCore/WebCoreKeyboardUIMode.h>
#include <memory>
#include <wtf/HashMap.h>
#include <wtf/MonotonicTime.h>
#include <wtf/RefPtr.h>
#include <wtf/RunLoop.h>
#include <wtf/Seconds.h>
#include <wtf/text/WTFString.h>
#if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
#include "WebPageAccessibilityObject.h"
#include <wtf/glib/GRefPtr.h>
#endif
#if PLATFORM(GTK)
#include "ArgumentCodersGtk.h"
#include "WebPrintOperationGtk.h"
#endif
#if PLATFORM(IOS)
#include "GestureTypes.h"
#import "WebPageMessages.h"
#endif
#if ENABLE(IOS_TOUCH_EVENTS)
#include <WebKitAdditions/PlatformTouchEventIOS.h>
#elif ENABLE(TOUCH_EVENTS)
#include <WebCore/PlatformTouchEvent.h>
#endif
#if ENABLE(MAC_GESTURE_EVENTS)
#include <WebKitAdditions/PlatformGestureEventMac.h>
#endif
#if ENABLE(CONTEXT_MENUS)
#include "InjectedBundlePageContextMenuClient.h"
#endif
#if PLATFORM(COCOA)
#include "ViewGestureGeometryCollector.h"
#include <wtf/RetainPtr.h>
OBJC_CLASS CALayer;
OBJC_CLASS NSArray;
OBJC_CLASS NSDictionary;
OBJC_CLASS NSObject;
OBJC_CLASS WKAccessibilityWebPageObject;
#endif
namespace API {
class Array;
}
namespace IPC {
class Decoder;
class Connection;
}
namespace WebCore {
class DocumentLoader;
class GraphicsContext;
class Frame;
class FrameView;
class HTMLPlugInElement;
class HTMLPlugInImageElement;
class IntPoint;
class KeyboardEvent;
class MediaPlaybackTargetContext;
class Page;
class PrintContext;
class Range;
class ResourceResponse;
class ResourceRequest;
class SharedBuffer;
class SubstituteData;
class TextCheckingRequest;
class URL;
class VisibleSelection;
struct Highlight;
struct KeypressCommand;
struct TextCheckingResult;
#if ENABLE(VIDEO) && USE(GSTREAMER)
class MediaPlayerRequestInstallMissingPluginsCallback;
#endif
}
namespace WebKit {
class DrawingArea;
class InjectedBundleBackForwardList;
class NotificationPermissionRequestManager;
class PDFPlugin;
class PageBanner;
class PluginView;
class RemoteWebInspectorUI;
class VisibleContentRectUpdateInfo;
class WebColorChooser;
class WebContextMenu;
class WebContextMenuItemData;
class WebDocumentLoader;
class WebEvent;
class WebFrame;
class WebFullScreenManager;
class WebImage;
class WebInspector;
class WebInspectorClient;
class WebInspectorUI;
class WebGestureEvent;
class WebKeyboardEvent;
class WebMouseEvent;
class WebNotificationClient;
class WebOpenPanelResultListener;
class WebPageGroupProxy;
class WebPageOverlay;
class WebPlaybackSessionManager;
class WebPopupMenu;
class WebUndoStep;
class WebUserContentController;
class WebVideoFullscreenManager;
class WebWheelEvent;
struct AssistedNodeInformation;
struct AttributedString;
struct BackForwardListItemState;
struct EditingRange;
struct EditorState;
class GamepadData;
struct InteractionInformationAtPosition;
struct InteractionInformationRequest;
struct LoadParameters;
struct PrintInfo;
struct WebsitePolicies;
struct WebPageCreationParameters;
struct WebPreferencesStore;
struct WebSelectionData;
#if PLATFORM(COCOA)
class RemoteLayerTreeTransaction;
#endif
#if ENABLE(TOUCH_EVENTS)
class WebTouchEvent;
#endif
class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender {
public:
static Ref<WebPage> create(uint64_t pageID, WebPageCreationParameters&&);
virtual ~WebPage();
void reinitializeWebPage(WebPageCreationParameters&&);
void close();
static WebPage* fromCorePage(WebCore::Page*);
WebCore::Page* corePage() const { return m_page.get(); }
uint64_t pageID() const { return m_pageID; }
WebCore::SessionID sessionID() const { return m_page->sessionID(); }
bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); }
void setSessionID(WebCore::SessionID);
void setSize(const WebCore::IntSize&);
const WebCore::IntSize& size() const { return m_viewSize; }
WebCore::IntRect bounds() const { return WebCore::IntRect(WebCore::IntPoint(), size()); }
InjectedBundleBackForwardList* backForwardList();
DrawingArea* drawingArea() const { return m_drawingArea.get(); }
#if ENABLE(ASYNC_SCROLLING)
WebCore::ScrollingCoordinator* scrollingCoordinator() const;
#endif
WebPageGroupProxy* pageGroup() const { return m_pageGroup.get(); }
void scrollMainFrameIfNotAtMaxScrollPosition(const WebCore::IntSize& scrollOffset);
bool scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity);
void centerSelectionInVisibleArea();
#if PLATFORM(COCOA)
void willCommitLayerTree(RemoteLayerTreeTransaction&);
void didFlushLayerTreeAtTime(MonotonicTime);
#endif
enum class LazyCreationPolicy { UseExistingOnly, CreateIfNeeded };
WebInspector* inspector(LazyCreationPolicy = LazyCreationPolicy::CreateIfNeeded);
WebInspectorUI* inspectorUI();
RemoteWebInspectorUI* remoteInspectorUI();
bool isInspectorPage() { return !!m_inspectorUI || !!m_remoteInspectorUI; }
#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
WebPlaybackSessionManager& playbackSessionManager();
WebVideoFullscreenManager& videoFullscreenManager();
#endif
#if PLATFORM(IOS)
void setAllowsMediaDocumentInlinePlayback(bool);
bool allowsMediaDocumentInlinePlayback() const { return m_allowsMediaDocumentInlinePlayback; }
#endif
#if ENABLE(FULLSCREEN_API)
WebFullScreenManager* fullScreenManager();
#endif
// -- Called by the DrawingArea.
// FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
void layoutIfNeeded();
// -- Called from WebCore clients.
bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
void didStartPageTransition();
void didCompletePageTransition();
void didCommitLoad(WebFrame*);
void willReplaceMultipartContent(const WebFrame&);
void didReplaceMultipartContent(const WebFrame&);
void didFinishLoad(WebFrame*);
void show();
String userAgent(const WebCore::URL&) const;
String userAgent(WebFrame*, const WebCore::URL&) const;
String platformUserAgent(const WebCore::URL&) const;
WebCore::KeyboardUIMode keyboardUIMode();
const String& overrideContentSecurityPolicy() const { return m_overrideContentSecurityPolicy; }
WebUndoStep* webUndoStep(uint64_t);
void addWebUndoStep(uint64_t, WebUndoStep*);
void removeWebEditCommand(uint64_t);
bool isInRedo() const { return m_isInRedo; }
bool isAlwaysOnLoggingAllowed() const;
void setActivePopupMenu(WebPopupMenu*);
void setHiddenPageTimerThrottlingIncreaseLimit(std::chrono::milliseconds limit)
{
m_page->setTimerAlignmentIntervalIncreaseLimit(limit);
}
#if ENABLE(INPUT_TYPE_COLOR)
WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
void setActiveColorChooser(WebColorChooser*);
void didChooseColor(const WebCore::Color&);
void didEndColorPicker();
#endif
WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }
void setActiveOpenPanelResultListener(Ref<WebOpenPanelResultListener>&&);
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
// -- InjectedBundle methods
#if ENABLE(CONTEXT_MENUS)
void setInjectedBundleContextMenuClient(std::unique_ptr<API::InjectedBundle::PageContextMenuClient>);
#endif
void setInjectedBundleEditorClient(std::unique_ptr<API::InjectedBundle::EditorClient>);
void setInjectedBundleFormClient(std::unique_ptr<API::InjectedBundle::FormClient>);
void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClientBase*);
void initializeInjectedBundlePolicyClient(WKBundlePagePolicyClientBase*);
void initializeInjectedBundleResourceLoadClient(WKBundlePageResourceLoadClientBase*);
void setInjectedBundleUIClient(std::unique_ptr<API::InjectedBundle::PageUIClient>);
#if ENABLE(FULLSCREEN_API)
void initializeInjectedBundleFullScreenClient(WKBundlePageFullScreenClientBase*);
#endif
#if ENABLE(CONTEXT_MENUS)
API::InjectedBundle::PageContextMenuClient& injectedBundleContextMenuClient() { return *m_contextMenuClient.get(); }
#endif
API::InjectedBundle::EditorClient& injectedBundleEditorClient() { return *m_editorClient.get(); }
API::InjectedBundle::FormClient& injectedBundleFormClient() { return *m_formClient.get(); }
InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
InjectedBundlePagePolicyClient& injectedBundlePolicyClient() { return m_policyClient; }
InjectedBundlePageResourceLoadClient& injectedBundleResourceLoadClient() { return m_resourceLoadClient; }
API::InjectedBundle::PageUIClient& injectedBundleUIClient() { return *m_uiClient.get(); }
#if ENABLE(FULLSCREEN_API)
InjectedBundlePageFullScreenClient& injectedBundleFullScreenClient() { return m_fullScreenClient; }
#endif
bool findStringFromInjectedBundle(const String&, FindOptions);
WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
WebCore::MainFrame* mainFrame() const; // May return 0.
WebCore::FrameView* mainFrameView() const; // May return 0.
RefPtr<WebCore::Range> currentSelectionAsRange();
#if ENABLE(NETSCAPE_PLUGIN_API)
RefPtr<Plugin> createPlugin(WebFrame*, WebCore::HTMLPlugInElement*, const Plugin::Parameters&, String& newMIMEType);
#endif
#if ENABLE(WEBGL)
WebCore::WebGLLoadPolicy webGLPolicyForURL(WebFrame*, const String&);
WebCore::WebGLLoadPolicy resolveWebGLPolicyForURL(WebFrame*, const String&);
#endif
enum class IncludePostLayoutDataHint { No, Yes };
EditorState editorState(IncludePostLayoutDataHint = IncludePostLayoutDataHint::Yes) const;
void sendPostLayoutEditorStateIfNeeded();
void updateEditorStateAfterLayoutIfEditabilityChanged();
String renderTreeExternalRepresentation() const;
String renderTreeExternalRepresentationForPrinting() const;
uint64_t renderTreeSize() const;
void setTracksRepaints(bool);
bool isTrackingRepaints() const;
void resetTrackedRepaints();
Ref<API::Array> trackedRepaintRects();
void executeEditingCommand(const String& commandName, const String& argument);
bool isEditingCommandEnabled(const String& commandName);
void clearMainFrameName();
void sendClose();
void sendSetWindowFrame(const WebCore::FloatRect&);
double textZoomFactor() const;
void setTextZoomFactor(double);
double pageZoomFactor() const;
void setPageZoomFactor(double);
void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
void windowScreenDidChange(uint32_t);
void accessibilitySettingsDidChange();
void scalePage(double scale, const WebCore::IntPoint& origin);
void scalePageInViewCoordinates(double scale, WebCore::IntPoint centerInViewCoordinates);
double pageScaleFactor() const;
double totalScaleFactor() const;
double viewScaleFactor() const;
void scaleView(double scale);
void setUseFixedLayout(bool);
bool useFixedLayout() const { return m_useFixedLayout; }
bool setFixedLayoutSize(const WebCore::IntSize&);
WebCore::IntSize fixedLayoutSize() const;
void listenForLayoutMilestones(uint32_t /* LayoutMilestones */);
void setSuppressScrollbarAnimations(bool);
void setEnableVerticalRubberBanding(bool);
void setEnableHorizontalRubberBanding(bool);
void setBackgroundExtendsBeyondPage(bool);
void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
void setPaginationBehavesLikeColumns(bool);
void setPageLength(double);
void setGapBetweenPages(double);
void setPaginationLineGridEnabled(bool);
void postInjectedBundleMessage(const String& messageName, const UserData&);
bool drawsBackground() const { return m_drawsBackground; }
void setUnderlayColor(const WebCore::Color& color) { m_underlayColor = color; }
WebCore::Color underlayColor() const { return m_underlayColor; }
void stopLoading();
void stopLoadingFrame(uint64_t frameID);
bool defersLoading() const;
void setDefersLoading(bool deferLoading);
void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
void exitAcceleratedCompositingMode();
void addPluginView(PluginView*);
void removePluginView(PluginView*);
bool isVisible() const { return m_activityState & WebCore::ActivityState::IsVisible; }
bool isVisibleOrOccluded() const { return m_activityState & WebCore::ActivityState::IsVisibleOrOccluded; }
LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
void setLayerHostingMode(LayerHostingMode);
#if PLATFORM(COCOA)
void updatePluginsActiveAndFocusedState();
const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
const WebCore::FloatRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
bool hasCachedWindowFrame() const { return m_hasCachedWindowFrame; }
void updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor);
#endif
#if PLATFORM(MAC)
void setTopOverhangImage(WebImage*);
void setBottomOverhangImage(WebImage*);
#endif
bool windowIsFocused() const;
bool windowAndWebPageAreFocused() const;
#if !PLATFORM(IOS)
void setHeaderPageBanner(PageBanner*);
PageBanner* headerPageBanner();
void setFooterPageBanner(PageBanner*);
PageBanner* footerPageBanner();
void hidePageBanners();
void showPageBanners();
void setHeaderBannerHeightForTesting(int);
void setFooterBannerHeightForTesting(int);
#endif
WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
#if PLATFORM(IOS)
WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&);
WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&);
#endif
PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double additionalScaleFactor, SnapshotOptions);
PassRefPtr<WebImage> snapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
PassRefPtr<WebImage> snapshotNode(WebCore::Node&, SnapshotOptions, unsigned maximumPixelCount = std::numeric_limits<unsigned>::max());
static const WebEvent* currentEvent();
FindController& findController() { return m_findController; }
#if ENABLE(GEOLOCATION)
GeolocationPermissionRequestManager& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
#endif
#if PLATFORM(IOS)
void savePageState(WebCore::HistoryItem&);
void restorePageState(const WebCore::HistoryItem&);
#endif
#if ENABLE(MEDIA_STREAM)
UserMediaPermissionRequestManager& userMediaPermissionRequestManager() { return m_userMediaPermissionRequestManager; }
#endif
void elementDidFocus(WebCore::Node*);
void elementDidBlur(WebCore::Node*);
void resetAssistedNodeForFrame(WebFrame*);
void viewportPropertiesDidChange(const WebCore::ViewportArguments&);
#if PLATFORM(IOS)
WebCore::FloatSize screenSize() const;
WebCore::FloatSize availableScreenSize() const;
int32_t deviceOrientation() const { return m_deviceOrientation; }
void didReceiveMobileDocType(bool);
void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
bool isUsingTestingViewportConfiguration() const { return m_useTestingViewportConfiguration; }
double minimumPageScaleFactor() const;
double maximumPageScaleFactor() const;
double maximumPageScaleFactorIgnoringAlwaysScalable() const;
bool allowsUserScaling() const;
bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; }
void handleTap(const WebCore::IntPoint&, uint64_t lastLayerTreeTransactionId);
void potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
void commitPotentialTap(uint64_t lastLayerTreeTransactionId);
void commitPotentialTapFailed();
void cancelPotentialTap();
void cancelPotentialTapInFrame(WebFrame&);
void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
void inspectorNodeSearchEndedAtPosition(const WebCore::FloatPoint&);
void blurAssistedNode();
void selectWithGesture(const WebCore::IntPoint&, uint32_t granularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithAssistedNode, uint64_t callbackID);
void updateSelectionWithTouches(const WebCore::IntPoint& point, uint32_t touches, bool baseIsStart, uint64_t callbackID);
void updateBlockSelectionWithTouch(const WebCore::IntPoint&, uint32_t touch, uint32_t handlePosition);
void selectWithTwoTouches(const WebCore::IntPoint& from, const WebCore::IntPoint& to, uint32_t gestureType, uint32_t gestureState, uint64_t callbackID);
void extendSelection(uint32_t granularity);
void selectWordBackward();
void moveSelectionByOffset(int32_t offset, uint64_t callbackID);
void selectTextWithGranularityAtPoint(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
void selectPositionAtBoundaryWithDirection(const WebCore::IntPoint&, uint32_t granularity, uint32_t direction, bool isInteractingWithAssistedNode, uint64_t callbackID);
void moveSelectionAtBoundaryWithDirection(uint32_t granularity, uint32_t direction, uint64_t callbackID);
void selectPositionAtPoint(const WebCore::IntPoint&, bool isInteractingWithAssistedNode, uint64_t callbackID);
void beginSelectionInDirection(uint32_t direction, uint64_t callbackID);
void updateSelectionWithExtentPoint(const WebCore::IntPoint&, bool isInteractingWithAssistedNode, uint64_t callbackID);
void updateSelectionWithExtentPointAndBoundary(const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode, uint64_t callbackID);
void requestDictationContext(uint64_t callbackID);
void replaceDictatedText(const String& oldText, const String& newText);
void replaceSelectedText(const String& oldText, const String& newText);
void requestAutocorrectionData(const String& textForAutocorrection, uint64_t callbackID);
void applyAutocorrection(const String& correction, const String& originalText, uint64_t callbackID);
void syncApplyAutocorrection(const String& correction, const String& originalText, bool& correctionApplied);
void requestAutocorrectionContext(uint64_t callbackID);
void getAutocorrectionContext(String& beforeText, String& markedText, String& selectedText, String& afterText, uint64_t& location, uint64_t& length);
void getPositionInformation(const InteractionInformationRequest&, InteractionInformationAtPosition&);
void requestPositionInformation(const InteractionInformationRequest&);
void startInteractionWithElementAtPosition(const WebCore::IntPoint&);
void stopInteraction();
void performActionOnElement(uint32_t action);
void focusNextAssistedNode(bool isForward, uint64_t callbackID);
void setAssistedNodeValue(const String&);
void setAssistedNodeValueAsNumber(double);
void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection);
WebCore::IntRect rectForElementAtInteractionLocation();
void updateSelectionAppearance();
void getSelectionContext(uint64_t callbackID);
void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, uint64_t requestID);
void getRectsForGranularityWithSelectionOffset(uint32_t, int32_t, uint64_t callbackID);
void getRectsAtSelectionOffsetWithText(int32_t, const String&, uint64_t callbackID);
#if ENABLE(IOS_TOUCH_EVENTS)
void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
#endif
void contentSizeCategoryDidChange(const String&);
void executeEditCommandWithCallback(const String&, uint64_t callbackID);
Seconds eventThrottlingDelay() const;
void showInspectorHighlight(const WebCore::Highlight&);
void hideInspectorHighlight();
void showInspectorIndication();
void hideInspectorIndication();
void enableInspectorNodeSearch();
void disableInspectorNodeSearch();
void setForceAlwaysUserScalable(bool);
#endif
void setLayerTreeStateIsFrozen(bool);
void markLayersVolatile(std::function<void ()> completionHandler = { });
void cancelMarkLayersVolatile();
NotificationPermissionRequestManager* notificationPermissionRequestManager();
void pageDidScroll();
#if USE(COORDINATED_GRAPHICS)
void pageDidRequestScroll(const WebCore::IntPoint&);
#endif
#if ENABLE(CONTEXT_MENUS)
WebContextMenu* contextMenu();
WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
#endif
bool hasLocalDataForURL(const WebCore::URL&);
String cachedResponseMIMETypeForURL(const WebCore::URL&);
String cachedSuggestedFilenameForURL(const WebCore::URL&);
RefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::URL&);
static bool canHandleRequest(const WebCore::ResourceRequest&);
class SandboxExtensionTracker {
public:
~SandboxExtensionTracker();
void invalidate();
void beginLoad(WebFrame*, const SandboxExtension::Handle& handle);
void willPerformLoadDragDestinationAction(PassRefPtr<SandboxExtension> pendingDropSandboxExtension);
void didStartProvisionalLoad(WebFrame*);
void didCommitProvisionalLoad(WebFrame*);
void didFailProvisionalLoad(WebFrame*);
private:
void setPendingProvisionalSandboxExtension(PassRefPtr<SandboxExtension>);
RefPtr<SandboxExtension> m_pendingProvisionalSandboxExtension;
RefPtr<SandboxExtension> m_provisionalSandboxExtension;
RefPtr<SandboxExtension> m_committedSandboxExtension;
};
SandboxExtensionTracker& sandboxExtensionTracker() { return m_sandboxExtensionTracker; }
#if PLATFORM(GTK)
void setComposition(const String& text, const Vector<WebCore::CompositionUnderline>& underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeLength);
void confirmComposition(const String& text, int64_t selectionStart, int64_t selectionLength);
void cancelComposition();
void collapseSelectionInFrame(uint64_t frameID);
#endif
#if PLATFORM (GTK) && HAVE(GTK_GESTURES)
void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& result);
#endif
void didApplyStyle();
void didChangeSelection();
void discardedComposition();
void canceledComposition();
#if PLATFORM(COCOA)
void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
WKAccessibilityWebPageObject* accessibilityRemoteObject();
NSObject *accessibilityObjectForMainFramePlugin();
const WebCore::FloatPoint& accessibilityPosition() const { return m_accessibilityPosition; }
void sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
void insertTextAsync(const String& text, const EditingRange& replacementRange, bool registerUndoGroup = false, uint32_t editingRangeIsRelativeTo = (uint32_t)EditingRangeIsRelativeTo::EditableRoot, bool suppressSelectionUpdate = false);
void getMarkedRangeAsync(uint64_t callbackID);
void getSelectedRangeAsync(uint64_t callbackID);
void characterIndexForPointAsync(const WebCore::IntPoint&, uint64_t callbackID);
void firstRectForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
void setCompositionAsync(const String& text, Vector<WebCore::CompositionUnderline> underlines, const EditingRange& selectionRange, const EditingRange& replacementRange);
void confirmCompositionAsync();
#if PLATFORM(MAC)
void insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<WebCore::DictationAlternative>& dictationAlternativeLocations, bool registerUndoGroup = false);
void attributedSubstringForCharacterRangeAsync(const EditingRange&, uint64_t callbackID);
void fontAtSelection(uint64_t callbackID);
#endif
void readSelectionFromPasteboard(const WTF::String& pasteboardName, bool& result);
void getStringSelectionForPasteboard(WTF::String& stringValue);
void getDataSelectionForPasteboard(const WTF::String pasteboardType, SharedMemory::Handle& handle, uint64_t& size);
void shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent&, bool& result);
void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result);
bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*);
#if ENABLE(SERVICE_CONTROLS)
void replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference&);
#endif
#endif
#if HAVE(ACCESSIBILITY) && PLATFORM(GTK)
void updateAccessibilityTree();
#endif
void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length);
bool hasCompositionForTesting();
void confirmCompositionForTesting(const String& compositionString);
// FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
// any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
void dummy(bool&);
#if PLATFORM(COCOA)
bool isSpeaking();
void speak(const String&);
void stopSpeaking();
void performDictionaryLookupForSelection(WebCore::Frame*, const WebCore::VisibleSelection&, WebCore::TextIndicatorPresentationTransition);
#endif
bool isSmartInsertDeleteEnabled();
void setSmartInsertDeleteEnabled(bool);
bool isSelectTrailingWhitespaceEnabled();
void setSelectTrailingWhitespaceEnabled(bool);
void replaceSelectionWithText(WebCore::Frame*, const String&);
void clearSelection();
void restoreSelectionInFocusedEditableElement();
#if ENABLE(DRAG_SUPPORT)
#if PLATFORM(GTK)
void performDragControllerAction(uint64_t action, const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t draggingSourceOperationMask, WebSelectionData&&, uint32_t flags);
#else
void performDragControllerAction(uint64_t action, const WebCore::DragData&, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
#endif
void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation);
void willPerformLoadDragDestinationAction();
void mayPerformUploadDragDestinationAction();
void willStartDrag() { ASSERT(!m_isStartingDrag); m_isStartingDrag = true; }
void didStartDrag() { ASSERT(m_isStartingDrag); m_isStartingDrag = false; }
void dragCancelled() { m_isStartingDrag = false; }
#endif // ENABLE(DRAG_SUPPORT)
void beginPrinting(uint64_t frameID, const PrintInfo&);
void endPrinting();
void computePagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
void computePagesForPrintingImpl(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& pageRects, double& totalScaleFactor);
#if PLATFORM(COCOA)
void drawRectToImage(uint64_t frameID, const PrintInfo&, const WebCore::IntRect&, const WebCore::IntSize&, uint64_t callbackID);
void drawPagesToPDF(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, uint64_t callbackID);
void drawPagesToPDFImpl(uint64_t frameID, const PrintInfo&, uint32_t first, uint32_t count, RetainPtr<CFMutableDataRef>& pdfPageData);
#if PLATFORM(IOS)
void computePagesForPrintingAndDrawToPDF(uint64_t frameID, const PrintInfo&, uint64_t callbackID, PassRefPtr<Messages::WebPage::ComputePagesForPrintingAndDrawToPDF::DelayedReply>);
#endif
#elif PLATFORM(GTK)
void drawPagesForPrinting(uint64_t frameID, const PrintInfo&, uint64_t callbackID);
void didFinishPrintOperation(const WebCore::ResourceError&, uint64_t callbackID);
#endif
void addResourceRequest(unsigned long, const WebCore::ResourceRequest&);
void removeResourceRequest(unsigned long);
void setMediaVolume(float);
void setMuted(WebCore::MediaProducer::MutedStateFlags);
void setMayStartMediaWhenInWindow(bool);
#if ENABLE(MEDIA_SESSION)
void handleMediaEvent(uint32_t /* WebCore::MediaEventType */);
void setVolumeOfMediaElement(double, uint64_t);
#endif
void updateMainFrameScrollOffsetPinning();
bool mainFrameHasCustomContentProvider() const;
void addMIMETypeWithCustomContentProvider(const String&);
void mainFrameDidLayout();
bool canRunBeforeUnloadConfirmPanel() const { return m_canRunBeforeUnloadConfirmPanel; }
void setCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel) { m_canRunBeforeUnloadConfirmPanel = canRunBeforeUnloadConfirmPanel; }
bool canRunModal() const { return m_canRunModal; }
void setCanRunModal(bool canRunModal) { m_canRunModal = canRunModal; }
void runModal();
void setDeviceScaleFactor(float);
float deviceScaleFactor() const;
void forceRepaintWithoutCallback();
void unmarkAllMisspellings();
void unmarkAllBadGrammar();
#if PLATFORM(COCOA)
void handleAlternativeTextUIResult(const String&);
#endif
// For testing purpose.
void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
void simulateMouseMotion(WebCore::IntPoint, double time);
#if ENABLE(CONTEXT_MENUS)
void contextMenuShowing() { m_isShowingContextMenu = true; }
#endif
void wheelEvent(const WebWheelEvent&);
void wheelEventHandlersChanged(bool);
void recomputeShortCircuitHorizontalWheelEventsState();
#if ENABLE(MAC_GESTURE_EVENTS)
void gestureEvent(const WebGestureEvent&);
#endif
void updateVisibilityState(bool isInitialState = false);
#if PLATFORM(IOS)
void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&);
void setMaximumUnobscuredSize(const WebCore::FloatSize&);
void setDeviceOrientation(int32_t);
void dynamicViewportSizeUpdate(const WebCore::FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const WebCore::FloatRect& targetExposedContentRect, const WebCore::FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double scale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID);
void synchronizeDynamicViewportUpdate(double& newTargetScale, WebCore::FloatPoint& newScrollPosition, uint64_t& nextValidLayerTreeTransactionID);
void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, MonotonicTime oldestTimestamp);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
void applicationWillResignActive();
void applicationDidEnterBackground(bool isSuspendedUnderLock);
void applicationDidFinishSnapshottingAfterEnteringBackground();
void applicationWillEnterForeground(bool isSuspendedUnderLock);
void applicationDidBecomeActive();
void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
void completePendingSyntheticClickForContentChangeObserver();
#endif
#if ENABLE(IOS_TOUCH_EVENTS)
void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
#endif
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
#endif
bool shouldUseCustomContentProviderForResponse(const WebCore::ResourceResponse&);
bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
void setAsynchronousPluginInitializationEnabled(bool enabled) { m_asynchronousPluginInitializationEnabled = enabled; }
bool asynchronousPluginInitializationEnabledForAllPlugins() const { return m_asynchronousPluginInitializationEnabledForAllPlugins; }
void setAsynchronousPluginInitializationEnabledForAllPlugins(bool enabled) { m_asynchronousPluginInitializationEnabledForAllPlugins = enabled; }
bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
void setTabToLinksEnabled(bool enabled) { m_tabToLinks = enabled; }
bool tabToLinksEnabled() const { return m_tabToLinks; }
bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
void setScrollingPerformanceLoggingEnabled(bool);
#if PLATFORM(COCOA)
bool shouldUsePDFPlugin() const;
bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
void setPDFPluginEnabled(bool enabled) { m_pdfPluginEnabled = enabled; }
NSDictionary *dataDetectionContext() const { return m_dataDetectionContext.get(); }
#endif
void savePDFToFileInDownloadsFolder(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size);
#if PLATFORM(COCOA)
void savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, const String& originatingURLString, const uint8_t* data, unsigned long size, const String& pdfUUID);
#endif
bool mainFrameIsScrollable() const { return m_mainFrameIsScrollable; }
void setMinimumLayoutSize(const WebCore::IntSize&);
WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
void setAutoSizingShouldExpandToViewHeight(bool shouldExpand);
bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; }
bool canShowMIMEType(const String& MIMEType) const;
void addTextCheckingRequest(uint64_t requestID, PassRefPtr<WebCore::TextCheckingRequest>);
void didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>&);
void didCancelCheckingText(uint64_t requestID);
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
void determinePrimarySnapshottedPlugIn();
void determinePrimarySnapshottedPlugInTimerFired();
void resetPrimarySnapshottedPlugIn();
bool matchesPrimaryPlugIn(const String& pageOrigin, const String& pluginOrigin, const String& mimeType) const;
bool plugInIntersectsSearchRect(WebCore::HTMLPlugInImageElement& pluginImageElement);
bool plugInIsPrimarySize(WebCore::HTMLPlugInImageElement& pluginImageElement, unsigned &pluginArea);
#endif
#if ENABLE(DATA_DETECTION)
void setDataDetectionResults(NSArray *);
#endif
unsigned extendIncrementalRenderingSuppression();
void stopExtendingIncrementalRenderingSuppression(unsigned token);
bool shouldExtendIncrementalRenderingSuppression() { return !m_activeRenderingSuppressionTokens.isEmpty(); }
WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
std::optional<WebCore::ScrollbarOverlayStyle> scrollbarOverlayStyle() { return m_scrollbarOverlayStyle; }
void setScrollbarOverlayStyle(std::optional<uint32_t /* WebCore::ScrollbarOverlayStyle */> scrollbarStyle);
Ref<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
void updateCachedDocumentLoader(WebDocumentLoader&, WebCore::Frame&);
void getBytecodeProfile(uint64_t callbackID);
void getSamplingProfilerOutput(uint64_t callbackID);
#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
void handleTelephoneNumberClick(const String& number, const WebCore::IntPoint&);
void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&);
#endif
void didChangeScrollOffsetForFrame(WebCore::Frame*);
void setMainFrameProgressCompleted(bool completed) { m_mainFrameProgressCompleted = completed; }
bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
void postMessage(const String& messageName, API::Object* messageBody);
void postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData);
#if PLATFORM(GTK)
void setInputMethodState(bool);
#endif
void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&);
#if ENABLE(VIDEO)
#if USE(GSTREAMER)
void requestInstallMissingMediaPlugins(const String& details, const String& description, WebCore::MediaPlayerRequestInstallMissingPluginsCallback&);
#endif
#endif
void addUserScript(const String& source, WebCore::UserContentInjectedFrames, WebCore::UserScriptInjectionTime);
void addUserStyleSheet(const String& source, WebCore::UserContentInjectedFrames);
void removeAllUserContent();
void dispatchDidReachLayoutMilestone(WebCore::LayoutMilestones);
void didRestoreScrollPosition();
bool isControlledByAutomation() const;
void setControlledByAutomation(bool);
void insertNewlineInQuotedContent();
#if USE(OS_STATE)
std::chrono::system_clock::time_point loadCommitTime() const { return m_loadCommitTime; }
#endif
#if ENABLE(GAMEPAD)
void gamepadActivity(const Vector<GamepadData>&, bool shouldMakeGamepadsVisible);
#endif
#if ENABLE(POINTER_LOCK)
void didAcquirePointerLock();
void didNotAcquirePointerLock();
void didLosePointerLock();
#endif
void didGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID);
void setUseIconLoadingClient(bool);
private:
WebPage(uint64_t pageID, WebPageCreationParameters&&);
void updateThrottleState();
void updateUserActivity();
// IPC::MessageSender
IPC::Connection* messageSenderConnection() override;
uint64_t messageSenderDestinationID() override;
void platformInitialize();
void platformDetach();
void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
void didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&);
void didReceiveSyncWebPageMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&);
#if PLATFORM(IOS)
void resetViewportDefaultConfiguration(WebFrame* mainFrame);
void viewportConfigurationChanged();
void updateViewportSizeForCSSViewportUnits();
static void convertSelectionRectsToRootView(WebCore::FrameView*, Vector<WebCore::SelectionRect>&);
PassRefPtr<WebCore::Range> rangeForWebSelectionAtPosition(const WebCore::IntPoint&, const WebCore::VisiblePosition&, SelectionFlags&);
PassRefPtr<WebCore::Range> rangeForBlockAtPoint(const WebCore::IntPoint&);
void computeExpandAndShrinkThresholdsForHandle(const WebCore::IntPoint&, SelectionHandlePosition, float& growThreshold, float& shrinkThreshold);
PassRefPtr<WebCore::Range> changeBlockSelection(const WebCore::IntPoint&, SelectionHandlePosition, float& growThreshold, float& shrinkThreshold, SelectionFlags&);
PassRefPtr<WebCore::Range> expandedRangeFromHandle(WebCore::Range*, SelectionHandlePosition);
PassRefPtr<WebCore::Range> contractedRangeFromHandle(WebCore::Range* currentRange, SelectionHandlePosition, SelectionFlags&);
void getAssistedNodeInformation(AssistedNodeInformation&);
void platformInitializeAccessibility();
void handleSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint& location);
void completeSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint& location, WebCore::SyntheticClickType);
void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
void resetTextAutosizing();
WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&, const WebCore::IntPoint&, bool isInteractingWithAssistedNode);
PassRefPtr<WebCore::Range> rangeForGranularityAtPoint(const WebCore::Frame&, const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode);
bool shouldSwitchToBlockModeForHandle(const WebCore::IntPoint& handlePoint, SelectionHandlePosition);
RefPtr<WebCore::Range> switchToBlockSelectionAtPoint(const WebCore::IntPoint&, SelectionHandlePosition);
#if ENABLE(DATA_INTERACTION)
void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
#endif
#endif
#if !PLATFORM(COCOA)
static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
#endif
bool performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&);
#if PLATFORM(MAC)
bool executeKeypressCommandsInternal(const Vector<WebCore::KeypressCommand>&, WebCore::KeyboardEvent*);
#endif
bool markLayersVolatileImmediatelyIfPossible();
void layerVolatilityTimerFired();
void callVolatilityCompletionHandlers();
String sourceForFrame(WebFrame*);
void loadDataImpl(uint64_t navigationID, PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::URL& baseURL, const WebCore::URL& failingURL, const UserData&);
void loadStringImpl(uint64_t navigationID, const String&, const String& MIMEType, const WebCore::URL& baseURL, const WebCore::URL& failingURL, const UserData&);
bool platformHasLocalDataForURL(const WebCore::URL&);
// Actions
void tryClose();
void platformDidReceiveLoadParameters(const LoadParameters&);
void loadRequest(const LoadParameters&);
void loadData(const LoadParameters&);
void loadString(const LoadParameters&);
void loadAlternateHTMLString(const LoadParameters&);
void navigateToPDFLinkWithSimulatedClick(const String& url, WebCore::IntPoint documentPoint, WebCore::IntPoint screenPoint);
void reload(uint64_t navigationID, bool reloadFromOrigin, bool contentBlockersEnabled, const SandboxExtension::Handle&);
void goForward(uint64_t navigationID, uint64_t);
void goBack(uint64_t navigationID, uint64_t);
void goToBackForwardItem(uint64_t navigationID, uint64_t);
void tryRestoreScrollPosition();
void setInitialFocus(bool forward, bool isKeyboardEventValid, const WebKeyboardEvent&, uint64_t callbackID);
void updateIsInWindow(bool isInitialState = false);
void setActivityState(WebCore::ActivityState::Flags, bool wantsDidUpdateActivityState, const Vector<uint64_t>& callbackIDs);
void validateCommand(const String&, uint64_t);
void executeEditCommand(const String&, const String&);
void setEditable(bool);
void mouseEvent(const WebMouseEvent&);
void keyEvent(const WebKeyboardEvent&);
#if ENABLE(IOS_TOUCH_EVENTS)
void touchEventSync(const WebTouchEvent&, bool& handled);
#elif ENABLE(TOUCH_EVENTS)
void touchEvent(const WebTouchEvent&);
#endif
#if ENABLE(CONTEXT_MENUS)
void contextMenuHidden() { m_isShowingContextMenu = false; }
void contextMenuForKeyEvent();
#endif
static bool scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity);
static bool logicalScroll(WebCore::Page*, WebCore::ScrollLogicalDirection, WebCore::ScrollGranularity);
void loadURLInFrame(const String&, uint64_t frameID);
enum class WasRestoredByAPIRequest { No, Yes };
void restoreSessionInternal(const Vector<BackForwardListItemState>&, WasRestoredByAPIRequest);
void restoreSession(const Vector<BackForwardListItemState>&);
void didRemoveBackForwardItem(uint64_t);
#if ENABLE(REMOTE_INSPECTOR)
void setAllowsRemoteInspection(bool);
void setRemoteInspectionNameOverride(const String&);
#endif
void setDrawsBackground(bool);
#if HAVE(COREANIMATION_FENCES)
void setTopContentInsetFenced(float, IPC::Attachment);
#endif
void setTopContentInset(float);
void viewWillStartLiveResize();
void viewWillEndLiveResize();
void getContentsAsString(uint64_t callbackID);
#if ENABLE(MHTML)
void getContentsAsMHTMLData(uint64_t callbackID);
#endif
void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
void getResourceDataFromFrame(uint64_t frameID, const String& resourceURL, uint64_t callbackID);
void getRenderTreeExternalRepresentation(uint64_t callbackID);
void getSelectionOrContentsAsString(uint64_t callbackID);
void getSelectionAsWebArchiveData(uint64_t callbackID);
void getSourceForFrame(uint64_t frameID, uint64_t callbackID);
void getWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID);
void runJavaScriptInMainFrame(const String&, uint64_t callbackID);
void forceRepaint(uint64_t callbackID);
void takeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, uint64_t callbackID);
void preferencesDidChange(const WebPreferencesStore&);
void platformPreferencesDidChange(const WebPreferencesStore&);
void updatePreferences(const WebPreferencesStore&);
void didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t navigationID, DownloadID);
void setUserAgent(const String&);
void setCustomTextEncodingName(const String&);
void suspendActiveDOMObjectsAndAnimations();
void resumeActiveDOMObjectsAndAnimations();
#if PLATFORM(COCOA)
void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
void performDictionaryLookupOfCurrentSelection();
void performDictionaryLookupForRange(WebCore::Frame*, WebCore::Range&, NSDictionary *options, WebCore::TextIndicatorPresentationTransition);
WebCore::DictionaryPopupInfo dictionaryPopupInfoForRange(WebCore::Frame*, WebCore::Range&, NSDictionary **options, WebCore::TextIndicatorPresentationTransition);
#if ENABLE(PDFKIT_PLUGIN)
WebCore::DictionaryPopupInfo dictionaryPopupInfoForSelectionInPDFPlugin(PDFSelection *, PDFPlugin&, NSDictionary **options, WebCore::TextIndicatorPresentationTransition);
#endif
void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
RetainPtr<PDFDocument> pdfDocumentForPrintingFrame(WebCore::Frame*);
void computePagesForPrintingPDFDocument(uint64_t frameID, const PrintInfo&, Vector<WebCore::IntRect>& resultPageRects);
void drawPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, const WebCore::IntRect&);
void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
#endif
void setMainFrameIsScrollable(bool);
void unapplyEditCommand(uint64_t commandID);
void reapplyEditCommand(uint64_t commandID);
void didRemoveEditCommand(uint64_t commandID);
void findString(const String&, uint32_t findOptions, uint32_t maxMatchCount);
void findStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
void getImageForFindMatch(uint32_t matchIndex);
void selectFindMatch(uint32_t matchIndex);
void hideFindUI();
void countStringMatches(const String&, uint32_t findOptions, uint32_t maxMatchCount);
#if USE(COORDINATED_GRAPHICS)
void sendViewportAttributesChanged(const WebCore::ViewportArguments&);
#endif
void didChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
void setTextForActivePopupMenu(int32_t index);
#if PLATFORM(GTK)
void failedToShowPopupMenu();
#endif
#if PLATFORM(IOS)
void didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vector<String>&, const String& displayString, const IPC::DataReference& iconData);
#endif
void didChooseFilesForOpenPanel(const Vector<String>&);
void didCancelForOpenPanel();
#if ENABLE(SANDBOX_EXTENSIONS)
void extendSandboxForFileFromOpenPanel(const SandboxExtension::Handle&);
#endif
void didReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed);
void didReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed);
#if ENABLE(MEDIA_STREAM)
void userMediaAccessWasGranted(uint64_t userMediaID, const String& audioDeviceUID, const String& videoDeviceUID);
void userMediaAccessWasDenied(uint64_t userMediaID, uint64_t reason, String invalidConstraint);
void didCompleteMediaDeviceEnumeration(uint64_t userMediaID, const Vector<WebCore::CaptureDevice>& devices, const String& deviceIdentifierHashSalt, bool originHasPersistentAccess);
#if ENABLE(SANDBOX_EXTENSIONS)
void grantUserMediaDeviceSandboxExtensions(const MediaDeviceSandboxExtensions&);
void revokeUserMediaDeviceSandboxExtensions(const Vector<String>&);
#endif
#endif
void advanceToNextMisspelling(bool startBeforeSelection);
void changeSpellingToWord(const String& word);
#if USE(APPKIT)
void uppercaseWord();
void lowercaseWord();
void capitalizeWord();
#endif
#if ENABLE(CONTEXT_MENUS)
void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
#endif
void changeSelectedIndex(int32_t index);
void setCanStartMediaTimerFired();
static bool platformCanHandleRequest(const WebCore::ResourceRequest&);
static PluginView* focusedPluginViewForFrame(WebCore::Frame&);
static PluginView* pluginViewForFrame(WebCore::Frame*);
static RefPtr<WebCore::Range> rangeFromEditingRange(WebCore::Frame&, const EditingRange&, EditingRangeIsRelativeTo = EditingRangeIsRelativeTo::EditableRoot);
void reportUsedFeatures();
void updateWebsitePolicies(const WebsitePolicies&);
#if PLATFORM(MAC)
void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
RefPtr<WebCore::Range> lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
void immediateActionDidUpdate();
void immediateActionDidCancel();
void immediateActionDidComplete();
void setFont(const String& fontFamily, double fontSize, uint64_t fontTraits);
void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
void handleAcceptedCandidate(WebCore::TextCheckingResult);
#endif
#if PLATFORM(COCOA)
void requestActiveNowPlayingSessionInfo();
#endif
void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS)
void playbackTargetSelected(uint64_t, const WebCore::MediaPlaybackTargetContext& outputDevice) const;
void playbackTargetAvailabilityDidChange(uint64_t, bool);
void setShouldPlayToPlaybackTarget(uint64_t, bool);
#endif
void clearWheelEventTestTrigger();
void setShouldScaleViewToFitDocument(bool);
void pageStoppedScrolling();
#if ENABLE(VIDEO) && USE(GSTREAMER)
void didEndRequestInstallMissingMediaPlugins(uint32_t result);
#endif
void setResourceCachingDisabled(bool);
void setUserInterfaceLayoutDirection(uint32_t);
bool canPluginHandleResponse(const WebCore::ResourceResponse&);
#if USE(QUICK_LOOK)
void didReceivePasswordForQuickLookDocument(const String&);
#endif
uint64_t m_pageID;
std::unique_ptr<WebCore::Page> m_page;
RefPtr<WebFrame> m_mainFrame;
RefPtr<InjectedBundleBackForwardList> m_backForwardList;
RefPtr<WebPageGroupProxy> m_pageGroup;
String m_userAgent;
WebCore::IntSize m_viewSize;
std::unique_ptr<DrawingArea> m_drawingArea;
HashSet<PluginView*> m_pluginViews;
bool m_hasSeenPlugin { false };
HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
bool m_useFixedLayout { false };
bool m_drawsBackground { true };
WebCore::Color m_underlayColor;
bool m_isInRedo { false };
bool m_isClosed { false };
bool m_tabToLinks { false };
bool m_asynchronousPluginInitializationEnabled { false };
bool m_asynchronousPluginInitializationEnabledForAllPlugins { false };
bool m_artificialPluginInitializationDelayEnabled { false };
bool m_scrollingPerformanceLoggingEnabled { false };
bool m_mainFrameIsScrollable { true };
#if PLATFORM(IOS)
bool m_ignoreViewportScalingConstraints { false };
#endif
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
bool m_readyToFindPrimarySnapshottedPlugin { false };
bool m_didFindPrimarySnapshottedPlugin { false };
unsigned m_numberOfPrimarySnapshotDetectionAttempts { 0 };
String m_primaryPlugInPageOrigin;
String m_primaryPlugInOrigin;
String m_primaryPlugInMimeType;
RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer;
#endif
// The layer hosting mode.
LayerHostingMode m_layerHostingMode;
#if PLATFORM(COCOA)
bool m_pdfPluginEnabled { false };
bool m_hasCachedWindowFrame { false };
// The frame of the containing window in screen coordinates.
WebCore::FloatRect m_windowFrameInScreenCoordinates;
// The frame of the containing window in unflipped screen coordinates.
WebCore::FloatRect m_windowFrameInUnflippedScreenCoordinates;
// The frame of the view in window coordinates.
WebCore::FloatRect m_viewFrameInWindowCoordinates;
// The accessibility position of the view.
WebCore::FloatPoint m_accessibilityPosition;
RetainPtr<WKAccessibilityWebPageObject> m_mockAccessibilityElement;
ViewGestureGeometryCollector m_viewGestureGeometryCollector;
RetainPtr<NSDictionary> m_dataDetectionContext;
#elif HAVE(ACCESSIBILITY) && PLATFORM(GTK)
GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
#endif
#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
// Our view's window in the UI process.
uint64_t m_nativeWindowHandle { 0 };
#endif
#if !PLATFORM(IOS)
RefPtr<PageBanner> m_headerBanner;
RefPtr<PageBanner> m_footerBanner;
#endif // !PLATFORM(IOS)
RunLoop::Timer<WebPage> m_setCanStartMediaTimer;
bool m_mayStartMediaWhenInWindow { false };
HashMap<uint64_t, RefPtr<WebUndoStep>> m_undoStepMap;
#if ENABLE(CONTEXT_MENUS)
std::unique_ptr<API::InjectedBundle::PageContextMenuClient> m_contextMenuClient;
#endif
std::unique_ptr<API::InjectedBundle::EditorClient> m_editorClient;
std::unique_ptr<API::InjectedBundle::FormClient> m_formClient;
InjectedBundlePageLoaderClient m_loaderClient;
InjectedBundlePagePolicyClient m_policyClient;
InjectedBundlePageResourceLoadClient m_resourceLoadClient;
std::unique_ptr<API::InjectedBundle::PageUIClient> m_uiClient;
#if ENABLE(FULLSCREEN_API)
InjectedBundlePageFullScreenClient m_fullScreenClient;
#endif
FindController m_findController;
RefPtr<WebInspector> m_inspector;
RefPtr<WebInspectorUI> m_inspectorUI;
RefPtr<RemoteWebInspectorUI> m_remoteInspectorUI;
#if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
RefPtr<WebPlaybackSessionManager> m_playbackSessionManager;
RefPtr<WebVideoFullscreenManager> m_videoFullscreenManager;
#endif
#if PLATFORM(IOS)
bool m_allowsMediaDocumentInlinePlayback { false };
#endif
#if ENABLE(FULLSCREEN_API)
RefPtr<WebFullScreenManager> m_fullScreenManager;
#endif
RefPtr<WebPopupMenu> m_activePopupMenu;
#if ENABLE(CONTEXT_MENUS)
RefPtr<WebContextMenu> m_contextMenu;
#endif
#if ENABLE(INPUT_TYPE_COLOR)
WebColorChooser* m_activeColorChooser { nullptr };
#endif
RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener;
RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager;
Ref<WebUserContentController> m_userContentController;
#if ENABLE(GEOLOCATION)
GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
#endif
#if ENABLE(MEDIA_STREAM)
UserMediaPermissionRequestManager m_userMediaPermissionRequestManager;
#endif
std::unique_ptr<WebCore::PrintContext> m_printContext;
#if PLATFORM(GTK)
RefPtr<WebPrintOperationGtk> m_printOperation;
#endif
SandboxExtensionTracker m_sandboxExtensionTracker;
RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
WebCore::HysteresisActivity m_pageScrolledHysteresis;
bool m_canRunBeforeUnloadConfirmPanel { false };
bool m_canRunModal { false };
bool m_isRunningModal { false };
#if ENABLE(DRAG_SUPPORT)
bool m_isStartingDrag { false };
#endif
bool m_cachedMainFrameIsPinnedToLeftSide { true };
bool m_cachedMainFrameIsPinnedToRightSide { true };
bool m_cachedMainFrameIsPinnedToTopSide { true };
bool m_cachedMainFrameIsPinnedToBottomSide { true };
bool m_canShortCircuitHorizontalWheelEvents { false };
bool m_hasWheelEventHandlers { false };
unsigned m_cachedPageCount { 0 };
HashSet<unsigned long> m_trackedNetworkResourceRequestIdentifiers;
WebCore::IntSize m_minimumLayoutSize;
bool m_autoSizingShouldExpandToViewHeight { false };
bool m_userIsInteracting { false };
bool m_isAssistingNodeDueToUserInteraction { false };
bool m_hasEverFocusedElementDueToUserInteractionSincePageTransition { false };
bool m_needsHiddenContentEditableQuirk { false };
bool m_needsPlainTextQuirk { false };
#if ENABLE(CONTEXT_MENUS)
bool m_isShowingContextMenu { false };
#endif
RefPtr<WebCore::Node> m_assistedNode;
bool m_hasPendingBlurNotification { false };
#if PLATFORM(IOS)
RefPtr<WebCore::Range> m_currentWordRange;
RefPtr<WebCore::Node> m_interactionNode;
WebCore::IntPoint m_lastInteractionLocation;
enum SelectionAnchor {
Start,
End
};
SelectionAnchor m_selectionAnchor { Start };
RefPtr<WebCore::Node> m_potentialTapNode;
WebCore::FloatPoint m_potentialTapLocation;
WebCore::ViewportConfiguration m_viewportConfiguration;
bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
bool m_scaleWasSetByUIProcess { false };
bool m_userHasChangedPageScaleFactor { false };
bool m_hasStablePageScaleFactor { true };
bool m_useTestingViewportConfiguration { false };
bool m_isInStableState { true };
bool m_forceAlwaysUserScalable { false };
MonotonicTime m_oldestNonStableUpdateVisibleContentRectsTimestamp;
Seconds m_estimatedLatency { 0 };
WebCore::FloatSize m_screenSize;
WebCore::FloatSize m_availableScreenSize;
RefPtr<WebCore::Range> m_currentBlockSelection;
WebCore::IntRect m_blockRectForTextSelection;
RefPtr<WebCore::Range> m_initialSelection;
WebCore::IntSize m_blockSelectionDesiredSize;
WebCore::FloatSize m_maximumUnobscuredSize;
int32_t m_deviceOrientation { 0 };
bool m_inDynamicSizeUpdate { false };
HashMap<std::pair<WebCore::IntSize, double>, WebCore::IntPoint> m_dynamicSizeUpdateHistory;
RefPtr<WebCore::Node> m_pendingSyntheticClickNode;
WebCore::FloatPoint m_pendingSyntheticClickLocation;
WebCore::FloatRect m_previousExposedContentRect;
#endif
WebCore::Timer m_layerVolatilityTimer;
Vector<std::function<void ()>> m_markLayersAsVolatileCompletionHandlers;
bool m_isSuspendedUnderLock { false };
HashSet<String, ASCIICaseInsensitiveHash> m_mimeTypesWithCustomContentProviders;
WebCore::Color m_backgroundColor { WebCore::Color::white };
HashSet<unsigned> m_activeRenderingSuppressionTokens;
unsigned m_maximumRenderingSuppressionToken { 0 };
WebCore::ScrollPinningBehavior m_scrollPinningBehavior { WebCore::DoNotPin };
std::optional<WebCore::ScrollbarOverlayStyle> m_scrollbarOverlayStyle;
bool m_useAsyncScrolling { false };
WebCore::ActivityState::Flags m_activityState;
bool m_processSuppressionEnabled;
UserActivity m_userActivity;
WebCore::HysteresisActivity m_userActivityHysteresis;
uint64_t m_pendingNavigationID { 0 };
#if ENABLE(WEBGL)
WebCore::WebGLLoadPolicy m_systemWebGLPolicy { WebCore::WebGLAllowCreation };
#endif
bool m_mainFrameProgressCompleted { false };
bool m_shouldDispatchFakeMouseMoveEvents { true };
bool m_isEditorStateMissingPostLayoutData { false };
bool m_isSelectingTextWhileInsertingAsynchronously { false };
enum class EditorStateIsContentEditable { No, Yes, Unset };
mutable EditorStateIsContentEditable m_lastEditorStateWasContentEditable { EditorStateIsContentEditable::Unset };
#if PLATFORM(GTK)
bool m_inputMethodEnabled { false };
#endif
#if ENABLE(VIDEO) && USE(GSTREAMER)
RefPtr<WebCore::MediaPlayerRequestInstallMissingPluginsCallback> m_installMediaPluginsCallback;
#endif
#if USE(OS_STATE)
std::chrono::system_clock::time_point m_loadCommitTime;
#endif
WebCore::UserInterfaceLayoutDirection m_userInterfaceLayoutDirection { WebCore::UserInterfaceLayoutDirection::LTR };
const String m_overrideContentSecurityPolicy;
};
} // namespace WebKit
|