Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: Source/core/html/HTMLObjectElement.cpp

Issue 1005223002: Blink: Replace all "plug-in" with "plugin". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert netscape-dom-access tests. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 paramNames.append(name.string()); 193 paramNames.append(name.string());
194 paramValues.append(attribute.value().string()); 194 paramValues.append(attribute.value().string());
195 } 195 }
196 } 196 }
197 197
198 mapDataParamToSrc(&paramNames, &paramValues); 198 mapDataParamToSrc(&paramNames, &paramValues);
199 199
200 // 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
201 // attribute, not by a param element. However, for compatibility, allow the 201 // attribute, not by a param element. However, for compatibility, allow the
202 // 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"
203 // if we know that resource points to a plug-in. 203 // if we know that resource points to a plugin.
204 if (url.isEmpty() && !urlParameter.isEmpty()) { 204 if (url.isEmpty() && !urlParameter.isEmpty()) {
205 KURL completedURL = document().completeURL(urlParameter); 205 KURL completedURL = document().completeURL(urlParameter);
206 bool useFallback; 206 bool useFallback;
207 if (shouldUsePlugin(completedURL, serviceType, false, useFallback)) 207 if (shouldUsePlugin(completedURL, serviceType, false, useFallback))
208 url = urlParameter; 208 url = urlParameter;
209 } 209 }
210 } 210 }
211 211
212 212
213 bool HTMLObjectElement::hasFallbackContent() const 213 bool HTMLObjectElement::hasFallbackContent() const
214 { 214 {
215 for (Node* child = firstChild(); child; child = child->nextSibling()) { 215 for (Node* child = firstChild(); child; child = child->nextSibling()) {
216 // Ignore whitespace-only text, and <param> tags, any other content is f allback content. 216 // Ignore whitespace-only text, and <param> tags, any other content is f allback content.
217 if (child->isTextNode()) { 217 if (child->isTextNode()) {
218 if (!toText(child)->containsOnlyWhitespace()) 218 if (!toText(child)->containsOnlyWhitespace())
219 return true; 219 return true;
220 } else if (!isHTMLParamElement(*child)) { 220 } else if (!isHTMLParamElement(*child)) {
221 return true; 221 return true;
222 } 222 }
223 } 223 }
224 return false; 224 return false;
225 } 225 }
226 226
227 bool HTMLObjectElement::hasValidClassId() 227 bool HTMLObjectElement::hasValidClassId()
228 { 228 {
229 if (MIMETypeRegistry::isJavaAppletMIMEType(m_serviceType) && classId().start sWith("java:", TextCaseInsensitive)) 229 if (MIMETypeRegistry::isJavaAppletMIMEType(m_serviceType) && classId().start sWith("java:", TextCaseInsensitive))
230 return true; 230 return true;
231 231
232 // HTML5 says that fallback content should be rendered if a non-empty 232 // HTML5 says that fallback content should be rendered if a non-empty
233 // classid is specified for which the UA can't find a suitable plug-in. 233 // classid is specified for which the UA can't find a suitable plugin.
234 return classId().isEmpty(); 234 return classId().isEmpty();
235 } 235 }
236 236
237 void HTMLObjectElement::reloadPluginOnAttributeChange(const QualifiedName& name) 237 void HTMLObjectElement::reloadPluginOnAttributeChange(const QualifiedName& name)
238 { 238 {
239 // Following, 239 // Following,
240 // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element 240 // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element
241 // (Enumerated list below "Whenever one of the following conditions occur: ") 241 // (Enumerated list below "Whenever one of the following conditions occur: ")
242 // 242 //
243 // the updating of certain attributes should bring about "redetermination" 243 // the updating of certain attributes should bring about "redetermination"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698