Remove more unused HTMLTokenizer features

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678903002
diff --git a/sky/engine/core/html/parser/HTMLTokenizer.cpp b/sky/engine/core/html/parser/HTMLTokenizer.cpp
index ee05b5d..8fbf9ac 100644
--- a/sky/engine/core/html/parser/HTMLTokenizer.cpp
+++ b/sky/engine/core/html/parser/HTMLTokenizer.cpp
@@ -243,14 +243,6 @@
     }
     END_STATE()
 
-    HTML_BEGIN_STATE(PLAINTEXTState) {
-        if (cc == kEndOfFileMarker)
-            return emitEndOfFile(source);
-        bufferCharacter(cc);
-        HTML_ADVANCE_TO(PLAINTEXTState);
-    }
-    END_STATE()
-
     HTML_BEGIN_STATE(TagOpenState) {
         if (cc == '!')
             HTML_ADVANCE_TO(MarkupDeclarationOpenState);
@@ -1077,25 +1069,6 @@
     return false;
 }
 
-String HTMLTokenizer::bufferedCharacters() const
-{
-    // FIXME: Add an assert about m_state.
-    StringBuilder characters;
-    characters.reserveCapacity(numberOfBufferedCharacters());
-    characters.append('<');
-    characters.append('/');
-    characters.append(m_temporaryBuffer.data(), m_temporaryBuffer.size());
-    return characters.toString();
-}
-
-void HTMLTokenizer::updateStateFor(const String& tagName)
-{
-    if (threadSafeMatch(tagName, HTMLNames::scriptTag))
-        setState(HTMLTokenizer::ScriptDataState);
-    else if (threadSafeMatch(tagName, HTMLNames::styleTag))
-        setState(HTMLTokenizer::RAWTEXTState);
-}
-
 inline bool HTMLTokenizer::temporaryBufferIs(const String& expectedString)
 {
     return vectorEqualsString(m_temporaryBuffer, expectedString);
diff --git a/sky/engine/core/html/parser/HTMLTokenizer.h b/sky/engine/core/html/parser/HTMLTokenizer.h
index 243e998..3e31f96 100644
--- a/sky/engine/core/html/parser/HTMLTokenizer.h
+++ b/sky/engine/core/html/parser/HTMLTokenizer.h
@@ -47,7 +47,6 @@
         CharacterReferenceInDataState,
         RAWTEXTState,
         ScriptDataState,
-        PLAINTEXTState,
         TagOpenState,
         EndTagOpenState,
         TagNameState,
@@ -100,35 +99,6 @@
     // they call reset() first).
     bool nextToken(SegmentedString&, HTMLToken&);
 
-    // Returns a copy of any characters buffered internally by the tokenizer.
-    // The tokenizer buffers characters when searching for the </script> token
-    // that terminates a script element.
-    String bufferedCharacters() const;
-
-    size_t numberOfBufferedCharacters() const
-    {
-        // Notice that we add 2 to the length of the m_temporaryBuffer to
-        // account for the "</" characters, which are effecitvely buffered in
-        // the tokenizer's state machine.
-        return m_temporaryBuffer.size() ? m_temporaryBuffer.size() + 2 : 0;
-    }
-
-    // Updates the tokenizer's state according to the given tag name. This is
-    // an approximation of how the tree builder would update the tokenizer's
-    // state. This method is useful for approximating HTML tokenization. To
-    // get exactly the correct tokenization, you need the real tree builder.
-    //
-    // The main failures in the approximation are as follows:
-    //
-    //  * The first set of character tokens emitted for a <pre> element might
-    //    contain an extra leading newline.
-    //  * The replacement of U+0000 with U+FFFD will not be sensitive to the
-    //    tree builder's insertion mode.
-    //  * CDATA sections in foreign content will be tokenized as bogus comments
-    //    instead of as character tokens.
-    //
-    void updateStateFor(const String& tagName);
-
     State state() const { return m_state; }
     void setState(State state) { m_state = state; }