#include "third_party/blink/renderer/core/editing/selection_template.h"
#include <ostream>
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/position_with_affinity.h"
namespace blink {
template <typename Strategy>
SelectionTemplate<Strategy>::SelectionTemplate(const SelectionTemplate& other)
: … { … }
template <typename Strategy>
SelectionTemplate<Strategy>::SelectionTemplate() = default;
template <typename Strategy>
bool SelectionTemplate<Strategy>::operator==(
const SelectionTemplate& other) const { … }
template <typename Strategy>
bool SelectionTemplate<Strategy>::operator!=(
const SelectionTemplate& other) const { … }
template <typename Strategy>
void SelectionTemplate<Strategy>::Trace(Visitor* visitor) const { … }
template <typename Strategy>
const PositionTemplate<Strategy>& SelectionTemplate<Strategy>::Anchor() const { … }
template <typename Strategy>
Document* SelectionTemplate<Strategy>::GetDocument() const { … }
template <typename Strategy>
const PositionTemplate<Strategy>& SelectionTemplate<Strategy>::Focus() const { … }
template <typename Strategy>
bool SelectionTemplate<Strategy>::IsCaret() const { … }
template <typename Strategy>
bool SelectionTemplate<Strategy>::IsRange() const { … }
template <typename Strategy>
bool SelectionTemplate<Strategy>::IsValidFor(const Document& document) const { … }
template <typename Strategy>
bool SelectionTemplate<Strategy>::AssertValidFor(
const Document& document) const { … }
#if DCHECK_IS_ON()
template <typename Strategy>
bool SelectionTemplate<Strategy>::AssertValid() const { … }
#else
template <typename Strategy>
bool SelectionTemplate<Strategy>::AssertValid() const {
return true;
}
#endif
#if DCHECK_IS_ON()
template <typename Strategy>
void SelectionTemplate<Strategy>::ShowTreeForThis() const { … }
#endif
template <typename Strategy>
const PositionTemplate<Strategy>&
SelectionTemplate<Strategy>::ComputeEndPosition() const { … }
template <typename Strategy>
const PositionTemplate<Strategy>&
SelectionTemplate<Strategy>::ComputeStartPosition() const { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy> SelectionTemplate<Strategy>::ComputeRange()
const { … }
template <typename Strategy>
bool SelectionTemplate<Strategy>::IsAnchorFirst() const { … }
template <typename Strategy>
void SelectionTemplate<Strategy>::ResetDirectionCache() const { … }
template <typename Strategy>
void SelectionTemplate<Strategy>::PrintTo(std::ostream* ostream,
const char* type) const { … }
std::ostream& operator<<(std::ostream& ostream,
const SelectionInDOMTree& selection) { … }
std::ostream& operator<<(std::ostream& ostream,
const SelectionInFlatTree& selection) { … }
template <typename Strategy>
SelectionTemplate<Strategy>::Builder::Builder(
const SelectionTemplate<Strategy>& selection)
: … { … }
template <typename Strategy>
SelectionTemplate<Strategy>::Builder::Builder() = default;
template <typename Strategy>
SelectionTemplate<Strategy> SelectionTemplate<Strategy>::Builder::Build()
const { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::Collapse(
const PositionTemplate<Strategy>& position) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::Collapse(
const PositionWithAffinityTemplate<Strategy>& position_with_affinity) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::Extend(
const PositionTemplate<Strategy>& position) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SelectAllChildren(const Node& node) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetAffinity(TextAffinity affinity) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetAsBackwardSelection(
const EphemeralRangeTemplate<Strategy>& range) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetAsForwardSelection(
const EphemeralRangeTemplate<Strategy>& range) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetBaseAndExtent(
const EphemeralRangeTemplate<Strategy>& range) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetBaseAndExtent(
const PositionTemplate<Strategy>& base,
const PositionTemplate<Strategy>& extent) { … }
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetBaseAndExtentDeprecated(
const PositionTemplate<Strategy>& base,
const PositionTemplate<Strategy>& extent) { … }
template <typename Strategy>
SelectionTemplate<Strategy>::InvalidSelectionResetter::InvalidSelectionResetter(
const SelectionTemplate<Strategy>& selection)
: … { … }
template <typename Strategy>
SelectionTemplate<
Strategy>::InvalidSelectionResetter::~InvalidSelectionResetter() { … }
SelectionInDOMTree ConvertToSelectionInDOMTree(
const SelectionInFlatTree& selection_in_flat_tree) { … }
SelectionInFlatTree ConvertToSelectionInFlatTree(
const SelectionInDOMTree& selection) { … }
template <typename Strategy>
void SelectionTemplate<Strategy>::InvalidSelectionResetter::Trace(
blink::Visitor* visitor) const { … }
template class CORE_TEMPLATE_EXPORT SelectionTemplate<EditingStrategy>;
template class CORE_TEMPLATE_EXPORT
SelectionTemplate<EditingInFlatTreeStrategy>;
}