Title: [155194] trunk/Source
Revision
155194
Author
[email protected]
Date
2013-09-06 10:23:03 -0700 (Fri, 06 Sep 2013)

Log Message

FrameLoader::subresourceLoader() should return a reference.
<https://webkit.org/b/120830>

Reviewed by Anders Carlsson.

There is always a SubresourceLoader, so this method could never return null.
Also made m_subresourceLoader an OwnPtr to reduce header dependencies.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (155193 => 155194)


--- trunk/Source/WebCore/ChangeLog	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/ChangeLog	2013-09-06 17:23:03 UTC (rev 155194)
@@ -1,3 +1,13 @@
+2013-09-06  Andreas Kling  <[email protected]>
+
+        FrameLoader::subresourceLoader() should return a reference.
+        <https://webkit.org/b/120830>
+
+        Reviewed by Anders Carlsson.
+
+        There is always a SubresourceLoader, so this method could never return null.
+        Also made m_subresourceLoader an OwnPtr to reduce header dependencies.
+
 2013-09-06  Chris Fleizach  <[email protected]>
 
         AX: aria-relevant does not expose AXARIARelevant

Modified: trunk/Source/WebCore/dom/DOMImplementation.cpp (155193 => 155194)


--- trunk/Source/WebCore/dom/DOMImplementation.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/dom/DOMImplementation.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -50,6 +50,7 @@
 #include "SecurityOrigin.h"
 #include "Settings.h"
 #include "StyleSheetContents.h"
+#include "SubframeLoader.h"
 #include "TextDocument.h"
 #include "ThreadGlobalData.h"
 #include "XMLNames.h"
