chromium/third_party/blink/renderer/modules/accessibility/ax_selection.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/modules/accessibility/ax_selection.h"

#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/dom/focus_params.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/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/position.h"
#include "third_party/blink/renderer/core/editing/position_with_affinity.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/text_affinity.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"

namespace blink {

namespace {

// TODO(nektar): Add Web tests for this event.
void ScheduleSelectEvent(TextControlElement& text_control) {}

// TODO(nektar): Add Web tests for this event.
DispatchEventResult DispatchSelectStart(Node* node) {}

}  // namespace

//
// AXSelection::Builder
//

AXSelection::Builder& AXSelection::Builder::SetAnchor(
    const AXPosition& anchor) {}

AXSelection::Builder& AXSelection::Builder::SetAnchor(const Position& anchor) {}

AXSelection::Builder& AXSelection::Builder::SetFocus(const AXPosition& focus) {}

AXSelection::Builder& AXSelection::Builder::SetFocus(const Position& focus) {}

AXSelection::Builder& AXSelection::Builder::SetSelection(
    const SelectionInDOMTree& selection) {}

const AXSelection AXSelection::Builder::Build() {}

//
// AXSelection
//

// static
void AXSelection::ClearCurrentSelection(Document& document) {}

// static
AXSelection AXSelection::FromCurrentSelection(
    const Document& document,
    const AXSelectionBehavior selection_behavior) {}

// static
AXSelection AXSelection::FromCurrentSelection(
    const TextControlElement& text_control) {}

// static
AXSelection AXSelection::FromSelection(
    const SelectionInDOMTree& selection,
    const AXSelectionBehavior selection_behavior) {}

AXSelection::AXSelection() :{}

bool AXSelection::IsValid() const {}

const SelectionInDOMTree AXSelection::AsSelection(
    const AXSelectionBehavior selection_behavior) const {}

void AXSelection::UpdateSelectionIfNecessary() {}

bool AXSelection::Select(const AXSelectionBehavior selection_behavior) {}

String AXSelection::ToString() const {}

std::optional<AXSelection::TextControlSelection>
AXSelection::AsTextControlSelection() const {}

bool operator==(const AXSelection& a, const AXSelection& b) {}

bool operator!=(const AXSelection& a, const AXSelection& b) {}

std::ostream& operator<<(std::ostream& ostream, const AXSelection& selection) {}

}  // namespace blink