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

Unified Diff: sky/engine/core/html/parser/HTMLTokenizer.h

Issue 678263002: Update tokenizer to match spec (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/html/parser/HTMLToken.h ('k') | sky/engine/core/html/parser/HTMLTokenizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/parser/HTMLTokenizer.h
diff --git a/sky/engine/core/html/parser/HTMLTokenizer.h b/sky/engine/core/html/parser/HTMLTokenizer.h
index bc8c48af0de10c2f6c4ed5ebc4ccd58298d04e5f..6c6dc9ce3d9f1d44467bb9d917c521b8865cf4c4 100644
--- a/sky/engine/core/html/parser/HTMLTokenizer.h
+++ b/sky/engine/core/html/parser/HTMLTokenizer.h
@@ -47,13 +47,13 @@ public:
DataState,
CharacterReferenceInDataState,
CharacterReferenceInAttributeValueState,
- RAWTEXTState,
+ RawDataState,
+ RawDataLessThanSignState,
+ RawDataEndTagOpenState,
+ RawDataEndTagNameState,
TagOpenState,
CloseTagState,
TagNameState,
- RAWTEXTLessThanSignState,
- RAWTEXTEndTagOpenState,
- RAWTEXTEndTagNameState,
BeforeAttributeNameState,
AttributeNameState,
AfterAttributeNameState,
@@ -61,8 +61,7 @@ public:
AttributeValueDoubleQuotedState,
AttributeValueSingleQuotedState,
AttributeValueUnquotedState,
- AfterAttributeValueQuotedState,
- SelfClosingStartTagState,
+ VoidTagState,
CommentStart1State,
CommentStart2State,
CommentState,
@@ -76,6 +75,7 @@ public:
bool nextToken(SegmentedString&, HTMLToken&);
State state() const { return m_state; }
+
void setState(State state) { m_state = state; }
private:
@@ -121,12 +121,6 @@ private:
// Return whether we need to emit a character token before dealing with
// the buffered end tag.
inline bool flushBufferedEndTag(SegmentedString&);
- inline bool temporaryBufferIs(const String&);
-
- // Sometimes we speculatively consume input characters and we don't
- // know whether they represent end tags or RCDATA, etc. These
- // functions help manage these state.
- inline void addToPossibleEndTag(LChar cc);
inline void saveEndTagNameIfNeeded()
{
@@ -136,7 +130,6 @@ private:
}
inline bool isAppropriateEndTag();
-
inline bool haveBufferedCharacterToken()
{
return m_token->type() == HTMLToken::Character;
@@ -158,11 +151,6 @@ private:
// http://www.whatwg.org/specs/web-apps/current-work/#temporary-buffer
Vector<LChar, 32> m_temporaryBuffer;
-
- // We occationally want to emit both a character token and an end tag
- // token (e.g., when lexing script). We buffer the name of the end tag
- // token here so we remember it next time we re-enter the tokenizer.
- Vector<LChar, 32> m_bufferedEndTagName;
};
}
« no previous file with comments | « sky/engine/core/html/parser/HTMLToken.h ('k') | sky/engine/core/html/parser/HTMLTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698