| Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
|
| index 1545f8481bdc52799053f6e65d49e2709c132ec3..13e5b9b233a78b9ee60ab432b5d55f3c25ba7ad4 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
|
| @@ -260,7 +260,7 @@ LayoutObject* HTMLPlugInElement::createLayoutObject(const ComputedStyle& style)
|
| return image;
|
| }
|
|
|
| -
|
| + m_pluginIsAvailable = true;
|
| return new LayoutEmbeddedObject(this);
|
| }
|
|
|
| @@ -397,7 +397,7 @@ bool HTMLPlugInElement::layoutObjectIsFocusable() const
|
|
|
| if (useFallbackContent() || !HTMLFrameOwnerElement::layoutObjectIsFocusable())
|
| return false;
|
| - return layoutObject() && layoutObject()->isEmbeddedObject() && !layoutEmbeddedItem().showsUnavailablePluginIndicator();
|
| + return m_pluginIsAvailable;
|
| }
|
|
|
| bool HTMLPlugInElement::isImageType()
|
| @@ -493,8 +493,10 @@ bool HTMLPlugInElement::loadPlugin(const KURL& url, const String& mimeType, cons
|
| FrameLoaderClient::DetachedPluginPolicy policy = requireLayoutObject ? FrameLoaderClient::FailOnDetachedPlugin : FrameLoaderClient::AllowDetachedPlugin;
|
| Widget* widget = frame->loader().client()->createPlugin(this, url, paramNames, paramValues, mimeType, loadManually, policy);
|
| if (!widget) {
|
| - if (!layoutItem.isNull() && !layoutItem.showsUnavailablePluginIndicator())
|
| + if (!layoutItem.isNull() && !layoutItem.showsUnavailablePluginIndicator()) {
|
| + m_pluginIsAvailable = false;
|
| layoutItem.setPluginUnavailabilityReason(LayoutEmbeddedObject::PluginMissing);
|
| + }
|
| return false;
|
| }
|
|
|
| @@ -555,8 +557,10 @@ bool HTMLPlugInElement::allowedToLoadObject(const KURL& url, const String& mimeT
|
| fastGetAttribute(HTMLNames::typeAttr);
|
| if (!document().contentSecurityPolicy()->allowObjectFromSource(url)
|
| || !document().contentSecurityPolicy()->allowPluginTypeForDocument(document(), mimeType, declaredMimeType, url)) {
|
| - if (LayoutEmbeddedItem layoutItem = layoutEmbeddedItem())
|
| + if (LayoutEmbeddedItem layoutItem = layoutEmbeddedItem()) {
|
| + m_pluginIsAvailable = false;
|
| layoutItem.setPluginUnavailabilityReason(LayoutEmbeddedObject::PluginBlockedByContentSecurityPolicy);
|
| + }
|
| return false;
|
| }
|
| // If the URL is empty, a plugin could still be instantiated if a MIME-type
|
|
|