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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // we have to explicitly suppress the tag's CODEBASE attribute if there is n
one in a PARAM, | 180 // we have to explicitly suppress the tag's CODEBASE attribute if there is n
one in a PARAM, |
181 // else our Java plugin will misinterpret it. [4004531] | 181 // else our Java plugin will misinterpret it. [4004531] |
182 String codebase; | 182 String codebase; |
183 if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) { | 183 if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) { |
184 codebase = "codebase"; | 184 codebase = "codebase"; |
185 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM
already | 185 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM
already |
186 } | 186 } |
187 | 187 |
188 // Turn the attributes of the <object> element into arrays, but don't overri
de <param> values. | 188 // Turn the attributes of the <object> element into arrays, but don't overri
de <param> values. |
189 AttributeCollection attributes = this->attributes(); | 189 AttributeCollection attributes = this->attributes(); |
190 AttributeCollection::iterator end = attributes.end(); | 190 for (const auto& attribute : attributes) { |
191 for (AttributeCollection::iterator it = attributes.begin(); it != end; ++it)
{ | 191 const AtomicString& name = attribute.name().localName(); |
192 const AtomicString& name = it->name().localName(); | |
193 if (!uniqueParamNames.contains(name.impl())) { | 192 if (!uniqueParamNames.contains(name.impl())) { |
194 paramNames.append(name.string()); | 193 paramNames.append(name.string()); |
195 paramValues.append(it->value().string()); | 194 paramValues.append(attribute.value().string()); |
196 } | 195 } |
197 } | 196 } |
198 | 197 |
199 mapDataParamToSrc(¶mNames, ¶mValues); | 198 mapDataParamToSrc(¶mNames, ¶mValues); |
200 | 199 |
201 // HTML5 says that an object resource's URL is specified by the object's dat
a | 200 // HTML5 says that an object resource's URL is specified by the object's dat
a |
202 // attribute, not by a param element. However, for compatibility, allow the | 201 // attribute, not by a param element. However, for compatibility, allow the |
203 // resource's URL to be given by a param named "src", "movie", "code" or "ur
l" | 202 // resource's URL to be given by a param named "src", "movie", "code" or "ur
l" |
204 // if we know that resource points to a plug-in. | 203 // if we know that resource points to a plug-in. |
205 if (url.isEmpty() && !urlParameter.isEmpty()) { | 204 if (url.isEmpty() && !urlParameter.isEmpty()) { |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 { | 456 { |
458 return fastHasAttribute(usemapAttr); | 457 return fastHasAttribute(usemapAttr); |
459 } | 458 } |
460 | 459 |
461 bool HTMLObjectElement::useFallbackContent() const | 460 bool HTMLObjectElement::useFallbackContent() const |
462 { | 461 { |
463 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; | 462 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; |
464 } | 463 } |
465 | 464 |
466 } | 465 } |
OLD | NEW |