| 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 | 5 * Copyright (C) 2004, 2005, 2006, 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 addPropertyToPresentationAttributeStyle( | 85 addPropertyToPresentationAttributeStyle( |
| 86 style, CSSPropertyWidth, 0, CSSPrimitiveValue::UnitType::Pixels); | 86 style, CSSPropertyWidth, 0, CSSPrimitiveValue::UnitType::Pixels); |
| 87 addPropertyToPresentationAttributeStyle( | 87 addPropertyToPresentationAttributeStyle( |
| 88 style, CSSPropertyHeight, 0, CSSPrimitiveValue::UnitType::Pixels); | 88 style, CSSPropertyHeight, 0, CSSPrimitiveValue::UnitType::Pixels); |
| 89 } | 89 } |
| 90 } else { | 90 } else { |
| 91 HTMLPlugInElement::collectStyleForPresentationAttribute(name, value, style); | 91 HTMLPlugInElement::collectStyleForPresentationAttribute(name, value, style); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 void HTMLEmbedElement::parseAttribute(const QualifiedName& name, | 95 void HTMLEmbedElement::parseAttribute( |
| 96 const AtomicString& oldValue, | 96 const AttributeModificationParams& params) { |
| 97 const AtomicString& value) { | 97 if (params.name == typeAttr) { |
| 98 if (name == typeAttr) { | 98 m_serviceType = params.newValue.lower(); |
| 99 m_serviceType = value.lower(); | |
| 100 size_t pos = m_serviceType.find(";"); | 99 size_t pos = m_serviceType.find(";"); |
| 101 if (pos != kNotFound) | 100 if (pos != kNotFound) |
| 102 m_serviceType = m_serviceType.left(pos); | 101 m_serviceType = m_serviceType.left(pos); |
| 103 if (layoutObject()) { | 102 if (layoutObject()) { |
| 104 setNeedsWidgetUpdate(true); | 103 setNeedsWidgetUpdate(true); |
| 105 layoutObject()->setNeedsLayoutAndFullPaintInvalidation( | 104 layoutObject()->setNeedsLayoutAndFullPaintInvalidation( |
| 106 "Embed type changed"); | 105 "Embed type changed"); |
| 107 } else { | 106 } else { |
| 108 requestPluginCreationWithoutLayoutObjectIfPossible(); | 107 requestPluginCreationWithoutLayoutObjectIfPossible(); |
| 109 } | 108 } |
| 110 } else if (name == codeAttr) { | 109 } else if (params.name == codeAttr) { |
| 111 // TODO(schenney): Remove this branch? It's not in the spec and we're not in | 110 // TODO(schenney): Remove this branch? It's not in the spec and we're not in |
| 112 // the HTMLAppletElement hierarchy. | 111 // the HTMLAppletElement hierarchy. |
| 113 m_url = stripLeadingAndTrailingHTMLSpaces(value); | 112 m_url = stripLeadingAndTrailingHTMLSpaces(params.newValue); |
| 114 } else if (name == srcAttr) { | 113 } else if (params.name == srcAttr) { |
| 115 m_url = stripLeadingAndTrailingHTMLSpaces(value); | 114 m_url = stripLeadingAndTrailingHTMLSpaces(params.newValue); |
| 116 if (layoutObject() && isImageType()) { | 115 if (layoutObject() && isImageType()) { |
| 117 if (!m_imageLoader) | 116 if (!m_imageLoader) |
| 118 m_imageLoader = HTMLImageLoader::create(this); | 117 m_imageLoader = HTMLImageLoader::create(this); |
| 119 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); | 118 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); |
| 120 } else if (layoutObject()) { | 119 } else if (layoutObject()) { |
| 121 // Check if this Embed can transition from potentially-active to active | 120 // Check if this Embed can transition from potentially-active to active |
| 122 if (fastHasAttribute(typeAttr)) { | 121 if (fastHasAttribute(typeAttr)) { |
| 123 setNeedsWidgetUpdate(true); | 122 setNeedsWidgetUpdate(true); |
| 124 lazyReattachIfNeeded(); | 123 lazyReattachIfNeeded(); |
| 125 } | 124 } |
| 126 } else { | 125 } else { |
| 127 requestPluginCreationWithoutLayoutObjectIfPossible(); | 126 requestPluginCreationWithoutLayoutObjectIfPossible(); |
| 128 } | 127 } |
| 129 } else { | 128 } else { |
| 130 HTMLPlugInElement::parseAttribute(name, oldValue, value); | 129 HTMLPlugInElement::parseAttribute(params); |
| 131 } | 130 } |
| 132 } | 131 } |
| 133 | 132 |
| 134 void HTMLEmbedElement::parametersForPlugin(Vector<String>& paramNames, | 133 void HTMLEmbedElement::parametersForPlugin(Vector<String>& paramNames, |
| 135 Vector<String>& paramValues) { | 134 Vector<String>& paramValues) { |
| 136 AttributeCollection attributes = this->attributes(); | 135 AttributeCollection attributes = this->attributes(); |
| 137 for (const Attribute& attribute : attributes) { | 136 for (const Attribute& attribute : attributes) { |
| 138 paramNames.push_back(attribute.localName().getString()); | 137 paramNames.push_back(attribute.localName().getString()); |
| 139 paramValues.push_back(attribute.value().getString()); | 138 paramValues.push_back(attribute.value().getString()); |
| 140 } | 139 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 for (HTMLObjectElement* object = | 224 for (HTMLObjectElement* object = |
| 226 Traversal<HTMLObjectElement>::firstAncestor(*this); | 225 Traversal<HTMLObjectElement>::firstAncestor(*this); |
| 227 object; object = Traversal<HTMLObjectElement>::firstAncestor(*object)) { | 226 object; object = Traversal<HTMLObjectElement>::firstAncestor(*object)) { |
| 228 if (object->isExposed()) | 227 if (object->isExposed()) |
| 229 return false; | 228 return false; |
| 230 } | 229 } |
| 231 return true; | 230 return true; |
| 232 } | 231 } |
| 233 | 232 |
| 234 } // namespace blink | 233 } // namespace blink |
| OLD | NEW |