From 2bde8e466a4451c7319e3a072d118917957d6554 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 25 May 2011 19:08:45 +0100 Subject: Merge WebKit at r82507: Initial merge by git Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e --- Source/WebCore/html/HTMLPlugInImageElement.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Source/WebCore/html/HTMLPlugInImageElement.cpp') diff --git a/Source/WebCore/html/HTMLPlugInImageElement.cpp b/Source/WebCore/html/HTMLPlugInImageElement.cpp index db07334..f3a99dd 100644 --- a/Source/WebCore/html/HTMLPlugInImageElement.cpp +++ b/Source/WebCore/html/HTMLPlugInImageElement.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2011 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -25,6 +25,7 @@ #include "FrameLoader.h" #include "FrameLoaderClient.h" #include "HTMLImageLoader.h" +#include "HTMLNames.h" #include "Image.h" #include "Page.h" #include "RenderEmbeddedObject.h" @@ -32,13 +33,14 @@ namespace WebCore { -HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser) +HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser, PreferPlugInsForImagesOption preferPlugInsForImagesOption) : HTMLPlugInElement(tagName, document) // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay // widget updates until after all children are parsed. For HTMLEmbedElement // this delay is unnecessary, but it is simpler to make both classes share // the same codepath in this class. , m_needsWidgetUpdate(!createdByParser) + , m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPreferPlugInsForImages) { } @@ -58,7 +60,7 @@ bool HTMLPlugInImageElement::isImageType() if (Frame* frame = document()->frame()) { KURL completedURL = frame->loader()->completeURL(m_url); - return frame->loader()->client()->objectContentType(completedURL, m_serviceType) == ObjectContentImage; + return frame->loader()->client()->objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage; } return Image::supportsType(m_serviceType); @@ -99,7 +101,7 @@ bool HTMLPlugInImageElement::wouldLoadAsNetscapePlugin(const String& url, const if (!url.isEmpty()) completedURL = frameLoader->completeURL(url); - if (frameLoader->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin) + if (frameLoader->client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin) return true; return false; } -- cgit v1.1