OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 if (!beforeLoadAllowedLoad) { | 171 if (!beforeLoadAllowedLoad) { |
172 if (document()->isPluginDocument()) { | 172 if (document()->isPluginDocument()) { |
173 // Plugins inside plugin documents load differently than other plugi
ns. By the time | 173 // Plugins inside plugin documents load differently than other plugi
ns. By the time |
174 // we are here in a plugin document, the load of the plugin (which i
s the plugin document's | 174 // we are here in a plugin document, the load of the plugin (which i
s the plugin document's |
175 // main resource) has already started. We need to explicitly cancel
the main resource load here. | 175 // main resource) has already started. We need to explicitly cancel
the main resource load here. |
176 toPluginDocument(document())->cancelManualPluginLoad(); | 176 toPluginDocument(document())->cancelManualPluginLoad(); |
177 } | 177 } |
178 return; | 178 return; |
179 } | 179 } |
180 | 180 |
| 181 RefPtr<HTMLEmbedElement> protect(this); // Loading the plugin might remove u
s from the document. |
181 SubframeLoader* loader = document()->frame()->loader()->subframeLoader(); | 182 SubframeLoader* loader = document()->frame()->loader()->subframeLoader(); |
182 // FIXME: beforeLoad could have detached the renderer! Just like in the <ob
ject> case above. | 183 // FIXME: beforeLoad could have detached the renderer! Just like in the <ob
ject> case above. |
183 loader->requestObject(this, m_url, getAttribute(nameAttr), m_serviceType, pa
ramNames, paramValues); | 184 loader->requestObject(this, m_url, getAttribute(nameAttr), m_serviceType, pa
ramNames, paramValues); |
184 } | 185 } |
185 | 186 |
186 bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context) | 187 bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context) |
187 { | 188 { |
188 if (isImageType()) | 189 if (isImageType()) |
189 return HTMLPlugInImageElement::rendererIsNeeded(context); | 190 return HTMLPlugInImageElement::rendererIsNeeded(context); |
190 | 191 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } | 271 } |
271 | 272 |
272 void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons
t | 273 void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons
t |
273 { | 274 { |
274 HTMLPlugInImageElement::addSubresourceAttributeURLs(urls); | 275 HTMLPlugInImageElement::addSubresourceAttributeURLs(urls); |
275 | 276 |
276 addSubresourceURL(urls, document()->completeURL(getAttribute(srcAttr))); | 277 addSubresourceURL(urls, document()->completeURL(getAttribute(srcAttr))); |
277 } | 278 } |
278 | 279 |
279 } | 280 } |
OLD | NEW |