#include "third_party/blink/renderer/core/editing/dom_selection.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_get_composed_ranges_options.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/range.h"
#include "third_party/blink/renderer/core/dom/tree_scope.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/frame_selection.h"
#include "third_party/blink/renderer/core/editing/iterators/text_iterator.h"
#include "third_party/blink/renderer/core/editing/position.h"
#include "third_party/blink/renderer/core/editing/selection_modifier.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/set_selection_options.h"
#include "third_party/blink/renderer/core/editing/visible_selection.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
DOMSelection::DOMSelection(const TreeScope* tree_scope)
: … { … }
void DOMSelection::ClearTreeScope() { … }
FrameSelection& DOMSelection::Selection() const { … }
bool DOMSelection::IsAvailable() const { … }
void DOMSelection::UpdateFrameSelection(
const SelectionInDOMTree& selection,
Range* new_cached_range,
const SetSelectionOptions& passed_options) const { … }
VisibleSelection DOMSelection::GetVisibleSelection() const { … }
bool DOMSelection::IsAnchorFirstInSelection() const { … }
Node* DOMSelection::anchorNode() const { … }
unsigned DOMSelection::anchorOffset() const { … }
Node* DOMSelection::focusNode() const { … }
unsigned DOMSelection::focusOffset() const { … }
Node* DOMSelection::baseNode() const { … }
unsigned DOMSelection::baseOffset() const { … }
Node* DOMSelection::extentNode() const { … }
unsigned DOMSelection::extentOffset() const { … }
bool DOMSelection::isCollapsed() const { … }
String DOMSelection::type() const { … }
String DOMSelection::direction() const { … }
unsigned DOMSelection::rangeCount() const { … }
void DOMSelection::collapse(Node* node,
unsigned offset,
ExceptionState& exception_state) { … }
void DOMSelection::collapseToEnd(ExceptionState& exception_state) { … }
void DOMSelection::collapseToStart(ExceptionState& exception_state) { … }
void DOMSelection::empty() { … }
void DOMSelection::setBaseAndExtent(Node* base_node,
unsigned base_offset,
Node* extent_node,
unsigned extent_offset,
ExceptionState& exception_state) { … }
void DOMSelection::modify(const String& alter_string,
const String& direction_string,
const String& granularity_string) { … }
void DOMSelection::extend(Node* node,
unsigned offset,
ExceptionState& exception_state) { … }
Range* DOMSelection::getRangeAt(unsigned index,
ExceptionState& exception_state) const { … }
const StaticRangeVector DOMSelection::getComposedRanges(
const GetComposedRangesOptions* options) const { … }
void DOMSelection::Rescope(Node*& node,
unsigned& offset,
const HeapVector<Member<ShadowRoot>>& shadowRoots,
bool isEnd) const { … }
Range* DOMSelection::PrimaryRangeOrNull() const { … }
EphemeralRange DOMSelection::CreateRangeFromSelectionEditor() const { … }
bool DOMSelection::IsSelectionOfDocument() const { … }
void DOMSelection::CacheRangeIfSelectionOfDocument(Range* range) const { … }
Range* DOMSelection::DocumentCachedRange() const { … }
void DOMSelection::ClearCachedRangeIfSelectionOfDocument() { … }
void DOMSelection::removeRange(Range* range) { … }
void DOMSelection::removeAllRanges() { … }
void DOMSelection::addRange(Range* new_range) { … }
void DOMSelection::deleteFromDocument() { … }
bool DOMSelection::containsNode(const Node* n, bool allow_partial) const { … }
void DOMSelection::selectAllChildren(Node* n, ExceptionState& exception_state) { … }
String DOMSelection::toString() { … }
Node* DOMSelection::ShadowAdjustedNode(const Position& position) const { … }
unsigned DOMSelection::ShadowAdjustedOffset(const Position& position) const { … }
bool DOMSelection::IsValidForPosition(Node* node) const { … }
void DOMSelection::AddConsoleWarning(const String& message) { … }
void DOMSelection::Trace(Visitor* visitor) const { … }
DOMSelection::TemporaryRange::TemporaryRange(const DOMSelection* selection,
Range* range) { … }
DOMSelection::TemporaryRange::~TemporaryRange() { … }
Range* DOMSelection::TemporaryRange::GetRange() { … }
}