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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMImplementation.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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 if (doctype) 107 if (doctype)
108 doc->AppendChild(doctype); 108 doc->AppendChild(doctype);
109 if (document_element) 109 if (document_element)
110 doc->AppendChild(document_element); 110 doc->AppendChild(document_element);
111 111
112 return doc; 112 return doc;
113 } 113 }
114 114
115 bool DOMImplementation::IsXMLMIMEType(const String& mime_type) { 115 bool DOMImplementation::IsXMLMIMEType(const String& mime_type) {
116 if (EqualIgnoringCase(mime_type, "text/xml") || 116 if (DeprecatedEqualIgnoringCase(mime_type, "text/xml") ||
117 EqualIgnoringCase(mime_type, "application/xml") || 117 DeprecatedEqualIgnoringCase(mime_type, "application/xml") ||
118 EqualIgnoringCase(mime_type, "text/xsl")) 118 DeprecatedEqualIgnoringCase(mime_type, "text/xsl"))
119 return true; 119 return true;
120 120
121 // Per RFCs 3023 and 2045, an XML MIME type is of the form: 121 // Per RFCs 3023 and 2045, an XML MIME type is of the form:
122 // ^[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+/[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+\+xml$ 122 // ^[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+/[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+\+xml$
123 123
124 int length = mime_type.length(); 124 int length = mime_type.length();
125 if (length < 7) 125 if (length < 7)
126 return false; 126 return false;
127 127
128 if (mime_type[0] == '/' || mime_type[length - 5] == '/' || 128 if (mime_type[0] == '/' || mime_type[length - 5] == '/' ||
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 IsASCIISpace(mime_type[end_subtype]); 184 IsASCIISpace(mime_type[end_subtype]);
185 } 185 }
186 return parameter_marker > subtype; 186 return parameter_marker > subtype;
187 } 187 }
188 } 188 }
189 return false; 189 return false;
190 } 190 }
191 191
192 static bool IsTextPlainType(const String& mime_type) { 192 static bool IsTextPlainType(const String& mime_type) {
193 return mime_type.StartsWith("text/", kTextCaseASCIIInsensitive) && 193 return mime_type.StartsWith("text/", kTextCaseASCIIInsensitive) &&
194 !(EqualIgnoringCase(mime_type, "text/html") || 194 !(DeprecatedEqualIgnoringCase(mime_type, "text/html") ||
195 EqualIgnoringCase(mime_type, "text/xml") || 195 DeprecatedEqualIgnoringCase(mime_type, "text/xml") ||
196 EqualIgnoringCase(mime_type, "text/xsl")); 196 DeprecatedEqualIgnoringCase(mime_type, "text/xsl"));
197 } 197 }
198 198
199 bool DOMImplementation::IsTextMIMEType(const String& mime_type) { 199 bool DOMImplementation::IsTextMIMEType(const String& mime_type) {
200 return MIMETypeRegistry::IsSupportedJavaScriptMIMEType(mime_type) || 200 return MIMETypeRegistry::IsSupportedJavaScriptMIMEType(mime_type) ||
201 IsJSONMIMEType(mime_type) || IsTextPlainType(mime_type); 201 IsJSONMIMEType(mime_type) || IsTextPlainType(mime_type);
202 } 202 }
203 203
204 HTMLDocument* DOMImplementation::createHTMLDocument(const String& title) { 204 HTMLDocument* DOMImplementation::createHTMLDocument(const String& title) {
205 DocumentInit init = 205 DocumentInit init =
206 DocumentInit::FromContext(GetDocument().ContextDocument()) 206 DocumentInit::FromContext(GetDocument().ContextDocument())
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return XMLDocument::Create(init); 282 return XMLDocument::Create(init);
283 283
284 return HTMLDocument::Create(init); 284 return HTMLDocument::Create(init);
285 } 285 }
286 286
287 DEFINE_TRACE(DOMImplementation) { 287 DEFINE_TRACE(DOMImplementation) {
288 visitor->Trace(document_); 288 visitor->Trace(document_);
289 } 289 }
290 290
291 } // namespace blink 291 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/CompositorProxy.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698