#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include <ostream>
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/abstract_range.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/range.h"
#include "third_party/blink/renderer/core/dom/text.h"
namespace blink {
namespace {
template <typename Strategy>
Node* CommonAncestorContainerNode(const Node* container_a,
const Node* container_b) { … }
}
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::EphemeralRangeTemplate(
const PositionTemplate<Strategy>& start,
const PositionTemplate<Strategy>& end)
: … { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::EphemeralRangeTemplate(
const EphemeralRangeTemplate<Strategy>& other)
: … { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::EphemeralRangeTemplate(
const PositionTemplate<Strategy>& position)
: … { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::EphemeralRangeTemplate(
const AbstractRange* range)
: … { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::EphemeralRangeTemplate(const Range* range) { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::EphemeralRangeTemplate() = default;
template <typename Strategy>
EphemeralRangeTemplate<Strategy>::~EphemeralRangeTemplate() = default;
template <typename Strategy>
EphemeralRangeTemplate<Strategy>& EphemeralRangeTemplate<Strategy>::operator=(
const EphemeralRangeTemplate<Strategy>& other) { … }
template <typename Strategy>
bool EphemeralRangeTemplate<Strategy>::operator==(
const EphemeralRangeTemplate<Strategy>& other) const { … }
template <typename Strategy>
bool EphemeralRangeTemplate<Strategy>::operator!=(
const EphemeralRangeTemplate<Strategy>& other) const { … }
template <typename Strategy>
Document& EphemeralRangeTemplate<Strategy>::GetDocument() const { … }
template <typename Strategy>
PositionTemplate<Strategy> EphemeralRangeTemplate<Strategy>::StartPosition()
const { … }
template <typename Strategy>
PositionTemplate<Strategy> EphemeralRangeTemplate<Strategy>::EndPosition()
const { … }
template <typename Strategy>
Node* EphemeralRangeTemplate<Strategy>::CommonAncestorContainer() const { … }
template <typename Strategy>
bool EphemeralRangeTemplate<Strategy>::IsCollapsed() const { … }
template <typename Strategy>
typename EphemeralRangeTemplate<Strategy>::RangeTraversal
EphemeralRangeTemplate<Strategy>::Nodes() const { … }
template <typename Strategy>
EphemeralRangeTemplate<Strategy>
EphemeralRangeTemplate<Strategy>::RangeOfContents(const Node& node) { … }
#if DCHECK_IS_ON()
template <typename Strategy>
bool EphemeralRangeTemplate<Strategy>::IsValid() const { … }
#else
template <typename Strategy>
bool EphemeralRangeTemplate<Strategy>::IsValid() const {
return true;
}
#endif
#if DCHECK_IS_ON()
template <typename Strategy>
void EphemeralRangeTemplate<Strategy>::ShowTreeForThis() const { … }
#endif
Range* CreateRange(const EphemeralRange& range) { … }
template <typename Strategy>
static std::ostream& PrintEphemeralRange(
std::ostream& ostream,
const EphemeralRangeTemplate<Strategy> range) { … }
std::ostream& operator<<(std::ostream& ostream, const EphemeralRange& range) { … }
std::ostream& operator<<(std::ostream& ostream,
const EphemeralRangeInFlatTree& range) { … }
EphemeralRangeInFlatTree ToEphemeralRangeInFlatTree(
const EphemeralRange& range) { … }
template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingStrategy>;
template class CORE_TEMPLATE_EXPORT
EphemeralRangeTemplate<EditingInFlatTreeStrategy>;
}