Teach SubframeLoader a bit about references
https://bugs.webkit.org/show_bug.cgi?id=124076
Reviewed by Anders Carlsson.
* html/HTMLAppletElement.cpp:
* html/HTMLFrameElementBase.cpp:
* html/HTMLMediaElement.cpp:
* loader/SubframeLoader.cpp:
* loader/SubframeLoader.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/loader/SubframeLoader.h b/Source/WebCore/loader/SubframeLoader.h
index 9800900..1932ae1 100644
--- a/Source/WebCore/loader/SubframeLoader.h
+++ b/Source/WebCore/loader/SubframeLoader.h
@@ -45,12 +45,10 @@
class FrameLoaderClient;
class HTMLAppletElement;
class HTMLFrameOwnerElement;
+class HTMLMediaElement;
class HTMLPlugInImageElement;
class IntSize;
class URL;
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-class Node;
-#endif
class Widget;
// This is a slight misnomer. It handles the higher level logic of loading both subframes and plugins.
@@ -61,17 +59,15 @@
void clear();
- bool requestFrame(HTMLFrameOwnerElement*, const String& url, const AtomicString& frameName, bool lockHistory = true, bool lockBackForwardList = true);
+ bool requestFrame(HTMLFrameOwnerElement&, const String& url, const AtomicString& frameName, bool lockHistory = true, bool lockBackForwardList = true);
bool requestObject(HTMLPlugInImageElement&, const String& url, const AtomicString& frameName,
const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues);
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- // FIXME: This should take Element* instead of Node*, or better yet the
- // specific type of Element which this code depends on.
- PassRefPtr<Widget> loadMediaPlayerProxyPlugin(Node*, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
+ PassRefPtr<Widget> loadMediaPlayerProxyPlugin(HTMLMediaElement&, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
#endif
- PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const Vector<String>& paramNames, const Vector<String>& paramValues);
+ PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement&, const Vector<String>& paramNames, const Vector<String>& paramValues);
bool allowPlugins(ReasonForCallingAllowPlugins);
@@ -80,14 +76,13 @@
bool resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages);
private:
- bool requestPlugin(HTMLPlugInImageElement*, const URL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
- Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const URL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
- Frame* loadSubframe(HTMLFrameOwnerElement*, const URL&, const String& name, const String& referrer);
- bool loadPlugin(HTMLPlugInImageElement*, const URL&, const String& mimeType,
- const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
+ bool requestPlugin(HTMLPlugInImageElement&, const URL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
+ Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement&, const URL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
+ Frame* loadSubframe(HTMLFrameOwnerElement&, const URL&, const String& name, const String& referrer);
+ bool loadPlugin(HTMLPlugInImageElement&, const URL&, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
bool shouldUsePlugin(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback);
- bool pluginIsLoadable(HTMLPlugInImageElement*, const URL&, const String& mimeType);
+ bool pluginIsLoadable(HTMLPlugInImageElement&, const URL&, const String& mimeType);
Document* document() const;