@@ -341,7 +342,7 @@
     PluginData* pluginData = 0;
     PluginData::AllowedPluginTypes allowedPluginTypes = PluginData::OnlyApplicationPlugins;
     if (frame && frame->page()) {
-        if (frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        if (frame->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
             allowedPluginTypes = PluginData::AllPlugins;
 
         pluginData = &frame->page()->pluginData();

Modified: trunk/Source/WebCore/history/PageCache.cpp (155193 => 155194)


--- trunk/Source/WebCore/history/PageCache.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/history/PageCache.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -48,6 +48,7 @@
 #include "Page.h"
 #include "Settings.h"
 #include "SharedWorkerRepository.h"
+#include "SubframeLoader.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringConcatenate.h>
@@ -110,7 +111,7 @@
         PCLOG("   -Frame is an error page");
         rejectReasons |= 1 << IsErrorPage;
     }
-    if (frame->loader().subframeLoader()->containsPlugins() && !frame->page()->settings().pageCacheSupportsPlugins()) {
+    if (frame->loader().subframeLoader().containsPlugins() && !frame->page()->settings().pageCacheSupportsPlugins()) {
         PCLOG("   -Frame contains plugins");
         rejectReasons |= 1 << HasPlugins;
     }
@@ -316,7 +317,7 @@
         && documentLoader->mainDocumentError().isNull()
         // Do not cache error pages (these can be recognized as pages with substitute data or unreachable URLs).
         && !(documentLoader->substituteData().isValid() && !documentLoader->substituteData().failingURL().isEmpty())
-        && (!frameLoader.subframeLoader()->containsPlugins() || frame->page()->settings().pageCacheSupportsPlugins())
+        && (!frameLoader.subframeLoader().containsPlugins() || frame->page()->settings().pageCacheSupportsPlugins())
         && (!document->url().protocolIs("https") || (!documentLoader->response().cacheControlContainsNoCache() && !documentLoader->response().cacheControlContainsNoStore()))
         && (!document->domWindow() || !document->domWindow()->hasEventListeners(eventNames().unloadEvent))
 #if ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebCore/html/HTMLAppletElement.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLAppletElement.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLAppletElement.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -33,6 +33,7 @@
 #include "RenderApplet.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 #include "Widget.h"
 
 namespace WebCore {
@@ -159,7 +160,7 @@
     Frame* frame = document().frame();
     ASSERT(frame);
 
-    renderer->setWidget(frame->loader().subframeLoader()->createJavaAppletWidget(roundedIntSize(LayoutSize(contentWidth, contentHeight)), this, paramNames, paramValues));
+    renderer->setWidget(frame->loader().subframeLoader().createJavaAppletWidget(roundedIntSize(LayoutSize(contentWidth, contentHeight)), this, paramNames, paramValues));
 }
 
 bool HTMLAppletElement::canEmbedJava() const

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -54,6 +54,7 @@
 #include "ScriptEventListener.h"
 #include "Settings.h"
 #include "StylePropertySet.h"
+#include "SubframeLoader.h"
 #include "Text.h"
 #include "TextIterator.h"
 #include "XMLNames.h"
@@ -759,7 +760,7 @@
             return false;
     } else if (hasLocalName(noembedTag)) {
         Frame* frame = document().frame();
-        if (frame && frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        if (frame && frame->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
             return false;
     }
     return StyledElement::rendererIsNeeded(style);

Modified: trunk/Source/WebCore/html/HTMLEmbedElement.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLEmbedElement.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLEmbedElement.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -37,6 +37,7 @@
 #include "RenderEmbeddedObject.h"
 #include "RenderWidget.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 #include <wtf/Ref.h>
 
 namespace WebCore {
@@ -169,9 +170,9 @@
     if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
         return;
 
-    SubframeLoader* loader = document().frame()->loader().subframeLoader();
+    SubframeLoader& loader = document().frame()->loader().subframeLoader();
     // FIXME: beforeLoad could have detached the renderer!  Just like in the <object> case above.
-    loader->requestObject(this, m_url, getNameAttribute(), m_serviceType, paramNames, paramValues);
+    loader.requestObject(this, m_url, getNameAttribute(), m_serviceType, paramNames, paramValues);
 }
 
 bool HTMLEmbedElement::rendererIsNeeded(const RenderStyle& style)

Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -39,6 +39,7 @@
 #include "ScriptController.h"
 #include "ScriptEventListener.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 
 namespace WebCore {
 
@@ -86,7 +87,7 @@
     if (!parentFrame)
         return;
 
-    parentFrame->loader().subframeLoader()->requestFrame(this, m_URL, m_frameName, lockHistory, lockBackForwardList);
+    parentFrame->loader().subframeLoader().requestFrame(this, m_URL, m_frameName, lockHistory, lockBackForwardList);
     if (contentFrame())
         contentFrame()->setInViewSourceMode(viewSourceMode());
 }

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -4362,7 +4362,7 @@
     
     // Hang onto the proxy widget so it won't be destroyed if the plug-in is set to
     // display:none
-    m_proxyWidget = frame->loader().subframeLoader()->loadMediaPlayerProxyPlugin(this, url, paramNames, paramValues);
+    m_proxyWidget = frame->loader().subframeLoader().loadMediaPlayerProxyPlugin(this, url, paramNames, paramValues);
     if (m_proxyWidget)
         m_needWidgetUpdate = false;
 }
@@ -4378,8 +4378,8 @@
 
     mediaElement->getPluginProxyParams(kurl, paramNames, paramValues);
     // FIXME: What if document().frame() is 0?
-    SubframeLoader* loader = document().frame()->loader().subframeLoader();
-    loader->loadMediaPlayerProxyPlugin(mediaElement, kurl, paramNames, paramValues);
+    SubframeLoader& loader = document().frame()->loader().subframeLoader();
+    loader.loadMediaPlayerProxyPlugin(mediaElement, kurl, paramNames, paramValues);
 }
 
 #endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)

Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLObjectElement.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -50,6 +50,7 @@
 #include "RenderWidget.h"
 #include "ScriptEventListener.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 #include "Text.h"
 #include "Widget.h"
 #include <wtf/Ref.h>
@@ -206,8 +207,8 @@
     // resource's URL to be given by a param named "src", "movie", "code" or "url"
     // if we know that resource points to a plug-in.
     if (url.isEmpty() && !urlParameter.isEmpty()) {
-        SubframeLoader* loader = document().frame()->loader().subframeLoader();
-        if (loader->resourceWillUsePlugin(urlParameter, serviceType, shouldPreferPlugInsForImages()))
+        SubframeLoader& loader = document().frame()->loader().subframeLoader();
+        if (loader.resourceWillUsePlugin(urlParameter, serviceType, shouldPreferPlugInsForImages()))
             url = ""
     }
 }
@@ -316,8 +317,8 @@
     if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
         return;
 
-    SubframeLoader* loader = document().frame()->loader().subframeLoader();
-    bool success = beforeLoadAllowedLoad && hasValidClassId() && loader->requestObject(this, url, getNameAttribute(), serviceType, paramNames, paramValues);
+    SubframeLoader& loader = document().frame()->loader().subframeLoader();
+    bool success = beforeLoadAllowedLoad && hasValidClassId() && loader.requestObject(this, url, getNameAttribute(), serviceType, paramNames, paramValues);
     if (!success && fallbackContent)
         renderFallbackContent();
 }

Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -48,6 +48,7 @@
 #include "Settings.h"
 #include "ShadowRoot.h"
 #include "StyleResolver.h"
