| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); | 164 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
| 165 m_imageLoader->updateFromElement(); | 165 m_imageLoader->updateFromElement(); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 void HTMLPlugInImageElement::detach(const AttachContext& context) | 169 void HTMLPlugInImageElement::detach(const AttachContext& context) |
| 170 { | 170 { |
| 171 // FIXME: Because of the insanity that is HTMLPlugInImageElement::recalcStyl
e, | 171 // FIXME: Because of the insanity that is HTMLPlugInImageElement::recalcStyl
e, |
| 172 // we can end up detaching during an attach() call, before we even have a | 172 // we can end up detaching during an attach() call, before we even have a |
| 173 // renderer. In that case, don't mark the widget for update. | 173 // renderer. In that case, don't mark the widget for update. |
| 174 if (attached() && renderer() && !useFallbackContent()) | 174 if (confusingAndOftenMisusedAttached() && renderer() && !useFallbackContent(
)) |
| 175 // Update the widget the next time we attach (detaching destroys the plu
gin). | 175 // Update the widget the next time we attach (detaching destroys the plu
gin). |
| 176 setNeedsWidgetUpdate(true); | 176 setNeedsWidgetUpdate(true); |
| 177 HTMLPlugInElement::detach(context); | 177 HTMLPlugInElement::detach(context); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void HTMLPlugInImageElement::updateWidgetIfNecessary() | 180 void HTMLPlugInImageElement::updateWidgetIfNecessary() |
| 181 { | 181 { |
| 182 document().updateStyleIfNeeded(); | 182 document().updateStyleIfNeeded(); |
| 183 | 183 |
| 184 if (!needsWidgetUpdate() || useFallbackContent() || isImageType()) | 184 if (!needsWidgetUpdate() || useFallbackContent() || isImageType()) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); | 321 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); |
| 322 return false; | 322 return false; |
| 323 } | 323 } |
| 324 | 324 |
| 325 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu
reContent(document().securityOrigin(), url)) | 325 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu
reContent(document().securityOrigin(), url)) |
| 326 return false; | 326 return false; |
| 327 return true; | 327 return true; |
| 328 } | 328 } |
| 329 | 329 |
| 330 } // namespace WebCore | 330 } // namespace WebCore |
| OLD | NEW |