parser/htmlparser/src/nsHTMLTokenizer.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set sw=2 ts=2 et tw=78: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 /**
     9  * @file nsHTMLTokenizer.cpp
    10  * This is an implementation of the nsITokenizer interface.
    11  * This file contains the implementation of a tokenizer to tokenize an HTML
    12  * document. It attempts to do so, making tradeoffs between compatibility with
    13  * older parsers and the SGML specification. Note that most of the real
    14  * "tokenization" takes place in nsHTMLTokens.cpp.
    15  */
    17 #include "nsHTMLTokenizer.h"
    18 #include "nsIParser.h"
    19 #include "nsParserConstants.h"
    21 /************************************************************************
    22   And now for the main class -- nsHTMLTokenizer...
    23  ************************************************************************/
    25 /**
    26  * Satisfy the nsISupports interface.
    27  */
    28 NS_IMPL_ISUPPORTS(nsHTMLTokenizer, nsITokenizer)
    30 /**
    31  * Default constructor
    32  */
    33 nsHTMLTokenizer::nsHTMLTokenizer()
    34 {
    35   // TODO Assert about:blank-ness.
    36 }
    38 nsresult
    39 nsHTMLTokenizer::WillTokenize(bool aIsFinalChunk)
    40 {
    41   return NS_OK;
    42 }
    44 /**
    45  * This method is repeatedly called by the tokenizer. 
    46  * Each time, we determine the kind of token we're about to 
    47  * read, and then we call the appropriate method to handle
    48  * that token type.
    49  *  
    50  * @param  aScanner The source of our input.
    51  * @param  aFlushTokens An OUT parameter to tell the caller whether it should
    52  *                      process our queued tokens up to now (e.g., when we
    53  *                      reach a <script>).
    54  * @return Success or error
    55  */
    56 nsresult
    57 nsHTMLTokenizer::ConsumeToken(nsScanner& aScanner, bool& aFlushTokens)
    58 {
    59   return kEOF;
    60 }

mercurial