| 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, 2007, 2008, 2009, 2011 Apple Inc. All rights | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "bindings/core/v8/ScriptEventListener.h" | 27 #include "bindings/core/v8/ScriptEventListener.h" |
| 28 #include "core/HTMLNames.h" | 28 #include "core/HTMLNames.h" |
| 29 #include "core/dom/Attribute.h" | 29 #include "core/dom/Attribute.h" |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/dom/ElementTraversal.h" | 31 #include "core/dom/ElementTraversal.h" |
| 32 #include "core/dom/TagCollection.h" | 32 #include "core/dom/TagCollection.h" |
| 33 #include "core/dom/Text.h" | 33 #include "core/dom/Text.h" |
| 34 #include "core/dom/shadow/ShadowRoot.h" | 34 #include "core/dom/shadow/ShadowRoot.h" |
| 35 #include "core/fetch/ImageResource.h" | 35 #include "core/fetch/ImageResource.h" |
| 36 #include "core/frame/LocalFrame.h" |
| 36 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
| 37 #include "core/html/HTMLImageLoader.h" | 38 #include "core/html/HTMLImageLoader.h" |
| 38 #include "core/html/HTMLMetaElement.h" | 39 #include "core/html/HTMLMetaElement.h" |
| 39 #include "core/html/HTMLParamElement.h" | 40 #include "core/html/HTMLParamElement.h" |
| 40 #include "core/html/parser/HTMLParserIdioms.h" | 41 #include "core/html/parser/HTMLParserIdioms.h" |
| 41 #include "core/layout/api/LayoutEmbeddedItem.h" | 42 #include "core/layout/api/LayoutEmbeddedItem.h" |
| 43 #include "core/loader/FrameLoaderClient.h" |
| 42 #include "core/plugins/PluginView.h" | 44 #include "core/plugins/PluginView.h" |
| 43 #include "platform/MIMETypeRegistry.h" | 45 #include "platform/MIMETypeRegistry.h" |
| 44 #include "platform/Widget.h" | 46 #include "platform/Widget.h" |
| 45 | 47 |
| 46 namespace blink { | 48 namespace blink { |
| 47 | 49 |
| 48 using namespace HTMLNames; | 50 using namespace HTMLNames; |
| 49 | 51 |
| 50 inline HTMLObjectElement::HTMLObjectElement(Document& document, | 52 inline HTMLObjectElement::HTMLObjectElement(Document& document, |
| 51 HTMLFormElement* form, | 53 HTMLFormElement* form, |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 if (!allowedToLoadFrameURL(url)) { | 308 if (!allowedToLoadFrameURL(url)) { |
| 307 dispatchErrorEvent(); | 309 dispatchErrorEvent(); |
| 308 return; | 310 return; |
| 309 } | 311 } |
| 310 | 312 |
| 311 // TODO(schenney): crbug.com/572908 Is it possible to get here without a | 313 // TODO(schenney): crbug.com/572908 Is it possible to get here without a |
| 312 // layoutObject now that we don't have beforeload events? | 314 // layoutObject now that we don't have beforeload events? |
| 313 if (!layoutObject()) | 315 if (!layoutObject()) |
| 314 return; | 316 return; |
| 315 | 317 |
| 318 // Overwrites the URL and MIME type of a Flash embed to use an HTML5 embed. |
| 319 KURL overridenUrl = |
| 320 document().frame()->loader().client()->overrideFlashEmbedWithHTML( |
| 321 document().completeURL(m_url)); |
| 322 if (!overridenUrl.isEmpty()) { |
| 323 url = m_url = overridenUrl.getString(); |
| 324 serviceType = m_serviceType = "text/html"; |
| 325 } |
| 326 |
| 316 if (!hasValidClassId() || | 327 if (!hasValidClassId() || |
| 317 !requestObject(url, serviceType, paramNames, paramValues)) { | 328 !requestObject(url, serviceType, paramNames, paramValues)) { |
| 318 if (!url.isEmpty()) | 329 if (!url.isEmpty()) |
| 319 dispatchErrorEvent(); | 330 dispatchErrorEvent(); |
| 320 if (hasFallbackContent()) | 331 if (hasFallbackContent()) |
| 321 renderFallbackContent(); | 332 renderFallbackContent(); |
| 322 } | 333 } |
| 323 } | 334 } |
| 324 | 335 |
| 325 Node::InsertionNotificationRequest HTMLObjectElement::insertedInto( | 336 Node::InsertionNotificationRequest HTMLObjectElement::insertedInto( |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 455 |
| 445 bool HTMLObjectElement::isInteractiveContent() const { | 456 bool HTMLObjectElement::isInteractiveContent() const { |
| 446 return fastHasAttribute(usemapAttr); | 457 return fastHasAttribute(usemapAttr); |
| 447 } | 458 } |
| 448 | 459 |
| 449 bool HTMLObjectElement::useFallbackContent() const { | 460 bool HTMLObjectElement::useFallbackContent() const { |
| 450 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; | 461 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; |
| 451 } | 462 } |
| 452 | 463 |
| 453 } // namespace blink | 464 } // namespace blink |
| OLD | NEW |