#include "third_party/blink/renderer/core/fragment_directive/text_fragment_anchor.h"
#include "base/auto_reset.h"
#include "base/trace_event/typed_macros.h"
#include "components/shared_highlighting/core/common/fragment_directives_utils.h"
#include "third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom-blink.h"
#include "third_party/blink/renderer/core/accessibility/ax_object_cache.h"
#include "third_party/blink/renderer/core/annotation/annotation_agent_container_impl.h"
#include "third_party/blink/renderer/core/annotation/annotation_agent_impl.h"
#include "third_party/blink/renderer/core/annotation/text_annotation_selector.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/element.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/editor.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/visible_units.h"
#include "third_party/blink/renderer/core/fragment_directive/fragment_directive.h"
#include "third_party/blink/renderer/core/fragment_directive/fragment_directive_utils.h"
#include "third_party/blink/renderer/core/fragment_directive/text_directive.h"
#include "third_party/blink/renderer/core/fragment_directive/text_fragment_handler.h"
#include "third_party/blink/renderer/core/fragment_directive/text_fragment_selector.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/layout/layout_object.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/frame_load_request.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/scroll/scroll_alignment.h"
#include "third_party/blink/renderer/core/scroll/scroll_into_view_util.h"
#include "third_party/blink/renderer/core/scroll/scrollable_area.h"
#include "third_party/blink/renderer/platform/search_engine_utils.h"
namespace blink {
namespace {
bool CheckSecurityRestrictions(LocalFrame& frame) { … }
}
base::TimeDelta TextFragmentAnchor::PostLoadTaskDelay() { … }
base::TimeDelta TextFragmentAnchor::PostLoadTaskTimeout() { … }
bool TextFragmentAnchor::GenerateNewToken(const DocumentLoader& loader) { … }
bool TextFragmentAnchor::GenerateNewTokenForSameDocument(
const DocumentLoader& loader,
WebFrameLoadType load_type,
mojom::blink::SameDocumentNavigationType same_document_navigation_type) { … }
TextFragmentAnchor* TextFragmentAnchor::TryCreate(const KURL& url,
LocalFrame& frame,
bool should_scroll) { … }
TextFragmentAnchor::TextFragmentAnchor(
HeapVector<Member<TextDirective>>& text_directives,
LocalFrame& frame,
bool should_scroll)
: … { … }
bool TextFragmentAnchor::InvokeSelector() { … }
void TextFragmentAnchor::Installed() { … }
void TextFragmentAnchor::NewContentMayBeAvailable() { … }
void TextFragmentAnchor::FinalizeAnchor() { … }
void TextFragmentAnchor::Trace(Visitor* visitor) const { … }
void TextFragmentAnchor::WillPerformAttach() { … }
void TextFragmentAnchor::UpdateCurrentState() { … }
void TextFragmentAnchor::ApplyEffectsToFirstMatch() { … }
bool TextFragmentAnchor::EnsureFirstMatchInViewIfNeeded() { … }
void TextFragmentAnchor::DidFinishSearch() { … }
void TextFragmentAnchor::ApplyTargetToCommonAncestor(
const EphemeralRangeInFlatTree& range) { … }
void TextFragmentAnchor::SetTickClockForTesting(
const base::TickClock* tick_clock) { … }
bool TextFragmentAnchor::HasSearchEngineSource() { … }
bool TextFragmentAnchor::MarkFailedAttachmentsForRetry() { … }
void TextFragmentAnchor::PostLoadTask(TimerBase*) { … }
}