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