Skip to content
Browse files
Scroll To Text Fragment indicator flash not always apparent.

Reviewed by Tim Horton.

For some pages, if there is content being loaded in right around the time we scroll
and flash the text indicator, then the indicator will not be on screen and visible
to the user. We should scroll to the right place on the page one last time before we
actually create and display the text indicator to ensure that the page is at the right

* Source/WebCore/page/FrameView.cpp:

Canonical link:
  • Loading branch information
megangardner committed Sep 12, 2022
1 parent 2f9d01a commit f017f4f3662e09818fbe2dbffe8a5adf51ec8009
Showing 1 changed file with 4 additions and 1 deletion.
@@ -2462,7 +2462,10 @@ void FrameView::textFragmentIndicatorTimerFired()
if (m_pendingTextFragmentIndicatorText != plainText(m_pendingTextFragmentIndicatorRange.value()))

auto textIndicator = TextIndicator::createWithRange(m_pendingTextFragmentIndicatorRange.value(), { TextIndicatorOption::DoNotClipToVisibleRect }, WebCore::TextIndicatorPresentationTransition::Bounce);
auto range = m_pendingTextFragmentIndicatorRange.value();
TemporarySelectionChange selectionChange(document, { range }, { TemporarySelectionOption::DelegateMainFrameScroll, TemporarySelectionOption::RevealSelectionBounds, TemporarySelectionOption::UserTriggered });

auto textIndicator = TextIndicator::createWithRange(range, { TextIndicatorOption::DoNotClipToVisibleRect }, WebCore::TextIndicatorPresentationTransition::Bounce);
if (textIndicator)>chrome().client().setTextIndicator(textIndicator->data());

0 comments on commit f017f4f

Please sign in to comment.