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

Side by Side Diff: third_party/WebKit/Source/core/html/LinkRelAttribute.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 is_import_(false), 46 is_import_(false),
47 is_manifest_(false), 47 is_manifest_(false),
48 is_service_worker_(false) { 48 is_service_worker_(false) {
49 if (rel.IsEmpty()) 49 if (rel.IsEmpty())
50 return; 50 return;
51 String rel_copy = rel; 51 String rel_copy = rel;
52 rel_copy.Replace('\n', ' '); 52 rel_copy.Replace('\n', ' ');
53 Vector<String> list; 53 Vector<String> list;
54 rel_copy.Split(' ', list); 54 rel_copy.Split(' ', list);
55 for (const String& link_type : list) { 55 for (const String& link_type : list) {
56 if (EqualIgnoringCase(link_type, "stylesheet")) { 56 if (DeprecatedEqualIgnoringCase(link_type, "stylesheet")) {
57 if (!is_import_) 57 if (!is_import_)
58 is_style_sheet_ = true; 58 is_style_sheet_ = true;
59 } else if (EqualIgnoringCase(link_type, "import")) { 59 } else if (DeprecatedEqualIgnoringCase(link_type, "import")) {
60 if (!is_style_sheet_) 60 if (!is_style_sheet_)
61 is_import_ = true; 61 is_import_ = true;
62 } else if (EqualIgnoringCase(link_type, "alternate")) { 62 } else if (DeprecatedEqualIgnoringCase(link_type, "alternate")) {
63 is_alternate_ = true; 63 is_alternate_ = true;
64 } else if (EqualIgnoringCase(link_type, "icon")) { 64 } else if (DeprecatedEqualIgnoringCase(link_type, "icon")) {
65 // This also allows "shortcut icon" since we just ignore the non-standard 65 // This also allows "shortcut icon" since we just ignore the non-standard
66 // "shortcut" token. 66 // "shortcut" token.
67 // FIXME: This doesn't really follow the spec that requires "shortcut 67 // FIXME: This doesn't really follow the spec that requires "shortcut
68 // icon" to be the entire string 68 // icon" to be the entire string
69 // http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html# rel-icon 69 // http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html# rel-icon
70 icon_type_ = kFavicon; 70 icon_type_ = kFavicon;
71 } else if (EqualIgnoringCase(link_type, "prefetch")) { 71 } else if (DeprecatedEqualIgnoringCase(link_type, "prefetch")) {
72 is_link_prefetch_ = true; 72 is_link_prefetch_ = true;
73 } else if (EqualIgnoringCase(link_type, "dns-prefetch")) { 73 } else if (DeprecatedEqualIgnoringCase(link_type, "dns-prefetch")) {
74 is_dns_prefetch_ = true; 74 is_dns_prefetch_ = true;
75 } else if (EqualIgnoringCase(link_type, "preconnect")) { 75 } else if (DeprecatedEqualIgnoringCase(link_type, "preconnect")) {
76 is_preconnect_ = true; 76 is_preconnect_ = true;
77 } else if (EqualIgnoringCase(link_type, "preload")) { 77 } else if (DeprecatedEqualIgnoringCase(link_type, "preload")) {
78 is_link_preload_ = true; 78 is_link_preload_ = true;
79 } else if (EqualIgnoringCase(link_type, "prerender")) { 79 } else if (DeprecatedEqualIgnoringCase(link_type, "prerender")) {
80 is_link_prerender_ = true; 80 is_link_prerender_ = true;
81 } else if (EqualIgnoringCase(link_type, "next")) { 81 } else if (DeprecatedEqualIgnoringCase(link_type, "next")) {
82 is_link_next_ = true; 82 is_link_next_ = true;
83 } else if (EqualIgnoringCase(link_type, "apple-touch-icon")) { 83 } else if (DeprecatedEqualIgnoringCase(link_type, "apple-touch-icon")) {
84 icon_type_ = kTouchIcon; 84 icon_type_ = kTouchIcon;
85 } else if (EqualIgnoringCase(link_type, "apple-touch-icon-precomposed")) { 85 } else if (DeprecatedEqualIgnoringCase(link_type,
86 "apple-touch-icon-precomposed")) {
86 icon_type_ = kTouchPrecomposedIcon; 87 icon_type_ = kTouchPrecomposedIcon;
87 } else if (EqualIgnoringCase(link_type, "manifest")) { 88 } else if (DeprecatedEqualIgnoringCase(link_type, "manifest")) {
88 is_manifest_ = true; 89 is_manifest_ = true;
89 } else if (EqualIgnoringCase(link_type, "serviceworker")) { 90 } else if (DeprecatedEqualIgnoringCase(link_type, "serviceworker")) {
90 is_service_worker_ = true; 91 is_service_worker_ = true;
91 } 92 }
92 // Adding or removing a value here requires you to update 93 // Adding or removing a value here requires you to update
93 // RelList::supportedTokens() 94 // RelList::supportedTokens()
94 } 95 }
95 } 96 }
96 97
97 } // namespace blink 98 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLUListElement.cpp ('k') | third_party/WebKit/Source/core/html/TextControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698