#include "third_party/blink/renderer/core/editing/commands/insert_list_command.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/element_traversal.h"
#include "third_party/blink/renderer/core/editing/commands/editing_commands_utilities.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/iterators/text_iterator.h"
#include "third_party/blink/renderer/core/editing/relocatable_position.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/visible_position.h"
#include "third_party/blink/renderer/core/editing/visible_selection.h"
#include "third_party/blink/renderer/core/editing/visible_units.h"
#include "third_party/blink/renderer/core/html/html_br_element.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_li_element.h"
#include "third_party/blink/renderer/core/html/html_span_element.h"
#include "third_party/blink/renderer/core/html/html_ulist_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
namespace blink {
static Node* EnclosingListChild(Node* node, Node* list_node) { … }
HTMLUListElement* InsertListCommand::FixOrphanedListChild(
Node* node,
EditingState* editing_state) { … }
HTMLElement* InsertListCommand::MergeWithNeighboringLists(
HTMLElement* passed_list,
EditingState* editing_state) { … }
bool InsertListCommand::SelectionHasListOfType(
const Position& selection_start,
const Position& selection_end,
const HTMLQualifiedName& list_tag) { … }
InsertListCommand::InsertListCommand(Document& document, Type type)
: … { … }
static bool InSameTreeAndOrdered(const Position& should_be_former,
const Position& should_be_later) { … }
void InsertListCommand::DoApply(EditingState* editing_state) { … }
InputEvent::InputType InsertListCommand::GetInputType() const { … }
bool InsertListCommand::DoApplyForSingleParagraph(
bool force_create_list,
const HTMLQualifiedName& list_tag,
Range& current_selection,
EditingState* editing_state) { … }
void InsertListCommand::UnlistifyParagraph(
const VisiblePosition& original_start,
HTMLElement* list_element,
Node* list_child_node,
EditingState* editing_state) { … }
static HTMLElement* AdjacentEnclosingList(const VisiblePosition& pos,
const VisiblePosition& adjacent_pos,
const HTMLQualifiedName& list_tag) { … }
void InsertListCommand::ListifyParagraph(const VisiblePosition& original_start,
const HTMLQualifiedName& list_tag,
EditingState* editing_state) { … }
void InsertListCommand::MoveParagraphOverPositionIntoEmptyListItem(
const VisiblePosition& pos,
HTMLLIElement* list_item_element,
EditingState* editing_state) { … }
void InsertListCommand::Trace(Visitor* visitor) const { … }
}