+#include "SubframeLoader.h"
 #include <_javascript_Core/APICast.h>
 #include <_javascript_Core/JSBase.h>
 #include <wtf/HashMap.h>
@@ -451,7 +452,7 @@
         return;
 
     for (Frame* frame = &document().page()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-        if (!frame->loader().subframeLoader()->containsPlugins())
+        if (!frame->loader().subframeLoader().containsPlugins())
             continue;
         
         if (!frame->document())

Modified: trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp (155193 => 155194)


--- trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -31,6 +31,7 @@
 #include "FrameLoader.h"
 #include "ScriptController.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 
 namespace WebCore {
 
@@ -38,7 +39,7 @@
 {
     Frame* frame = document ? document->frame() : 0;
     scriptEnabled = frame && frame->script().canExecuteScripts(NotAboutToExecuteScript);
-    pluginsEnabled = frame && frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
+    pluginsEnabled = frame && frame->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin);
 
     Settings* settings = document ? document->settings() : 0;
     usePreHTML5ParserQuirks = settings && settings->usePreHTML5ParserQuirks();

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (155193 => 155194)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -104,6 +104,7 @@
 #include "SegmentedString.h"
 #include "SerializedScriptValue.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 #include "TextResourceDecoder.h"
 #include "WindowFeatures.h"
 #include "XMLDocumentParser.h"
@@ -216,7 +217,7 @@
     , m_policyChecker(adoptPtr(new PolicyChecker(&frame)))
     , m_history(adoptPtr(new HistoryController(frame)))
     , m_notifer(&frame)
-    , m_subframeLoader(&frame)
+    , m_subframeLoader(adoptPtr(new SubframeLoader(&frame)))
     , m_icon(adoptPtr(new IconController(&frame)))
     , m_mixedContentChecker(&frame)
     , m_state(FrameStateProvisional)
@@ -600,7 +601,7 @@
     // as some destructors might still try to access the document.
     m_frame.setDocument(0);
 
-    m_subframeLoader.clear();
+    subframeLoader().clear();
 
     if (clearScriptObjects)
         m_frame.script().clearScriptObjects();

Modified: trunk/Source/WebCore/loader/FrameLoader.h (155193 => 155194)


--- trunk/Source/WebCore/loader/FrameLoader.h	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/loader/FrameLoader.h	2013-09-06 17:23:03 UTC (rev 155194)
@@ -41,7 +41,6 @@
 #include "ResourceHandleTypes.h"
 #include "ResourceLoadNotifier.h"
 #include "SecurityContext.h"
-#include "SubframeLoader.h"
 #include "Timer.h"
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
@@ -54,6 +53,7 @@
 class CachedResource;
 class Chrome;
 class DOMWrapperWorld;
+class Document;
 class DocumentLoader;
 class Event;
 class FormState;
@@ -74,6 +74,7 @@
 class SecurityOrigin;
 class SerializedScriptValue;
 class StringWithDirection;
+class SubframeLoader;
 class SubstituteData;
 
 struct FrameLoadRequest;
@@ -94,7 +95,7 @@
     PolicyChecker* policyChecker() const { return m_policyChecker.get(); }
     HistoryController& history() const { return *m_history; }
     ResourceLoadNotifier* notifier() const { return &m_notifer; }
-    SubframeLoader* subframeLoader() const { return &m_subframeLoader; }
+    SubframeLoader& subframeLoader() const { return *m_subframeLoader; }
     IconController* icon() const { return m_icon.get(); }
     MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChecker; }
 
@@ -388,7 +389,7 @@
     OwnPtr<PolicyChecker> m_policyChecker;
     const OwnPtr<HistoryController> m_history;
     mutable ResourceLoadNotifier m_notifer;
-    mutable SubframeLoader m_subframeLoader;
+    const OwnPtr<SubframeLoader> m_subframeLoader;
     mutable FrameLoaderStateMachine m_stateMachine;
     OwnPtr<IconController> m_icon;
     mutable MixedContentChecker m_mixedContentChecker;

Modified: trunk/Source/WebCore/page/Frame.h (155193 => 155194)


--- trunk/Source/WebCore/page/Frame.h	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/page/Frame.h	2013-09-06 17:23:03 UTC (rev 155194)
@@ -61,6 +61,7 @@
     class FrameDestructionObserver;
     class FrameSelection;
     class FrameView;
+    class HTMLFrameOwnerElement;
     class HTMLTableCellElement;
     class IntRect;
     class Node;
@@ -72,6 +73,7 @@
     class Settings;
     class TiledBackingStore;
     class VisiblePosition;
+    class Widget;
 
 #if !USE(TILED_BACKING_STORE)
     class TiledBackingStoreClient { };

Modified: trunk/Source/WebCore/page/Page.cpp (155193 => 155194)


--- trunk/Source/WebCore/page/Page.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/page/Page.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -80,6 +80,7 @@
 #include "StorageArea.h"
 #include "StorageNamespace.h"
 #include "StyleResolver.h"
+#include "SubframeLoader.h"
 #include "TextResourceDecoder.h"
 #include "VisitedLinkState.h"
 #include "VoidCallback.h"
@@ -501,7 +502,7 @@
             continue;
         
         for (Frame* frame = &page.mainFrame(); frame; frame = frame->tree().traverseNext()) {
-            if (frame->loader().subframeLoader()->containsPlugins())
+            if (frame->loader().subframeLoader().containsPlugins())
                 framesNeedingReload.append(*frame);
         }
     }

