#include "third_party/blink/renderer/core/editing/selection_adjuster.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/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_body_element.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
namespace blink {
namespace {
template <typename Strategy>
SelectionTemplate<Strategy> ComputeAdjustedSelection(
const SelectionTemplate<Strategy> selection,
const EphemeralRangeTemplate<Strategy>& range) { … }
bool IsEmptyTableCell(const Node* node) { … }
}
class GranularityAdjuster final { … };
PositionInFlatTree ComputeStartRespectingGranularity(
const PositionInFlatTreeWithAffinity& start,
TextGranularity granularity) { … }
PositionInFlatTree ComputeEndRespectingGranularity(
const PositionInFlatTree& start,
const PositionInFlatTreeWithAffinity& end,
TextGranularity granularity) { … }
SelectionInDOMTree SelectionAdjuster::AdjustSelectionRespectingGranularity(
const SelectionInDOMTree& selection,
TextGranularity granularity,
const WordInclusion inclusion = WordInclusion::kDefault) { … }
SelectionInFlatTree SelectionAdjuster::AdjustSelectionRespectingGranularity(
const SelectionInFlatTree& selection,
TextGranularity granularity,
const WordInclusion inclusion = WordInclusion::kDefault) { … }
class ShadowBoundaryAdjuster final { … };
SelectionInDOMTree
SelectionAdjuster::AdjustSelectionToAvoidCrossingShadowBoundaries(
const SelectionInDOMTree& selection) { … }
SelectionInFlatTree
SelectionAdjuster::AdjustSelectionToAvoidCrossingShadowBoundaries(
const SelectionInFlatTree& selection) { … }
class EditingBoundaryAdjuster final { … };
template <>
inline bool
EditingBoundaryAdjuster::IsEditingBoundary<EditingInFlatTreeStrategy>(
const Node& node,
const Node& previous_node,
bool is_previous_node_editable) { … }
SelectionInDOMTree
SelectionAdjuster::AdjustSelectionToAvoidCrossingEditingBoundaries(
const SelectionInDOMTree& selection) { … }
SelectionInFlatTree
SelectionAdjuster::AdjustSelectionToAvoidCrossingEditingBoundaries(
const SelectionInFlatTree& selection) { … }
class SelectionTypeAdjuster final { … };
SelectionInDOMTree SelectionAdjuster::AdjustSelectionType(
const SelectionInDOMTree& selection) { … }
SelectionInFlatTree SelectionAdjuster::AdjustSelectionType(
const SelectionInFlatTree& selection) { … }
}