#include "third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node_traversal.h"
#include "third_party/blink/renderer/core/dom/text.h"
#include "third_party/blink/renderer/core/editing/commands/delete_selection_options.h"
#include "third_party/blink/renderer/core/editing/commands/editing_commands_utilities.h"
#include "third_party/blink/renderer/core/editing/commands/insert_line_break_command.h"
#include "third_party/blink/renderer/core/editing/editing_style.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.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/forms/html_form_element.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_hr_element.h"
#include "third_party/blink/renderer/core/html/html_quote_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_text.h"
#include "third_party/blink/renderer/core/mathml_names.h"
#include "third_party/blink/renderer/core/svg_names.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
namespace blink {
namespace {
bool IsPhrasingContent(const Node* node) { … }
bool IsEditableRootPhrasingContent(const Position& position) { … }
}
static Element* HighestVisuallyEquivalentDivBelowRoot(Element* start_block) { … }
static bool InSameBlock(const VisiblePosition& a, const VisiblePosition& b) { … }
InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand(
Document& document,
bool must_use_default_paragraph_element,
bool paste_blockquote_into_unquoted_area)
: … { … }
bool InsertParagraphSeparatorCommand::PreservesTypingStyle() const { … }
void InsertParagraphSeparatorCommand::CalculateStyleBeforeInsertion(
const Position& pos) { … }
void InsertParagraphSeparatorCommand::ApplyStyleAfterInsertion(
Element* original_enclosing_block,
EditingState* editing_state) { … }
bool InsertParagraphSeparatorCommand::ShouldUseDefaultParagraphElement(
Element* enclosing_block) const { … }
void InsertParagraphSeparatorCommand::GetAncestorsInsideBlock(
const Node* insertion_node,
Element* outer_block,
HeapVector<Member<Element>>& ancestors) { … }
Element* InsertParagraphSeparatorCommand::CloneHierarchyUnderNewBlock(
const HeapVector<Member<Element>>& ancestors,
Element* block_to_insert,
EditingState* editing_state) { … }
void InsertParagraphSeparatorCommand::DoApply(EditingState* editing_state) { … }
void InsertParagraphSeparatorCommand::Trace(Visitor* visitor) const { … }
}