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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h

Issue 2145353002: HTML parser: Add show/toString() debug helper methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.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) 2013 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2013 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 AtomicHTMLToken(HTMLToken::TokenType type, const AtomicString& name, const V ector<Attribute>& attributes = Vector<Attribute>()) 191 AtomicHTMLToken(HTMLToken::TokenType type, const AtomicString& name, const V ector<Attribute>& attributes = Vector<Attribute>())
192 : m_type(type) 192 : m_type(type)
193 , m_name(name) 193 , m_name(name)
194 , m_selfClosing(false) 194 , m_selfClosing(false)
195 , m_attributes(attributes) 195 , m_attributes(attributes)
196 { 196 {
197 ASSERT(usesName()); 197 ASSERT(usesName());
198 } 198 }
199 199
200 #ifndef NDEBUG
201 void show() const;
202 #endif
203
200 private: 204 private:
201 HTMLToken::TokenType m_type; 205 HTMLToken::TokenType m_type;
202 206
203 void initializeAttributes(const HTMLToken::AttributeList& attributes); 207 void initializeAttributes(const HTMLToken::AttributeList& attributes);
204 QualifiedName nameForAttribute(const HTMLToken::Attribute&) const; 208 QualifiedName nameForAttribute(const HTMLToken::Attribute&) const;
205 209
206 bool usesName() const; 210 bool usesName() const;
207 211
208 bool usesAttributes() const; 212 bool usesAttributes() const;
209 213
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 const QualifiedName& name = nameForAttribute(attribute); 246 const QualifiedName& name = nameForAttribute(attribute);
243 // FIXME: This is N^2 for the number of attributes. 247 // FIXME: This is N^2 for the number of attributes.
244 if (!findAttributeInVector(m_attributes, name)) 248 if (!findAttributeInVector(m_attributes, name))
245 m_attributes.append(Attribute(name, value)); 249 m_attributes.append(Attribute(name, value));
246 } 250 }
247 } 251 }
248 252
249 } // namespace blink 253 } // namespace blink
250 254
251 #endif 255 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698