| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 m_serviceType = m_serviceType.left(pos); | 105 m_serviceType = m_serviceType.left(pos); |
| 106 // TODO(schenney): crbug.com/572908 What is the right thing to do here? | 106 // TODO(schenney): crbug.com/572908 What is the right thing to do here? |
| 107 // Should we suppress the reload stuff when a persistable widget-type is | 107 // Should we suppress the reload stuff when a persistable widget-type is |
| 108 // specified? | 108 // specified? |
| 109 reloadPluginOnAttributeChange(name); | 109 reloadPluginOnAttributeChange(name); |
| 110 if (!layoutObject()) | 110 if (!layoutObject()) |
| 111 requestPluginCreationWithoutLayoutObjectIfPossible(); | 111 requestPluginCreationWithoutLayoutObjectIfPossible(); |
| 112 } else if (name == dataAttr) { | 112 } else if (name == dataAttr) { |
| 113 m_url = stripLeadingAndTrailingHTMLSpaces(params.newValue); | 113 m_url = stripLeadingAndTrailingHTMLSpaces(params.newValue); |
| 114 if (layoutObject() && isImageType()) { | 114 if (layoutObject() && isImageType()) { |
| 115 setNeedsWidgetUpdate(true); | 115 setNeedsPluginUpdate(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::UpdateIgnorePreviousError); | 118 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); |
| 119 } else { | 119 } else { |
| 120 reloadPluginOnAttributeChange(name); | 120 reloadPluginOnAttributeChange(name); |
| 121 } | 121 } |
| 122 } else if (name == classidAttr) { | 122 } else if (name == classidAttr) { |
| 123 m_classId = params.newValue; | 123 m_classId = params.newValue; |
| 124 reloadPluginOnAttributeChange(name); | 124 reloadPluginOnAttributeChange(name); |
| 125 } else { | 125 } else { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 needsInvalidation = | 257 needsInvalidation = |
| 258 !fastHasAttribute(classidAttr) && !fastHasAttribute(dataAttr); | 258 !fastHasAttribute(classidAttr) && !fastHasAttribute(dataAttr); |
| 259 } else if (name == dataAttr) { | 259 } else if (name == dataAttr) { |
| 260 needsInvalidation = !fastHasAttribute(classidAttr); | 260 needsInvalidation = !fastHasAttribute(classidAttr); |
| 261 } else if (name == classidAttr) { | 261 } else if (name == classidAttr) { |
| 262 needsInvalidation = true; | 262 needsInvalidation = true; |
| 263 } else { | 263 } else { |
| 264 NOTREACHED(); | 264 NOTREACHED(); |
| 265 needsInvalidation = false; | 265 needsInvalidation = false; |
| 266 } | 266 } |
| 267 setNeedsWidgetUpdate(true); | 267 setNeedsPluginUpdate(true); |
| 268 if (needsInvalidation) | 268 if (needsInvalidation) |
| 269 lazyReattachIfNeeded(); | 269 lazyReattachIfNeeded(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 // TODO(schenney): crbug.com/572908 This should be unified with | 272 // TODO(schenney): crbug.com/572908 This should be unified with |
| 273 // HTMLEmbedElement::updateWidget and moved down into HTMLPluginElement.cpp | 273 // HTMLEmbedElement::updatePlugin and moved down into HTMLPluginElement.cpp |
| 274 void HTMLObjectElement::updateWidgetInternal() { | 274 void HTMLObjectElement::updatePluginInternal() { |
| 275 DCHECK(!layoutEmbeddedItem().showsUnavailablePluginIndicator()); | 275 DCHECK(!layoutEmbeddedItem().showsUnavailablePluginIndicator()); |
| 276 DCHECK(needsWidgetUpdate()); | 276 DCHECK(needsPluginUpdate()); |
| 277 setNeedsWidgetUpdate(false); | 277 setNeedsPluginUpdate(false); |
| 278 // TODO(schenney): crbug.com/572908 This should ASSERT | 278 // TODO(schenney): crbug.com/572908 This should ASSERT |
| 279 // isFinishedParsingChildren() instead. | 279 // isFinishedParsingChildren() instead. |
| 280 if (!isFinishedParsingChildren()) { | 280 if (!isFinishedParsingChildren()) { |
| 281 dispatchErrorEvent(); | 281 dispatchErrorEvent(); |
| 282 return; | 282 return; |
| 283 } | 283 } |
| 284 | 284 |
| 285 // TODO(schenney): crbug.com/572908 I'm not sure it's ever possible to get | 285 // TODO(schenney): crbug.com/572908 I'm not sure it's ever possible to get |
| 286 // into updateWidget during a removal, but just in case we should avoid | 286 // into updateWidget during a removal, but just in case we should avoid |
| 287 // loading the frame to prevent security bugs. | 287 // loading the frame to prevent security bugs. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 return InsertionDone; | 335 return InsertionDone; |
| 336 } | 336 } |
| 337 | 337 |
| 338 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint) { | 338 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint) { |
| 339 HTMLPlugInElement::removedFrom(insertionPoint); | 339 HTMLPlugInElement::removedFrom(insertionPoint); |
| 340 ListedElement::removedFrom(insertionPoint); | 340 ListedElement::removedFrom(insertionPoint); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void HTMLObjectElement::childrenChanged(const ChildrenChange& change) { | 343 void HTMLObjectElement::childrenChanged(const ChildrenChange& change) { |
| 344 if (isConnected() && !useFallbackContent()) { | 344 if (isConnected() && !useFallbackContent()) { |
| 345 setNeedsWidgetUpdate(true); | 345 setNeedsPluginUpdate(true); |
| 346 lazyReattachIfNeeded(); | 346 lazyReattachIfNeeded(); |
| 347 } | 347 } |
| 348 HTMLPlugInElement::childrenChanged(change); | 348 HTMLPlugInElement::childrenChanged(change); |
| 349 } | 349 } |
| 350 | 350 |
| 351 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const { | 351 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const { |
| 352 return attribute.name() == codebaseAttr || attribute.name() == dataAttr || | 352 return attribute.name() == codebaseAttr || attribute.name() == dataAttr || |
| 353 (attribute.name() == usemapAttr && attribute.value()[0] != '#') || | 353 (attribute.name() == usemapAttr && attribute.value()[0] != '#') || |
| 354 HTMLPlugInElement::isURLAttribute(attribute); | 354 HTMLPlugInElement::isURLAttribute(attribute); |
| 355 } | 355 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 458 |
| 459 bool HTMLObjectElement::willUseFallbackContentAtLayout() const { | 459 bool HTMLObjectElement::willUseFallbackContentAtLayout() const { |
| 460 return !hasValidClassId() && hasFallbackContent(); | 460 return !hasValidClassId() && hasFallbackContent(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void HTMLObjectElement::associateWith(HTMLFormElement* form) { | 463 void HTMLObjectElement::associateWith(HTMLFormElement* form) { |
| 464 associateByParser(form); | 464 associateByParser(form); |
| 465 }; | 465 }; |
| 466 | 466 |
| 467 } // namespace blink | 467 } // namespace blink |
| OLD | NEW |