| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // If the plug-in element already contains a subframe, loadOrRedirectSubfram
e will re-use it. Otherwise, | 237 // If the plug-in element already contains a subframe, loadOrRedirectSubfram
e will re-use it. Otherwise, |
| 238 // it will create a new frame and set it as the RenderPart's widget, causing
what was previously | 238 // it will create a new frame and set it as the RenderPart's widget, causing
what was previously |
| 239 // in the widget to be torn down. | 239 // in the widget to be torn down. |
| 240 return loadOrRedirectSubframe(completedURL, getNameAttribute(), true); | 240 return loadOrRedirectSubframe(completedURL, getNameAttribute(), true); |
| 241 } | 241 } |
| 242 | 242 |
| 243 bool HTMLPlugInImageElement::loadPlugin(const KURL& url, const String& mimeType,
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFa
llback) | 243 bool HTMLPlugInImageElement::loadPlugin(const KURL& url, const String& mimeType,
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFa
llback) |
| 244 { | 244 { |
| 245 Frame* frame = document()->frame(); | 245 Frame* frame = document()->frame(); |
| 246 | 246 |
| 247 // Application plug-ins are plug-ins implemented by the user agent, for exam
ple Qt plug-ins, | 247 if (!frame->loader()->allowPlugins(AboutToInstantiatePlugin)) |
| 248 // as opposed to third-party code such as Flash. The user agent decides whet
her or not they are | |
| 249 // permitted, rather than WebKit. | |
| 250 if (!frame->loader()->allowPlugins(AboutToInstantiatePlugin) && !MIMETypeReg
istry::isApplicationPluginMIMEType(mimeType)) | |
| 251 return false; | 248 return false; |
| 252 | 249 |
| 253 if (!pluginIsLoadable(url, mimeType)) | 250 if (!pluginIsLoadable(url, mimeType)) |
| 254 return false; | 251 return false; |
| 255 | 252 |
| 256 RenderEmbeddedObject* renderer = renderEmbeddedObject(); | 253 RenderEmbeddedObject* renderer = renderEmbeddedObject(); |
| 257 | 254 |
| 258 // FIXME: This code should not depend on renderer! | 255 // FIXME: This code should not depend on renderer! |
| 259 if (!renderer || useFallback) | 256 if (!renderer || useFallback) |
| 260 return false; | 257 return false; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); | 323 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); |
| 327 return false; | 324 return false; |
| 328 } | 325 } |
| 329 | 326 |
| 330 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu
reContent(document()->securityOrigin(), url)) | 327 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu
reContent(document()->securityOrigin(), url)) |
| 331 return false; | 328 return false; |
| 332 return true; | 329 return true; |
| 333 } | 330 } |
| 334 | 331 |
| 335 } // namespace WebCore | 332 } // namespace WebCore |
| OLD | NEW |