| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) { | 182 if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) { |
| 183 codebase = "codebase"; | 183 codebase = "codebase"; |
| 184 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM
already | 184 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM
already |
| 185 } | 185 } |
| 186 | 186 |
| 187 // Turn the attributes of the <object> element into arrays, but don't overri
de <param> values. | 187 // Turn the attributes of the <object> element into arrays, but don't overri
de <param> values. |
| 188 AttributeCollection attributes = this->attributes(); | 188 AttributeCollection attributes = this->attributes(); |
| 189 for (const Attribute& attribute : attributes) { | 189 for (const Attribute& attribute : attributes) { |
| 190 const AtomicString& name = attribute.name().localName(); | 190 const AtomicString& name = attribute.name().localName(); |
| 191 if (!uniqueParamNames.contains(name.impl())) { | 191 if (!uniqueParamNames.contains(name.impl())) { |
| 192 paramNames.append(name.string()); | 192 paramNames.append(name.getString()); |
| 193 paramValues.append(attribute.value().string()); | 193 paramValues.append(attribute.value().getString()); |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 | 196 |
| 197 mapDataParamToSrc(¶mNames, ¶mValues); | 197 mapDataParamToSrc(¶mNames, ¶mValues); |
| 198 | 198 |
| 199 // HTML5 says that an object resource's URL is specified by the object's dat
a | 199 // HTML5 says that an object resource's URL is specified by the object's dat
a |
| 200 // attribute, not by a param element. However, for compatibility, allow the | 200 // attribute, not by a param element. However, for compatibility, allow the |
| 201 // resource's URL to be given by a param named "src", "movie", "code" or "ur
l" | 201 // resource's URL to be given by a param named "src", "movie", "code" or "ur
l" |
| 202 // if we know that resource points to a plugin. | 202 // if we know that resource points to a plugin. |
| 203 if (url.isEmpty() && !urlParameter.isEmpty()) { | 203 if (url.isEmpty() && !urlParameter.isEmpty()) { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 399 } |
| 400 | 400 |
| 401 bool HTMLObjectElement::containsJavaApplet() const | 401 bool HTMLObjectElement::containsJavaApplet() const |
| 402 { | 402 { |
| 403 if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr))) | 403 if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr))) |
| 404 return true; | 404 return true; |
| 405 | 405 |
| 406 for (HTMLElement& child : Traversal<HTMLElement>::childrenOf(*this)) { | 406 for (HTMLElement& child : Traversal<HTMLElement>::childrenOf(*this)) { |
| 407 if (isHTMLParamElement(child) | 407 if (isHTMLParamElement(child) |
| 408 && equalIgnoringCase(child.getNameAttribute(), "type") | 408 && equalIgnoringCase(child.getNameAttribute(), "type") |
| 409 && MIMETypeRegistry::isJavaAppletMIMEType(child.getAttribute(valueAt
tr).string())) | 409 && MIMETypeRegistry::isJavaAppletMIMEType(child.getAttribute(valueAt
tr).getString())) |
| 410 return true; | 410 return true; |
| 411 if (isHTMLObjectElement(child) && toHTMLObjectElement(child).containsJav
aApplet()) | 411 if (isHTMLObjectElement(child) && toHTMLObjectElement(child).containsJav
aApplet()) |
| 412 return true; | 412 return true; |
| 413 } | 413 } |
| 414 | 414 |
| 415 return false; | 415 return false; |
| 416 } | 416 } |
| 417 | 417 |
| 418 void HTMLObjectElement::didMoveToNewDocument(Document& oldDocument) | 418 void HTMLObjectElement::didMoveToNewDocument(Document& oldDocument) |
| 419 { | 419 { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 443 { | 443 { |
| 444 return fastHasAttribute(usemapAttr); | 444 return fastHasAttribute(usemapAttr); |
| 445 } | 445 } |
| 446 | 446 |
| 447 bool HTMLObjectElement::useFallbackContent() const | 447 bool HTMLObjectElement::useFallbackContent() const |
| 448 { | 448 { |
| 449 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; | 449 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace blink | 452 } // namespace blink |
| OLD | NEW |