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

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

Issue 2576373002: Fix HTML parser CDATA edge-case and sync state names with spec (Closed)
Patch Set: Created 4 years 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 DOCTYPEPublicIdentifierSingleQuotedState, 116 DOCTYPEPublicIdentifierSingleQuotedState,
117 AfterDOCTYPEPublicIdentifierState, 117 AfterDOCTYPEPublicIdentifierState,
118 BetweenDOCTYPEPublicAndSystemIdentifiersState, 118 BetweenDOCTYPEPublicAndSystemIdentifiersState,
119 AfterDOCTYPESystemKeywordState, 119 AfterDOCTYPESystemKeywordState,
120 BeforeDOCTYPESystemIdentifierState, 120 BeforeDOCTYPESystemIdentifierState,
121 DOCTYPESystemIdentifierDoubleQuotedState, 121 DOCTYPESystemIdentifierDoubleQuotedState,
122 DOCTYPESystemIdentifierSingleQuotedState, 122 DOCTYPESystemIdentifierSingleQuotedState,
123 AfterDOCTYPESystemIdentifierState, 123 AfterDOCTYPESystemIdentifierState,
124 BogusDOCTYPEState, 124 BogusDOCTYPEState,
125 CDATASectionState, 125 CDATASectionState,
126 // These CDATA states are not in the HTML5 spec, but we use them internally. 126 CDATASectionBracketState,
127 CDATASectionRightSquareBracketState, 127 CDATASectionEndState,
128 CDATASectionDoubleRightSquareBracketState,
129 }; 128 };
130 129
131 // This function returns true if it emits a token. Otherwise, callers 130 // This function returns true if it emits a token. Otherwise, callers
132 // must provide the same (in progress) token on the next call (unless 131 // must provide the same (in progress) token on the next call (unless
133 // they call reset() first). 132 // they call reset() first).
134 bool nextToken(SegmentedString&, HTMLToken&); 133 bool nextToken(SegmentedString&, HTMLToken&);
135 134
136 // Returns a copy of any characters buffered internally by the tokenizer. 135 // Returns a copy of any characters buffered internally by the tokenizer.
137 // The tokenizer buffers characters when searching for the </script> token 136 // The tokenizer buffers characters when searching for the </script> token
138 // that terminates a script element. 137 // that terminates a script element.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // 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
264 // 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.
265 Vector<LChar, 32> m_bufferedEndTagName; 264 Vector<LChar, 32> m_bufferedEndTagName;
266 265
267 HTMLParserOptions m_options; 266 HTMLParserOptions m_options;
268 }; 267 };
269 268
270 } // namespace blink 269 } // namespace blink
271 270
272 #endif 271 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698