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

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

Issue 2717303002: Considering HTMLTokenizer state in HTMLSourceTracker (Closed)
Patch Set: Considering HTMLTokenizer state in HTMLSourceTracker 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 3 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 Vector<LChar, 32> m_temporaryBuffer; 259 Vector<LChar, 32> m_temporaryBuffer;
260 260
261 // We occationally want to emit both a character token and an end tag 261 // We occationally want to emit both a character token and an end tag
262 // token (e.g., when lexing script). We buffer the name of the end tag 262 // token (e.g., when lexing script). We buffer the name of the end tag
263 // token here so we remember it next time we re-enter the tokenizer. 263 // token here so we remember it next time we re-enter the tokenizer.
264 Vector<LChar, 32> m_bufferedEndTagName; 264 Vector<LChar, 32> m_bufferedEndTagName;
265 265
266 HTMLParserOptions m_options; 266 HTMLParserOptions m_options;
267 }; 267 };
268 268
269 inline bool isEndTagBufferingState(HTMLTokenizer::State state) {
Charlie Harrison 2017/03/07 18:37:49 Can you just make this an inline static member fun
wanchang 2017/03/08 00:35:35 Done.
270 switch (state) {
271 case HTMLTokenizer::RCDATAEndTagOpenState:
272 case HTMLTokenizer::RCDATAEndTagNameState:
273 case HTMLTokenizer::RAWTEXTEndTagOpenState:
274 case HTMLTokenizer::RAWTEXTEndTagNameState:
275 case HTMLTokenizer::ScriptDataEndTagOpenState:
276 case HTMLTokenizer::ScriptDataEndTagNameState:
277 case HTMLTokenizer::ScriptDataEscapedEndTagOpenState:
278 case HTMLTokenizer::ScriptDataEscapedEndTagNameState:
279 return true;
280 default:
281 return false;
282 }
283 }
284
269 } // namespace blink 285 } // namespace blink
270 286
271 #endif 287 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698