Bug 1665252 - remove allowpaymentrequest attribute from HTMLIFrameElement r=dom-worke...
[gecko.git] / dom / base / nsHTMLContentSerializer.h
blob3628f011eab70488335338f032485c2fcb8f0251
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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/. */
7 /*
8 * nsIContentSerializer implementation that can be used with an
9 * nsIDocumentEncoder to convert an HTML (not XHTML!) DOM to an HTML
10 * string that could be parsed into more or less the original DOM.
13 #ifndef nsHTMLContentSerializer_h__
14 #define nsHTMLContentSerializer_h__
16 #include "mozilla/Attributes.h"
17 #include "nsXHTMLContentSerializer.h"
18 #include "nsString.h"
20 class nsAtom;
22 class nsHTMLContentSerializer final : public nsXHTMLContentSerializer {
23 public:
24 nsHTMLContentSerializer();
25 virtual ~nsHTMLContentSerializer();
27 NS_IMETHOD AppendElementStart(
28 mozilla::dom::Element* aElement,
29 mozilla::dom::Element* aOriginalElement) override;
31 NS_IMETHOD AppendElementEnd(mozilla::dom::Element* aElement,
32 mozilla::dom::Element* aOriginalElement) override;
34 NS_IMETHOD AppendDocumentStart(mozilla::dom::Document* aDocument) override;
36 protected:
37 MOZ_MUST_USE
38 virtual bool SerializeHTMLAttributes(mozilla::dom::Element* aContent,
39 mozilla::dom::Element* aOriginalElement,
40 nsAString& aTagPrefix,
41 const nsAString& aTagNamespaceURI,
42 nsAtom* aTagName, int32_t aNamespace,
43 nsAString& aStr);
45 MOZ_MUST_USE
46 virtual bool AppendAndTranslateEntities(const nsAString& aStr,
47 nsAString& aOutputStr) override;
50 nsresult NS_NewHTMLContentSerializer(nsIContentSerializer** aSerializer);
52 #endif