Modified: trunk/Source/WebCore/plugins/DOMMimeType.cpp (155193 => 155194)


--- trunk/Source/WebCore/plugins/DOMMimeType.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebCore/plugins/DOMMimeType.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -26,6 +26,7 @@
 #include "Page.h"
 #include "PluginData.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
@@ -66,7 +67,7 @@
 
 PassRefPtr<DOMPlugin> DOMMimeType::enabledPlugin() const
 {
-    if (!m_frame || !m_frame->page() || !m_frame->page()->mainFrame().loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+    if (!m_frame || !m_frame->page() || !m_frame->page()->mainFrame().loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
         return 0;
 
     return DOMPlugin::create(m_pluginData.get(), m_frame, m_pluginData->mimePluginIndices()[m_index]);

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm (155193 => 155194)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm	2013-09-06 17:23:03 UTC (rev 155194)
@@ -34,6 +34,7 @@
 #import <WebCore/PageGroup.h>
 #import <WebCore/PlatformCookieJar.h>
 #import <WebCore/PlatformPasteboard.h>
+#import <WebCore/SubframeLoader.h>
 #import <WebKitSystemInterface.h>
 
 using namespace WebCore;
@@ -131,7 +132,7 @@
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
 
     // WebKit1 has no application plug-ins, so we don't need to add them here.
-    if (!page->mainFrame().loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+    if (!page->mainFrame().loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
         return;
 
     NSArray* pluginsArray = [[WebPluginDatabase sharedDatabase] plugins];

Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (155193 => 155194)


--- trunk/Source/WebKit/mac/WebView/WebFrame.mm	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm	2013-09-06 17:23:03 UTC (rev 155194)
@@ -93,6 +93,7 @@
 #import <WebCore/SecurityOrigin.h>
 #import <WebCore/SmartReplace.h>
 #import <WebCore/StylePropertySet.h>
+#import <WebCore/SubframeLoader.h>
 #import <WebCore/TextIterator.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/VisibleUnits.h>
@@ -807,7 +808,7 @@
 
     if (WebCore::DOMImplementation::isTextMIMEType(mimeType)
         || Image::supportsType(mimeType)
-        || (pluginData && pluginData->supportsMimeType(mimeType, PluginData::AllPlugins) && frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        || (pluginData && pluginData->supportsMimeType(mimeType, PluginData::AllPlugins) && frame->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
         || (pluginData && pluginData->supportsMimeType(mimeType, PluginData::OnlyApplicationPlugins)))
         return NO;
 
@@ -1017,7 +1018,7 @@
     if (documentLoader && !documentLoader->mainDocumentError().isNull())
         [result setObject:(NSError *)documentLoader->mainDocumentError() forKey:WebFrameMainDocumentError];
         
-    if (frameLoader.subframeLoader()->containsPlugins())
+    if (frameLoader.subframeLoader().containsPlugins())
         [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameHasPlugins];
     
     if (DOMWindow* domWindow = _private->coreFrame->document()->domWindow()) {

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (155193 => 155194)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -75,6 +75,7 @@
 #include "ResourceResponse.h"
 #include "ScriptController.h"
 #include "Settings.h"
+#include "SubframeLoader.h"
 #include "ViewportArguments.h"
 #include "WebEventConversion.h"
 #include "qwebhistory.h"
@@ -1359,7 +1360,7 @@
     if (arePluginsEnabled && PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
         plugInType = ObjectContentNetscapePlugin;
     else if (m_frame->page()) {
-        bool allowPlugins = m_frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
+        bool allowPlugins = m_frame->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin);
         if ((m_frame->page()->pluginData().supportsMimeType(mimeType, PluginData::AllPlugins) && allowPlugins)
             || m_frame->page()->pluginData().supportsMimeType(mimeType, PluginData::OnlyApplicationPlugins))
                 plugInType = ObjectContentOtherPlugin;

Modified: trunk/Source/WebKit/win/WebView.cpp (155193 => 155194)


--- trunk/Source/WebKit/win/WebView.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit/win/WebView.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -33,6 +33,7 @@
 #include "FullscreenVideoController.h"
 #include "MarshallingHelpers.h"
 #include "SoftLinking.h"
+#include "SubframeLoader.h"
 #include "TextIterator.h"
 #include "WebBackForwardList.h"
 #include "WebChromeClient.h"
@@ -2544,7 +2545,7 @@
 bool WebView::canShowMIMEType(const String& mimeType)
 {
     Frame* coreFrame = core(m_mainFrame);
-    bool allowPlugins = coreFrame && coreFrame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
+    bool allowPlugins = coreFrame && coreFrame->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin);
 
     bool canShow = MIMETypeRegistry::isSupportedImageMIMEType(mimeType)
         || MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (155193 => 155194)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -73,6 +73,7 @@
 #include <WebCore/ResourceBuffer.h>
 #include <WebCore/ResourceError.h>
 #include <WebCore/Settings.h>
+#include <WebCore/SubframeLoader.h>
 #include <WebCore/UIEventWithKeyState.h>
 #include <WebCore/Widget.h>
 #include <WebCore/WindowFeatures.h>
@@ -1416,7 +1417,7 @@
     bool plugInSupportsMIMEType = false;
     if (WebPage* webPage = m_frame->page()) {
         const PluginData& pluginData = webPage->corePage()->pluginData();
-        if (pluginData.supportsMimeType(mimeType, PluginData::AllPlugins) && webFrame()->coreFrame()->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        if (pluginData.supportsMimeType(mimeType, PluginData::AllPlugins) && webFrame()->coreFrame()->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
             plugInSupportsMIMEType = true;
         else if (pluginData.supportsMimeType(mimeType, PluginData::OnlyApplicationPlugins))
             plugInSupportsMIMEType = true;

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (155193 => 155194)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -53,6 +53,7 @@
 #include <WebCore/PlatformPasteboard.h>
 #include <WebCore/ResourceError.h>
 #include <WebCore/StorageNamespace.h>
+#include <WebCore/SubframeLoader.h>
 #include <wtf/Atomics.h>
 
 #if ENABLE(NETWORK_PROCESS)
@@ -296,7 +297,7 @@
 #if ENABLE(NETSCAPE_PLUGIN_API)
     populatePluginCache();
 
-    if (page->mainFrame().loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin)) {
+    if (page->mainFrame().loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin)) {
         plugins = m_cachedPlugins;
         return;
     }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (155193 => 155194)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-09-06 16:48:44 UTC (rev 155193)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-09-06 17:23:03 UTC (rev 155194)
@@ -131,6 +131,7 @@
 #include <WebCore/Settings.h>
 #include <WebCore/ShadowRoot.h>
 #include <WebCore/SharedBuffer.h>
+#include <WebCore/SubframeLoader.h>
 #include <WebCore/SubstituteData.h>
 #include <WebCore/TextIterator.h>
 #include <WebCore/VisiblePosition.h>
@@ -541,7 +542,7 @@
     String pageURLString = m_page->mainFrame().loader().documentLoader()->responseURL().string();
     PluginProcessType processType = pluginElement->displayState() == HTMLPlugInElement::WaitingForSnapshot ? PluginProcessTypeSnapshot : PluginProcessTypeNormal;
 
-    bool allowOnlyApplicationPlugins = !frame->coreFrame()->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
+    bool allowOnlyApplicationPlugins = !frame->coreFrame()->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin);
 
     uint64_t pluginProcessToken;
     uint32_t pluginLoadPolicy;
@@ -3775,7 +3776,7 @@
 {
 #if ENABLE(NETSCAPE_PLUGIN_API)
     uint32_t pluginLoadPolicy;
-    bool allowOnlyApplicationPlugins = !m_mainFrame->coreFrame()->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
+    bool allowOnlyApplicationPlugins = !m_mainFrame->coreFrame()->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin);
 
     uint64_t pluginProcessToken;
     String newMIMEType;
@@ -3940,7 +3941,7 @@
         return true;
 
     const PluginData& pluginData = m_page->pluginData();
-    if (pluginData.supportsMimeType(MIMEType, PluginData::AllPlugins) && corePage()->mainFrame().loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+    if (pluginData.supportsMimeType(MIMEType, PluginData::AllPlugins) && corePage()->mainFrame().loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin))
         return true;
 
     // We can use application plugins even if plugins aren't enabled.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to