Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationScheduler.h
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Jul 2017 21:26:31 +0000 (21:26 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Jul 2017 21:26:31 +0000 (21:26 +0000)
commit3bd047a9085fa6c8e574a3a1280cbe38590b790a
treea418d7b1e9c5db3c85f87ffb9a6500376aec85ca
parentdf8f91c8a341cce3445b001dcf2308dffbee7d05
Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationScheduler.h
https://bugs.webkit.org/show_bug.cgi?id=174004

Reviewed by Simon Fraser.

Source/WebCore:

Made FrameLoader and NavigationScheduler UniqueRef in Frame so that we can forward declare them,
and forward declared IntPoint and IntRect to avoid including FrameLoader.h, IntRect.h,
and NavigationScheduler.h in Frame.h

* Modules/mediastream/MediaStream.cpp:
* Modules/webaudio/AudioContext.cpp:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Avoid calling loader().mixedContentChecker().canRunInsecureContent(~)
on a nullptr even though this used to work because we weren't de-referencing it.
* bindings/js/ScriptController.cpp:
* dom/Document.cpp:
* dom/EventDispatcher.cpp:
* editing/Editor.cpp:
* editing/cocoa/EditorCocoa.mm:
* editing/ios/EditorIOS.mm:
* editing/mac/EditorMac.mm:
* history/CachedPage.cpp:
* html/HTMLObjectElement.cpp:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::DocumentLoader::~DocumentLoader): Check !isLoading() before accessing frameLoader to avoid
accessing m_frame->loader() inside ~FrameLoader.
* html/parser/XSSAuditor.cpp:
* html/parser/XSSAuditorDelegate.cpp:
* inspector/InspectorInstrumentation.h:
* loader/CrossOriginPreflightChecker.cpp:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setOpener): Avoid accessing this FrameLoader via m_opener->loader() when it's
this FrameLoader inside ~FrameLoader since UniqueRef<FrameLoader> is clears itself before calling
the destructor of FrameLoader.
* loader/ImageLoader.cpp:
* loader/LinkLoader.cpp:
* loader/SubframeLoader.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/appcache/DOMApplicationCache.cpp:
* mathml/MathMLElement.cpp:
* page/DOMWindow.cpp:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::init): Moved here from Frame.h
(WebCore::Frame::setDocument):
* page/Frame.h:
(WebCore::Frame::loader):
(WebCore::Frame::navigationScheduler):
* page/History.cpp:
* page/Location.cpp:
* page/PerformanceLogging.cpp:
* page/PerformanceNavigation.cpp:
* page/UserContentProvider.cpp:
* page/ios/FrameIOS.mm:
(WebCore::Frame::initWithSimpleHTMLDocument):
* plugins/PluginInfoProvider.cpp:
* replay/ReplayInputCreationMethods.cpp:
* replay/UserInputBridge.cpp:
* xml/XSLTProcessorLibxslt.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit/mac:

* WebCoreSupport/WebPluginInfoProvider.mm:

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::transitionToCommittedForNewPage):

Source/WebKit2:

* WebProcess/Plugins/WebPluginInfoProvider.cpp:
* WebProcess/WebPage/WebInspector.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
50 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaStream.cpp
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/cocoa/EditorCocoa.mm
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/history/CachedPage.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/parser/HTMLDocumentParser.cpp
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/html/parser/XSSAuditorDelegate.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/loader/CrossOriginPreflightChecker.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/LinkLoader.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/loader/appcache/DOMApplicationCache.cpp
Source/WebCore/mathml/MathMLElement.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/page/History.cpp
Source/WebCore/page/Location.cpp
Source/WebCore/page/PerformanceLogging.cpp
Source/WebCore/page/PerformanceNavigation.cpp
Source/WebCore/page/UserContentProvider.cpp
Source/WebCore/page/ios/FrameIOS.mm
Source/WebCore/plugins/PluginInfoProvider.cpp
Source/WebCore/replay/ReplayInputCreationMethods.cpp
Source/WebCore/replay/UserInputBridge.cpp
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebPluginInfoProvider.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.cpp
Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
Source/WebKit2/WebProcess/WebPage/WebInspector.cpp
Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp