#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/inspector/dom_patch_support.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/dom/attribute.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_init.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/xml_document.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/html/html_document.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/parser/html_document_parser.h"
#include "third_party/blink/renderer/core/inspector/dom_editor.h"
#include "third_party/blink/renderer/core/inspector/inspector_history.h"
#include "third_party/blink/renderer/core/xml/parser/xml_document_parser.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/crypto.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_deque.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/deque.h"
#include "third_party/blink/renderer/platform/wtf/hash_traits.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
namespace blink {
DOMPatchSupport::DOMPatchSupport(DOMEditor* dom_editor, Document& document)
: … { … }
void DOMPatchSupport::PatchDocument(const String& markup) { … }
Node* DOMPatchSupport::PatchNode(Node* node,
const String& markup,
ExceptionState& exception_state) { … }
bool DOMPatchSupport::InnerPatchNode(Digest* old_digest,
Digest* new_digest,
ExceptionState& exception_state) { … }
std::pair<DOMPatchSupport::ResultMap, DOMPatchSupport::ResultMap>
DOMPatchSupport::Diff(const HeapVector<Member<Digest>>& old_list,
const HeapVector<Member<Digest>>& new_list) { … }
bool DOMPatchSupport::InnerPatchChildren(
ContainerNode* parent_node,
const HeapVector<Member<Digest>>& old_list,
const HeapVector<Member<Digest>>& new_list,
ExceptionState& exception_state) { … }
DOMPatchSupport::Digest* DOMPatchSupport::CreateDigest(
Node* node,
UnusedNodesMap* unused_nodes_map) { … }
bool DOMPatchSupport::InsertBeforeAndMarkAsUsed(
ContainerNode* parent_node,
Digest* digest,
Node* anchor,
ExceptionState& exception_state) { … }
bool DOMPatchSupport::RemoveChildAndMoveToNew(Digest* old_digest,
ExceptionState& exception_state) { … }
void DOMPatchSupport::MarkNodeAsUsed(Digest* digest) { … }
void DOMPatchSupport::Digest::Trace(Visitor* visitor) const { … }
}