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

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

Issue 2811793004: Rename EqualIgnoringCase*() to DeprecatedEqualIgnoringCase*() (Closed)
Patch Set: Created 3 years, 8 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
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 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 HTMLPlugInElement::ParseAttribute(params); 126 HTMLPlugInElement::ParseAttribute(params);
127 } 127 }
128 } 128 }
129 129
130 static void MapDataParamToSrc(Vector<String>* param_names, 130 static void MapDataParamToSrc(Vector<String>* param_names,
131 Vector<String>* param_values) { 131 Vector<String>* param_values) {
132 // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e. 132 // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e.
133 // Real and WMP require "src" attribute). 133 // Real and WMP require "src" attribute).
134 int src_index = -1, data_index = -1; 134 int src_index = -1, data_index = -1;
135 for (unsigned i = 0; i < param_names->size(); ++i) { 135 for (unsigned i = 0; i < param_names->size(); ++i) {
136 if (EqualIgnoringCase((*param_names)[i], "src")) 136 if (DeprecatedEqualIgnoringCase((*param_names)[i], "src"))
137 src_index = i; 137 src_index = i;
138 else if (EqualIgnoringCase((*param_names)[i], "data")) 138 else if (DeprecatedEqualIgnoringCase((*param_names)[i], "data"))
139 data_index = i; 139 data_index = i;
140 } 140 }
141 141
142 if (src_index == -1 && data_index != -1) { 142 if (src_index == -1 && data_index != -1) {
143 param_names->push_back("src"); 143 param_names->push_back("src");
144 param_values->push_back((*param_values)[data_index]); 144 param_values->push_back((*param_values)[data_index]);
145 } 145 }
146 } 146 }
147 147
148 // TODO(schenney): crbug.com/572908 This function should not deal with url or 148 // TODO(schenney): crbug.com/572908 This function should not deal with url or
(...skipping 13 matching lines...) Expand all
162 if (name.IsEmpty()) 162 if (name.IsEmpty())
163 continue; 163 continue;
164 164
165 unique_param_names.insert(name.Impl()); 165 unique_param_names.insert(name.Impl());
166 param_names.push_back(p->GetName()); 166 param_names.push_back(p->GetName());
167 param_values.push_back(p->Value()); 167 param_values.push_back(p->Value());
168 168
169 // TODO(schenney): crbug.com/572908 url adjustment does not belong in this 169 // TODO(schenney): crbug.com/572908 url adjustment does not belong in this
170 // function. 170 // function.
171 if (url.IsEmpty() && url_parameter.IsEmpty() && 171 if (url.IsEmpty() && url_parameter.IsEmpty() &&
172 (EqualIgnoringCase(name, "src") || EqualIgnoringCase(name, "movie") || 172 (DeprecatedEqualIgnoringCase(name, "src") ||
173 EqualIgnoringCase(name, "code") || EqualIgnoringCase(name, "url"))) 173 DeprecatedEqualIgnoringCase(name, "movie") ||
174 DeprecatedEqualIgnoringCase(name, "code") ||
175 DeprecatedEqualIgnoringCase(name, "url")))
174 url_parameter = StripLeadingAndTrailingHTMLSpaces(p->Value()); 176 url_parameter = StripLeadingAndTrailingHTMLSpaces(p->Value());
175 // TODO(schenney): crbug.com/572908 serviceType calculation does not belong 177 // TODO(schenney): crbug.com/572908 serviceType calculation does not belong
176 // in this function. 178 // in this function.
177 if (service_type.IsEmpty() && EqualIgnoringCase(name, "type")) { 179 if (service_type.IsEmpty() && DeprecatedEqualIgnoringCase(name, "type")) {
178 service_type = p->Value(); 180 service_type = p->Value();
179 size_t pos = service_type.Find(";"); 181 size_t pos = service_type.Find(";");
180 if (pos != kNotFound) 182 if (pos != kNotFound)
181 service_type = service_type.Left(pos); 183 service_type = service_type.Left(pos);
182 } 184 }
183 } 185 }
184 186
185 // When OBJECT is used for an applet via Sun's Java plugin, the CODEBASE 187 // When OBJECT is used for an applet via Sun's Java plugin, the CODEBASE
186 // attribute in the tag points to the Java plugin itself (an ActiveX 188 // attribute in the tag points to the Java plugin itself (an ActiveX
187 // component) while the actual applet CODEBASE is in a PARAM tag. See 189 // component) while the actual applet CODEBASE is in a PARAM tag. See
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 423 }
422 return true; 424 return true;
423 } 425 }
424 426
425 bool HTMLObjectElement::ContainsJavaApplet() const { 427 bool HTMLObjectElement::ContainsJavaApplet() const {
426 if (MIMETypeRegistry::IsJavaAppletMIMEType(getAttribute(typeAttr))) 428 if (MIMETypeRegistry::IsJavaAppletMIMEType(getAttribute(typeAttr)))
427 return true; 429 return true;
428 430
429 for (HTMLElement& child : Traversal<HTMLElement>::ChildrenOf(*this)) { 431 for (HTMLElement& child : Traversal<HTMLElement>::ChildrenOf(*this)) {
430 if (isHTMLParamElement(child) && 432 if (isHTMLParamElement(child) &&
431 EqualIgnoringCase(child.GetNameAttribute(), "type") && 433 DeprecatedEqualIgnoringCase(child.GetNameAttribute(), "type") &&
432 MIMETypeRegistry::IsJavaAppletMIMEType( 434 MIMETypeRegistry::IsJavaAppletMIMEType(
433 child.getAttribute(valueAttr).GetString())) 435 child.getAttribute(valueAttr).GetString()))
434 return true; 436 return true;
435 if (isHTMLObjectElement(child) && 437 if (isHTMLObjectElement(child) &&
436 toHTMLObjectElement(child).ContainsJavaApplet()) 438 toHTMLObjectElement(child).ContainsJavaApplet())
437 return true; 439 return true;
438 } 440 }
439 441
440 return false; 442 return false;
441 } 443 }
(...skipping 17 matching lines...) Expand all
459 461
460 bool HTMLObjectElement::WillUseFallbackContentAtLayout() const { 462 bool HTMLObjectElement::WillUseFallbackContentAtLayout() const {
461 return !HasValidClassId() && HasFallbackContent(); 463 return !HasValidClassId() && HasFallbackContent();
462 } 464 }
463 465
464 void HTMLObjectElement::AssociateWith(HTMLFormElement* form) { 466 void HTMLObjectElement::AssociateWith(HTMLFormElement* form) {
465 AssociateByParser(form); 467 AssociateByParser(form);
466 }; 468 };
467 469
468 } // namespace blink 470 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMetaElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLParagraphElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698