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

Side by Side Diff: sky/engine/core/html/parser/HTMLToken.h

Issue 678263002: Update tokenizer to match spec (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 ASSERT(m_type == StartTag || m_type == EndTag); 143 ASSERT(m_type == StartTag || m_type == EndTag);
144 return m_selfClosing; 144 return m_selfClosing;
145 } 145 }
146 146
147 void setSelfClosing() 147 void setSelfClosing()
148 { 148 {
149 ASSERT(m_type == StartTag || m_type == EndTag); 149 ASSERT(m_type == StartTag || m_type == EndTag);
150 m_selfClosing = true; 150 m_selfClosing = true;
151 } 151 }
152 152
153 void beginStartTag(UChar character) 153 void beginStartTag(LChar character)
154 { 154 {
155 ASSERT(character); 155 ASSERT(character);
156 ASSERT(m_type == Uninitialized); 156 ASSERT(m_type == Uninitialized);
157 m_type = StartTag; 157 m_type = StartTag;
158 m_selfClosing = false; 158 m_selfClosing = false;
159 m_currentAttribute = 0; 159 m_currentAttribute = 0;
160 m_attributes.clear(); 160 m_attributes.clear();
161 161
162 m_data.append(character); 162 m_data.append(character);
163 m_orAllData |= character;
164 } 163 }
165 164
166 void beginEndTag(LChar character) 165 void beginEndTag(LChar character)
167 { 166 {
168 ASSERT(m_type == Uninitialized); 167 ASSERT(m_type == Uninitialized);
169 m_type = EndTag; 168 m_type = EndTag;
170 m_selfClosing = false; 169 m_selfClosing = false;
171 m_currentAttribute = 0; 170 m_currentAttribute = 0;
172 m_attributes.clear(); 171 m_attributes.clear();
173 172
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 bool m_selfClosing; 307 bool m_selfClosing;
309 AttributeList m_attributes; 308 AttributeList m_attributes;
310 309
311 // A pointer into m_attributes used during lexing. 310 // A pointer into m_attributes used during lexing.
312 Attribute* m_currentAttribute; 311 Attribute* m_currentAttribute;
313 }; 312 };
314 313
315 } 314 }
316 315
317 #endif 316 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/BackgroundHTMLParser.cpp ('k') | sky/engine/core/html/parser/HTMLTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698