Currently, the class MainResourceLoader is accessible via DocumentLoader::mainResourceLoader(). As a part of merging MainResourceLoader into DocumentLoader, we need to do something with this function. Many of the uses of DocumentLoader::mainResourceLoader() would be satisfied by making it return the ResourceLoader that is loading the main resource, rather than the MainResourceLoader (see why we want to delete MainResourceLoader?) However, at least temporarily, PluginDocument and MediaDocument need to be able to access the main resource's CachedResource so that they can disable buffering in the cache layer, so we'll need to expose that, too. In addition, the class MainResourceLoader is exposed to the WebKit layer via FrameLoaderClient::convertMainResourceLoadToDownload. This should probably take a DocumentLoader* instead.
Created attachment 193195 [details] patch
Comment on attachment 193195 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=193195&action=review > Source/WebCore/loader/DocumentLoader.cpp:126 > +ResourceLoader* DocumentLoader::mainResourceLoader() const > +{ > + return m_mainResourceLoader ? m_mainResourceLoader->loader() : 0; > +} Nate tells me this slight nuttiness is going to be short-lived.
(In reply to comment #2) > (From update of attachment 193195 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=193195&action=review > > > Source/WebCore/loader/DocumentLoader.cpp:126 > > +ResourceLoader* DocumentLoader::mainResourceLoader() const > > +{ > > + return m_mainResourceLoader ? m_mainResourceLoader->loader() : 0; > > +} > > Nate tells me this slight nuttiness is going to be short-lived. Yeah, sadly it has going to be there temporarily unless I did this merger as a 150KB monster patch. Hopefully a week or less, we'll see.
Comment on attachment 193195 [details] patch Clearing flags on attachment: 193195 Committed r145914: <http://trac.webkit.org/changeset/145914>
All reviewed patches have been landed. Closing bug.