https://bugs.webkit.org/show_bug.cgi?id=184191
Reviewed by Darin Adler.
Source/WebCore:
Drop MainFrame class and move contents into Page / Frame since there is a 1:1
relationship between the Page and the MainFrame.
This is ground work for introducing LocalFrame / RemoteFrame concepts.
* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::supportsVersion):
(WebCore::ApplePaySession::canMakePayments):
(WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
(WebCore::ApplePaySession::openPaymentSetup):
(WebCore::ApplePaySession::paymentCoordinator const):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::paymentCoordinator):
* Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
* Modules/mediastream/UserMediaRequest.cpp:
* Modules/plugins/QuickTimePluginReplacement.mm:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::mainFrame const):
(WebCore::AccessibilityObject::visiblePositionForBounds const):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptState.cpp:
* contentextensions/ContentExtensionsBackend.cpp:
* css/MediaQueryEvaluator.cpp:
(WebCore::displayModeEvaluate):
* dom/DOMImplementation.cpp:
* dom/Document.cpp:
* dom/DocumentMarkerController.cpp:
* dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
* dom/EventDispatcher.cpp:
* dom/ScriptedAnimationController.cpp:
* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers):
* editing/EditorCommand.cpp:
* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::Notifier::~Notifier):
* editing/cocoa/WebContentReaderCocoa.mm:
* editing/markup.cpp:
* history/CachedFrame.cpp:
* history/CachedPage.cpp:
* history/PageCache.cpp:
(WebCore::destroyRenderTree):
* html/HTMLMediaElement.cpp:
* html/HTMLPlugInImageElement.cpp:
* html/ImageDocument.cpp:
* html/MediaElementSession.cpp:
(WebCore::isMainContentForPurposesOfAutoplay):
* html/canvas/WebGLRenderingContextBase.cpp:
* inspector/InspectorClient.cpp:
* inspector/InspectorController.cpp:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorOverlay.cpp:
* inspector/PageScriptDebugServer.cpp:
* inspector/agents/InspectorApplicationCacheAgent.cpp:
* inspector/agents/InspectorCanvasAgent.cpp:
* inspector/agents/InspectorDOMAgent.cpp:
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::mainFrame):
* inspector/agents/InspectorPageAgent.h:
* inspector/agents/page/PageDebuggerAgent.cpp:
* inspector/agents/page/PageRuntimeAgent.cpp:
* loader/DocumentLoader.cpp:
* loader/DocumentWriter.cpp:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::setState):
* loader/HistoryController.cpp:
* loader/NavigationDisabler.h:
* loader/ProgressTracker.cpp:
* loader/ResourceLoadObserver.cpp:
* loader/ResourceLoader.cpp:
* loader/SubframeLoader.cpp:
* loader/SubresourceLoader.cpp:
* loader/appcache/ApplicationCacheHost.cpp:
* loader/archive/mhtml/MHTMLArchive.cpp:
* loader/cache/CachedResource.cpp:
* loader/cache/CachedResourceLoader.cpp:
* page/AutoscrollController.cpp:
* page/Chrome.cpp:
* page/ContextMenuController.cpp:
* page/DOMWindow.cpp:
* page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion):
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
(WebCore::RegionOverlay::create):
(WebCore::RegionOverlay::RegionOverlay):
(WebCore::RegionOverlay::~RegionOverlay):
(WebCore::DebugPageOverlays::ensureRegionOverlayForPage):
(WebCore::DebugPageOverlays::showRegionOverlay):
(WebCore::DebugPageOverlays::hideRegionOverlay):
(WebCore::DebugPageOverlays::regionChanged):
(WebCore::DebugPageOverlays::regionOverlayForPage const):
(WebCore::DebugPageOverlays::updateOverlayRegionVisibility):
(WebCore::DebugPageOverlays::settingsChanged):
* page/DebugPageOverlays.h:
(WebCore::DebugPageOverlays::hasOverlaysForPage const):
(WebCore::DebugPageOverlays::hasOverlays):
(WebCore::DebugPageOverlays::didLayout):
(WebCore::DebugPageOverlays::didChangeEventHandlers):
* page/DragController.cpp:
(WebCore::DragController::performDragOperation):
(WebCore::DragController::tryDHTMLDrag):
(WebCore::DragController::beginDrag):
(WebCore::DragController::doSystemDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::clearLatchedState):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/FocusController.cpp:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::dropChildren):
(WebCore::Frame::selfOnlyRef):
(WebCore::Frame::selfOnlyDeref):
* page/Frame.h:
(WebCore::Frame::mainFrame const):
* page/FrameTree.cpp:
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::setContentsSize):
(WebCore::FrameView::didChangeScrollOffset):
(WebCore::FrameView::setViewExposedRect):
* page/History.cpp:
* page/MainFrame.cpp: Removed.
* page/MainFrame.h: Removed.
* page/MemoryRelease.cpp:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::m_applicationManifest):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::latchingState):
(WebCore::Page::pushNewLatchingState):
(WebCore::Page::resetLatchingState):
(WebCore::Page::popLatchingState):
(WebCore::Page::removeLatchingStateForTarget):
(WebCore::Page::setPaymentCoordinator):
* page/Page.h:
(WebCore::Page::mainFrame):
(WebCore::Page::mainFrame const):
(WebCore::Page::wheelEventDeltaFilter):
(WebCore::Page::pageOverlayController):
(WebCore::Page::servicesOverlayController):
(WebCore::Page::paymentCoordinator const):
(WebCore::Page::applicationManifest const):
(WebCore::Page::performanceLogging const):
* page/PageConsoleClient.cpp:
* page/PageDebuggable.cpp:
* page/PageGroup.cpp:
* page/PageGroupLoadDeferrer.cpp:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::controller const):
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::PageOverlayController):
(WebCore::PageOverlayController::createRootLayersIfNeeded):
(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
(WebCore::PageOverlayController::didChangeViewExposedRect):
(WebCore::PageOverlayController::updateSettingsForLayer):
(WebCore::PageOverlayController::deviceScaleFactor const):
(WebCore::PageOverlayController::notifyFlushRequired):
(WebCore::PageOverlayController::tiledBackingUsageChanged):
* page/PageOverlayController.h:
* page/PageSerializer.cpp:
* page/PerformanceLogging.cpp:
(WebCore::PerformanceLogging::PerformanceLogging):
(WebCore::PerformanceLogging::didReachPointOfInterest):
* page/PerformanceLogging.h:
* page/PerformanceMonitor.cpp:
* page/ResourceUsageOverlay.cpp:
(WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
(WebCore::ResourceUsageOverlay::initialize):
* page/SettingsBase.cpp:
* page/SpatialNavigation.cpp:
* page/UserContentProvider.cpp:
* page/ios/FrameIOS.mm:
* page/mac/DragControllerMac.mm:
* page/mac/EventHandlerMac.mm:
(WebCore::latchingIsLockedToPlatformFrame):
(WebCore::latchingIsLockedToAncestorOfThisFrame):
(WebCore::EventHandler::clearOrScheduleClearingLatchedStateIfNeeded):
(WebCore::EventHandler::platformPrepareForWheelEvents):
(WebCore::EventHandler::platformRecordWheelEvent):
(WebCore::EventHandler::platformCompleteWheelEvent):
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
* page/mac/PageMac.mm:
* page/mac/ServicesOverlayController.h:
(WebCore::ServicesOverlayController::page const):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
(WebCore::ServicesOverlayController::Highlight::deviceScaleFactor const):
(WebCore::ServicesOverlayController::ServicesOverlayController):
(WebCore::ServicesOverlayController::invalidateHighlightsOfType):
(WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
(WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown const):
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
(WebCore::ServicesOverlayController::buildSelectionHighlight):
(WebCore::ServicesOverlayController::hasRelevantSelectionServices):
(WebCore::ServicesOverlayController::createOverlayIfNeeded):
(WebCore::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
(WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
(WebCore::ServicesOverlayController::mouseEvent):
(WebCore::ServicesOverlayController::handleClick):
(WebCore::ServicesOverlayController::mainFrame const):
* page/scrolling/AsyncScrollingCoordinator.cpp:
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
* plugins/DOMMimeType.cpp:
* plugins/PluginInfoProvider.cpp:
(WebCore::PluginInfoProvider::refresh):
* rendering/RenderBox.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers const):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
* rendering/RenderObject.cpp:
* replay/UserInputBridge.cpp:
* storage/StorageEventDispatcher.cpp:
* style/StyleTreeResolver.cpp:
(WebCore::Style::suspendMemoryCacheClientCalls):
* svg/SVGSVGElement.cpp:
* svg/graphics/SVGImage.cpp:
* testing/InternalSettings.cpp:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::installMockPageOverlay):
(WebCore::Internals::pageOverlayLayerTreeAsText const):
* testing/MockPageOverlay.cpp:
* testing/MockPageOverlay.h:
* testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::installOverlay):
(WebCore::MockPageOverlayClient::layerTreeAsText):
* testing/MockPageOverlayClient.h:
* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::MockPaymentCoordinator):
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeMerchantValidation):
(WebCore::MockPaymentCoordinator::changeShippingOption):
(WebCore::MockPaymentCoordinator::changePaymentMethod):
(WebCore::MockPaymentCoordinator::acceptPayment):
(WebCore::MockPaymentCoordinator::cancelPayment):
* testing/MockPaymentCoordinator.h:
* workers/service/context/ServiceWorkerThreadProxy.cpp:
Source/WebKit:
Drop MainFrame class and move contents into Page / Frame since there is a 1:1
relationship between the Page and the MainFrame.
This is ground work for introducing LocalFrame / RemoteFrame concepts.
* Shared/WebRenderLayer.cpp:
* Shared/WebRenderObject.cpp:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::paymentCoordinator):
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInstallPageOverlay):
(WKBundlePageUninstallPageOverlay):
(WKBundlePageInstallPageOverlayWithAnimation):
(WKBundlePageUninstallPageOverlayWithAnimation):
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/Plugins/PluginView.cpp:
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::~WebInspectorClient):
(WebKit::WebInspectorClient::highlight):
(WebKit::WebInspectorClient::hideHighlight):
(WebKit::WebInspectorClient::showPaintRect):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::hideFindUI):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
* WebProcess/WebPage/WebFrame.cpp:
* WebProcess/WebPage/WebInspector.cpp:
* WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrame const):
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
(WebKit::WebPage::plugInIntersectsSearchRect):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
* WebProcess/WebPage/ios/FindControllerIOS.mm:
* WebProcess/WebPage/ios/WebPageIOS.mm:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::WebPage::dataDetectorsDidPresentUI):
(WebKit::WebPage::dataDetectorsDidChangeUI):
(WebKit::WebPage::dataDetectorsDidHideUI):
* WebProcess/WebProcess.cpp:
* WebProcess/WebStorage/StorageAreaMap.cpp:
Source/WebKitLegacy/mac:
Drop MainFrame class and move contents into Page / Frame since there is a 1:1
relationship between the Page and the MainFrame.
This is ground work for introducing LocalFrame / RemoteFrame concepts.
* WebCoreSupport/WebDragClient.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebInspectorClient.mm:
* WebCoreSupport/WebPlatformStrategies.mm:
* WebCoreSupport/WebPluginInfoProvider.mm:
* WebView/WebFrame.mm:
* WebView/WebFrameView.mm:
* WebView/WebHTMLView.mm:
* WebView/WebView.mm:
Source/WebKitLegacy/win:
Drop MainFrame class and move contents into Page / Frame since there is a 1:1
relationship between the Page and the MainFrame.
This is ground work for introducing LocalFrame / RemoteFrame concepts.
* WebCoreSupport/AcceleratedCompositingContext.cpp:
* WebCoreSupport/WebContextMenuClient.cpp:
* WebCoreSupport/WebDragClient.cpp:
* WebDropSource.cpp:
* WebFrame.cpp:
* WebView.cpp:
Tools:
* TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230211
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-04-03 Chris Dumez <cdumez@apple.com>
+
+ Drop MainFrame class
+ https://bugs.webkit.org/show_bug.cgi?id=184191
+
+ Reviewed by Darin Adler.
+
+ Drop MainFrame class and move contents into Page / Frame since there is a 1:1
+ relationship between the Page and the MainFrame.
+
+ This is ground work for introducing LocalFrame / RemoteFrame concepts.
+
+ * Modules/applepay/ApplePaySession.cpp:
+ (WebCore::ApplePaySession::create):
+ (WebCore::ApplePaySession::supportsVersion):
+ (WebCore::ApplePaySession::canMakePayments):
+ (WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
+ (WebCore::ApplePaySession::openPaymentSetup):
+ (WebCore::ApplePaySession::paymentCoordinator const):
+ * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
+ (WebCore::paymentCoordinator):
+ * Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
+ * Modules/mediastream/UserMediaRequest.cpp:
+ * Modules/plugins/QuickTimePluginReplacement.mm:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::mainFrame const):
+ (WebCore::AccessibilityObject::visiblePositionForBounds const):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptState.cpp:
+ * contentextensions/ContentExtensionsBackend.cpp:
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::displayModeEvaluate):
+ * dom/DOMImplementation.cpp:
+ * dom/Document.cpp:
+ * dom/DocumentMarkerController.cpp:
+ * dom/Element.cpp:
+ (WebCore::Element::removedFromAncestor):
+ * dom/EventDispatcher.cpp:
+ * dom/ScriptedAnimationController.cpp:
+ * editing/Editor.cpp:
+ (WebCore::Editor::scanSelectionForTelephoneNumbers):
+ * editing/EditorCommand.cpp:
+ * editing/SelectionRectGatherer.cpp:
+ (WebCore::SelectionRectGatherer::Notifier::~Notifier):
+ * editing/cocoa/WebContentReaderCocoa.mm:
+ * editing/markup.cpp:
+ * history/CachedFrame.cpp:
+ * history/CachedPage.cpp:
+ * history/PageCache.cpp:
+ (WebCore::destroyRenderTree):
+ * html/HTMLMediaElement.cpp:
+ * html/HTMLPlugInImageElement.cpp:
+ * html/ImageDocument.cpp:
+ * html/MediaElementSession.cpp:
+ (WebCore::isMainContentForPurposesOfAutoplay):
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ * inspector/InspectorClient.cpp:
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorFrontendClientLocal.cpp:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorInstrumentation.cpp:
+ * inspector/InspectorOverlay.cpp:
+ * inspector/PageScriptDebugServer.cpp:
+ * inspector/agents/InspectorApplicationCacheAgent.cpp:
+ * inspector/agents/InspectorCanvasAgent.cpp:
+ * inspector/agents/InspectorDOMAgent.cpp:
+ * inspector/agents/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::mainFrame):
+ * inspector/agents/InspectorPageAgent.h:
+ * inspector/agents/page/PageDebuggerAgent.cpp:
+ * inspector/agents/page/PageRuntimeAgent.cpp:
+ * loader/DocumentLoader.cpp:
+ * loader/DocumentWriter.cpp:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+ (WebCore::FrameLoader::setState):
+ * loader/HistoryController.cpp:
+ * loader/NavigationDisabler.h:
+ * loader/ProgressTracker.cpp:
+ * loader/ResourceLoadObserver.cpp:
+ * loader/ResourceLoader.cpp:
+ * loader/SubframeLoader.cpp:
+ * loader/SubresourceLoader.cpp:
+ * loader/appcache/ApplicationCacheHost.cpp:
+ * loader/archive/mhtml/MHTMLArchive.cpp:
+ * loader/cache/CachedResource.cpp:
+ * loader/cache/CachedResourceLoader.cpp:
+ * page/AutoscrollController.cpp:
+ * page/Chrome.cpp:
+ * page/ContextMenuController.cpp:
+ * page/DOMWindow.cpp:
+ * page/DebugPageOverlays.cpp:
+ (WebCore::MouseWheelRegionOverlay::updateRegion):
+ (WebCore::NonFastScrollableRegionOverlay::updateRegion):
+ (WebCore::RegionOverlay::create):
+ (WebCore::RegionOverlay::RegionOverlay):
+ (WebCore::RegionOverlay::~RegionOverlay):
+ (WebCore::DebugPageOverlays::ensureRegionOverlayForPage):
+ (WebCore::DebugPageOverlays::showRegionOverlay):
+ (WebCore::DebugPageOverlays::hideRegionOverlay):
+ (WebCore::DebugPageOverlays::regionChanged):
+ (WebCore::DebugPageOverlays::regionOverlayForPage const):
+ (WebCore::DebugPageOverlays::updateOverlayRegionVisibility):
+ (WebCore::DebugPageOverlays::settingsChanged):
+ * page/DebugPageOverlays.h:
+ (WebCore::DebugPageOverlays::hasOverlaysForPage const):
+ (WebCore::DebugPageOverlays::hasOverlays):
+ (WebCore::DebugPageOverlays::didLayout):
+ (WebCore::DebugPageOverlays::didChangeEventHandlers):
+ * page/DragController.cpp:
+ (WebCore::DragController::performDragOperation):
+ (WebCore::DragController::tryDHTMLDrag):
+ (WebCore::DragController::beginDrag):
+ (WebCore::DragController::doSystemDrag):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::mouseMoved):
+ (WebCore::EventHandler::handleMouseReleaseEvent):
+ (WebCore::EventHandler::handleWheelEvent):
+ (WebCore::EventHandler::clearLatchedState):
+ (WebCore::EventHandler::defaultWheelEventHandler):
+ * page/FocusController.cpp:
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ (WebCore::Frame::dropChildren):
+ (WebCore::Frame::selfOnlyRef):
+ (WebCore::Frame::selfOnlyDeref):
+ * page/Frame.h:
+ (WebCore::Frame::mainFrame const):
+ * page/FrameTree.cpp:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setFrameRect):
+ (WebCore::FrameView::setContentsSize):
+ (WebCore::FrameView::didChangeScrollOffset):
+ (WebCore::FrameView::setViewExposedRect):
+ * page/History.cpp:
+ * page/MainFrame.cpp: Removed.
+ * page/MainFrame.h: Removed.
+ * page/MemoryRelease.cpp:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ (WebCore::m_applicationManifest):
+ (WebCore::Page::setDeviceScaleFactor):
+ (WebCore::Page::latchingState):
+ (WebCore::Page::pushNewLatchingState):
+ (WebCore::Page::resetLatchingState):
+ (WebCore::Page::popLatchingState):
+ (WebCore::Page::removeLatchingStateForTarget):
+ (WebCore::Page::setPaymentCoordinator):
+ * page/Page.h:
+ (WebCore::Page::mainFrame):
+ (WebCore::Page::mainFrame const):
+ (WebCore::Page::wheelEventDeltaFilter):
+ (WebCore::Page::pageOverlayController):
+ (WebCore::Page::servicesOverlayController):
+ (WebCore::Page::paymentCoordinator const):
+ (WebCore::Page::applicationManifest const):
+ (WebCore::Page::performanceLogging const):
+ * page/PageConsoleClient.cpp:
+ * page/PageDebuggable.cpp:
+ * page/PageGroup.cpp:
+ * page/PageGroupLoadDeferrer.cpp:
+ * page/PageOverlay.cpp:
+ (WebCore::PageOverlay::controller const):
+ * page/PageOverlayController.cpp:
+ (WebCore::PageOverlayController::PageOverlayController):
+ (WebCore::PageOverlayController::createRootLayersIfNeeded):
+ (WebCore::PageOverlayController::layerWithDocumentOverlays):
+ (WebCore::PageOverlayController::layerWithViewOverlays):
+ (WebCore::PageOverlayController::installPageOverlay):
+ (WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
+ (WebCore::PageOverlayController::didChangeViewExposedRect):
+ (WebCore::PageOverlayController::updateSettingsForLayer):
+ (WebCore::PageOverlayController::deviceScaleFactor const):
+ (WebCore::PageOverlayController::notifyFlushRequired):
+ (WebCore::PageOverlayController::tiledBackingUsageChanged):
+ * page/PageOverlayController.h:
+ * page/PageSerializer.cpp:
+ * page/PerformanceLogging.cpp:
+ (WebCore::PerformanceLogging::PerformanceLogging):
+ (WebCore::PerformanceLogging::didReachPointOfInterest):
+ * page/PerformanceLogging.h:
+ * page/PerformanceMonitor.cpp:
+ * page/ResourceUsageOverlay.cpp:
+ (WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
+ (WebCore::ResourceUsageOverlay::initialize):
+ * page/SettingsBase.cpp:
+ * page/SpatialNavigation.cpp:
+ * page/UserContentProvider.cpp:
+ * page/ios/FrameIOS.mm:
+ * page/mac/DragControllerMac.mm:
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::latchingIsLockedToPlatformFrame):
+ (WebCore::latchingIsLockedToAncestorOfThisFrame):
+ (WebCore::EventHandler::clearOrScheduleClearingLatchedStateIfNeeded):
+ (WebCore::EventHandler::platformPrepareForWheelEvents):
+ (WebCore::EventHandler::platformRecordWheelEvent):
+ (WebCore::EventHandler::platformCompleteWheelEvent):
+ (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
+ * page/mac/PageMac.mm:
+ * page/mac/ServicesOverlayController.h:
+ (WebCore::ServicesOverlayController::page const):
+ * page/mac/ServicesOverlayController.mm:
+ (WebCore::ServicesOverlayController::Highlight::Highlight):
+ (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
+ (WebCore::ServicesOverlayController::Highlight::deviceScaleFactor const):
+ (WebCore::ServicesOverlayController::ServicesOverlayController):
+ (WebCore::ServicesOverlayController::invalidateHighlightsOfType):
+ (WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
+ (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown const):
+ (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
+ (WebCore::ServicesOverlayController::buildSelectionHighlight):
+ (WebCore::ServicesOverlayController::hasRelevantSelectionServices):
+ (WebCore::ServicesOverlayController::createOverlayIfNeeded):
+ (WebCore::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
+ (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
+ (WebCore::ServicesOverlayController::mouseEvent):
+ (WebCore::ServicesOverlayController::handleClick):
+ (WebCore::ServicesOverlayController::mainFrame const):
+ * page/scrolling/AsyncScrollingCoordinator.cpp:
+ * page/scrolling/ScrollingCoordinator.cpp:
+ * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
+ * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+ * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
+ * plugins/DOMMimeType.cpp:
+ * plugins/PluginInfoProvider.cpp:
+ (WebCore::PluginInfoProvider::refresh):
+ * rendering/RenderBox.cpp:
+ * rendering/RenderLayer.cpp:
+ * rendering/RenderLayerBacking.cpp:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers const):
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
+ (WebCore::RenderLayerCompositor::attachRootLayer):
+ (WebCore::RenderLayerCompositor::detachRootLayer):
+ (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
+ * rendering/RenderObject.cpp:
+ * replay/UserInputBridge.cpp:
+ * storage/StorageEventDispatcher.cpp:
+ * style/StyleTreeResolver.cpp:
+ (WebCore::Style::suspendMemoryCacheClientCalls):
+ * svg/SVGSVGElement.cpp:
+ * svg/graphics/SVGImage.cpp:
+ * testing/InternalSettings.cpp:
+ * testing/Internals.cpp:
+ (WebCore::Internals::Internals):
+ (WebCore::Internals::installMockPageOverlay):
+ (WebCore::Internals::pageOverlayLayerTreeAsText const):
+ * testing/MockPageOverlay.cpp:
+ * testing/MockPageOverlay.h:
+ * testing/MockPageOverlayClient.cpp:
+ (WebCore::MockPageOverlayClient::installOverlay):
+ (WebCore::MockPageOverlayClient::layerTreeAsText):
+ * testing/MockPageOverlayClient.h:
+ * testing/MockPaymentCoordinator.cpp:
+ (WebCore::MockPaymentCoordinator::MockPaymentCoordinator):
+ (WebCore::MockPaymentCoordinator::showPaymentUI):
+ (WebCore::MockPaymentCoordinator::completeMerchantValidation):
+ (WebCore::MockPaymentCoordinator::changeShippingOption):
+ (WebCore::MockPaymentCoordinator::changePaymentMethod):
+ (WebCore::MockPaymentCoordinator::acceptPayment):
+ (WebCore::MockPaymentCoordinator::cancelPayment):
+ * testing/MockPaymentCoordinator.h:
+ * workers/service/context/ServiceWorkerThreadProxy.cpp:
+
2018-04-03 Sihui Liu <sihui_liu@apple.com>
The referer header is not set after redirect
#include "Document.h"
#include "DocumentLoader.h"
#include "EventNames.h"
+#include "Frame.h"
#include "JSDOMPromiseDeferred.h"
#include "LinkIconCollector.h"
#include "LinkIconType.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageConsoleClient.h"
#include "PaymentAuthorizationStatus.h"
if (!UserGestureIndicator::processingUserGesture())
return Exception { InvalidAccessError, "Must create a new ApplePaySession from a user gesture handler." };
- auto& paymentCoordinator = document.frame()->mainFrame().paymentCoordinator();
+ if (!document.page())
+ return Exception { InvalidAccessError, "Frame is detached" };
+
+ auto& paymentCoordinator = document.page()->paymentCoordinator();
if (!version || !paymentCoordinator.supportsVersion(version))
return Exception { InvalidAccessError, makeString("\"" + String::number(version), "\" is not a supported version.") };
, m_paymentRequest { WTFMove(paymentRequest) }
, m_version { version }
{
- ASSERT(document.frame()->mainFrame().paymentCoordinator().supportsVersion(version));
+ ASSERT(document.page()->paymentCoordinator().supportsVersion(version));
suspendIfNeeded();
}
if (canCall.hasException())
return canCall.releaseException();
- return document.frame()->mainFrame().paymentCoordinator().supportsVersion(version);
+ auto* page = document.page();
+ if (!page)
+ return Exception { InvalidAccessError };
+
+ return page->paymentCoordinator().supportsVersion(version);
}
static bool shouldDiscloseApplePayCapability(Document& document)
if (canCall.hasException())
return canCall.releaseException();
- return document.frame()->mainFrame().paymentCoordinator().canMakePayments();
+ auto* page = document.page();
+ if (!page)
+ return Exception { InvalidAccessError };
+
+ return page->paymentCoordinator().canMakePayments();
}
ExceptionOr<void> ApplePaySession::canMakePaymentsWithActiveCard(ScriptExecutionContext& scriptExecutionContext, const String& merchantIdentifier, Ref<DeferredPromise>&& passedPromise)
RefPtr<DeferredPromise> promise(WTFMove(passedPromise));
if (!shouldDiscloseApplePayCapability(document)) {
- auto& paymentCoordinator = document.frame()->mainFrame().paymentCoordinator();
+ auto* page = document.page();
+ if (!page)
+ return Exception { InvalidAccessError };
+
+ auto& paymentCoordinator = page->paymentCoordinator();
bool canMakePayments = paymentCoordinator.canMakePayments();
RunLoop::main().dispatch([promise, canMakePayments]() mutable {
return { };
}
- auto& paymentCoordinator = document.frame()->mainFrame().paymentCoordinator();
+ auto* page = document.page();
+ if (!page)
+ return Exception { InvalidAccessError };
+
+ auto& paymentCoordinator = page->paymentCoordinator();
paymentCoordinator.canMakePaymentsWithActiveCard(merchantIdentifier, document.domain(), [promise](bool canMakePayments) mutable {
promise->resolve<IDLBoolean>(canMakePayments);
if (!UserGestureIndicator::processingUserGesture())
return Exception { InvalidAccessError, "Must call ApplePaySession.openPaymentSetup from a user gesture handler." };
- RefPtr<DeferredPromise> promise(WTFMove(passedPromise));
- auto& paymentCoordinator = document.frame()->mainFrame().paymentCoordinator();
+ auto* page = document.page();
+ if (!page)
+ return Exception { InvalidAccessError };
+ auto& paymentCoordinator = page->paymentCoordinator();
+
+ RefPtr<DeferredPromise> promise(WTFMove(passedPromise));
paymentCoordinator.openPaymentSetup(merchantIdentifier, document.domain(), [promise](bool result) mutable {
promise->resolve<IDLBoolean>(result);
});
PaymentCoordinator& ApplePaySession::paymentCoordinator() const
{
- return downcast<Document>(*scriptExecutionContext()).frame()->mainFrame().paymentCoordinator();
+ return downcast<Document>(*scriptExecutionContext()).page()->paymentCoordinator();
}
bool ApplePaySession::canBegin() const
#include "ApplePaySessionPaymentRequest.h"
#include "Document.h"
#include "EventNames.h"
+#include "Frame.h"
#include "JSApplePayPayment.h"
#include "JSApplePayRequest.h"
#include "LinkIconCollector.h"
-#include "MainFrame.h"
#include "MerchantValidationEvent.h"
#include "Page.h"
#include "Payment.h"
static inline PaymentCoordinator& paymentCoordinator(Document& document)
{
- return document.frame()->mainFrame().paymentCoordinator();
+ ASSERT(document.page());
+ return document.page()->paymentCoordinator();
}
bool ApplePayPaymentHandler::hasActiveSession(Document& document)
#include "CaptureDevice.h"
#include "Document.h"
-#include "MainFrame.h"
+#include "Frame.h"
#include "SecurityOrigin.h"
#include "UserMediaController.h"
#include "DeprecatedGlobalSettings.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "Frame.h"
#include "HTMLIFrameElement.h"
#include "HTMLParserIdioms.h"
#include "JSMediaStream.h"
#include "JSOverconstrainedError.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MediaConstraints.h"
#include "RealtimeMediaSourceCenter.h"
#include "SchemeRegistry.h"
#import "CommonVM.h"
#import "Event.h"
+#import "Frame.h"
#import "HTMLPlugInElement.h"
#import "HTMLVideoElement.h"
#import "JSDOMBinding.h"
#import "JSHTMLVideoElement.h"
#import "JSQuickTimePluginReplacement.h"
#import "Logging.h"
-#import "MainFrame.h"
#import "RenderElement.h"
#import "ScriptController.h"
#import "ScriptSourceCode.h"
page/IntersectionObserverEntry.cpp
page/LayoutContext.cpp
page/Location.cpp
-page/MainFrame.cpp
page/MemoryRelease.cpp
page/MouseEventWithHitTestResults.cpp
page/Navigator.cpp
931CBD0F161A44E900E4C874 /* ScrollingStateScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 931CBD09161A44E900E4C874 /* ScrollingStateScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
931CBD11161A44E900E4C874 /* ScrollingStateTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 931CBD0B161A44E900E4C874 /* ScrollingStateTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
931D72F615FE695300C4C07E /* LayoutMilestones.h in Headers */ = {isa = PBXBuildFile; fileRef = 931D72F515FE695300C4C07E /* LayoutMilestones.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 932AD70617EFA2C40038F8FF /* MainFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 932AD70417EFA2C30038F8FF /* MainFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
932CC0B71DFFD158004C0F9F /* MediaTrackConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 932CC0B61DFFD158004C0F9F /* MediaTrackConstraints.h */; settings = {ATTRIBUTES = (Private, ); }; };
932CC0D51DFFD667004C0F9F /* JSMediaTrackConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 932CC0D11DFFD667004C0F9F /* JSMediaTrackConstraints.h */; };
93309DD7099E64920056E581 /* AppendNodeCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D88099E64910056E581 /* AppendNodeCommand.h */; };
931CBD0B161A44E900E4C874 /* ScrollingStateTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingStateTree.h; sourceTree = "<group>"; };
931D72F515FE695300C4C07E /* LayoutMilestones.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutMilestones.h; sourceTree = "<group>"; };
9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLOptionsCollection.cpp; sourceTree = "<group>"; };
- 932AD70317EFA2C30038F8FF /* MainFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainFrame.cpp; sourceTree = "<group>"; };
- 932AD70417EFA2C30038F8FF /* MainFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainFrame.h; sourceTree = "<group>"; };
932CC0B61DFFD158004C0F9F /* MediaTrackConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTrackConstraints.h; sourceTree = "<group>"; };
932CC0D01DFFD667004C0F9F /* JSMediaTrackConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaTrackConstraints.cpp; sourceTree = "<group>"; };
932CC0D11DFFD667004C0F9F /* JSMediaTrackConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaTrackConstraints.h; sourceTree = "<group>"; };
BCE1C41A0D982980003B02F2 /* Location.cpp */,
BCE1C4190D982980003B02F2 /* Location.h */,
BCE1C4220D9829F2003B02F2 /* Location.idl */,
- 932AD70317EFA2C30038F8FF /* MainFrame.cpp */,
- 932AD70417EFA2C30038F8FF /* MainFrame.h */,
931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */,
52E2CAFB19FF0207001EEB4F /* MediaProducer.h */,
413E00771DB0E4DE002341D2 /* MemoryRelease.cpp */,
93A806171E03B51C008A1F26 /* LongRange.h in Headers */,
46EFAF121E5FB9F100E7F34B /* LowPowerModeNotifier.h in Headers */,
1A0409DC1A4360B5009E47F3 /* MachSendRight.h in Headers */,
- 932AD70617EFA2C40038F8FF /* MainFrame.h in Headers */,
7AE6C93C1BE0C60100E19E03 /* MainThreadSharedTimer.h in Headers */,
1A8F6BC60DB55CDC001DB794 /* ManifestParser.h in Headers */,
CE1866451F72E5B400A0CAB6 /* MarkedText.h in Headers */,
#include "HTMLParserIdioms.h"
#include "HitTestResult.h"
#include "LocalizedStrings.h"
-#include "MainFrame.h"
#include "MathMLNames.h"
#include "NodeList.h"
#include "NodeTraversal.h"
return node->document().frame();
}
-MainFrame* AccessibilityObject::mainFrame() const
+Frame* AccessibilityObject::mainFrame() const
{
Document* document = topDocument();
if (!document)
if (rect.isEmpty())
return VisiblePosition();
- MainFrame* mainFrame = this->mainFrame();
+ auto* mainFrame = this->mainFrame();
if (!mainFrame)
return VisiblePosition();
class FrameView;
class IntPoint;
class IntSize;
-class MainFrame;
class Node;
class Page;
class RenderObject;
virtual Document* document() const;
virtual FrameView* documentFrameView() const;
Frame* frame() const;
- MainFrame* mainFrame() const;
+ Frame* mainFrame() const;
Document* topDocument() const;
ScrollView* scrollViewAncestor() const;
String language() const;
#import "Editor.h"
#import "Font.h"
#import "FontCascade.h"
+#import "Frame.h"
#import "FrameLoaderClient.h"
#import "FrameSelection.h"
#import "HTMLAnchorElement.h"
#import "HTMLInputElement.h"
#import "HTMLNames.h"
#import "LocalizedStrings.h"
-#import "MainFrame.h"
#import "Page.h"
#import "PluginDocument.h"
#import "PluginViewBase.h"
#include "JSDocument.h"
#include "JSMainThreadExecState.h"
#include "LoadableModuleScript.h"
-#include "MainFrame.h"
#include "ModuleFetchFailureKind.h"
#include "ModuleFetchParameters.h"
#include "NP_jsobject.h"
#include "ScriptState.h"
#include "Document.h"
+#include "Frame.h"
#include "JSDOMWindowBase.h"
#include "JSWorkerGlobalScope.h"
-#include "MainFrame.h"
#include "Node.h"
#include "Page.h"
#include "ScriptController.h"
#include "ExtensionStyleSheets.h"
#include "Frame.h"
#include "FrameLoaderClient.h"
-#include "MainFrame.h"
#include "Page.h"
#include "ResourceLoadInfo.h"
#include "URL.h"
#include "CSSPrimitiveValue.h"
#include "CSSToLengthConversionData.h"
#include "CSSValueKeywords.h"
+#include "Frame.h"
#include "FrameView.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MediaFeatureNames.h"
#include "MediaList.h"
#include "MediaQuery.h"
auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
- auto manifest = frame.mainFrame().applicationManifest();
+ auto manifest = frame.page() ? frame.page()->applicationManifest() : std::nullopt;
if (!manifest)
return keyword == CSSValueBrowser;
#include "Image.h"
#include "ImageDocument.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "MediaDocument.h"
#include "MediaList.h"
#include "MediaPlayer.h"
#include "FocusEvent.h"
#include "FontFaceSet.h"
#include "FormController.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "LayoutDisallowedScope.h"
#include "LoaderStrategy.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MediaCanStartListener.h"
#include "MediaProducer.h"
#include "MediaQueryList.h"
#include "Chrome.h"
#include "ChromeClient.h"
-#include "MainFrame.h"
+#include "Frame.h"
#include "NodeTraversal.h"
#include "Page.h"
#include "Range.h"
#include "EventNames.h"
#include "FocusController.h"
#include "FocusEvent.h"
+#include "Frame.h"
#include "FrameSelection.h"
#include "FrameView.h"
#include "HTMLBodyElement.h"
#include "JSLazyEventListener.h"
#include "KeyboardEvent.h"
#include "KeyframeEffect.h"
-#include "MainFrame.h"
#include "MutationObserverInterestGroup.h"
#include "MutationRecord.h"
#include "NodeRenderStyle.h"
frame->animation().cancelAnimations(*this);
#if PLATFORM(MAC)
- if (frame)
- frame->mainFrame().removeLatchingStateForTarget(*this);
+ if (frame && frame->page())
+ frame->page()->removeLatchingStateForTarget(*this);
#endif
}
#include "CompositionEvent.h"
#include "EventContext.h"
#include "EventPath.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "HTMLInputElement.h"
#include "InputEvent.h"
#include "KeyboardEvent.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MouseEvent.h"
#include "ScopedEventQueue.h"
#include "ScriptDisallowedScope.h"
#include "DisplayRefreshMonitorManager.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "Frame.h"
#include "FrameView.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "RequestAnimationFrameCallback.h"
#include "Settings.h"
#include "InsertTextCommand.h"
#include "KeyboardEvent.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "ModifySelectionListLevel.h"
#include "NodeList.h"
#include "NodeTraversal.h"
FrameSelection& frameSelection = m_frame.selection();
if (!frameSelection.isRange()) {
- m_frame.mainFrame().servicesOverlayController().selectedTelephoneNumberRangesChanged();
+ if (auto* page = m_frame.page())
+ page->servicesOverlayController().selectedTelephoneNumberRangesChanged();
return;
}
RefPtr<Range> selectedRange = frameSelection.toNormalizedRange();
RefPtr<Range> extendedRange = extendedSelection.toNormalizedRange();
if (!extendedRange) {
- m_frame.mainFrame().servicesOverlayController().selectedTelephoneNumberRangesChanged();
+ if (auto* page = m_frame.page())
+ page->servicesOverlayController().selectedTelephoneNumberRangesChanged();
return;
}
m_detectedTelephoneNumberRanges.append(range);
}
- m_frame.mainFrame().servicesOverlayController().selectedTelephoneNumberRangesChanged();
+ if (auto* page = m_frame.page())
+ page->servicesOverlayController().selectedTelephoneNumberRangesChanged();
}
void Editor::scanRangeForTelephoneNumbers(Range& range, const StringView& stringView, Vector<RefPtr<Range>>& markedRanges)
#include "HTMLNames.h"
#include "IndentOutdentCommand.h"
#include "InsertListCommand.h"
-#include "MainFrame.h"
#include "Page.h"
#include "Pasteboard.h"
#include "RenderBox.h"
#include "Editor.h"
#include "EditorClient.h"
#include "Frame.h"
-#include "MainFrame.h"
#include "RenderView.h"
#include "ServicesOverlayController.h"
SelectionRectGatherer::Notifier::~Notifier()
{
- m_gatherer.m_renderView.view().frame().mainFrame().servicesOverlayController().selectionRectsDidChange(m_gatherer.m_rects, m_gatherer.m_gapRects, m_gatherer.isTextOnly());
+ if (auto* page = m_gatherer.m_renderView.view().frame().page())
+ page->servicesOverlayController().selectionRectsDidChange(m_gatherer.m_rects, m_gatherer.m_gapRects, m_gatherer.isTextOnly());
}
std::unique_ptr<SelectionRectGatherer::Notifier> SelectionRectGatherer::clearAndCreateNotifier()
#import "HTMLImageElement.h"
#import "HTMLObjectElement.h"
#import "LegacyWebArchive.h"
-#import "MainFrame.h"
#import "Page.h"
#import "PublicURLManager.h"
#import "RuntimeEnabledFeatures.h"
#include "HTMLTextAreaElement.h"
#include "HTMLTextFormControlElement.h"
#include "LibWebRTCProvider.h"
-#include "MainFrame.h"
#include "MarkupAccumulator.h"
#include "NodeList.h"
#include "Page.h"
#include "DOMWindow.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageCache.h"
#include "SVGDocumentExtensions.h"
#include "Document.h"
#include "Element.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "HistoryController.h"
#include "HistoryItem.h"
-#include "MainFrame.h"
#include "Node.h"
#include "Page.h"
#include "PageTransitionEvent.h"
#include "Document.h"
#include "DocumentLoader.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "HistoryController.h"
#include "IgnoreOpensDuringUnloadCountIncrementer.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "ScriptDisallowedScope.h"
#include "Settings.h"
// When entering page cache, tear down the render tree before setting the in-cache flag.
// This maintains the invariant that render trees are never present in the page cache.
// Note that destruction happens bottom-up so that the main frame's tree dies last.
-static void destroyRenderTree(MainFrame& mainFrame)
+static void destroyRenderTree(Frame& mainFrame)
{
for (Frame* frame = mainFrame.tree().traversePrevious(CanWrap::Yes); frame; frame = frame->tree().traversePrevious(CanWrap::No)) {
if (!frame->document())
#include "DocumentLoader.h"
#include "ElementChildIterator.h"
#include "EventNames.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "JSHTMLMediaElement.h"
#include "Logging.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "MediaController.h"
#include "MediaControls.h"
#include "MediaDocument.h"
#include "CommonVM.h"
#include "ContentSecurityPolicy.h"
#include "EventNames.h"
+#include "Frame.h"
#include "FrameLoaderClient.h"
#include "HTMLImageLoader.h"
#include "JSDOMConvertBoolean.h"
#include "JSShadowRoot.h"
#include "LocalizedStrings.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MouseEvent.h"
#include "Page.h"
#include "PlatformMouseEvent.h"
#include "DocumentLoader.h"
#include "EventListener.h"
#include "EventNames.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
#include "HTMLNames.h"
#include "LocalizedStrings.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "MouseEvent.h"
#include "Page.h"
#include "RawDataDocumentParser.h"
#include "HTMLVideoElement.h"
#include "HitTestResult.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PlatformMediaSessionManager.h"
#include "RenderMedia.h"
if (!document.frame() || !document.frame()->isMainFrame())
return false;
- MainFrame& mainFrame = document.frame()->mainFrame();
+ auto& mainFrame = document.frame()->mainFrame();
if (!mainFrame.view() || !mainFrame.view()->renderView())
return false;
#include "IntSize.h"
#include "JSMainThreadExecState.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "NotImplemented.h"
#include "OESElementIndexUint.h"
#include "OESStandardDerivatives.h"
#include "config.h"
#include "InspectorClient.h"
+#include "Frame.h"
#include "InspectorController.h"
-#include "MainFrame.h"
#include "Page.h"
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "CommonVM.h"
#include "DOMWindow.h"
#include "DOMWrapperWorld.h"
+#include "Frame.h"
#include "GraphicsContext.h"
#include "InspectorApplicationCacheAgent.h"
#include "InspectorCSSAgent.h"
#include "JSDOMWindow.h"
#include "JSDOMWindowCustom.h"
#include "JSMainThreadExecState.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageConsoleAgent.h"
#include "PageDebuggerAgent.h"
#include "DOMWrapperWorld.h"
#include "Document.h"
#include "FloatRect.h"
+#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "InspectorController.h"
#include "InspectorFrontendHost.h"
#include "InspectorPageAgent.h"
-#include "MainFrame.h"
#include "Page.h"
#include "ScriptController.h"
#include "ScriptState.h"
#include "Editor.h"
#include "Event.h"
#include "FocusController.h"
+#include "Frame.h"
#include "HitTestResult.h"
#include "InspectorController.h"
#include "InspectorFrontendClient.h"
#include "JSDOMExceptionHandling.h"
#include "JSInspectorFrontendHost.h"
#include "JSMainThreadExecState.h"
-#include "MainFrame.h"
#include "MouseEvent.h"
#include "Node.h"
#include "Page.h"
#include "Database.h"
#include "DocumentLoader.h"
#include "Event.h"
+#include "Frame.h"
#include "InspectorApplicationCacheAgent.h"
#include "InspectorCSSAgent.h"
#include "InspectorCanvasAgent.h"
#include "InspectorWorkerAgent.h"
#include "InstrumentingAgents.h"
#include "LoaderStrategy.h"
-#include "MainFrame.h"
#include "PageDebuggerAgent.h"
#include "PageHeapAgent.h"
#include "PageRuntimeAgent.h"
#include "EditorClient.h"
#include "Element.h"
#include "EmptyClients.h"
+#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "InspectorClient.h"
#include "InspectorOverlayPage.h"
#include "LibWebRTCProvider.h"
-#include "MainFrame.h"
#include "Node.h"
#include "Page.h"
#include "PageConfiguration.h"
#include "CommonVM.h"
#include "Document.h"
#include "EventLoop.h"
+#include "Frame.h"
#include "FrameView.h"
#include "InspectorController.h"
#include "InspectorFrontendClient.h"
#include "JSDOMExceptionHandling.h"
#include "JSDOMWindowCustom.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageGroup.h"
#include "PluginViewBase.h"
#include "InspectorPageAgent.h"
#include "InstrumentingAgents.h"
#include "LoaderStrategy.h"
-#include "MainFrame.h"
#include "PlatformStrategies.h"
#include <wtf/text/StringBuilder.h>
#include "JSCanvasRenderingContext2D.h"
#include "JSImageBitmapRenderingContext.h"
#include "JSMainThreadExecState.h"
-#include "MainFrame.h"
#include "OffscreenCanvas.h"
#include "ScriptState.h"
#include "StringAdaptors.h"
#include "Element.h"
#include "Event.h"
#include "EventListener.h"
+#include "Frame.h"
#include "FrameTree.h"
#include "HTMLElement.h"
#include "HTMLFrameOwnerElement.h"
#include "JSDOMBindingSecurity.h"
#include "JSEventListener.h"
#include "JSNode.h"
-#include "MainFrame.h"
#include "MutationEvent.h"
#include "Node.h"
#include "NodeList.h"
#include "InspectorOverlay.h"
#include "InstrumentingAgents.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "Page.h"
#include "RenderObject.h"
m_identifierToFrame.remove(identifier);
}
-MainFrame& InspectorPageAgent::mainFrame()
+Frame& InspectorPageAgent::mainFrame()
{
return m_page.mainFrame();
}
class Frame;
class InspectorClient;
class InspectorOverlay;
-class MainFrame;
class Page;
class RenderObject;
class SharedBuffer;
// Cross-agents API
Page& page() { return m_page; }
- MainFrame& mainFrame();
+ Frame& mainFrame();
Frame* frameForId(const String& frameId);
WEBCORE_EXPORT String frameId(Frame*);
bool hasIdForFrame(Frame*) const;
#include "Document.h"
#include "EventListener.h"
#include "EventTarget.h"
+#include "Frame.h"
#include "InspectorOverlay.h"
#include "InspectorPageAgent.h"
#include "InstrumentingAgents.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageConsoleClient.h"
#include "PageScriptDebugServer.h"
#include "InspectorPageAgent.h"
#include "InstrumentingAgents.h"
#include "JSDOMWindowBase.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageConsoleClient.h"
#include "ScriptController.h"
#include "EventNames.h"
#include "ExtensionStyleSheets.h"
#include "FormState.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameTree.h"
#include "LinkIconCollector.h"
#include "LinkIconType.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "NetworkLoadMetrics.h"
#include "Page.h"
#include "FrameLoaderStateMachine.h"
#include "FrameView.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "PluginDocument.h"
#include "RawDataDocumentParser.h"
#include "ScriptController.h"
#include "FloatRect.h"
#include "FormState.h"
#include "FormSubmission.h"
+#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoaderClient.h"
#include "FrameNetworkingContext.h"
#include "LoadTiming.h"
#include "LoaderStrategy.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "MemoryRelease.h"
#include "NavigationDisabler.h"
// Log main frame navigation types.
if (m_frame.isMainFrame()) {
- if (auto* page = m_frame.page())
+ if (auto* page = m_frame.page()) {
page->mainFrameLoadStarted(newURL, type);
- static_cast<MainFrame&>(m_frame).performanceLogging().didReachPointOfInterest(PerformanceLogging::MainFrameLoadStarted);
+ page->performanceLogging().didReachPointOfInterest(PerformanceLogging::MainFrameLoadStarted);
+ }
}
policyChecker().setLoadType(type);
if (m_documentLoader)
m_documentLoader->stopRecordingResponses();
if (m_frame.isMainFrame() && oldState != newState)
- static_cast<MainFrame&>(m_frame).didCompleteLoad();
+ m_frame.page()->performanceLogging().didReachPointOfInterest(PerformanceLogging::MainFrameLoadCompleted);
}
}
#include "CachedPage.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameLoaderStateMachine.h"
#include "FrameView.h"
#include "HistoryItem.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "NavigationPolicyCheck.h"
#include "Page.h"
#include "PageCache.h"
#pragma once
-#include "MainFrame.h"
+#include "Frame.h"
namespace WebCore {
#include "FrameLoaderClient.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "ProgressTrackerClient.h"
#include "ResourceResponse.h"
#include <wtf/text/CString.h>
#include "FrameLoader.h"
#include "HTMLFrameOwnerElement.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "ResourceLoadStatistics.h"
#include "ResourceRequest.h"
#include "FrameLoaderClient.h"
#include "InspectorInstrumentation.h"
#include "LoaderStrategy.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
#include "HTMLNames.h"
#include "HTMLObjectElement.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "NavigationScheduler.h"
#include "Page.h"
#include "PluginData.h"
#include "HTTPParsers.h"
#include "LinkLoader.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "Page.h"
#include "ResourceLoadObserver.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "InspectorInstrumentation.h"
-#include "MainFrame.h"
#include "Page.h"
#include "ProgressEvent.h"
#include "ResourceHandle.h"
#include "MHTMLArchive.h"
#include "Document.h"
+#include "Frame.h"
#include "MHTMLParser.h"
#include "MIMETypeRegistry.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageSerializer.h"
#include "QuotedPrintable.h"
#include "DiagnosticLoggingKeys.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "HTTPHeaderNames.h"
#include "InspectorInstrumentation.h"
#include "LoaderStrategy.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "PlatformStrategies.h"
#include "ProgressTracker.h"
#include "LoaderStrategy.h"
#include "LocalizedStrings.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "Page.h"
#include "PingLoader.h"
#include "AutoscrollController.h"
#include "EventHandler.h"
+#include "Frame.h"
#include "FrameView.h"
#include "HitTestResult.h"
-#include "MainFrame.h"
#include "Page.h"
#include "RenderBox.h"
#include "RenderView.h"
#include "FileIconLoader.h"
#include "FileList.h"
#include "FloatRect.h"
+#include "Frame.h"
#include "FrameLoaderClient.h"
#include "FrameTree.h"
#include "Geolocation.h"
#include "HitTestResult.h"
#include "Icon.h"
#include "InspectorInstrumentation.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageGroupLoadDeferrer.h"
#include "PopupOpeningObserver.h"
#include "Event.h"
#include "EventHandler.h"
#include "FormState.h"
+#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "HitTestResult.h"
#include "InspectorController.h"
#include "LocalizedStrings.h"
-#include "MainFrame.h"
#include "MouseEvent.h"
#include "NavigationAction.h"
#include "Node.h"
#include "EventNames.h"
#include "FloatRect.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "JSDOMWindowBase.h"
#include "JSMainThreadExecState.h"
#include "Location.h"
-#include "MainFrame.h"
#include "MediaQueryList.h"
#include "MediaQueryMatcher.h"
#include "MessageEvent.h"
#include "ElementIterator.h"
#include "FrameView.h"
#include "GraphicsContext.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageOverlay.h"
#include "PageOverlayController.h"
class RegionOverlay : public RefCounted<RegionOverlay>, public PageOverlay::Client {
public:
- static Ref<RegionOverlay> create(MainFrame&, DebugPageOverlays::RegionType);
+ static Ref<RegionOverlay> create(Page&, DebugPageOverlays::RegionType);
virtual ~RegionOverlay();
void recomputeRegion();
PageOverlay& overlay() { return *m_overlay; }
protected:
- RegionOverlay(MainFrame&, Color);
+ RegionOverlay(Page&, Color);
private:
void willMoveToPage(PageOverlay&, Page*) final;
virtual bool updateRegion() = 0;
void drawRegion(GraphicsContext&, const Region&, const Color&, const IntRect& dirtyRect);
- MainFrame& m_frame;
+ Page& m_page;
RefPtr<PageOverlay> m_overlay;
std::unique_ptr<Region> m_region;
Color m_color;
class MouseWheelRegionOverlay final : public RegionOverlay {
public:
- static Ref<MouseWheelRegionOverlay> create(MainFrame& frame)
+ static Ref<MouseWheelRegionOverlay> create(Page& page)
{
- return adoptRef(*new MouseWheelRegionOverlay(frame));
+ return adoptRef(*new MouseWheelRegionOverlay(page));
}
private:
- explicit MouseWheelRegionOverlay(MainFrame& frame)
- : RegionOverlay(frame, Color(0.5f, 0.0f, 0.0f, 0.4f))
+ explicit MouseWheelRegionOverlay(Page& page)
+ : RegionOverlay(page, Color(0.5f, 0.0f, 0.0f, 0.4f))
{
}
{
auto region = std::make_unique<Region>();
- for (const Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext()) {
+ for (const Frame* frame = &m_page.mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (!frame->view() || !frame->document())
continue;
class NonFastScrollableRegionOverlay final : public RegionOverlay {
public:
- static Ref<NonFastScrollableRegionOverlay> create(MainFrame& frame)
+ static Ref<NonFastScrollableRegionOverlay> create(Page& page)
{
- return adoptRef(*new NonFastScrollableRegionOverlay(frame));
+ return adoptRef(*new NonFastScrollableRegionOverlay(page));
}
private:
- explicit NonFastScrollableRegionOverlay(MainFrame& frame)
- : RegionOverlay(frame, Color(1.0f, 0.5f, 0.0f, 0.4f))
+ explicit NonFastScrollableRegionOverlay(Page& page)
+ : RegionOverlay(page, Color(1.0f, 0.5f, 0.0f, 0.4f))
{
}
{
bool regionChanged = false;
- if (Page* page = m_frame.page()) {
- if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) {
- EventTrackingRegions eventTrackingRegions = scrollingCoordinator->absoluteEventTrackingRegions();
+ if (ScrollingCoordinator* scrollingCoordinator = m_page.scrollingCoordinator()) {
+ EventTrackingRegions eventTrackingRegions = scrollingCoordinator->absoluteEventTrackingRegions();
- if (eventTrackingRegions != m_eventTrackingRegions) {
- m_eventTrackingRegions = eventTrackingRegions;
- regionChanged = true;
- }
+ if (eventTrackingRegions != m_eventTrackingRegions) {
+ m_eventTrackingRegions = eventTrackingRegions;
+ regionChanged = true;
}
}
drawRegion(context, m_eventTrackingRegions.asynchronousDispatchRegion, m_color, bounds);
}
-Ref<RegionOverlay> RegionOverlay::create(MainFrame& frame, DebugPageOverlays::RegionType regionType)
+Ref<RegionOverlay> RegionOverlay::create(Page& page, DebugPageOverlays::RegionType regionType)
{
switch (regionType) {
case DebugPageOverlays::RegionType::WheelEventHandlers:
- return MouseWheelRegionOverlay::create(frame);
+ return MouseWheelRegionOverlay::create(page);
case DebugPageOverlays::RegionType::NonFastScrollableRegion:
- return NonFastScrollableRegionOverlay::create(frame);
+ return NonFastScrollableRegionOverlay::create(page);
}
ASSERT_NOT_REACHED();
- return MouseWheelRegionOverlay::create(frame);
+ return MouseWheelRegionOverlay::create(page);
}
-RegionOverlay::RegionOverlay(MainFrame& frame, Color regionColor)
- : m_frame(frame)
+RegionOverlay::RegionOverlay(Page& page, Color regionColor)
+ : m_page(page)
, m_overlay(PageOverlay::create(*this, PageOverlay::OverlayType::Document))
, m_color(regionColor)
{
RegionOverlay::~RegionOverlay()
{
if (m_overlay)
- m_frame.pageOverlayController().uninstallPageOverlay(*m_overlay, PageOverlay::FadeMode::DoNotFade);
+ m_page.pageOverlayController().uninstallPageOverlay(*m_overlay, PageOverlay::FadeMode::DoNotFade);
}
void RegionOverlay::willMoveToPage(PageOverlay&, Page* page)
return static_cast<size_t>(regionType);
}
-RegionOverlay& DebugPageOverlays::ensureRegionOverlayForFrame(MainFrame& frame, RegionType regionType)
+RegionOverlay& DebugPageOverlays::ensureRegionOverlayForPage(Page& page, RegionType regionType)
{
- auto it = m_frameRegionOverlays.find(&frame);
- if (it != m_frameRegionOverlays.end()) {
+ auto it = m_pageRegionOverlays.find(&page);
+ if (it != m_pageRegionOverlays.end()) {
auto& visualizer = it->value[indexOf(regionType)];
if (!visualizer)
- visualizer = RegionOverlay::create(frame, regionType);
+ visualizer = RegionOverlay::create(page, regionType);
return *visualizer;
}
Vector<RefPtr<RegionOverlay>> visualizers(NumberOfRegionTypes);
- auto visualizer = RegionOverlay::create(frame, regionType);
+ auto visualizer = RegionOverlay::create(page, regionType);
visualizers[indexOf(regionType)] = visualizer.copyRef();
- m_frameRegionOverlays.add(&frame, WTFMove(visualizers));
+ m_pageRegionOverlays.add(&page, WTFMove(visualizers));
return visualizer;
}
-void DebugPageOverlays::showRegionOverlay(MainFrame& frame, RegionType regionType)
+void DebugPageOverlays::showRegionOverlay(Page& page, RegionType regionType)
{
- auto& visualizer = ensureRegionOverlayForFrame(frame, regionType);
- frame.pageOverlayController().installPageOverlay(visualizer.overlay(), PageOverlay::FadeMode::DoNotFade);
+ auto& visualizer = ensureRegionOverlayForPage(page, regionType);
+ page.pageOverlayController().installPageOverlay(visualizer.overlay(), PageOverlay::FadeMode::DoNotFade);
}
-void DebugPageOverlays::hideRegionOverlay(MainFrame& frame, RegionType regionType)
+void DebugPageOverlays::hideRegionOverlay(Page& page, RegionType regionType)
{
- auto it = m_frameRegionOverlays.find(&frame);
- if (it == m_frameRegionOverlays.end())
+ auto it = m_pageRegionOverlays.find(&page);
+ if (it == m_pageRegionOverlays.end())
return;
auto& visualizer = it->value[indexOf(regionType)];
if (!visualizer)
return;
- frame.pageOverlayController().uninstallPageOverlay(visualizer->overlay(), PageOverlay::FadeMode::DoNotFade);
+ page.pageOverlayController().uninstallPageOverlay(visualizer->overlay(), PageOverlay::FadeMode::DoNotFade);
visualizer = nullptr;
}
void DebugPageOverlays::regionChanged(Frame& frame, RegionType regionType)
{
- if (auto* visualizer = regionOverlayForFrame(frame.mainFrame(), regionType))
+ auto* page = frame.page();
+ if (!page)
+ return;
+
+ if (auto* visualizer = regionOverlayForPage(*page, regionType))
visualizer->recomputeRegion();
}
-RegionOverlay* DebugPageOverlays::regionOverlayForFrame(MainFrame& frame, RegionType regionType) const
+RegionOverlay* DebugPageOverlays::regionOverlayForPage(Page& page, RegionType regionType) const
{
- auto it = m_frameRegionOverlays.find(&frame);
- if (it == m_frameRegionOverlays.end())
+ auto it = m_pageRegionOverlays.find(&page);
+ if (it == m_pageRegionOverlays.end())
return nullptr;
return it->value.at(indexOf(regionType)).get();
}
-void DebugPageOverlays::updateOverlayRegionVisibility(MainFrame& frame, DebugOverlayRegions visibleRegions)
+void DebugPageOverlays::updateOverlayRegionVisibility(Page& page, DebugOverlayRegions visibleRegions)
{
if (visibleRegions & NonFastScrollableRegion)
- showRegionOverlay(frame, RegionType::NonFastScrollableRegion);
+ showRegionOverlay(page, RegionType::NonFastScrollableRegion);
else
- hideRegionOverlay(frame, RegionType::NonFastScrollableRegion);
+ hideRegionOverlay(page, RegionType::NonFastScrollableRegion);
if (visibleRegions & WheelEventHandlerRegion)
- showRegionOverlay(frame, RegionType::WheelEventHandlers);
+ showRegionOverlay(page, RegionType::WheelEventHandlers);
else
- hideRegionOverlay(frame, RegionType::WheelEventHandlers);
+ hideRegionOverlay(page, RegionType::WheelEventHandlers);
}
-void DebugPageOverlays::settingsChanged(MainFrame& frame)
+void DebugPageOverlays::settingsChanged(Page& page)
{
- DebugOverlayRegions activeOverlayRegions = frame.settings().visibleDebugOverlayRegions();
- if (!activeOverlayRegions && !hasOverlays(frame))
+ DebugOverlayRegions activeOverlayRegions = page.settings().visibleDebugOverlayRegions();
+ if (!activeOverlayRegions && !hasOverlays(page))
return;
- DebugPageOverlays::singleton().updateOverlayRegionVisibility(frame, activeOverlayRegions);
+ DebugPageOverlays::singleton().updateOverlayRegionVisibility(page, activeOverlayRegions);
}
}
namespace WebCore {
-class MainFrame;
+class Page;
class RegionOverlay;
class DebugPageOverlays {
static void didLayout(Frame&);
static void didChangeEventHandlers(Frame&);
- WEBCORE_EXPORT static void settingsChanged(MainFrame&);
+ WEBCORE_EXPORT static void settingsChanged(Page&);
private:
- static bool hasOverlays(MainFrame&);
+ static bool hasOverlays(Page&);
- void showRegionOverlay(MainFrame&, RegionType);
- void hideRegionOverlay(MainFrame&, RegionType);
+ void showRegionOverlay(Page&, RegionType);
+ void hideRegionOverlay(Page&, RegionType);
void regionChanged(Frame&, RegionType);
- bool hasOverlaysForFrame(MainFrame& frame) const
+ bool hasOverlaysForPage(Page& page) const
{
- return m_frameRegionOverlays.contains(&frame);
+ return m_pageRegionOverlays.contains(&page);
}
- void updateOverlayRegionVisibility(MainFrame&, DebugOverlayRegions);
+ void updateOverlayRegionVisibility(Page&, DebugOverlayRegions);
- RegionOverlay* regionOverlayForFrame(MainFrame&, RegionType) const;
- RegionOverlay& ensureRegionOverlayForFrame(MainFrame&, RegionType);
+ RegionOverlay* regionOverlayForPage(Page&, RegionType) const;
+ RegionOverlay& ensureRegionOverlayForPage(Page&, RegionType);
- HashMap<MainFrame*, Vector<RefPtr<RegionOverlay>>> m_frameRegionOverlays;
+ HashMap<Page*, Vector<RefPtr<RegionOverlay>>> m_pageRegionOverlays;
static DebugPageOverlays* sharedDebugOverlays;
};
-#define FAST_RETURN_IF_NO_OVERLAYS(frame) if (LIKELY(!hasOverlays(frame))) return;
+#define FAST_RETURN_IF_NO_OVERLAYS(page) if (LIKELY(!page || !hasOverlays(*page))) return;
-inline bool DebugPageOverlays::hasOverlays(MainFrame& frame)
+inline bool DebugPageOverlays::hasOverlays(Page& page)
{
if (!sharedDebugOverlays)
return false;
- return sharedDebugOverlays->hasOverlaysForFrame(frame);
+ return sharedDebugOverlays->hasOverlaysForPage(page);
}
inline void DebugPageOverlays::didLayout(Frame& frame)
{
- FAST_RETURN_IF_NO_OVERLAYS(frame.mainFrame());
+ FAST_RETURN_IF_NO_OVERLAYS(frame.page());
sharedDebugOverlays->regionChanged(frame, RegionType::WheelEventHandlers);
sharedDebugOverlays->regionChanged(frame, RegionType::NonFastScrollableRegion);
inline void DebugPageOverlays::didChangeEventHandlers(Frame& frame)
{
- FAST_RETURN_IF_NO_OVERLAYS(frame.mainFrame());
+ FAST_RETURN_IF_NO_OVERLAYS(frame.page());
sharedDebugOverlays->regionChanged(frame, RegionType::WheelEventHandlers);
sharedDebugOverlays->regionChanged(frame, RegionType::NonFastScrollableRegion);
#include "File.h"
#include "FloatRect.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "FrameSelection.h"
#include "HitTestResult.h"
#include "Image.h"
#include "ImageOrientation.h"
-#include "MainFrame.h"
#include "MoveSelectionCommand.h"
#include "Page.h"
#include "Pasteboard.h"
if ((m_dragDestinationAction & DragDestinationActionDHTML) && dragIsHandledByDocument(m_dragHandlingMethod)) {
m_client.willPerformDragDestinationAction(DragDestinationActionDHTML, dragData);
- Ref<MainFrame> mainFrame(m_page.mainFrame());
+ Ref<Frame> mainFrame(m_page.mainFrame());
bool preventedDefault = false;
if (mainFrame->view())
preventedDefault = mainFrame->eventHandler().performDragAndDrop(createMouseEvent(dragData), Pasteboard::createForDragAndDrop(dragData), dragData.draggingSourceOperationMask(), dragData.containsFiles());
bool DragController::tryDHTMLDrag(const DragData& dragData, DragOperation& operation)
{
ASSERT(m_documentUnderMouse);
- Ref<MainFrame> mainFrame(m_page.mainFrame());
+ Ref<Frame> mainFrame(m_page.mainFrame());
RefPtr<FrameView> viewProtector = mainFrame->view();
if (!viewProtector)
return false;
m_dragInitiator = frame.document();
// Protect this frame and view, as a load may occur mid drag and attempt to unload this frame
- Ref<MainFrame> mainFrameProtector(m_page.mainFrame());
+ Ref<Frame> mainFrameProtector(m_page.mainFrame());
RefPtr<FrameView> viewProtector = mainFrameProtector->view();
auto mouseDownPointInRootViewCoordinates = viewProtector->rootViewToContents(frame.view()->contentsToRootView(mouseDownPoint));
m_didInitiateDrag = true;
m_dragInitiator = frame.document();
// Protect this frame and view, as a load may occur mid drag and attempt to unload this frame
- Ref<MainFrame> frameProtector(m_page.mainFrame());
+ Ref<Frame> frameProtector(m_page.mainFrame());
RefPtr<FrameView> viewProtector = frameProtector->view();
DragItem item;
#include "FloatPoint.h"
#include "FloatRect.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameSelection.h"
#include "FrameTree.h"
#include "InspectorInstrumentation.h"
#include "KeyboardEvent.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MouseEvent.h"
#include "MouseEventWithHitTestResults.h"
#include "Page.h"
}
#endif
- if (m_frame.mainFrame().pageOverlayController().handleMouseEvent(platformMouseEvent))
+ if (m_frame.page()->pageOverlayController().handleMouseEvent(platformMouseEvent))
return true;
#if ENABLE(TOUCH_EVENTS)
RefPtr<FrameView> protector(m_frame.view());
MaximumDurationTracker maxDurationTracker(&m_maxMouseMovedDuration);
- if (m_frame.mainFrame().pageOverlayController().handleMouseEvent(event))
+ if (m_frame.page() && m_frame.page()->pageOverlayController().handleMouseEvent(event))
return true;
HitTestResult hoveredNode = HitTestResult(LayoutPoint());
}
#endif
- if (m_frame.mainFrame().pageOverlayController().handleMouseEvent(platformMouseEvent))
+ if (m_frame.page()->pageOverlayController().handleMouseEvent(platformMouseEvent))
return true;
#if ENABLE(TOUCH_EVENTS)
void EventHandler::platformRecordWheelEvent(const PlatformWheelEvent& event)
{
- m_frame.mainFrame().wheelEventDeltaFilter()->updateFromDelta(FloatSize(event.deltaX(), event.deltaY()));
+ if (auto* page = m_frame.page())
+ page->wheelEventDeltaFilter()->updateFromDelta(FloatSize(event.deltaX(), event.deltaY()));
}
bool EventHandler::platformCompleteWheelEvent(const PlatformWheelEvent& event, ContainerNode*, const WeakPtr<ScrollableArea>&)
platformPrepareForWheelEvents(event, result, element, scrollableContainer, scrollableArea, isOverWidget);
#if PLATFORM(MAC)
- if (event.phase() == PlatformWheelEventPhaseNone && event.momentumPhase() == PlatformWheelEventPhaseNone)
- m_frame.mainFrame().resetLatchingState();
+ if (event.phase() == PlatformWheelEventPhaseNone && event.momentumPhase() == PlatformWheelEventPhaseNone && m_frame.page())
+ m_frame.page()->resetLatchingState();
#endif
// FIXME: It should not be necessary to do this mutation here.
void EventHandler::clearLatchedState()
{
+ auto* page = m_frame.page();
+ if (!page)
+ return;
+
#if PLATFORM(MAC)
- m_frame.mainFrame().resetLatchingState();
+ page->resetLatchingState();
#endif
- if (auto filter = m_frame.mainFrame().wheelEventDeltaFilter())
+ if (auto filter = page->wheelEventDeltaFilter())
filter->endFilteringDeltas();
}
}
#if PLATFORM(MAC)
- ScrollLatchingState* latchedState = m_frame.mainFrame().latchingState();
+ ScrollLatchingState* latchedState = m_frame.page() ? m_frame.page()->latchingState() : nullptr;
Element* stopElement = latchedState ? latchedState->previousWheelScrolledElement() : nullptr;
- if (m_frame.mainFrame().wheelEventDeltaFilter()->isFilteringDeltas()) {
- filteredPlatformDelta = m_frame.mainFrame().wheelEventDeltaFilter()->filteredDelta();
- filteredVelocity = m_frame.mainFrame().wheelEventDeltaFilter()->filteredVelocity();
+ if (m_frame.page() && m_frame.page()->wheelEventDeltaFilter()->isFilteringDeltas()) {
+ filteredPlatformDelta = m_frame.page()->wheelEventDeltaFilter()->filteredDelta();
+ filteredVelocity = m_frame.page()->wheelEventDeltaFilter()->filteredVelocity();
}
#else
Element* stopElement = nullptr;
#include "Event.h"
#include "EventHandler.h"
#include "EventNames.h"
+#include "Frame.h"
#include "FrameSelection.h"
#include "FrameTree.h"
#include "FrameView.h"
#include "HTMLTextAreaElement.h"
#include "HitTestResult.h"
#include "KeyboardEvent.h"
-#include "MainFrame.h"
#include "Page.h"
#include "Range.h"
#include "RenderWidget.h"
#include "InspectorInstrumentation.h"
#include "JSDOMWindowProxy.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MathMLNames.h"
#include "MediaFeatureNames.h"
#include "NavigationScheduler.h"
}
Frame::Frame(Page& page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient& frameLoaderClient)
- : m_mainFrame(ownerElement ? page.mainFrame() : static_cast<MainFrame&>(*this))
+ : m_mainFrame(ownerElement ? page.mainFrame() : *this)
, m_page(&page)
, m_settings(&page.settings())
, m_treeNode(*this, parentFromOwnerElement(ownerElement))
return page() && page()->isAlwaysOnLoggingAllowed();
}
+void Frame::dropChildren()
+{
+ ASSERT(isMainFrame());
+ while (Frame* child = tree().firstChild())
+ tree().removeChild(*child);
+}
+
+void Frame::selfOnlyRef()
+{
+ ASSERT(isMainFrame());
+ if (m_selfOnlyRefCount++)
+ return;
+
+ ref();
+}
+
+void Frame::selfOnlyDeref()
+{
+ ASSERT(isMainFrame());
+ ASSERT(m_selfOnlyRefCount);
+ if (--m_selfOnlyRefCount)
+ return;
+
+ if (hasOneRef())
+ dropChildren();
+
+ deref();
+}
+
} // namespace WebCore
class IntPoint;
class IntRect;
class IntSize;
-class MainFrame;
class NavigationScheduler;
class Node;
class Page;
};
typedef unsigned LayerTreeFlags;
-class Frame : public ThreadSafeRefCounted<Frame> {
+class Frame final : public ThreadSafeRefCounted<Frame> {
public:
WEBCORE_EXPORT static Ref<Frame> create(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
bool useFixedLayout = false, ScrollbarMode = ScrollbarAuto, bool horizontalLock = false,
ScrollbarMode = ScrollbarAuto, bool verticalLock = false);
- WEBCORE_EXPORT virtual ~Frame();
+ WEBCORE_EXPORT ~Frame();
void addDestructionObserver(FrameDestructionObserver*);
void removeDestructionObserver(FrameDestructionObserver*);
void detachFromPage();
void disconnectOwnerElement();
- MainFrame& mainFrame() const;
+ Frame& mainFrame() const;
bool isMainFrame() const { return this == static_cast<void*>(&m_mainFrame); }
Page* page() const;
// ========
-protected:
- Frame(Page&, HTMLFrameOwnerElement*, FrameLoaderClient&);
- void setMainFrameWasDestroyed();
+ void selfOnlyRef();
+ void selfOnlyDeref();
private:
+ friend class NavigationDisabler;
+
+ Frame(Page&, HTMLFrameOwnerElement*, FrameLoaderClient&);
+
+ void dropChildren();
+
HashSet<FrameDestructionObserver*> m_destructionObservers;
- MainFrame& m_mainFrame;
+ Frame& m_mainFrame;
Page* m_page;
const RefPtr<Settings> m_settings;
mutable FrameTree m_treeNode;
float m_textZoomFactor;
int m_activeDOMObjectsAndAnimationsSuspendedCount;
- bool m_mainFrameWasDestroyed { false };
bool m_documentIsBeingReplaced { false };
+ unsigned m_navigationDisableCount { 0 };
+ unsigned m_selfOnlyRefCount { 0 };
protected:
UniqueRef<EventHandler> m_eventHandler;
m_page = nullptr;
}
-inline MainFrame& Frame::mainFrame() const
+inline Frame& Frame::mainFrame() const
{
- ASSERT_WITH_SECURITY_IMPLICATION(!m_mainFrameWasDestroyed);
return m_mainFrame;
}
-inline void Frame::setMainFrameWasDestroyed()
-{
- m_mainFrameWasDestroyed = false;
-}
-
} // namespace WebCore
#include "FrameTree.h"
#include "Document.h"
+#include "Frame.h"
#include "FrameView.h"
#include "HTMLFrameOwnerElement.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageGroup.h"
#include <stdarg.h>
#include "EventNames.h"
#include "FloatRect.h"
#include "FocusController.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "FrameSelection.h"
#include "InspectorController.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "OverflowEvent.h"
#include "Page.h"
renderView->compositor().frameViewDidChangeSize();
}
- if (frame().isMainFrame())
- frame().mainFrame().pageOverlayController().didChangeViewSize();
+ if (frame().isMainFrame() && frame().page())
+ frame().page()->pageOverlayController().didChangeViewSize();
viewportContentsChanged();
}
page->chrome().contentsSizeChanged(frame(), size); // Notify only.
if (frame().isMainFrame()) {
- frame().mainFrame().pageOverlayController().didChangeDocumentSize();
+ page->pageOverlayController().didChangeDocumentSize();
PageCache::singleton().markPagesForContentsSizeChanged(*page);
}
layoutContext().enableSetNeedsLayout();
void FrameView::didChangeScrollOffset()
{
- frame().mainFrame().pageOverlayController().didScrollFrame(frame());
+ if (auto* page = frame().page())
+ page->pageOverlayController().didScrollFrame(frame());
frame().loader().client().didChangeScrollOffset();
}
if (auto* view = renderView())
view->compositor().scheduleLayerFlush(false /* canThrottle */);
- frame().mainFrame().pageOverlayController().didChangeViewExposedRect();
+ if (auto* page = frame().page())
+ page->pageOverlayController().didChangeViewExposedRect();
}
void FrameView::setViewportSizeForCSSViewportUnits(IntSize size)
#include "HistoryController.h"
#include "HistoryItem.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "NavigationScheduler.h"
#include "Page.h"
#include "ScriptController.h"
+++ /dev/null
-/*
- * Copyright (C) 2013-2018 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. ``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
- * 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.
- */
-
-#include "config.h"
-#include "MainFrame.h"
-
-#include "Element.h"
-#include "PageConfiguration.h"
-#include "PageOverlayController.h"
-#include "PaymentCoordinator.h"
-#include "PerformanceLogging.h"
-#include "ScrollLatchingState.h"
-#include "WheelEventDeltaFilter.h"
-
-#if PLATFORM(MAC)
-#include "ServicesOverlayController.h"
-#endif
-
-namespace WebCore {
-
-inline MainFrame::MainFrame(Page& page, PageConfiguration& configuration)
- : Frame(page, nullptr, *configuration.loaderClientForMainFrame)
- , m_selfOnlyRefCount(0)
-#if PLATFORM(MAC) && (ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION))
- , m_servicesOverlayController(std::make_unique<ServicesOverlayController>(*this))
-#endif
- , m_recentWheelEventDeltaFilter(WheelEventDeltaFilter::create())
- , m_pageOverlayController(std::make_unique<PageOverlayController>(*this))
-#if ENABLE(APPLE_PAY)
- , m_paymentCoordinator(std::make_unique<PaymentCoordinator>(*configuration.paymentCoordinatorClient))
-#endif
-#if ENABLE(APPLICATION_MANIFEST)
- , m_applicationManifest(configuration.applicationManifest)
-#endif
- , m_performanceLogging(std::make_unique<PerformanceLogging>(*this))
-{
-}
-
-MainFrame::~MainFrame()
-{
- m_recentWheelEventDeltaFilter = nullptr;
-
- setMainFrameWasDestroyed();
-}
-
-Ref<MainFrame> MainFrame::create(Page& page, PageConfiguration& configuration)
-{
- return adoptRef(*new MainFrame(page, configuration));
-}
-
-void MainFrame::selfOnlyRef()
-{
- if (m_selfOnlyRefCount++)
- return;
-
- ref();
-}
-
-void MainFrame::selfOnlyDeref()
-{
- ASSERT(m_selfOnlyRefCount);
- if (--m_selfOnlyRefCount)
- return;
-
- if (hasOneRef())
- dropChildren();
-
- deref();
-}
-
-void MainFrame::dropChildren()
-{
- while (Frame* child = tree().firstChild())
- tree().removeChild(*child);
-}
-
-void MainFrame::didCompleteLoad()
-{
- performanceLogging().didReachPointOfInterest(PerformanceLogging::MainFrameLoadCompleted);
-}
-
-#if PLATFORM(MAC)
-ScrollLatchingState* MainFrame::latchingState()
-{
- if (m_latchingState.isEmpty())
- return nullptr;
-
- return &m_latchingState.last();
-}
-
-void MainFrame::pushNewLatchingState()
-{
- m_latchingState.append(ScrollLatchingState());
-}
-
-void MainFrame::resetLatchingState()
-{
- m_latchingState.clear();
-}
-
-void MainFrame::popLatchingState()
-{
- m_latchingState.removeLast();
-}
-
-void MainFrame::removeLatchingStateForTarget(Element& targetNode)
-{
- if (m_latchingState.isEmpty())
- return;
-
- m_latchingState.removeAllMatching([&targetNode] (ScrollLatchingState& state) {
- auto* wheelElement = state.wheelEventElement();
- if (!wheelElement)
- return false;
-
- return targetNode.isEqualNode(wheelElement);
- });
-}
-#endif
-
-#if ENABLE(APPLE_PAY)
-void MainFrame::setPaymentCoordinator(std::unique_ptr<PaymentCoordinator>&& paymentCoordinator)
-{
- m_paymentCoordinator = WTFMove(paymentCoordinator);
-}
-#endif
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2013-2017 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. ``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
- * 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 "Frame.h"
-#include <wtf/Optional.h>
-#include <wtf/Vector.h>
-
-#if ENABLE(APPLICATION_MANIFEST)
-#include "ApplicationManifest.h"
-#endif
-
-namespace WebCore {
-
-class PageConfiguration;
-class PageOverlayController;
-class PaymentCoordinator;
-class PerformanceLogging;
-class ScrollLatchingState;
-class ServicesOverlayController;
-class WheelEventDeltaFilter;
-
-class MainFrame final : public Frame {
-public:
- static Ref<MainFrame> create(Page&, PageConfiguration&);
-
- virtual ~MainFrame();
-
- void selfOnlyRef();
- void selfOnlyDeref();
-
- WheelEventDeltaFilter* wheelEventDeltaFilter() { return m_recentWheelEventDeltaFilter.get(); }
- PageOverlayController& pageOverlayController() { return *m_pageOverlayController; }
-
-#if PLATFORM(MAC)
-#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
- ServicesOverlayController& servicesOverlayController() { return *m_servicesOverlayController; }
-#endif // ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
-
- ScrollLatchingState* latchingState();
- void pushNewLatchingState();
- void popLatchingState();
- void resetLatchingState();
- void removeLatchingStateForTarget(Element&);
-#endif // PLATFORM(MAC)
-
-#if ENABLE(APPLE_PAY)
- PaymentCoordinator& paymentCoordinator() const { return *m_paymentCoordinator; }
- WEBCORE_EXPORT void setPaymentCoordinator(std::unique_ptr<PaymentCoordinator>&&);
-#endif
-
-#if ENABLE(APPLICATION_MANIFEST)
- const std::optional<ApplicationManifest>& applicationManifest() const { return m_applicationManifest; }
-#endif
-
- PerformanceLogging& performanceLogging() const { return *m_performanceLogging; }
-
- void didCompleteLoad();
-
-private:
- MainFrame(Page&, PageConfiguration&);
-
- void dropChildren();
-
- unsigned m_selfOnlyRefCount;
-
-#if PLATFORM(MAC)
- Vector<ScrollLatchingState> m_latchingState;
-#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
- std::unique_ptr<ServicesOverlayController> m_servicesOverlayController;
-#endif
-#endif
-
- std::unique_ptr<WheelEventDeltaFilter> m_recentWheelEventDeltaFilter;
- std::unique_ptr<PageOverlayController> m_pageOverlayController;
-
-#if ENABLE(APPLE_PAY)
- std::unique_ptr<PaymentCoordinator> m_paymentCoordinator;
-#endif
-
-#if ENABLE(APPLICATION_MANIFEST)
- std::optional<ApplicationManifest> m_applicationManifest;
-#endif
-
- std::unique_ptr<PerformanceLogging> m_performanceLogging;
-
- unsigned m_navigationDisableCount { 0 };
- friend class NavigationDisabler;
-};
-
-} // namespace WebCore
#include "CommonVM.h"
#include "Document.h"
#include "FontCache.h"
+#include "Frame.h"
#include "GCController.h"
#include "HTMLMediaElement.h"
#include "InlineStyleSheetOwner.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "MemoryCache.h"
#include "Page.h"
#include "PageCache.h"
#include "LoaderStrategy.h"
#include "Logging.h"
#include "LowPowerModeNotifier.h"
-#include "MainFrame.h"
#include "MediaCanStartListener.h"
#include "Navigator.h"
#include "PageCache.h"
#include "PageDebuggable.h"
#include "PageGroup.h"
#include "PageOverlayController.h"
+#include "PaymentCoordinator.h"
+#include "PerformanceLogging.h"
#include "PerformanceLoggingClient.h"
#include "PerformanceMonitor.h"
#include "PlatformMediaSessionManager.h"
#include "SchemeRegistry.h"
#include "ScriptController.h"
#include "ScriptedAnimationController.h"
+#include "ScrollLatchingState.h"
#include "ScrollingCoordinator.h"
#include "Settings.h"
#include "SharedBuffer.h"
#include "VisitedLinkStore.h"
#include "VoidCallback.h"
#include "WebGLStateTracker.h"
+#include "WheelEventDeltaFilter.h"
#include "Widget.h"
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/StdLibExtras.h>
#include "MediaPlaybackTarget.h"
#endif
+#if PLATFORM(MAC)
+#include "ServicesOverlayController.h"
+#endif
+
#if ENABLE(MEDIA_SESSION)
#include "MediaSessionManager.h"
#endif
, m_settings(Settings::create(this))
, m_progress(std::make_unique<ProgressTracker>(*pageConfiguration.progressTrackerClient))
, m_backForwardController(std::make_unique<BackForwardController>(*this, *WTFMove(pageConfiguration.backForwardClient)))
- , m_mainFrame(MainFrame::create(*this, pageConfiguration))
+ , m_mainFrame(Frame::create(this, nullptr, pageConfiguration.loaderClientForMainFrame))
, m_editorClient(WTFMove(pageConfiguration.editorClient))
, m_plugInClient(pageConfiguration.plugInClient)
, m_validationMessageClient(WTFMove(pageConfiguration.validationMessageClient))
, m_isUtilityPage(isUtilityPageChromeClient(chrome().client()))
, m_performanceMonitor(isUtilityPage() ? nullptr : std::make_unique<PerformanceMonitor>(*this))
, m_lowPowerModeNotifier(std::make_unique<LowPowerModeNotifier>([this](bool isLowPowerModeEnabled) { handleLowModePowerChange(isLowPowerModeEnabled); }))
+ , m_performanceLogging(std::make_unique<PerformanceLogging>(*this))
+#if PLATFORM(MAC) && (ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION))
+ , m_servicesOverlayController(std::make_unique<ServicesOverlayController>(*this))
+#endif
+ , m_recentWheelEventDeltaFilter(WheelEventDeltaFilter::create())
+ , m_pageOverlayController(std::make_unique<PageOverlayController>(*this))
+#if ENABLE(APPLE_PAY)
+ , m_paymentCoordinator(std::make_unique<PaymentCoordinator>(*pageConfiguration.paymentCoordinatorClient))
+#endif
+#if ENABLE(APPLICATION_MANIFEST)
+ , m_applicationManifest(pageConfiguration.applicationManifest)
+#endif
{
updateTimerThrottlingState();
GraphicsContext::updateDocumentMarkerResources();
- mainFrame().pageOverlayController().didChangeDeviceScaleFactor();
+ pageOverlayController().didChangeDeviceScaleFactor();
}
void Page::setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection)
});
}
+#if PLATFORM(MAC)
+ScrollLatchingState* Page::latchingState()
+{
+ if (m_latchingState.isEmpty())
+ return nullptr;
+
+ return &m_latchingState.last();
+}
+
+void Page::pushNewLatchingState()
+{
+ m_latchingState.append(ScrollLatchingState());
+}
+
+void Page::resetLatchingState()
+{
+ m_latchingState.clear();
+}
+
+void Page::popLatchingState()
+{
+ m_latchingState.removeLast();
+}
+
+void Page::removeLatchingStateForTarget(Element& targetNode)
+{
+ if (m_latchingState.isEmpty())
+ return;
+
+ m_latchingState.removeAllMatching([&targetNode] (ScrollLatchingState& state) {
+ auto* wheelElement = state.wheelEventElement();
+ if (!wheelElement)
+ return false;
+
+ return targetNode.isEqualNode(wheelElement);
+ });
+}
+#endif // PLATFORM(MAC)
+
+#if ENABLE(APPLE_PAY)
+void Page::setPaymentCoordinator(std::unique_ptr<PaymentCoordinator>&& paymentCoordinator)
+{
+ m_paymentCoordinator = WTFMove(paymentCoordinator);
+}
+#endif
+
} // namespace WebCore
#include <wtf/SchedulePair.h>
#endif
+#if ENABLE(APPLICATION_MANIFEST)
+#include "ApplicationManifest.h"
+#endif
+
#if ENABLE(MEDIA_SESSION)
#include "MediaSessionEvents.h"
#endif
class DragClient;
class DragController;
class EditorClient;
+class Element;
class FocusController;
class Frame;
class FrameLoaderClient;
class InspectorController;
class LibWebRTCProvider;
class LowPowerModeNotifier;
-class MainFrame;
class MediaCanStartListener;
class MediaPlaybackTarget;
class PageConfiguration;
class PageConsoleClient;
class PageDebuggable;
class PageGroup;
+class PageOverlayController;
+class PaymentCoordinator;
+class PerformanceLogging;
class PerformanceLoggingClient;
class PerformanceMonitor;
class PlugInClient;
class RenderTheme;
class ResourceUsageOverlay;
class VisibleSelection;
+class ScrollLatchingState;
class ScrollableArea;
class ScrollingCoordinator;
+class ServicesOverlayController;
class Settings;
class SocketProvider;
class StorageNamespace;
class ActivityStateChangeObserver;
class VisitedLinkStore;
class WebGLStateTracker;
+class WheelEventDeltaFilter;
typedef uint64_t SharedStringHash;
EditorClient& editorClient() { return m_editorClient.get(); }
PlugInClient* plugInClient() const { return m_plugInClient; }
- MainFrame& mainFrame() { return m_mainFrame.get(); }
- const MainFrame& mainFrame() const { return m_mainFrame.get(); }
+ Frame& mainFrame() { return m_mainFrame.get(); }
+ const Frame& mainFrame() const { return m_mainFrame.get(); }
bool openedByDOM() const;
void setOpenedByDOM();
PerformanceLoggingClient* performanceLoggingClient() const { return m_performanceLoggingClient.get(); }
+ WheelEventDeltaFilter* wheelEventDeltaFilter() { return m_recentWheelEventDeltaFilter.get(); }
+ PageOverlayController& pageOverlayController() { return *m_pageOverlayController; }
+
+#if PLATFORM(MAC)
+#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
+ ServicesOverlayController& servicesOverlayController() { return *m_servicesOverlayController; }
+#endif // ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
+ ScrollLatchingState* latchingState();
+ void pushNewLatchingState();
+ void popLatchingState();
+ void resetLatchingState();
+ void removeLatchingStateForTarget(Element&);
+#endif // PLATFORM(MAC)
+
+#if ENABLE(APPLE_PAY)
+ PaymentCoordinator& paymentCoordinator() const { return *m_paymentCoordinator; }
+ WEBCORE_EXPORT void setPaymentCoordinator(std::unique_ptr<PaymentCoordinator>&&);
+#endif
+
+#if ENABLE(APPLICATION_MANIFEST)
+ const std::optional<ApplicationManifest>& applicationManifest() const { return m_applicationManifest; }
+#endif
+
// Notifications when the Page starts and stops being presented via a native window.
WEBCORE_EXPORT void setActivityState(ActivityState::Flags);
ActivityState::Flags activityState() const { return m_activityState; }
WEBCORE_EXPORT void applicationWillEnterForeground();
WEBCORE_EXPORT void applicationDidBecomeActive();
+ PerformanceLogging& performanceLogging() const { return *m_performanceLogging; }
+
private:
struct Navigation {
String domain;
const std::unique_ptr<ProgressTracker> m_progress;
const std::unique_ptr<BackForwardController> m_backForwardController;
- Ref<MainFrame> m_mainFrame;
+ Ref<Frame> m_mainFrame;
RefPtr<PluginData> m_pluginData;
std::optional<Navigation> m_navigationToLogWhenVisible;
+ std::unique_ptr<PerformanceLogging> m_performanceLogging;
+#if PLATFORM(MAC)
+ Vector<ScrollLatchingState> m_latchingState;
+#if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
+ std::unique_ptr<ServicesOverlayController> m_servicesOverlayController;
+#endif
+#endif
+
+ std::unique_ptr<WheelEventDeltaFilter> m_recentWheelEventDeltaFilter;
+ std::unique_ptr<PageOverlayController> m_pageOverlayController;
+
+#if ENABLE(APPLE_PAY)
+ std::unique_ptr<PaymentCoordinator> m_paymentCoordinator;
+#endif
+
+#if ENABLE(APPLICATION_MANIFEST)
+ std::optional<ApplicationManifest> m_applicationManifest;
+#endif
+
bool m_isRunningUserScripts { false };
bool m_shouldEnableICECandidateFilteringByDefault { true };
};
#include "JSHTMLCanvasElement.h"
#include "JSMainThreadExecState.h"
#include "JSOffscreenCanvas.h"
-#include "MainFrame.h"
#include "OffscreenCanvas.h"
#include "Page.h"
#include "ScriptableDocumentParser.h"
#if ENABLE(REMOTE_INSPECTOR)
#include "Document.h"
+#include "Frame.h"
#include "InspectorController.h"
-#include "MainFrame.h"
#include "Page.h"
#include "Settings.h"
#include <JavaScriptCore/InspectorAgentBase.h>
#include "DOMWrapperWorld.h"
#include "Document.h"
-#include "MainFrame.h"
+#include "Frame.h"
#include "Page.h"
#include "PageCache.h"
#include "StorageNamespace.h"
#include "Document.h"
#include "DocumentParser.h"
-#include "MainFrame.h"
+#include "Frame.h"
#include "Page.h"
#include "PageGroup.h"
#include "ScriptRunner.h"
#include "config.h"
#include "PageOverlay.h"
+#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageOverlayController.h"
#include "PlatformMouseEvent.h"
{
if (!m_page)
return nullptr;
- return &m_page->mainFrame().pageOverlayController();
+ return &m_page->pageOverlayController();
}
IntRect PageOverlay::bounds() const
#include "FrameView.h"
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageOverlay.h"
#include "ScrollingCoordinator.h"
namespace WebCore {
-PageOverlayController::PageOverlayController(MainFrame& mainFrame)
+PageOverlayController::PageOverlayController(Page& page)
: m_initialized(false)
- , m_mainFrame(mainFrame)
+ , m_page(page)
{
}
ASSERT(!m_documentOverlayRootLayer);
ASSERT(!m_viewOverlayRootLayer);
- m_documentOverlayRootLayer = GraphicsLayer::create(m_mainFrame.page()->chrome().client().graphicsLayerFactory(), *this);
- m_viewOverlayRootLayer = GraphicsLayer::create(m_mainFrame.page()->chrome().client().graphicsLayerFactory(), *this);
+ m_documentOverlayRootLayer = GraphicsLayer::create(m_page.chrome().client().graphicsLayerFactory(), *this);
+ m_viewOverlayRootLayer = GraphicsLayer::create(m_page.chrome().client().graphicsLayerFactory(), *this);
m_documentOverlayRootLayer->setName("Document overlay Container");
m_viewOverlayRootLayer->setName("View overlay container");
}
{
createRootLayersIfNeeded();
- bool inWindow = m_mainFrame.page() ? m_mainFrame.page()->isInWindow() : false;
+ bool inWindow = m_page.isInWindow();
for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
PageOverlay& overlay = *overlayAndLayer.key;
{
createRootLayersIfNeeded();
- bool inWindow = m_mainFrame.page() ? m_mainFrame.page()->isInWindow() : false;
+ bool inWindow = m_page.isInWindow();
for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
PageOverlay& overlay = *overlayAndLayer.key;
m_pageOverlays.append(&overlay);
- std::unique_ptr<GraphicsLayer> layer = GraphicsLayer::create(m_mainFrame.page()->chrome().client().graphicsLayerFactory(), *this);
+ std::unique_ptr<GraphicsLayer> layer = GraphicsLayer::create(m_page.chrome().client().graphicsLayerFactory(), *this);
layer->setAnchorPoint(FloatPoint3D());
layer->setBackgroundColor(overlay.backgroundColor());
layer->setName("Overlay content");
updateForceSynchronousScrollLayerPositionUpdates();
- overlay.setPage(m_mainFrame.page());
+ overlay.setPage(&m_page);
- if (FrameView* frameView = m_mainFrame.view())
+ if (FrameView* frameView = m_page.mainFrame().view())
frameView->enterCompositingMode();
updateOverlayGeometry(overlay, rawLayer);
forceSynchronousScrollLayerPositionUpdates = true;
}
- if (ScrollingCoordinator* scrollingCoordinator = m_mainFrame.page()->scrollingCoordinator())
+ if (ScrollingCoordinator* scrollingCoordinator = m_page.scrollingCoordinator())
scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(forceSynchronousScrollLayerPositionUpdates);
#endif
}
void PageOverlayController::didChangeViewExposedRect()
{
- m_mainFrame.page()->chrome().client().scheduleCompositingLayerFlush();
+ m_page.chrome().client().scheduleCompositingLayerFlush();
}
void PageOverlayController::didScrollFrame(Frame& frame)
void PageOverlayController::updateSettingsForLayer(GraphicsLayer& layer)
{
- Settings& settings = m_mainFrame.settings();
+ Settings& settings = m_page.settings();
layer.setAcceleratesDrawing(settings.acceleratedDrawingEnabled());
layer.setShowDebugBorder(settings.showDebugBorders());
layer.setShowRepaintCounter(settings.showRepaintCounter());
float PageOverlayController::deviceScaleFactor() const
{
- if (Page* page = m_mainFrame.page())
- return page->deviceScaleFactor();
- return 1;
+ return m_page.deviceScaleFactor();
}
void PageOverlayController::notifyFlushRequired(const WebCore::GraphicsLayer*)
{
- if (Page* page = m_mainFrame.page())
- page->chrome().client().scheduleCompositingLayerFlush();
+ m_page.chrome().client().scheduleCompositingLayerFlush();
}
void PageOverlayController::didChangeOverlayFrame(PageOverlay& overlay)
void PageOverlayController::tiledBackingUsageChanged(const GraphicsLayer* graphicsLayer, bool usingTiledBacking)
{
if (usingTiledBacking)
- graphicsLayer->tiledBacking()->setIsInWindow(m_mainFrame.page()->isInWindow());
+ graphicsLayer->tiledBacking()->setIsInWindow(m_page.isInWindow());
}
} // namespace WebKit
namespace WebCore {
class Frame;
-class MainFrame;
class Page;
class PlatformMouseEvent;
class PageOverlayController final : public GraphicsLayerClient {
WTF_MAKE_FAST_ALLOCATED;
public:
- PageOverlayController(MainFrame&);
+ PageOverlayController(Page&);
virtual ~PageOverlayController();
GraphicsLayer& layerWithDocumentOverlays();
HashMap<PageOverlay*, std::unique_ptr<GraphicsLayer>> m_overlayGraphicsLayers;
Vector<RefPtr<PageOverlay>> m_pageOverlays;
- MainFrame& m_mainFrame;
+ Page& m_page;
};
} // namespace WebKit
#include "CachedImage.h"
#include "Document.h"
#include "Element.h"
+#include "Frame.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLHeadElement.h"
#include "HTMLImageElement.h"
#include "HTMLStyleElement.h"
#include "HTTPParsers.h"
#include "Image.h"
-#include "MainFrame.h"
#include "MarkupAccumulator.h"
#include "Page.h"
#include "RenderElement.h"
#include "CommonVM.h"
#include "DOMWindow.h"
#include "Document.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "JSDOMWindow.h"
#include "Logging.h"
-#include "MainFrame.h"
+#include "Page.h"
#include "PageCache.h"
namespace WebCore {
return WTFMove(*commonVM().heap.objectTypeCounts());
}
-PerformanceLogging::PerformanceLogging(MainFrame& mainFrame)
- : m_mainFrame(mainFrame)
+PerformanceLogging::PerformanceLogging(Page& page)
+ : m_page(page)
{
}
UNUSED_PARAM(poi);
#else
// Ignore synthetic main frames used internally by SVG and web inspector.
- if (m_mainFrame.loader().client().isEmptyFrameLoaderClient())
+ if (m_page.mainFrame().loader().client().isEmptyFrameLoaderClient())
return;
auto stats = memoryUsageStatistics(ShouldIncludeExpensiveComputations::No);
namespace WebCore {
-class MainFrame;
+class Page;
enum class ShouldIncludeExpensiveComputations { No, Yes };
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(PerformanceLogging);
public:
- explicit PerformanceLogging(MainFrame&);
+ explicit PerformanceLogging(Page&);
enum PointOfInterest {
MainFrameLoadStarted,
private:
static void getPlatformMemoryUsageStatistics(HashMap<const char*, size_t>&);
- MainFrame& m_mainFrame;
+ Page& m_page;
};
}
#include "DeprecatedGlobalSettings.h"
#include "DiagnosticLoggingClient.h"
#include "DiagnosticLoggingKeys.h"
+#include "Frame.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PerformanceLogging.h"
#include "PublicSuffix.h"
#include "ResourceUsageOverlay.h"
+#include "Frame.h"
#include "FrameView.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageOverlayController.h"
#include "PlatformMouseEvent.h"
// FIXME: This is a hack so we don't try to uninstall the PageOverlay during Page destruction.
if (m_page.mainFrame().page())
- m_page.mainFrame().pageOverlayController().uninstallPageOverlay(*m_overlay, PageOverlay::FadeMode::DoNotFade);
+ m_page.pageOverlayController().uninstallPageOverlay(*m_overlay, PageOverlay::FadeMode::DoNotFade);
}
void ResourceUsageOverlay::initialize()
#endif
m_overlay->setFrame(initialRect);
- m_page.mainFrame().pageOverlayController().installPageOverlay(*m_overlay, PageOverlay::FadeMode::DoNotFade);
+ m_page.pageOverlayController().installPageOverlay(*m_overlay, PageOverlay::FadeMode::DoNotFade);
platformInitialize();
}
#include "Document.h"
#include "FontCascade.h"
#include "FontGenericFamilies.h"
+#include "Frame.h"
#include "FrameTree.h"
#include "FrameView.h"
#include "HistoryItem.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageCache.h"
#include "RenderWidget.h"
#include "config.h"
#include "SpatialNavigation.h"
+#include "Frame.h"
#include "FrameTree.h"
#include "FrameView.h"
#include "HTMLAreaElement.h"
#include "HTMLMapElement.h"
#include "HTMLSelectElement.h"
#include "IntRect.h"
-#include "MainFrame.h"
#include "Node.h"
#include "Page.h"
#include "RenderInline.h"
#include "Document.h"
#include "DocumentLoader.h"
+#include "Frame.h"
#include "FrameLoader.h"
-#include "MainFrame.h"
#include "Page.h"
#if ENABLE(CONTENT_EXTENSIONS)
#import "HitTestRequest.h"
#import "HitTestResult.h"
#import "Logging.h"
-#import "MainFrame.h"
#import "NodeRenderStyle.h"
#import "NodeTraversal.h"
#import "Page.h"
#import "EditorClient.h"
#import "Element.h"
#import "File.h"
+#import "Frame.h"
#import "FrameView.h"
#import "HTMLAttachmentElement.h"
-#import "MainFrame.h"
#import "Page.h"
#import "Pasteboard.h"
#import "PasteboardStrategy.h"
#include "HTMLHtmlElement.h"
#include "HTMLIFrameElement.h"
#include "KeyboardEvent.h"
-#include "MainFrame.h"
#include "MouseEventWithHitTestResults.h"
#include "Page.h"
#include "Pasteboard.h"
static bool latchingIsLockedToPlatformFrame(const Frame& frame)
{
- ScrollLatchingState* latchedState = frame.mainFrame().latchingState();
+ auto* page = frame.page();
+ if (!page)
+ return false;
+
+ ScrollLatchingState* latchedState = page->latchingState();
if (!latchedState)
return false;
static bool latchingIsLockedToAncestorOfThisFrame(const Frame& frame)
{
- ScrollLatchingState* latchedState = frame.mainFrame().latchingState();
+ auto* page = frame.page();
+ if (!page)
+ return false;
+
+ ScrollLatchingState* latchedState = page->latchingState();
if (!latchedState || !latchedState->frame())
return false;
} else {
// If another wheel event scrolling starts, stop the timer manually, and reset the latched state immediately.
if (event.shouldConsiderLatching()) {
- m_frame.mainFrame().resetLatchingState();
+ if (auto* page = m_frame.page())
+ page->resetLatchingState();
m_pendingMomentumWheelEventsTimer.stop();
} else if (event.isTransitioningToMomentumScroll()) {
// Wheel events machinary is transitioning to momenthum scrolling, so no need to reset latched state. Stop the timer.
if (scrollableArea && page && page->expectsWheelEventTriggers())
scrollableArea->scrollAnimator().setWheelEventTestTrigger(page->testTrigger());
- ScrollLatchingState* latchingState = m_frame.mainFrame().latchingState();
+ ScrollLatchingState* latchingState = page ? page->latchingState() : nullptr;
if (wheelEvent.shouldConsiderLatching()) {
- if (scrollableContainer && scrollableArea) {
+ if (scrollableContainer && scrollableArea && page) {
bool startingAtScrollLimit = scrolledToEdgeInDominantDirection(*scrollableContainer, *scrollableArea.get(), wheelEvent.deltaX(), wheelEvent.deltaY());
if (!startingAtScrollLimit) {
- m_frame.mainFrame().pushNewLatchingState();
- latchingState = m_frame.mainFrame().latchingState();
+ page->pushNewLatchingState();
+ latchingState = page->latchingState();
latchingState->setStartedGestureAtScrollLimit(false);
latchingState->setWheelEventElement(wheelEventTarget.get());
latchingState->setFrame(&m_frame);
latchingState->setScrollableContainer(scrollableContainer.get());
latchingState->setWidgetIsLatched(result.isOverWidget());
isOverWidget = latchingState->widgetIsLatched();
- m_frame.mainFrame().wheelEventDeltaFilter()->beginFilteringDeltas();
+ page->wheelEventDeltaFilter()->beginFilteringDeltas();
}
}
} else if (wheelEvent.shouldResetLatching())
void EventHandler::platformRecordWheelEvent(const PlatformWheelEvent& wheelEvent)
{
+ auto* page = m_frame.page();
+ if (!page)
+ return;
+
switch (wheelEvent.phase()) {
case PlatformWheelEventPhaseBegan:
- m_frame.mainFrame().wheelEventDeltaFilter()->beginFilteringDeltas();
+ page->wheelEventDeltaFilter()->beginFilteringDeltas();
break;
case PlatformWheelEventPhaseEnded:
- m_frame.mainFrame().wheelEventDeltaFilter()->endFilteringDeltas();
+ page->wheelEventDeltaFilter()->endFilteringDeltas();
break;
default:
break;
}
- m_frame.mainFrame().wheelEventDeltaFilter()->updateFromDelta(FloatSize(wheelEvent.deltaX(), wheelEvent.deltaY()));
+ page->wheelEventDeltaFilter()->updateFromDelta(FloatSize(wheelEvent.deltaX(), wheelEvent.deltaY()));
}
static FrameView* frameViewForLatchingState(Frame& frame, ScrollLatchingState* latchingState)
if (!view)
return false;
- ScrollLatchingState* latchingState = m_frame.mainFrame().latchingState();
+ ScrollLatchingState* latchingState = m_frame.page() ? m_frame.page()->latchingState() : nullptr;
if (wheelEvent.useLatchedEventElement() && !latchingIsLockedToAncestorOfThisFrame(m_frame) && latchingState && latchingState->scrollableContainer()) {
m_isHandlingWheelEvent = false;
if (frameHasPlatformWidget(m_frame) && widget.isFrameView())
return true;
- ScrollLatchingState* latchingState = m_frame.mainFrame().latchingState();
+ ScrollLatchingState* latchingState = m_frame.page() ? m_frame.page()->latchingState() : nullptr;
if (!latchingState)
return false;
#import "Page.h"
#import "DocumentLoader.h"
+#import "Frame.h"
#import "FrameLoader.h"
#import "FrameTree.h"
#import "Logging.h"
-#import "MainFrame.h"
#import "RenderObject.h"
#import <pal/Logging.h>
namespace WebCore {
class LayoutRect;
-class MainFrame;
+class Page;
struct GapRects;
class ServicesOverlayController : private PageOverlay::Client {
WTF_MAKE_FAST_ALLOCATED;
public:
- explicit ServicesOverlayController(MainFrame&);
+ explicit ServicesOverlayController(Page&);
~ServicesOverlayController();
void selectedTelephoneNumberRangesChanged();
void willDestroyHighlight(Highlight*);
void didFinishFadingOutHighlight(Highlight*);
- MainFrame& mainFrame() const { return m_mainFrame; }
+ Frame& mainFrame() const;
+ Page& page() const { return m_page; }
- MainFrame& m_mainFrame;
+ Page& m_page;
PageOverlay* m_servicesOverlay { nullptr };
RefPtr<Highlight> m_activeHighlight;
#import "EventHandler.h"
#import "FloatQuad.h"
#import "FocusController.h"
+#import "Frame.h"
#import "FrameSelection.h"
#import "FrameView.h"
#import "GapRects.h"
#import "GraphicsLayer.h"
#import "GraphicsLayerCA.h"
#import "Logging.h"
-#import "MainFrame.h"
#import "Page.h"
#import "PageOverlayController.h"
#import "PlatformCAAnimationCocoa.h"
{
ASSERT(ddHighlight);
- Page* page = controller.mainFrame().page();
- m_graphicsLayer = GraphicsLayer::create(page ? page->chrome().client().graphicsLayerFactory() : nullptr, *this);
+ auto& page = controller.page();
+ m_graphicsLayer = GraphicsLayer::create(page.chrome().client().graphicsLayerFactory(), *this);
m_graphicsLayer->setDrawsContent(true);
setDDHighlight(ddHighlight.get());
if (!m_controller)
return;
- Page* page = m_controller->mainFrame().page();
- if (!page)
- return;
-
- page->chrome().client().scheduleCompositingLayerFlush();
+ m_controller->page().chrome().client().scheduleCompositingLayerFlush();
}
void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const FloatRect&, GraphicsLayerPaintBehavior)
if (!m_controller)
return 1;
- Page* page = m_controller->mainFrame().page();
- if (!page)
- return 1;
-
- return page->deviceScaleFactor();
+ return m_controller->page().deviceScaleFactor();
}
void ServicesOverlayController::Highlight::fadeIn()
return enclosingIntRect(boundingRect);
}
-ServicesOverlayController::ServicesOverlayController(MainFrame& mainFrame)
- : m_mainFrame(mainFrame)
+ServicesOverlayController::ServicesOverlayController(Page& page)
+ : m_page(page)
, m_determineActiveHighlightTimer(*this, &ServicesOverlayController::determineActiveHighlightTimerFired)
, m_buildHighlightsTimer(*this, &ServicesOverlayController::buildPotentialHighlightsIfNeeded)
{
void ServicesOverlayController::invalidateHighlightsOfType(Highlight::Type type)
{
- if (!m_mainFrame.settings().serviceControlsEnabled())
+ if (!m_page.settings().serviceControlsEnabled())
return;
m_dirtyHighlightTypes |= type;
if (m_potentialHighlights.isEmpty()) {
if (m_servicesOverlay)
- m_mainFrame.pageOverlayController().uninstallPageOverlay(*m_servicesOverlay, PageOverlay::FadeMode::DoNotFade);
+ m_page.pageOverlayController().uninstallPageOverlay(*m_servicesOverlay, PageOverlay::FadeMode::DoNotFade);
return;
}
return 0_s;
Seconds minimumTimeUntilHighlightShouldBeShown = 200_ms;
- Page* page = m_mainFrame.page();
- if (page && page->focusController().focusedOrMainFrame().selection().selection().isContentEditable())
+ if (m_page.focusController().focusedOrMainFrame().selection().selection().isContentEditable())
minimumTimeUntilHighlightShouldBeShown = 1_s;
- bool mousePressed = m_mainFrame.eventHandler().mousePressed();
+ bool mousePressed = mainFrame().eventHandler().mousePressed();
// Highlight hysteresis is only for selection services, because telephone number highlights are already much more stable
// by virtue of being expanded to include the entire telephone number. However, we will still avoid highlighting
void ServicesOverlayController::buildPhoneNumberHighlights()
{
Vector<RefPtr<Range>> phoneNumberRanges;
- for (Frame* frame = &m_mainFrame; frame; frame = frame->tree().traverseNext())
+ for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext())
phoneNumberRanges.appendVector(frame->editor().detectedTelephoneNumberRanges());
if (phoneNumberRanges.isEmpty()) {
HashSet<RefPtr<Highlight>> newPotentialHighlights;
- FrameView& mainFrameView = *m_mainFrame.view();
+ FrameView& mainFrameView = *mainFrame().view();
for (auto& range : phoneNumberRanges) {
// FIXME: This will choke if the range wraps around the edge of the view.
return;
}
- Page* page = m_mainFrame.page();
- if (!page)
- return;
-
if (!DataDetectorsLibrary())
return;
Vector<CGRect> cgRects;
cgRects.reserveCapacity(m_currentSelectionRects.size());
- RefPtr<Range> selectionRange = page->selection().firstRange();
+ RefPtr<Range> selectionRange = m_page.selection().firstRange();
if (selectionRange) {
- FrameView* mainFrameView = m_mainFrame.view();
+ FrameView* mainFrameView = mainFrame().view();
if (!mainFrameView)
return;
bool ServicesOverlayController::hasRelevantSelectionServices()
{
- if (Page* page = m_mainFrame.page())
- return page->chrome().client().hasRelevantSelectionServices(m_isTextOnly);
- return false;
+ return m_page.chrome().client().hasRelevantSelectionServices(m_isTextOnly);
}
void ServicesOverlayController::createOverlayIfNeeded()
if (m_servicesOverlay)
return;
- if (!m_mainFrame.settings().serviceControlsEnabled())
+ if (!m_page.settings().serviceControlsEnabled())
return;
auto overlay = PageOverlay::create(*this, PageOverlay::OverlayType::Document);
m_servicesOverlay = overlay.ptr();
- m_mainFrame.pageOverlayController().installPageOverlay(WTFMove(overlay), PageOverlay::FadeMode::DoNotFade);
+ m_page.pageOverlayController().installPageOverlay(WTFMove(overlay), PageOverlay::FadeMode::DoNotFade);
}
Vector<RefPtr<Range>> ServicesOverlayController::telephoneNumberRangesForFocusedFrame()
{
- Page* page = m_mainFrame.page();
- if (!page)
- return { };
-
- return page->focusController().focusedOrMainFrame().editor().detectedTelephoneNumberRanges();
+ return m_page.focusController().focusedOrMainFrame().editor().detectedTelephoneNumberRanges();
}
bool ServicesOverlayController::highlightsAreEquivalent(const Highlight* a, const Highlight* b)
if (selectionHighlight.type() != Highlight::SelectionType)
return nullptr;
- Page* page = m_mainFrame.page();
- if (!page)
- return nullptr;
-
- const VisibleSelection& selection = page->selection();
+ const VisibleSelection& selection = m_page.selection();
if (!selection.isRange())
return nullptr;
bool ServicesOverlayController::mouseEvent(PageOverlay&, const PlatformMouseEvent& event)
{
- m_mousePosition = m_mainFrame.view()->windowToContents(event.position());
+ m_mousePosition = mainFrame().view()->windowToContents(event.position());
bool mouseIsOverActiveHighlightButton = false;
determineActiveHighlight(mouseIsOverActiveHighlightButton);
void ServicesOverlayController::handleClick(const IntPoint& clickPoint, Highlight& highlight)
{
- FrameView* frameView = m_mainFrame.view();
+ FrameView* frameView = mainFrame().view();
if (!frameView)
return;
- Page* page = m_mainFrame.page();
- if (!page)
- return;
-
IntPoint windowPoint = frameView->contentsToWindow(clickPoint);
if (highlight.type() == Highlight::SelectionType) {
for (auto& range : telephoneNumberRanges)
selectedTelephoneNumbers.append(range->text());
- page->chrome().client().handleSelectionServiceClick(page->focusController().focusedOrMainFrame().selection(), selectedTelephoneNumbers, windowPoint);
+ m_page.chrome().client().handleSelectionServiceClick(m_page.focusController().focusedOrMainFrame().selection(), selectedTelephoneNumbers, windowPoint);
} else if (highlight.type() == Highlight::TelephoneNumberType)
- page->chrome().client().handleTelephoneNumberClick(highlight.range().text(), windowPoint);
+ m_page.chrome().client().handleTelephoneNumberClick(highlight.range().text(), windowPoint);
+}
+
+Frame& ServicesOverlayController::mainFrame() const
+{
+ return m_page.mainFrame();
}
void ServicesOverlayController::didCreateHighlight(Highlight* highlight)
#include "FrameView.h"
#include "GraphicsLayer.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PerformanceLoggingClient.h"
#include "ScrollAnimator.h"
#include "Document.h"
#include "EventNames.h"
+#include "Frame.h"
#include "FrameView.h"
#include "GraphicsLayer.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PlatformWheelEvent.h"
#include "PluginViewBase.h"
#import "ScrollingCoordinatorIOS.h"
+#include "Frame.h"
#include "FrameView.h"
-#include "MainFrame.h"
#include "Page.h"
#include "Region.h"
#include "ScrollingStateTree.h"
#import "ScrollingCoordinatorMac.h"
+#include "Frame.h"
#include "FrameView.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PlatformWheelEvent.h"
#include "Region.h"
#include "CACFLayerTreeHostClient.h"
#include "DebugPageOverlays.h"
#include "DefWndProcWindowClass.h"
+#include "Frame.h"
#include "FrameView.h"
#include "LayerChangesFlusher.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "PlatformCALayerWin.h"
#include "PlatformLayer.h"
#include "TiledBacking.h"
#include "DOMMimeType.h"
#include "DOMPlugin.h"
+#include "Frame.h"
#include "FrameLoader.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PluginData.h"
#include "SubframeLoader.h"
#include "config.h"
#include "PluginInfoProvider.h"
+#include "Frame.h"
#include "FrameLoader.h"
-#include "MainFrame.h"
#include "Page.h"
#include "SubframeLoader.h"
{
refreshPlugins();
- Vector<Ref<MainFrame>> framesNeedingReload;
+ Vector<Ref<Frame>> framesNeedingReload;
for (auto& page : m_pages) {
page->clearPluginData();
#include "HitTestResult.h"
#include "InlineElementBox.h"
#include "LayoutState.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PaintInfo.h"
#include "RenderBoxFragmentInfo.h"
#include "HitTestResult.h"
#include "HitTestingTransformState.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "OverflowEvent.h"
#include "OverlapTestRequestClient.h"
#include "Page.h"
#include "CachedImage.h"
#include "Chrome.h"
#include "FilterEffectRenderer.h"
+#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
#include "InspectorInstrumentation.h"
#include "KeyframeList.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PerformanceLoggingClient.h"
#include "PluginViewBase.h"
#include "HitTestResult.h"
#include "InspectorInstrumentation.h"
#include "Logging.h"
-#include "MainFrame.h"
#include "NodeList.h"
#include "Page.h"
#include "PageOverlayController.h"
bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer& rootLayer) const
{
- int layerCount = m_compositedLayerCount + m_renderView.frame().mainFrame().pageOverlayController().overlayCount();
+ int layerCount = m_compositedLayerCount + page().pageOverlayController().overlayCount();
return layerCount > (rootLayer.isComposited() ? 1 : 0);
}
if (m_renderView.needsLayout())
return false;
- if (!m_compositing && (m_forceCompositingMode || (isMainFrameCompositor() && m_renderView.frame().mainFrame().pageOverlayController().overlayCount())))
+ if (!m_compositing && (m_forceCompositingMode || (isMainFrameCompositor() && page().pageOverlayController().overlayCount())))
enableCompositingMode(true);
if (!m_reevaluateCompositingAfterLayout && !m_compositing)
if (!isMainFrameCompositor() || !m_compositing)
return;
- auto& frame = m_renderView.frameView().frame();
- childList.append(&frame.mainFrame().pageOverlayController().layerWithDocumentOverlays());
+ childList.append(&page().pageOverlayController().layerWithDocumentOverlays());
}
void RenderLayerCompositor::layerBecameNonComposited(const RenderLayer& layer)
auto& frame = m_renderView.frameView().frame();
page().chrome().client().attachRootGraphicsLayer(frame, rootGraphicsLayer());
if (frame.isMainFrame())
- page().chrome().client().attachViewOverlayGraphicsLayer(frame, &frame.mainFrame().pageOverlayController().layerWithViewOverlays());
+ page().chrome().client().attachViewOverlayGraphicsLayer(frame, &page().pageOverlayController().layerWithViewOverlays());
break;
}
case RootLayerAttachedViaEnclosingFrame: {
page().chrome().client().attachRootGraphicsLayer(frame, nullptr);
if (frame.isMainFrame()) {
page().chrome().client().attachViewOverlayGraphicsLayer(frame, nullptr);
- frame.mainFrame().pageOverlayController().willDetachRootLayer();
+ page().pageOverlayController().willDetachRootLayer();
}
}
break;
if (!frame.isMainFrame())
return;
- m_rootContentLayer->addChild(&frame.mainFrame().pageOverlayController().layerWithDocumentOverlays());
+ m_rootContentLayer->addChild(&page().pageOverlayController().layerWithDocumentOverlays());
}
void RenderLayerCompositor::notifyIFramesOfCompositingChange()
#include "CSSAnimationController.h"
#include "Editing.h"
#include "FloatQuad.h"
+#include "Frame.h"
#include "FrameSelection.h"
#include "FrameView.h"
#include "GeometryUtilities.h"
#include "HTMLTableElement.h"
#include "HitTestResult.h"
#include "LogicalSelectionOffsetCaches.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PseudoElement.h"
#include "RenderChildIterator.h"
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "Document.h"
#include "DOMWindow.h"
#include "EventNames.h"
+#include "Frame.h"
#include "InspectorInstrumentation.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageGroup.h"
#include "SecurityOrigin.h"
#include "ComposedTreeIterator.h"
#include "DocumentTimeline.h"
#include "ElementIterator.h"
+#include "Frame.h"
#include "HTMLBodyElement.h"
#include "HTMLMeterElement.h"
#include "HTMLNames.h"
#include "HTMLProgressElement.h"
#include "HTMLSlotElement.h"
#include "LoaderStrategy.h"
-#include "MainFrame.h"
#include "NodeRenderStyle.h"
#include "Page.h"
#include "PlatformStrategies.h"
page->setMemoryCacheClientCallsEnabled(false);
- postResolutionCallbackQueue().append([protectedMainFrame = Ref<MainFrame>(page->mainFrame())] {
+ postResolutionCallbackQueue().append([protectedMainFrame = makeRef(page->mainFrame())] {
if (Page* page = protectedMainFrame->page())
page->setMemoryCacheClientCallsEnabled(true);
});
#include "DOMWrapperWorld.h"
#include "ElementIterator.h"
#include "EventNames.h"
+#include "Frame.h"
#include "FrameSelection.h"
-#include "MainFrame.h"
#include "RenderSVGResource.h"
#include "RenderSVGRoot.h"
#include "RenderSVGViewportContainer.h"
#include "DocumentLoader.h"
#include "EditorClient.h"
#include "ElementIterator.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "ImageBuffer.h"
#include "IntRect.h"
#include "JSDOMWindowBase.h"
#include "LibWebRTCProvider.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageConfiguration.h"
#include "RenderSVGRoot.h"
#include "DeprecatedGlobalSettings.h"
#include "Document.h"
#include "FontCache.h"
+#include "Frame.h"
#include "FrameView.h"
#include "LocaleToScriptMapping.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageGroup.h"
#include "RenderTheme.h"
#include "File.h"
#include "FontCache.h"
#include "FormController.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "GCObservation.h"
#include "InternalSettings.h"
#include "JSImageData.h"
#include "LibWebRTCProvider.h"
-#include "MainFrame.h"
#include "MallocStatistics.h"
#include "MediaPlayer.h"
#include "MediaProducer.h"
#if ENABLE(APPLE_PAY)
auto* frame = document.frame();
- if (frame && frame->isMainFrame()) {
- m_mockPaymentCoordinator = new MockPaymentCoordinator(frame->mainFrame());
- frame->mainFrame().setPaymentCoordinator(std::make_unique<PaymentCoordinator>(*m_mockPaymentCoordinator));
+ if (frame && frame->page()) {
+ m_mockPaymentCoordinator = new MockPaymentCoordinator(*frame->page());
+ frame->page()->setPaymentCoordinator(std::make_unique<PaymentCoordinator>(*m_mockPaymentCoordinator));
}
#endif
ExceptionOr<Ref<MockPageOverlay>> Internals::installMockPageOverlay(PageOverlayType type)
{
Document* document = contextDocument();
- if (!document || !document->frame())
+ if (!document || !document->page())
return Exception { InvalidAccessError };
- return MockPageOverlayClient::singleton().installOverlay(document->frame()->mainFrame(), type == PageOverlayType::View ? PageOverlay::OverlayType::View : PageOverlay::OverlayType::Document);
+ return MockPageOverlayClient::singleton().installOverlay(*document->page(), type == PageOverlayType::View ? PageOverlay::OverlayType::View : PageOverlay::OverlayType::Document);
}
ExceptionOr<String> Internals::pageOverlayLayerTreeAsText(unsigned short flags) const
{
Document* document = contextDocument();
- if (!document || !document->frame())
+ if (!document || !document->page())
return Exception { InvalidAccessError };
document->updateLayoutIgnorePendingStylesheets();
- return MockPageOverlayClient::singleton().layerTreeAsText(document->frame()->mainFrame(), toLayerTreeFlags(flags));
+ return MockPageOverlayClient::singleton().layerTreeAsText(*document->page(), toLayerTreeFlags(flags));
}
void Internals::setPageMuted(StringView statesString)
#include "MockPageOverlay.h"
#include "Document.h"
+#include "Frame.h"
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
-#include "MainFrame.h"
#include "PageOverlayController.h"
#include "PlatformMouseEvent.h"
namespace WebCore {
-class MainFrame;
-
class MockPageOverlay : public RefCounted<MockPageOverlay> {
public:
static Ref<MockPageOverlay> create(PageOverlay*);
#include "MockPageOverlayClient.h"
#include "Document.h"
+#include "Frame.h"
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
-#include "MainFrame.h"
#include "Page.h"
#include "PageOverlayController.h"
#include "PlatformMouseEvent.h"
MockPageOverlayClient::MockPageOverlayClient() = default;
-Ref<MockPageOverlay> MockPageOverlayClient::installOverlay(MainFrame& mainFrame, PageOverlay::OverlayType overlayType)
+Ref<MockPageOverlay> MockPageOverlayClient::installOverlay(Page& page, PageOverlay::OverlayType overlayType)
{
auto overlay = PageOverlay::create(*this, overlayType);
- mainFrame.pageOverlayController().installPageOverlay(overlay, PageOverlay::FadeMode::DoNotFade);
+ page.pageOverlayController().installPageOverlay(overlay, PageOverlay::FadeMode::DoNotFade);
auto mockOverlay = MockPageOverlay::create(overlay.ptr());
m_overlays.add(mockOverlay.ptr());
}
}
-String MockPageOverlayClient::layerTreeAsText(MainFrame& mainFrame, LayerTreeFlags flags)
+String MockPageOverlayClient::layerTreeAsText(Page& page, LayerTreeFlags flags)
{
- GraphicsLayer* viewOverlayRoot = mainFrame.pageOverlayController().viewOverlayRootLayer();
- GraphicsLayer* documentOverlayRoot = mainFrame.pageOverlayController().documentOverlayRootLayer();
+ GraphicsLayer* viewOverlayRoot = page.pageOverlayController().viewOverlayRootLayer();
+ GraphicsLayer* documentOverlayRoot = page.pageOverlayController().documentOverlayRootLayer();
return "View-relative:\n" + (viewOverlayRoot ? viewOverlayRoot->layerTreeAsText(flags | LayerTreeAsTextIncludePageOverlayLayers) : "(no view-relative overlay root)")
+ "\n\nDocument-relative:\n" + (documentOverlayRoot ? documentOverlayRoot->layerTreeAsText(flags | LayerTreeAsTextIncludePageOverlayLayers) : "(no document-relative overlay root)");
namespace WebCore {
-class MainFrame;
+class Page;
class MockPageOverlayClient final : public PageOverlay::Client {
friend class NeverDestroyed<MockPageOverlayClient>;
explicit MockPageOverlayClient();
- Ref<MockPageOverlay> installOverlay(MainFrame&, PageOverlay::OverlayType);
+ Ref<MockPageOverlay> installOverlay(Page&, PageOverlay::OverlayType);
void uninstallAllOverlays();
- String layerTreeAsText(MainFrame&, LayerTreeFlags);
+ String layerTreeAsText(Page&, LayerTreeFlags);
virtual ~MockPageOverlayClient() = default;
#if ENABLE(APPLE_PAY)
-#include "MainFrame.h"
#include "MockPayment.h"
#include "MockPaymentContact.h"
#include "MockPaymentMethod.h"
+#include "Page.h"
#include "PaymentCoordinator.h"
#include "URL.h"
#include <wtf/RunLoop.h>
namespace WebCore {
-MockPaymentCoordinator::MockPaymentCoordinator(MainFrame& mainFrame)
- : m_mainFrame { mainFrame }
+MockPaymentCoordinator::MockPaymentCoordinator(Page& page)
+ : m_page { page }
{
m_availablePaymentNetworks.add("amex");
m_availablePaymentNetworks.add("carteBancaire");
ASSERT(showCount == hideCount);
++showCount;
- dispatchIfShowing([mainFrame = makeRef(m_mainFrame)]() {
- mainFrame->paymentCoordinator().validateMerchant({ URL(), ASCIILiteral("https://webkit.org/") });
+ dispatchIfShowing([page = &m_page]() {
+ page->paymentCoordinator().validateMerchant({ URL(), ASCIILiteral("https://webkit.org/") });
});
return true;
}
void MockPaymentCoordinator::completeMerchantValidation(const PaymentMerchantSession&)
{
- dispatchIfShowing([mainFrame = makeRef(m_mainFrame), shippingAddress = m_shippingAddress]() mutable {
- mainFrame->paymentCoordinator().didSelectShippingContact(MockPaymentContact { WTFMove(shippingAddress) });
+ dispatchIfShowing([page = &m_page, shippingAddress = m_shippingAddress]() mutable {
+ page->paymentCoordinator().didSelectShippingContact(MockPaymentContact { WTFMove(shippingAddress) });
});
}
void MockPaymentCoordinator::changeShippingOption(String&& shippingOption)
{
- dispatchIfShowing([mainFrame = makeRef(m_mainFrame), shippingOption = WTFMove(shippingOption)]() mutable {
+ dispatchIfShowing([page = &m_page, shippingOption = WTFMove(shippingOption)]() mutable {
ApplePaySessionPaymentRequest::ShippingMethod shippingMethod;
shippingMethod.identifier = WTFMove(shippingOption);
- mainFrame->paymentCoordinator().didSelectShippingMethod(shippingMethod);
+ page->paymentCoordinator().didSelectShippingMethod(shippingMethod);
});
}
void MockPaymentCoordinator::changePaymentMethod(ApplePayPaymentMethod&& paymentMethod)
{
- dispatchIfShowing([mainFrame = makeRef(m_mainFrame), paymentMethod = WTFMove(paymentMethod)]() mutable {
- mainFrame->paymentCoordinator().didSelectPaymentMethod(MockPaymentMethod { WTFMove(paymentMethod) });
+ dispatchIfShowing([page = &m_page, paymentMethod = WTFMove(paymentMethod)]() mutable {
+ page->paymentCoordinator().didSelectPaymentMethod(MockPaymentMethod { WTFMove(paymentMethod) });
});
}
void MockPaymentCoordinator::acceptPayment()
{
- dispatchIfShowing([mainFrame = makeRef(m_mainFrame), shippingAddress = m_shippingAddress]() mutable {
+ dispatchIfShowing([page = &m_page, shippingAddress = m_shippingAddress]() mutable {
ApplePayPayment payment;
payment.shippingContact = WTFMove(shippingAddress);
- mainFrame->paymentCoordinator().didAuthorizePayment(MockPayment { WTFMove(payment) });
+ page->paymentCoordinator().didAuthorizePayment(MockPayment { WTFMove(payment) });
});
}
void MockPaymentCoordinator::cancelPayment()
{
- dispatchIfShowing([mainFrame = makeRef(m_mainFrame)] {
- mainFrame->paymentCoordinator().didCancelPaymentSession();
+ dispatchIfShowing([page = &m_page] {
+ page->paymentCoordinator().didCancelPaymentSession();
++hideCount;
ASSERT(showCount == hideCount);
});
namespace WebCore {
-class MainFrame;
+class Page;
struct ApplePayPaymentMethod;
class MockPaymentCoordinator final : public PaymentCoordinatorClient {
public:
- explicit MockPaymentCoordinator(MainFrame&);
+ explicit MockPaymentCoordinator(Page&);
void setShippingAddress(MockPaymentAddress&& shippingAddress) { m_shippingAddress = WTFMove(shippingAddress); }
void changeShippingOption(String&& shippingOption);
void updateTotalAndLineItems(const ApplePaySessionPaymentRequest::TotalAndLineItems&);
- MainFrame& m_mainFrame;
+ Page& m_page;
ApplePayPaymentContact m_shippingAddress;
ApplePayLineItem m_total;
Vector<ApplePayLineItem> m_lineItems;
#if ENABLE(SERVICE_WORKER)
#include "CacheStorageProvider.h"
+#include "Frame.h"
#include "FrameLoader.h"
#include "LoaderStrategy.h"
-#include "MainFrame.h"
#include "PlatformStrategies.h"
#include "Settings.h"
#include <pal/SessionID.h>
+2018-04-03 Chris Dumez <cdumez@apple.com>
+
+ Drop MainFrame class
+ https://bugs.webkit.org/show_bug.cgi?id=184191
+
+ Reviewed by Darin Adler.
+
+ Drop MainFrame class and move contents into Page / Frame since there is a 1:1
+ relationship between the Page and the MainFrame.
+
+ This is ground work for introducing LocalFrame / RemoteFrame concepts.
+
+ * Shared/WebRenderLayer.cpp:
+ * Shared/WebRenderObject.cpp:
+ * WebProcess/ApplePay/WebPaymentCoordinator.cpp:
+ (WebKit::WebPaymentCoordinator::paymentCoordinator):
+ * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+ * WebProcess/FullScreen/WebFullScreenManager.cpp:
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+ (WKBundlePageInstallPageOverlay):
+ (WKBundlePageUninstallPageOverlay):
+ (WKBundlePageInstallPageOverlayWithAnimation):
+ (WKBundlePageUninstallPageOverlayWithAnimation):
+ * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ * WebProcess/Plugins/PluginView.cpp:
+ * WebProcess/Plugins/WebPluginInfoProvider.cpp:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+ (WebKit::WebInspectorClient::~WebInspectorClient):
+ (WebKit::WebInspectorClient::highlight):
+ (WebKit::WebInspectorClient::hideHighlight):
+ (WebKit::WebInspectorClient::showPaintRect):
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+ * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
+ * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
+ * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+ * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
+ * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
+ * WebProcess/WebPage/FindController.cpp:
+ (WebKit::FindController::updateFindUIAfterPageScroll):
+ (WebKit::FindController::hideFindUI):
+ * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
+ * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
+ * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
+ * WebProcess/WebPage/WebBackForwardListProxy.cpp:
+ * WebProcess/WebPage/WebFrame.cpp:
+ * WebProcess/WebPage/WebInspector.cpp:
+ * WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::mainFrame const):
+ (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
+ (WebKit::WebPage::plugInIntersectsSearchRect):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
+ * WebProcess/WebPage/ios/FindControllerIOS.mm:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
+ (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
+ (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::performImmediateActionHitTestAtLocation):
+ (WebKit::WebPage::dataDetectorsDidPresentUI):
+ (WebKit::WebPage::dataDetectorsDidChangeUI):
+ (WebKit::WebPage::dataDetectorsDidHideUI):
+ * WebProcess/WebProcess.cpp:
+ * WebProcess/WebStorage/StorageAreaMap.cpp:
+
2018-04-03 Youenn Fablet <youenn@apple.com>
Make NetworkProcess get ContentBlocker information from UIProcess
#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoaderClient.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/RenderLayer.h>
#include <WebCore/RenderLayerBacking.h>
#include <WebCore/RenderView.h>
#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoaderClient.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/RenderInline.h>
#include <WebCore/RenderText.h>
#include <WebCore/RenderView.h>
#include "WebPaymentCoordinatorMessages.h"
#include "WebPaymentCoordinatorProxyMessages.h"
#include "WebProcess.h"
-#include <WebCore/MainFrame.h>
+#include <WebCore/Frame.h>
#include <WebCore/PaymentCoordinator.h>
#include <WebCore/URL.h>
WebCore::PaymentCoordinator& WebPaymentCoordinator::paymentCoordinator()
{
- return m_webPage.mainFrame()->paymentCoordinator();
+ return m_webPage.corePage()->paymentCoordinator();
}
}
#include <WebCore/HTMLOptionElement.h>
#include <WebCore/HTMLSelectElement.h>
#include <WebCore/JSElement.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/RenderElement.h>
#include <wtf/UUID.h>
#include "WebPage.h"
#include <WebCore/Color.h>
#include <WebCore/Element.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
#include <WebCore/HTMLVideoElement.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/RenderLayer.h>
#include <WebCore/RenderLayerBacking.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/AccessibilityObject.h>
#include <WebCore/ApplicationCacheStorage.h>
-#include <WebCore/MainFrame.h>
+#include <WebCore/Frame.h>
#include <WebCore/Page.h>
#include <WebCore/PageOverlay.h>
#include <WebCore/PageOverlayController.h>
void WKBundlePageInstallPageOverlay(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
{
- toImpl(pageRef)->mainFrame()->pageOverlayController().installPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::DoNotFade);
+ toImpl(pageRef)->corePage()->pageOverlayController().installPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::DoNotFade);
}
void WKBundlePageUninstallPageOverlay(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
{
- toImpl(pageRef)->mainFrame()->pageOverlayController().uninstallPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::DoNotFade);
+ toImpl(pageRef)->corePage()->pageOverlayController().uninstallPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::DoNotFade);
}
void WKBundlePageInstallPageOverlayWithAnimation(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
{
- toImpl(pageRef)->mainFrame()->pageOverlayController().installPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::Fade);
+ toImpl(pageRef)->corePage()->pageOverlayController().installPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::Fade);
}
void WKBundlePageUninstallPageOverlayWithAnimation(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
{
- toImpl(pageRef)->mainFrame()->pageOverlayController().uninstallPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::Fade);
+ toImpl(pageRef)->corePage()->pageOverlayController().uninstallPageOverlay(*toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::Fade);
}
void WKBundlePageSetTopOverhangImage(WKBundlePageRef pageRef, WKImageRef imageRef)
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameView.h>
#include <WebCore/HTMLFormElement.h>
-#include <WebCore/MainFrame.h>
#include <glib/gi18n-lib.h>
#include <wtf/NeverDestroyed.h>
#include <wtf/glib/WTFGType.h>
#import <WebCore/Frame.h>
#import <WebCore/HTMLFormElement.h>
#import <WebCore/HTMLInputElement.h>
-#import <WebCore/MainFrame.h>
#import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
using namespace WebCore;
#include <WebCore/ApplicationCache.h>
#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/CommonVM.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameView.h>
#include <WebCore/GCController.h>
#include <WebCore/JSDOMExceptionHandling.h>
#include <WebCore/JSDOMWindow.h>
#include <WebCore/JSNotification.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/PageGroup.h>
#include <WebCore/PrintContext.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/LegacyNSPasteboardTypes.h>
#import <WebCore/LocalizedStrings.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/MouseEvent.h>
#import <WebCore/PDFDocumentImage.h>
#import <WebCore/Page.h>
#include <WebCore/EventHandler.h>
#include <WebCore/EventNames.h>
#include <WebCore/FocusController.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoaderClient.h>
#include <WebCore/HTTPHeaderNames.h>
#include <WebCore/HostWindow.h>
#include <WebCore/MIMETypeRegistry.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/MouseEvent.h>
#include <WebCore/NetscapePlugInStreamLoader.h>
#include <WebCore/Page.h>
#include "WebProcessProxyMessages.h"
#include <WebCore/Document.h>
#include <WebCore/DocumentLoader.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/SubframeLoader.h>
#include <wtf/text/StringHash.h>
#include <WebCore/DocumentLoader.h>
#include <WebCore/FileChooser.h>
#include <WebCore/FileIconLoader.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameView.h>
#include <WebCore/HTMLParserIdioms.h>
#include <WebCore/HTMLPlugInImageElement.h>
#include <WebCore/Icon.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include <WebCore/ScriptController.h>
#include <WebCore/ContextMenu.h>
#include <WebCore/Editor.h>
#include <WebCore/Event.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include <WebCore/UserGestureIndicator.h>
#include <WebCore/DOMWrapperWorld.h>
#include <WebCore/DocumentLoader.h>
#include <WebCore/FormState.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameView.h>
#include <WebCore/HistoryController.h>
#include <WebCore/HistoryItem.h>
#include <WebCore/MIMETypeRegistry.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/MouseEvent.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include "DrawingArea.h"
#include "WebInspector.h"
#include "WebPage.h"
+#include <WebCore/Frame.h>
#include <WebCore/InspectorController.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/PageOverlayController.h>
#include <WebCore/Settings.h>
delete layer;
}
- if (m_paintRectOverlay && m_page->mainFrame())
- m_page->mainFrame()->pageOverlayController().uninstallPageOverlay(*m_paintRectOverlay, PageOverlay::FadeMode::Fade);
+ if (m_paintRectOverlay)
+ m_page->corePage()->pageOverlayController().uninstallPageOverlay(*m_paintRectOverlay, PageOverlay::FadeMode::Fade);
}
void WebInspectorClient::inspectedPageDestroyed()
if (!m_highlightOverlay) {
auto highlightOverlay = PageOverlay::create(*this);
m_highlightOverlay = highlightOverlay.ptr();
- m_page->mainFrame()->pageOverlayController().installPageOverlay(WTFMove(highlightOverlay), PageOverlay::FadeMode::Fade);
+ m_page->corePage()->pageOverlayController().installPageOverlay(WTFMove(highlightOverlay), PageOverlay::FadeMode::Fade);
m_highlightOverlay->setNeedsDisplay();
} else {
m_highlightOverlay->stopFadeOutAnimation();
void WebInspectorClient::hideHighlight()
{
#if !PLATFORM(IOS)
- if (m_highlightOverlay && m_page->mainFrame())
- m_page->mainFrame()->pageOverlayController().uninstallPageOverlay(*m_highlightOverlay, PageOverlay::FadeMode::Fade);
+ if (m_highlightOverlay)
+ m_page->corePage()->pageOverlayController().uninstallPageOverlay(*m_highlightOverlay, PageOverlay::FadeMode::Fade);
#else
m_page->hideInspectorHighlight();
#endif
if (!m_paintRectOverlay) {
m_paintRectOverlay = PageOverlay::create(*this, PageOverlay::OverlayType::Document);
- m_page->mainFrame()->pageOverlayController().installPageOverlay(*m_paintRectOverlay, PageOverlay::FadeMode::DoNotFade);
+ m_page->corePage()->pageOverlayController().installPageOverlay(*m_paintRectOverlay, PageOverlay::FadeMode::DoNotFade);
}
if (!m_paintIndicatorLayerClient)
#include <WebCore/Color.h>
#include <WebCore/Document.h>
#include <WebCore/DocumentLoader.h>
+#include <WebCore/Frame.h>
#include <WebCore/LoaderStrategy.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NetworkStorageSession.h>
#include <WebCore/Page.h>
#include <WebCore/PageGroup.h>
#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include <WebCore/Frame.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/ProgressTracker.h>
#import "WebPageProxyMessages.h"
#import <WebCore/DictionaryLookup.h>
#import <WebCore/Editor.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/TextIndicator.h>
#import <wtf/text/WTFString.h>
#import <WebCore/FrameView.h>
#import <WebCore/GraphicsContextCG.h>
#import <WebCore/LegacyWebArchive.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/NotImplemented.h>
#import <WebCore/Page.h>
#import <WebCore/Pasteboard.h>
#include "WebPage.h"
#include "WebPageCreationParameters.h"
#include "WebPreferencesKeys.h"
-#include <WebCore/MainFrame.h>
+#include <WebCore/Frame.h>
#include <WebCore/Page.h>
#include <WebCore/PageOverlayController.h>
#include <WebCore/Settings.h>
#include <WebCore/DOMWindow.h>
#include <WebCore/Document.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
#include <WebCore/GraphicsContext.h>
#include <WebCore/InspectorController.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NicosiaPaintingEngine.h>
#include <WebCore/Page.h>
#include <wtf/MemoryPressureHandler.h>
#include "DrawingArea.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
+#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/PageOverlayController.h>
#if USE(GLIB_EVENT_LOOP)
void CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged()
{
m_coordinator.deviceOrPageScaleFactorChanged();
- m_webPage.mainFrame()->pageOverlayController().didChangeDeviceScaleFactor();
+ m_webPage.corePage()->pageOverlayController().didChangeDeviceScaleFactor();
}
void CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged()
#include "AcceleratedSurface.h"
#include "WebPage.h"
+#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
-#include <WebCore/MainFrame.h>
namespace WebKit {
using namespace WebCore;
#include <WebCore/DocumentMarkerController.h>
#include <WebCore/FloatQuad.h>
#include <WebCore/FocusController.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameSelection.h>
#include <WebCore/FrameView.h>
#include <WebCore/GraphicsContext.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/PageOverlayController.h>
#include <WebCore/PlatformMouseEvent.h>
if (!shouldShowOverlay) {
if (m_findPageOverlay)
- m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(*m_findPageOverlay, PageOverlay::FadeMode::Fade);
+ m_webPage->corePage()->pageOverlayController().uninstallPageOverlay(*m_findPageOverlay, PageOverlay::FadeMode::Fade);
} else {
if (!m_findPageOverlay) {
auto findPageOverlay = PageOverlay::create(*this, PageOverlay::OverlayType::Document);
m_findPageOverlay = findPageOverlay.ptr();
- m_webPage->mainFrame()->pageOverlayController().installPageOverlay(WTFMove(findPageOverlay), PageOverlay::FadeMode::Fade);
+ m_webPage->corePage()->pageOverlayController().installPageOverlay(WTFMove(findPageOverlay), PageOverlay::FadeMode::Fade);
}
m_findPageOverlay->setNeedsDisplay();
}
{
m_findMatches.clear();
if (m_findPageOverlay)
- m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(*m_findPageOverlay, PageOverlay::FadeMode::Fade);
+ m_webPage->corePage()->pageOverlayController().uninstallPageOverlay(*m_findPageOverlay, PageOverlay::FadeMode::Fade);
if (auto* pluginView = WebPage::pluginViewForFrame(m_webPage->mainFrame()))
pluginView->findString(emptyString(), { }, 0);
#import "RemoteLayerBackingStoreCollection.h"
#import "RemoteLayerTreeTransaction.h"
#import "WebPage.h"
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <wtf/SetForScope.h>
#import <wtf/SystemTracing.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/InspectorController.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/PageOverlayController.h>
#import <WebCore/RenderLayerCompositor.h>
#import <WebCore/RenderView.h>
m_rootLayer->setShowDebugBorder(settings.showDebugBorders());
- if (MainFrame* mainFrame = m_webPage.mainFrame())
- DebugPageOverlays::settingsChanged(*mainFrame);
+ DebugPageOverlays::settingsChanged(*m_webPage.corePage());
}
#if PLATFORM(IOS)
#import "WebFrame.h"
#import "WebPage.h"
+#import <WebCore/Frame.h>
#import <WebCore/IntPoint.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/FrameView.h>
#import <WebCore/Page.h>
#import <WebCore/WAKAppKitStubs.h>
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
#include "WebProcessProxyMessages.h"
+#include <WebCore/Frame.h>
#include <WebCore/HistoryController.h>
#include <WebCore/HistoryItem.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/PageCache.h>
#include <wtf/HashMap.h>
#include <wtf/NeverDestroyed.h>
#include <WebCore/JSElement.h>
#include <WebCore/JSFile.h>
#include <WebCore/JSRange.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NodeTraversal.h>
#include <WebCore/Page.h>
#include <WebCore/PluginDocument.h>
#include "WebProcess.h"
#include <WebCore/Chrome.h>
#include <WebCore/Document.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameView.h>
#include <WebCore/InspectorController.h>
#include <WebCore/InspectorFrontendClient.h>
#include <WebCore/InspectorPageAgent.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NavigationAction.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include "WebInspectorFrontendAPIDispatcher.h"
#include "WebPage.h"
-#include <WebCore/MainFrame.h>
+#include <WebCore/Frame.h>
#include <WebCore/ScriptController.h>
#include <WebCore/ScriptState.h>
#include <WebCore/File.h>
#include <WebCore/FocusController.h>
#include <WebCore/FormState.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoaderTypes.h>
#include <WebCore/FrameView.h>
#include <WebCore/JSDOMWindow.h>
#include <WebCore/KeyboardEvent.h>
#include <WebCore/MIMETypeRegistry.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/MouseEvent.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
send(Messages::WebPageProxy::SetCanShortCircuitHorizontalWheelEvents(m_canShortCircuitHorizontalWheelEvents));
}
-MainFrame* WebPage::mainFrame() const
+Frame* WebPage::mainFrame() const
{
return m_page ? &m_page->mainFrame() : nullptr;
}
layoutIfNeeded();
- MainFrame& mainFrame = corePage()->mainFrame();
+ auto& mainFrame = corePage()->mainFrame();
if (!mainFrame.view())
return;
if (!mainFrame.view()->renderView())
bool WebPage::plugInIntersectsSearchRect(HTMLPlugInImageElement& plugInImageElement)
{
- MainFrame& mainFrame = corePage()->mainFrame();
+ auto& mainFrame = corePage()->mainFrame();
if (!mainFrame.view())
return false;
if (!mainFrame.view()->renderView())
WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
- WebCore::MainFrame* mainFrame() const; // May return nullptr.
+ WebCore::Frame* mainFrame() const; // May return nullptr.
WebCore::FrameView* mainFrameView() const; // May return nullptr.
RefPtr<WebCore::Range> currentSelectionAsRange();
#include "WebPage.h"
#include <WebCore/AXObjectCache.h>
#include <WebCore/Document.h>
-#include <WebCore/MainFrame.h>
+#include <WebCore/Frame.h>
#include <WebCore/Page.h>
using namespace WebKit;
#import "WebPageProxyMessages.h"
#import <WebCore/Editor.h>
#import <WebCore/FocusController.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/GraphicsContext.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/PageOverlayController.h>
#import <WebCore/PathUtilities.h>
bool FindController::updateFindIndicator(Frame& selectedFrame, bool isShowingOverlay, bool shouldAnimate)
{
if (m_findIndicatorOverlay) {
- m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(*m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
+ m_webPage->corePage()->pageOverlayController().uninstallPageOverlay(*m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
m_findIndicatorOverlay = nullptr;
m_isShowingFindIndicator = false;
}
m_findIndicatorOverlayClient = std::make_unique<FindIndicatorOverlayClientIOS>(selectedFrame, textIndicator.get());
m_findIndicatorOverlay = PageOverlay::create(*m_findIndicatorOverlayClient, PageOverlay::OverlayType::Document);
- m_webPage->mainFrame()->pageOverlayController().installPageOverlay(*m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
+ m_webPage->corePage()->pageOverlayController().installPageOverlay(*m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
m_findIndicatorOverlay->setFrame(enclosingIntRect(textIndicator->textBoundingRectInRootViewCoordinates()));
m_findIndicatorOverlay->setNeedsDisplay();
if (!m_isShowingFindIndicator)
return;
- m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(*m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
+ m_webPage->corePage()->pageOverlayController().uninstallPageOverlay(*m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
m_findIndicatorOverlay = nullptr;
m_isShowingFindIndicator = false;
m_foundStringMatchIndex = -1;
#import <WebCore/HitTestResult.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/LibWebRTCProvider.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/MediaSessionManagerIOS.h>
#import <WebCore/Node.h>
#import <WebCore/NodeList.h>
#import "WebProcess.h"
#import <QuartzCore/QuartzCore.h>
#import <WebCore/DebugPageOverlays.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/GraphicsContext.h>
#import <WebCore/GraphicsLayerCA.h>
#import <WebCore/InspectorController.h>
#import <WebCore/MachSendRight.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformCAAnimationCocoa.h>
#import <WebCore/RenderLayerBacking.h>
// in order to be scrolled by the ScrollingCoordinator.
settings.setAcceleratedCompositingForFixedPositionEnabled(true);
- if (MainFrame* mainFrame = m_webPage.mainFrame())
- DebugPageOverlays::settingsChanged(*mainFrame);
+ DebugPageOverlays::settingsChanged(*m_webPage.corePage());
bool showTiledScrollingIndicator = settings.showTiledScrollingIndicator();
if (showTiledScrollingIndicator == !!m_debugInfoLayer)
#import "WKStringCF.h"
#import <WebCore/AXObjectCache.h>
#import <WebCore/Document.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/ScrollView.h>
#import <WebCore/Scrollbar.h>
#import "WKString.h"
#import "WKStringCF.h"
#import <WebCore/AXObjectCache.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/PageOverlayController.h>
#import <WebCore/ScrollView.h>
- (NSArray *)accessibilityParameterizedAttributeNames
{
- Vector<String> result = m_page->mainFrame()->pageOverlayController().copyAccessibilityAttributesNames(true);
+ Vector<String> result = m_page->corePage()->pageOverlayController().copyAccessibilityAttributesNames(true);
if (result.isEmpty())
return nil;
if ([attribute isEqualToString:@"AXDataDetectorExistsAtPoint"] || [attribute isEqualToString:@"AXDidShowDataDetectorMenuAtPoint"]) {
bool value;
- if (!m_page->mainFrame()->pageOverlayController().copyAccessibilityAttributeBoolValueForPoint(attribute, pageOverlayPoint, value))
+ if (!m_page->corePage()->pageOverlayController().copyAccessibilityAttributeBoolValueForPoint(attribute, pageOverlayPoint, value))
return nil;
return [NSNumber numberWithBool:value];
}
if ([attribute isEqualToString:@"AXDataDetectorTypeAtPoint"]) {
String value;
- if (!m_page->mainFrame()->pageOverlayController().copyAccessibilityAttributeStringValueForPoint(attribute, pageOverlayPoint, value))
+ if (!m_page->corePage()->pageOverlayController().copyAccessibilityAttributeStringValueForPoint(attribute, pageOverlayPoint, value))
return nil;
return [NSString stringWithString:value];
}
#import <WebCore/Editor.h>
#import <WebCore/EventHandler.h>
#import <WebCore/FocusController.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameView.h>
#import <WebCore/GraphicsContext.h>
#import <WebCore/HitTestResult.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/MIMETypeRegistry.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/NetworkStorageSession.h>
#import <WebCore/NodeRenderStyle.h>
#import <WebCore/Page.h>
{
layoutIfNeeded();
- MainFrame& mainFrame = corePage()->mainFrame();
+ auto& mainFrame = corePage()->mainFrame();
if (!mainFrame.view() || !mainFrame.view()->renderView()) {
send(Messages::WebPageProxy::DidPerformImmediateActionHitTest(WebHitTestResultData(), false, UserData()));
return;
}
bool pageOverlayDidOverrideDataDetectors = false;
- for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ for (const auto& overlay : corePage()->pageOverlayController().pageOverlays()) {
WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay);
if (!webOverlay)
continue;
void WebPage::dataDetectorsDidPresentUI(PageOverlay::PageOverlayID overlayID)
{
- MainFrame& mainFrame = corePage()->mainFrame();
- for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ for (const auto& overlay : corePage()->pageOverlayController().pageOverlays()) {
if (overlay->pageOverlayID() == overlayID) {
if (WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay))
webOverlay->dataDetectorsDidPresentUI();
void WebPage::dataDetectorsDidChangeUI(PageOverlay::PageOverlayID overlayID)
{
- MainFrame& mainFrame = corePage()->mainFrame();
- for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ for (const auto& overlay : corePage()->pageOverlayController().pageOverlays()) {
if (overlay->pageOverlayID() == overlayID) {
if (WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay))
webOverlay->dataDetectorsDidChangeUI();
void WebPage::dataDetectorsDidHideUI(PageOverlay::PageOverlayID overlayID)
{
- MainFrame& mainFrame = corePage()->mainFrame();
+ auto& mainFrame = corePage()->mainFrame();
// Dispatching a fake mouse event will allow clients to display any UI that is normally displayed on hover.
mainFrame.eventHandler().dispatchFakeMouseMoveEventSoon();
- for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ for (const auto& overlay : corePage()->pageOverlayController().pageOverlays()) {
if (overlay->pageOverlayID() == overlayID) {
if (WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay))
webOverlay->dataDetectorsDidHideUI();
#include <WebCore/GlyphPage.h>
#include <WebCore/HTMLMediaElement.h>
#include <WebCore/JSDOMWindow.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/MemoryCache.h>
#include <WebCore/MemoryRelease.h>
#include <WebCore/MessagePort.h>
#include "WebProcess.h"
#include <WebCore/DOMWindow.h>
#include <WebCore/Document.h>
-#include <WebCore/MainFrame.h>
+#include <WebCore/Frame.h>
#include <WebCore/Page.h>
#include <WebCore/PageGroup.h>
#include <WebCore/SecurityOriginData.h>
+2018-04-03 Chris Dumez <cdumez@apple.com>
+
+ Drop MainFrame class
+ https://bugs.webkit.org/show_bug.cgi?id=184191
+
+ Reviewed by Darin Adler.
+
+ Drop MainFrame class and move contents into Page / Frame since there is a 1:1
+ relationship between the Page and the MainFrame.
+
+ This is ground work for introducing LocalFrame / RemoteFrame concepts.
+
+ * WebCoreSupport/WebDragClient.mm:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebCoreSupport/WebInspectorClient.mm:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ * WebCoreSupport/WebPluginInfoProvider.mm:
+ * WebView/WebFrame.mm:
+ * WebView/WebFrameView.mm:
+ * WebView/WebHTMLView.mm:
+ * WebView/WebView.mm:
+
2018-04-02 Jer Noble <jer.noble@apple.com>
Enable Legacy EME for all WebKit & WebKitLegacy clients
#import <WebCore/EditorClient.h>
#import <WebCore/EventHandler.h>
#import <WebCore/FloatPoint.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/Image.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/Pasteboard.h>
#import <WebCore/PasteboardWriter.h>
#import <WebCore/EventNames.h>
#import <WebCore/FocusController.h>
#import <WebCore/FormState.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameLoaderStateMachine.h>
#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/HitTestResult.h>
#import <WebCore/LoaderNSURLExtras.h>
#import <WebCore/MIMETypeRegistry.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/MouseEvent.h>
#import <WebCore/Page.h>
#import <WebCore/PluginBlacklist.h>
#import "WebUIDelegatePrivate.h"
#import "WebViewInternal.h"
#import <JavaScriptCore/InspectorAgentBase.h>
+#import <WebCore/Frame.h>
#import <WebCore/InspectorController.h>
#import <WebCore/InspectorFrontendClient.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/ScriptController.h>
#import <WebKitLegacy/DOMExtensions.h>
#import "WebResourceLoadScheduler.h"
#import <WebCore/BlobRegistryImpl.h>
#import <WebCore/Color.h>
-#import <WebCore/MainFrame.h>
+#import <WebCore/Frame.h>
#import <WebCore/NetworkStorageSession.h>
#import <WebCore/PasteboardItemInfo.h>
#import <WebCore/PlatformCookieJar.h>
#import "WebPluginDatabase.h"
#import "WebPluginPackage.h"
+#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/SubframeLoader.h>
#import <wtf/BlockObjCExceptions.h>
#import <WebCore/Editor.h>
#import <WebCore/EventHandler.h>
#import <WebCore/EventNames.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameLoadRequest.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameLoaderStateMachine.h>
#import <WebCore/JSNode.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/MIMETypeRegistry.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformEventFactoryMac.h>
#import <WebCore/PluginData.h>
#import <Foundation/NSURLRequest.h>
#import <WebCore/GraphicsContext.h>
#import <WebCore/KeyEventCodesIOS.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/WAKClipView.h>
#import <WebCore/WAKScrollView.h>
#import <WebCore/WAKWindow.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/LocalizedStrings.h>
#import <WebCore/MIMETypeRegistry.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/PrintContext.h>
#import <WebCore/Range.h>
#import <WebCore/FileSystem.h>
#import <WebCore/FocusController.h>
#import <WebCore/FontCache.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameSelection.h>
#import <WebCore/FrameTree.h>
#import <WebCore/LocalizedStrings.h>
#import <WebCore/LogInitialization.h>
#import <WebCore/MIMETypeRegistry.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/MemoryCache.h>
#import <WebCore/MemoryRelease.h>
#import <WebCore/NavigationPolicyCheck.h>
+2018-04-03 Chris Dumez <cdumez@apple.com>
+
+ Drop MainFrame class
+ https://bugs.webkit.org/show_bug.cgi?id=184191
+
+ Reviewed by Darin Adler.
+
+ Drop MainFrame class and move contents into Page / Frame since there is a 1:1
+ relationship between the Page and the MainFrame.
+
+ This is ground work for introducing LocalFrame / RemoteFrame concepts.
+
+ * WebCoreSupport/AcceleratedCompositingContext.cpp:
+ * WebCoreSupport/WebContextMenuClient.cpp:
+ * WebCoreSupport/WebDragClient.cpp:
+ * WebDropSource.cpp:
+ * WebFrame.cpp:
+ * WebView.cpp:
+
2018-03-26 Chris Dumez <cdumez@apple.com>
Use SecurityOriginData more consistently in Service Worker code
#include <WebCore/FrameView.h>
#include <WebCore/GraphicsLayerTextureMapper.h>
#include <WebCore/HWndDC.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/Settings.h>
#include <WebCore/SystemInfo.h>
#include <WebCore/ContextMenuController.h>
#include <WebCore/Editor.h>
#include <WebCore/Event.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
#include <WebCore/ResourceRequest.h>
#include <WebCore/DragData.h>
#include <WebCore/DragItem.h>
#include <WebCore/EventHandler.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
#include <WebCore/GraphicsContext.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/Pasteboard.h>
#include <WebCore/PlatformMouseEvent.h>
#include <WebCore/Cursor.h>
#include <WebCore/DragActions.h>
#include <WebCore/EventHandler.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/Page.h>
#include <WebCore/PlatformMouseEvent.h>
#include <WebCore/Event.h>
#include <WebCore/EventHandler.h>
#include <WebCore/FormState.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameTree.h>
#include <WebCore/JSDOMWindow.h>
#include <WebCore/KeyboardEvent.h>
#include <WebCore/MIMETypeRegistry.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/MemoryCache.h>
#include <WebCore/MouseRelatedEvent.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/FloatQuad.h>
#include <WebCore/FocusController.h>
#include <WebCore/Font.h>
+#include <WebCore/Frame.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameSelection.h>
#include <WebCore/FrameTree.h>
#include <WebCore/LogInitialization.h>
#include <WebCore/Logging.h>
#include <WebCore/MIMETypeRegistry.h>
-#include <WebCore/MainFrame.h>
#include <WebCore/MemoryCache.h>
#include <WebCore/MemoryRelease.h>
#include <WebCore/NavigationPolicyCheck.h>
+2018-04-03 Chris Dumez <cdumez@apple.com>
+
+ Drop MainFrame class
+ https://bugs.webkit.org/show_bug.cgi?id=184191
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
+
2018-04-03 Charlie Turner <cturner@igalia.com>
[WPE] Add WPE port to garden-o-matic
#import "PlatformUtilities.h"
#import <JavaScriptCore/InitializeThreading.h>
-#import <WebKit/WebView.h>
+#import <WebCore/Frame.h>
#import <WebCore/FrameLoadRequest.h>
-#import <WebCore/MainFrame.h>
#import <WebCore/Page.h>
#import <WebCore/PageConfiguration.h>
#import <WebCore/Document.h>
#import <WebCore/SubresourceLoader.h>
#import <WebCore/WebCoreNSURLSession.h>
#import <WebCore/ResourceLoader.h>
+#import <WebKit/WebView.h>
#import <wtf/SchedulePair.h>
static bool didLoadMainResource;