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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 RenderObject* HTMLPlugInImageElement::createRenderer(RenderStyle* style) | 129 RenderObject* HTMLPlugInImageElement::createRenderer(RenderStyle* style) |
130 { | 130 { |
131 // Fallback content breaks the DOM->Renderer class relationship of this | 131 // Fallback content breaks the DOM->Renderer class relationship of this |
132 // class and all superclasses because createObject won't necessarily | 132 // class and all superclasses because createObject won't necessarily |
133 // return a RenderEmbeddedObject, RenderPart or even RenderWidget. | 133 // return a RenderEmbeddedObject, RenderPart or even RenderWidget. |
134 if (useFallbackContent()) | 134 if (useFallbackContent()) |
135 return RenderObject::createObject(this, style); | 135 return RenderObject::createObject(this, style); |
136 | 136 |
137 if (isImageType()) { | 137 if (isImageType()) { |
138 RenderImage* image = new (document()->renderArena()) RenderImage(this); | 138 RenderImage* image = new RenderImage(this); |
139 image->setImageResource(RenderImageResource::create()); | 139 image->setImageResource(RenderImageResource::create()); |
140 return image; | 140 return image; |
141 } | 141 } |
142 | 142 |
143 return new (document()->renderArena()) RenderEmbeddedObject(this); | 143 return new RenderEmbeddedObject(this); |
144 } | 144 } |
145 | 145 |
146 void HTMLPlugInImageElement::willRecalcStyle(StyleChange) | 146 void HTMLPlugInImageElement::willRecalcStyle(StyleChange) |
147 { | 147 { |
148 // FIXME: Why is this necessary? Manual re-attach is almost always wrong. | 148 // FIXME: Why is this necessary? Manual re-attach is almost always wrong. |
149 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy
pe()) | 149 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy
pe()) |
150 reattach(); | 150 reattach(); |
151 } | 151 } |
152 | 152 |
153 void HTMLPlugInImageElement::attach(const AttachContext& context) | 153 void HTMLPlugInImageElement::attach(const AttachContext& context) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); | 326 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); |
327 return false; | 327 return false; |
328 } | 328 } |
329 | 329 |
330 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu
reContent(document()->securityOrigin(), url)) | 330 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu
reContent(document()->securityOrigin(), url)) |
331 return false; | 331 return false; |
332 return true; | 332 return true; |
333 } | 333 } |
334 | 334 |
335 } // namespace WebCore | 335 } // namespace WebCore |
OLD | NEW |