1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/htmlparser/src/nsParserService.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 +#ifndef NS_PARSERSERVICE_H__ 1.10 +#define NS_PARSERSERVICE_H__ 1.11 + 1.12 +#include "nsIParserService.h" 1.13 + 1.14 +extern "C" int MOZ_XMLIsLetter(const char* ptr); 1.15 +extern "C" int MOZ_XMLIsNCNameChar(const char* ptr); 1.16 +extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end, 1.17 + const char** next, char16_t* result); 1.18 + 1.19 +class nsParserService : public nsIParserService { 1.20 +public: 1.21 + nsParserService(); 1.22 + virtual ~nsParserService(); 1.23 + 1.24 + NS_DECL_ISUPPORTS 1.25 + 1.26 + int32_t HTMLAtomTagToId(nsIAtom* aAtom) const; 1.27 + 1.28 + int32_t HTMLCaseSensitiveAtomTagToId(nsIAtom* aAtom) const; 1.29 + 1.30 + int32_t HTMLStringTagToId(const nsAString& aTag) const; 1.31 + 1.32 + const char16_t *HTMLIdToStringTag(int32_t aId) const; 1.33 + 1.34 + nsIAtom *HTMLIdToAtomTag(int32_t aId) const; 1.35 + 1.36 + NS_IMETHOD HTMLConvertEntityToUnicode(const nsAString& aEntity, 1.37 + int32_t* aUnicode) const; 1.38 + NS_IMETHOD HTMLConvertUnicodeToEntity(int32_t aUnicode, 1.39 + nsCString& aEntity) const; 1.40 + NS_IMETHOD IsContainer(int32_t aId, bool& aIsContainer) const; 1.41 + NS_IMETHOD IsBlock(int32_t aId, bool& aIsBlock) const; 1.42 +}; 1.43 + 1.44 +#endif