| 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
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights
reserved. |
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 DEFINE_TRACE(HTMLObjectElement) | 72 DEFINE_TRACE(HTMLObjectElement) |
| 73 { | 73 { |
| 74 FormAssociatedElement::trace(visitor); | 74 FormAssociatedElement::trace(visitor); |
| 75 HTMLPlugInElement::trace(visitor); | 75 HTMLPlugInElement::trace(visitor); |
| 76 } | 76 } |
| 77 | 77 |
| 78 LayoutPart* HTMLObjectElement::existingLayoutPart() const | 78 LayoutPart* HTMLObjectElement::existingLayoutPart() const |
| 79 { | 79 { |
| 80 return layoutPart(); // This will return 0 if the renderer is not a LayoutPa
rt. | 80 return layoutPart(); // This will return 0 if the layoutObject is not a Layo
utPart. |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool HTMLObjectElement::isPresentationAttribute(const QualifiedName& name) const | 83 bool HTMLObjectElement::isPresentationAttribute(const QualifiedName& name) const |
| 84 { | 84 { |
| 85 if (name == borderAttr) | 85 if (name == borderAttr) |
| 86 return true; | 86 return true; |
| 87 return HTMLPlugInElement::isPresentationAttribute(name); | 87 return HTMLPlugInElement::isPresentationAttribute(name); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void HTMLObjectElement::collectStyleForPresentationAttribute(const QualifiedName
& name, const AtomicString& value, MutableStylePropertySet* style) | 90 void HTMLObjectElement::collectStyleForPresentationAttribute(const QualifiedName
& name, const AtomicString& value, MutableStylePropertySet* style) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 101 formAttributeChanged(); | 101 formAttributeChanged(); |
| 102 else if (name == typeAttr) { | 102 else if (name == typeAttr) { |
| 103 m_serviceType = value.lower(); | 103 m_serviceType = value.lower(); |
| 104 size_t pos = m_serviceType.find(";"); | 104 size_t pos = m_serviceType.find(";"); |
| 105 if (pos != kNotFound) | 105 if (pos != kNotFound) |
| 106 m_serviceType = m_serviceType.left(pos); | 106 m_serviceType = m_serviceType.left(pos); |
| 107 // FIXME: What is the right thing to do here? Should we supress the | 107 // FIXME: What is the right thing to do here? Should we supress the |
| 108 // reload stuff when a persistable widget-type is specified? | 108 // reload stuff when a persistable widget-type is specified? |
| 109 reloadPluginOnAttributeChange(name); | 109 reloadPluginOnAttributeChange(name); |
| 110 if (!layoutObject()) | 110 if (!layoutObject()) |
| 111 requestPluginCreationWithoutRendererIfPossible(); | 111 requestPluginCreationWithoutLayoutObjectIfPossible(); |
| 112 } else if (name == dataAttr) { | 112 } else if (name == dataAttr) { |
| 113 m_url = stripLeadingAndTrailingHTMLSpaces(value); | 113 m_url = stripLeadingAndTrailingHTMLSpaces(value); |
| 114 if (layoutObject() && isImageType()) { | 114 if (layoutObject() && isImageType()) { |
| 115 setNeedsWidgetUpdate(true); | 115 setNeedsWidgetUpdate(true); |
| 116 if (!m_imageLoader) | 116 if (!m_imageLoader) |
| 117 m_imageLoader = HTMLImageLoader::create(this); | 117 m_imageLoader = HTMLImageLoader::create(this); |
| 118 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousEr
ror); | 118 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousEr
ror); |
| 119 } else { | 119 } else { |
| 120 reloadPluginOnAttributeChange(name); | 120 reloadPluginOnAttributeChange(name); |
| 121 } | 121 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 Vector<String> paramNames; | 286 Vector<String> paramNames; |
| 287 Vector<String> paramValues; | 287 Vector<String> paramValues; |
| 288 parametersForPlugin(paramNames, paramValues, url, serviceType); | 288 parametersForPlugin(paramNames, paramValues, url, serviceType); |
| 289 | 289 |
| 290 // Note: url is modified above by parametersForPlugin. | 290 // Note: url is modified above by parametersForPlugin. |
| 291 if (!allowedToLoadFrameURL(url)) { | 291 if (!allowedToLoadFrameURL(url)) { |
| 292 dispatchErrorEvent(); | 292 dispatchErrorEvent(); |
| 293 return; | 293 return; |
| 294 } | 294 } |
| 295 | 295 |
| 296 // FIXME: Is it possible to get here without a renderer now that we don't ha
ve beforeload events? | 296 // FIXME: Is it possible to get here without a layoutObject now that we don'
t have beforeload events? |
| 297 if (!layoutObject()) | 297 if (!layoutObject()) |
| 298 return; | 298 return; |
| 299 | 299 |
| 300 if (!hasValidClassId() || !requestObject(url, serviceType, paramNames, param
Values)) { | 300 if (!hasValidClassId() || !requestObject(url, serviceType, paramNames, param
Values)) { |
| 301 if (!url.isEmpty()) | 301 if (!url.isEmpty()) |
| 302 dispatchErrorEvent(); | 302 dispatchErrorEvent(); |
| 303 if (hasFallbackContent()) | 303 if (hasFallbackContent()) |
| 304 renderFallbackContent(); | 304 renderFallbackContent(); |
| 305 } | 305 } |
| 306 } | 306 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 { | 450 { |
| 451 return fastHasAttribute(usemapAttr); | 451 return fastHasAttribute(usemapAttr); |
| 452 } | 452 } |
| 453 | 453 |
| 454 bool HTMLObjectElement::useFallbackContent() const | 454 bool HTMLObjectElement::useFallbackContent() const |
| 455 { | 455 { |
| 456 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; | 456 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; |
| 457 } | 457 } |
| 458 | 458 |
| 459 } | 459 } |
| OLD | NEW |