#include "third_party/blink/renderer/core/inspector/dom_editor.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/serializers/serialization.h"
#include "third_party/blink/renderer/core/inspector/dom_patch_support.h"
#include "third_party/blink/renderer/core/inspector/inspector_history.h"
#include "third_party/blink/renderer/core/inspector/protocol/protocol.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
namespace blink {
class DOMEditor::RemoveChildAction final : public InspectorHistory::Action { … };
class DOMEditor::InsertBeforeAction final : public InspectorHistory::Action { … };
class DOMEditor::RemoveAttributeAction final : public InspectorHistory::Action { … };
class DOMEditor::SetAttributeAction final : public InspectorHistory::Action { … };
class DOMEditor::SetOuterHTMLAction final : public InspectorHistory::Action { … };
class DOMEditor::ReplaceChildNodeAction final
: public InspectorHistory::Action { … };
class DOMEditor::SetNodeValueAction final : public InspectorHistory::Action { … };
DOMEditor::DOMEditor(InspectorHistory* history) : … { … }
bool DOMEditor::InsertBefore(ContainerNode* parent_node,
Node* node,
Node* anchor_node,
ExceptionState& exception_state) { … }
bool DOMEditor::RemoveChild(ContainerNode* parent_node,
Node* node,
ExceptionState& exception_state) { … }
bool DOMEditor::SetAttribute(Element* element,
const String& name,
const String& value,
ExceptionState& exception_state) { … }
bool DOMEditor::RemoveAttribute(Element* element,
const String& name,
ExceptionState& exception_state) { … }
bool DOMEditor::SetOuterHTML(Node* node,
const String& html,
Node** new_node,
ExceptionState& exception_state) { … }
bool DOMEditor::ReplaceChild(ContainerNode* parent_node,
Node* new_node,
Node* old_node,
ExceptionState& exception_state) { … }
bool DOMEditor::SetNodeValue(Node* node,
const String& value,
ExceptionState& exception_state) { … }
static protocol::Response ToResponse(ExceptionState& exception_state) { … }
protocol::Response DOMEditor::InsertBefore(ContainerNode* parent_node,
Node* node,
Node* anchor_node) { … }
protocol::Response DOMEditor::RemoveChild(ContainerNode* parent_node,
Node* node) { … }
protocol::Response DOMEditor::SetAttribute(Element* element,
const String& name,
const String& value) { … }
protocol::Response DOMEditor::RemoveAttribute(Element* element,
const String& name) { … }
protocol::Response DOMEditor::SetOuterHTML(Node* node,
const String& html,
Node** new_node) { … }
protocol::Response DOMEditor::SetNodeValue(Node* parent_node,
const String& value) { … }
void DOMEditor::Trace(Visitor* visitor) const { … }
}