Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(899)

Unified Diff: Source/core/html/HTMLPlugInImageElement.cpp

Issue 38453002: Move members of HTMLPlugInImageElement to HTMLPlugInElement, part 4. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInImageElement.cpp
diff --git a/Source/core/html/HTMLPlugInImageElement.cpp b/Source/core/html/HTMLPlugInImageElement.cpp
index f7a9ec8ca4a448cb6e360972b3a8b135cafb2248..66736e4c693fc60bdbb8ee1121d31fe92b587e01 100644
--- a/Source/core/html/HTMLPlugInImageElement.cpp
+++ b/Source/core/html/HTMLPlugInImageElement.cpp
@@ -30,10 +30,8 @@
#include "core/page/Settings.h"
#include "platform/Logging.h"
#include "core/platform/MIMETypeRegistry.h"
-#include "core/platform/graphics/Image.h"
#include "core/plugins/PluginData.h"
#include "core/rendering/RenderEmbeddedObject.h"
-#include "core/rendering/RenderImage.h"
#include "platform/UserGestureIndicator.h"
#include "weborigin/SecurityOrigin.h"
@@ -54,76 +52,12 @@ HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Doc
: HTMLPlugInElement(tagName, document, createdByParser, preferPlugInsForImagesOption)
, m_createdDuringUserGesture(UserGestureIndicator::processingUserGesture())
{
- setHasCustomStyleCallbacks();
}
HTMLPlugInImageElement::~HTMLPlugInImageElement()
{
}
-// We don't use m_url, as it may not be the final URL that the object loads,
-// depending on <param> values.
-bool HTMLPlugInImageElement::allowedToLoadFrameURL(const String& url)
-{
- KURL completeURL = document().completeURL(url);
-
- if (contentFrame() && protocolIsJavaScript(completeURL)
- && !document().securityOrigin()->canAccess(contentDocument()->securityOrigin()))
- return false;
-
- return document().frame()->isURLAllowed(completeURL);
-}
-
-// We don't use m_url, or m_serviceType as they may not be the final values
-// that <object> uses depending on <param> values.
-bool HTMLPlugInImageElement::wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
-{
- ASSERT(document().frame());
- KURL completedURL;
- if (!url.isEmpty())
- completedURL = document().completeURL(url);
-
- FrameLoader& frameLoader = document().frame()->loader();
- if (frameLoader.client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin)
- return true;
- return false;
-}
-
-RenderObject* HTMLPlugInImageElement::createRenderer(RenderStyle* style)
-{
- // Fallback content breaks the DOM->Renderer class relationship of this
- // class and all superclasses because createObject won't necessarily
- // return a RenderEmbeddedObject, RenderPart or even RenderWidget.
- if (useFallbackContent())
- return RenderObject::createObject(this, style);
-
- if (isImageType()) {
- RenderImage* image = new RenderImage(this);
- image->setImageResource(RenderImageResource::create());
- return image;
- }
-
- return new RenderEmbeddedObject(this);
-}
-
-void HTMLPlugInImageElement::willRecalcStyle(StyleRecalcChange)
-{
- // FIXME: Why is this necessary? Manual re-attach is almost always wrong.
- if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageType())
- reattach();
-}
-
-void HTMLPlugInImageElement::finishParsingChildren()
-{
- HTMLPlugInElement::finishParsingChildren();
- if (useFallbackContent())
- return;
-
- setNeedsWidgetUpdate(true);
- if (inDocument())
- setNeedsStyleRecalc();
-}
-
bool HTMLPlugInImageElement::requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
{
if (url.isEmpty() && mimeType.isEmpty())
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698