#ifndef markup_h
#define markup_h
#include "FragmentScriptingPermission.h"
#include "HTMLInterchange.h"
#include <wtf/Forward.h>
#include <wtf/Vector.h>
namespace WebCore {
class ContainerNode;
class Document;
class DocumentFragment;
class Element;
class HTMLElement;
class URL;
class Node;
class QualifiedName;
class Range;
typedef int ExceptionCode;
enum EChildrenOnly { IncludeNode, ChildrenOnly };
enum EAbsoluteURLs { DoNotResolveURLs, ResolveAllURLs, ResolveNonLocalURLs };
enum EFragmentSerialization { HTMLFragmentSerialization, XMLFragmentSerialization };
WEBCORE_EXPORT Ref<DocumentFragment> createFragmentFromText(Range& context, const String& text);
WEBCORE_EXPORT Ref<DocumentFragment> createFragmentFromMarkup(Document&, const String& markup, const String& baseURL, ParserContentPolicy = AllowScriptingContent);
RefPtr<DocumentFragment> createFragmentForInnerOuterHTML(Element&, const String& markup, ParserContentPolicy, ExceptionCode&);
RefPtr<DocumentFragment> createFragmentForTransformToFragment(Document&, const String& sourceString, const String& sourceMIMEType);
RefPtr<DocumentFragment> createContextualFragment(HTMLElement&, const String& markup, ParserContentPolicy, ExceptionCode&);
bool isPlainTextMarkup(Node*);
void replaceChildrenWithFragment(ContainerNode&, Ref<DocumentFragment>&&, ExceptionCode&);
void replaceChildrenWithText(ContainerNode&, const String&, ExceptionCode&);
String createMarkup(const Range&, Vector<Node*>* = nullptr, EAnnotateForInterchange = DoNotAnnotateForInterchange, bool convertBlocksToInlines = false, EAbsoluteURLs = DoNotResolveURLs);
String createMarkup(const Node&, EChildrenOnly = IncludeNode, Vector<Node*>* = nullptr, EAbsoluteURLs = DoNotResolveURLs, Vector<QualifiedName>* tagNamesToSkip = nullptr, EFragmentSerialization = HTMLFragmentSerialization);
WEBCORE_EXPORT String createFullMarkup(const Node&);
WEBCORE_EXPORT String createFullMarkup(const Range&);
String urlToMarkup(const URL&, const String& title);
String documentTypeString(const Document&);
}
#endif // markup_h