| 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 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef AtomicHTMLToken_h | 26 #ifndef AtomicHTMLToken_h |
| 27 #define AtomicHTMLToken_h | 27 #define AtomicHTMLToken_h |
| 28 | 28 |
| 29 #include "core/HTMLElementLookupTrie.h" | 29 #include "core/HTMLElementLookupTrie.h" |
| 30 #include "core/dom/Attribute.h" | 30 #include "core/dom/Attribute.h" |
| 31 #include "core/html/parser/CompactHTMLToken.h" | 31 #include "core/html/parser/CompactHTMLToken.h" |
| 32 #include "core/html/parser/HTMLToken.h" | 32 #include "core/html/parser/HTMLToken.h" |
| 33 #include "wtf/Allocator.h" |
| 33 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 34 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 class AtomicHTMLToken { | 39 class AtomicHTMLToken { |
| 40 STACK_ALLOCATED(); |
| 39 WTF_MAKE_NONCOPYABLE(AtomicHTMLToken); | 41 WTF_MAKE_NONCOPYABLE(AtomicHTMLToken); |
| 40 public: | 42 public: |
| 41 | 43 |
| 42 bool forceQuirks() const | 44 bool forceQuirks() const |
| 43 { | 45 { |
| 44 ASSERT(m_type == HTMLToken::DOCTYPE); | 46 ASSERT(m_type == HTMLToken::DOCTYPE); |
| 45 return m_doctypeData->m_forceQuirks; | 47 return m_doctypeData->m_forceQuirks; |
| 46 } | 48 } |
| 47 | 49 |
| 48 HTMLToken::Type type() const { return m_type; } | 50 HTMLToken::Type type() const { return m_type; } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 const QualifiedName& name = nameForAttribute(attribute); | 244 const QualifiedName& name = nameForAttribute(attribute); |
| 243 // FIXME: This is N^2 for the number of attributes. | 245 // FIXME: This is N^2 for the number of attributes. |
| 244 if (!findAttributeInVector(m_attributes, name)) | 246 if (!findAttributeInVector(m_attributes, name)) |
| 245 m_attributes.append(Attribute(name, value)); | 247 m_attributes.append(Attribute(name, value)); |
| 246 } | 248 } |
| 247 } | 249 } |
| 248 | 250 |
| 249 } | 251 } |
| 250 | 252 |
| 251 #endif | 253 #endif |
| OLD | NEW |