chromium/third_party/blink/renderer/core/fragment_directive/text_fragment_finder.cc

// Copyright 2019 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/core/fragment_directive/text_fragment_finder.h"

#include <memory>

#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_document_state.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/range.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/finder/async_find_buffer.h"
#include "third_party/blink/renderer/core/editing/finder/find_buffer.h"
#include "third_party/blink/renderer/core/editing/finder/find_options.h"
#include "third_party/blink/renderer/core/editing/finder/sync_find_buffer.h"
#include "third_party/blink/renderer/core/editing/iterators/backwards_character_iterator.h"
#include "third_party/blink/renderer/core/editing/iterators/character_iterator.h"
#include "third_party/blink/renderer/core/fragment_directive/text_fragment_selector.h"
#include "third_party/blink/renderer/core/html/list_item_ordinal.h"
#include "third_party/blink/renderer/platform/text/text_boundaries.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

namespace {

// TODO(crbug/924965): Determine how this should check node boundaries. This
// treats node boundaries as word boundaries, for example "o" is a whole word
// match in "f<i>o</i>o".
// Determines whether the |start| and/or |end| positions of |range| are on a
// word boundaries.
bool IsWordBounded(EphemeralRangeInFlatTree range, bool start, bool end) {}

PositionInFlatTree FirstWordBoundaryAfter(PositionInFlatTree position) {}

}  // namespace

// static
PositionInFlatTree TextFragmentFinder::NextTextPosition(
    PositionInFlatTree position,
    PositionInFlatTree end_position) {}

// static
PositionInFlatTree TextFragmentFinder::PreviousTextPosition(
    PositionInFlatTree position,
    PositionInFlatTree max_position) {}

void TextFragmentFinder::OnFindMatchInRangeComplete(
    String search_text,
    RangeInFlatTree* search_range,
    bool word_start_bounded,
    bool word_end_bounded,
    const EphemeralRangeInFlatTree& match) {}

void TextFragmentFinder::FindMatchInRange(String search_text,
                                          RangeInFlatTree* search_range,
                                          bool word_start_bounded,
                                          bool word_end_bounded) {}

void TextFragmentFinder::FindPrefix() {}

void TextFragmentFinder::OnPrefixMatchComplete(
    EphemeralRangeInFlatTree prefix_match) {}

void TextFragmentFinder::FindTextStart() {}

void TextFragmentFinder::OnTextStartMatchComplete(
    EphemeralRangeInFlatTree potential_match) {}

void TextFragmentFinder::FindTextEnd() {}

void TextFragmentFinder::OnTextEndMatchComplete(
    EphemeralRangeInFlatTree text_end_match) {}

void TextFragmentFinder::FindSuffix() {}

void TextFragmentFinder::OnSuffixMatchComplete(
    EphemeralRangeInFlatTree suffix_match) {}

void TextFragmentFinder::GoToStep(SelectorMatchStep step) {}

// static
bool TextFragmentFinder::IsInSameUninterruptedBlock(
    const PositionInFlatTree& start,
    const PositionInFlatTree& end) {}

TextFragmentFinder::TextFragmentFinder(Client& client,
                                       const TextFragmentSelector& selector,
                                       Document* document,
                                       FindBufferRunnerType runner_type)
    :{}

void TextFragmentFinder::Cancel() {}

void TextFragmentFinder::FindMatch() {}

void TextFragmentFinder::FindMatchFromPosition(
    PositionInFlatTree search_start) {}

void TextFragmentFinder::OnMatchComplete() {}

void TextFragmentFinder::Trace(Visitor* visitor) const {}

void TextFragmentFinder::SetPotentialMatch(EphemeralRangeInFlatTree range) {}

void TextFragmentFinder::SetPrefixMatch(EphemeralRangeInFlatTree range) {}

bool TextFragmentFinder::HasValidRanges() {}

}  // namespace blink