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

Side by Side Diff: third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (i != attrs.end()) 113 if (i != attrs.end())
114 type = i->value; 114 type = i->value;
115 115
116 m_isCSS = type.isEmpty() || type == "text/css"; 116 m_isCSS = type.isEmpty() || type == "text/css";
117 m_isXSL = (type == "text/xml" || type == "text/xsl" || 117 m_isXSL = (type == "text/xml" || type == "text/xsl" ||
118 type == "application/xml" || type == "application/xhtml+xml" || 118 type == "application/xml" || type == "application/xhtml+xml" ||
119 type == "application/rss+xml" || type == "application/atom+xml"); 119 type == "application/rss+xml" || type == "application/atom+xml");
120 if (!m_isCSS && !m_isXSL) 120 if (!m_isCSS && !m_isXSL)
121 return false; 121 return false;
122 122
123 href = attrs.get("href"); 123 href = attrs.at("href");
124 charset = attrs.get("charset"); 124 charset = attrs.at("charset");
125 String alternate = attrs.get("alternate"); 125 String alternate = attrs.at("alternate");
126 m_alternate = alternate == "yes"; 126 m_alternate = alternate == "yes";
127 m_title = attrs.get("title"); 127 m_title = attrs.at("title");
128 m_media = attrs.get("media"); 128 m_media = attrs.at("media");
129 129
130 return !m_alternate || !m_title.isEmpty(); 130 return !m_alternate || !m_title.isEmpty();
131 } 131 }
132 132
133 void ProcessingInstruction::process(const String& href, const String& charset) { 133 void ProcessingInstruction::process(const String& href, const String& charset) {
134 if (href.length() > 1 && href[0] == '#') { 134 if (href.length() > 1 && href[0] == '#') {
135 m_localHref = href.substring(1); 135 m_localHref = href.substring(1);
136 // We need to make a synthetic XSLStyleSheet that is embedded. 136 // We need to make a synthetic XSLStyleSheet that is embedded.
137 // It needs to be able to kick off import/include loads that 137 // It needs to be able to kick off import/include loads that
138 // can hang off some parent sheet. 138 // can hang off some parent sheet.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 DEFINE_TRACE(ProcessingInstruction) { 294 DEFINE_TRACE(ProcessingInstruction) {
295 visitor->trace(m_sheet); 295 visitor->trace(m_sheet);
296 visitor->trace(m_listenerForXSLT); 296 visitor->trace(m_listenerForXSLT);
297 CharacterData::trace(visitor); 297 CharacterData::trace(visitor);
298 ResourceOwner<StyleSheetResource>::trace(visitor); 298 ResourceOwner<StyleSheetResource>::trace(visitor);
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/NthIndexCache.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698