#include "third_party/blink/renderer/core/editing/serializers/markup_accumulator.h"
#include "base/containers/adapters.h"
#include "third_party/blink/renderer/core/dom/attr.h"
#include "third_party/blink/renderer/core/dom/cdata_section.h"
#include "third_party/blink/renderer/core/dom/comment.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/document_fragment.h"
#include "third_party/blink/renderer/core/dom/document_type.h"
#include "third_party/blink/renderer/core/dom/processing_instruction.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/editor.h"
#include "third_party/blink/renderer/core/editing/serializers/serialization.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_template_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/keywords.h"
#include "third_party/blink/renderer/core/xml_names.h"
#include "third_party/blink/renderer/core/xmlns_names.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
namespace blink {
class MarkupAccumulator::NamespaceContext final { … };
class MarkupAccumulator::ElementSerializationData final { … };
MarkupAccumulator::MarkupAccumulator(
AbsoluteURLs resolve_urls_method,
SerializationType serialization_type,
const ShadowRootInclusion& shadow_root_inclusion)
: … { … }
MarkupAccumulator::~MarkupAccumulator() = default;
void MarkupAccumulator::AppendString(const String& string) { … }
void MarkupAccumulator::AppendEndTag(const Element& element,
const AtomicString& prefix) { … }
void MarkupAccumulator::AppendStartMarkup(const Node& node) { … }
void MarkupAccumulator::AppendCustomAttributes(const Element&) { … }
bool MarkupAccumulator::ShouldIgnoreAttribute(
const Element& element,
const Attribute& attribute) const { … }
bool MarkupAccumulator::ShouldIgnoreElement(const Element& element) const { … }
AtomicString MarkupAccumulator::AppendElement(const Element& element) { … }
MarkupAccumulator::ElementSerializationData
MarkupAccumulator::AppendStartTagOpen(const Element& element) { … }
void MarkupAccumulator::AppendStartTagClose(const Element& element) { … }
void MarkupAccumulator::AppendAttribute(const Element& element,
const Attribute& attribute) { … }
void MarkupAccumulator::AppendAttributeAsXMLWithNamespace(
const Element& element,
const Attribute& attribute,
const String& value) { … }
bool MarkupAccumulator::ShouldAddNamespaceAttribute(
const Attribute& attribute,
const AtomicString& candidate_prefix) { … }
void MarkupAccumulator::AppendNamespace(const AtomicString& prefix,
const AtomicString& namespace_uri,
const Document& document) { … }
EntityMask MarkupAccumulator::EntityMaskForText(const Text& text) const { … }
void MarkupAccumulator::PushNamespaces(const Element& element) { … }
void MarkupAccumulator::PopNamespaces(const Element& element) { … }
AtomicString MarkupAccumulator::RetrievePreferredPrefixString(
const AtomicString& ns,
const AtomicString& preferred_prefix) { … }
void MarkupAccumulator::AddPrefix(const AtomicString& prefix,
const AtomicString& namespace_uri) { … }
AtomicString MarkupAccumulator::LookupNamespaceURI(const AtomicString& prefix) { … }
AtomicString MarkupAccumulator::GeneratePrefix(
const AtomicString& new_namespace) { … }
bool MarkupAccumulator::SerializeAsHTML() const { … }
Behavior;
std::pair<ShadowRoot*, HTMLTemplateElement*> MarkupAccumulator::GetShadowTree(
const Element& element) const { … }
template <typename Strategy>
void MarkupAccumulator::SerializeNodesWithNamespaces(
const Node& target_node,
ChildrenOnly children_only) { … }
template <typename Strategy>
CORE_EXPORT String
MarkupAccumulator::SerializeNodes(const Node& target_node,
ChildrenOnly children_only) { … }
template String MarkupAccumulator::SerializeNodes<EditingStrategy>(
const Node&,
ChildrenOnly);
}