| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |