Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5b38850ca53e0cecf0fbdef20fc3b1974f1a649c
      
https://github.com/WebKit/WebKit/commit/5b38850ca53e0cecf0fbdef20fc3b1974f1a649c
  Author: Tim Nguyen <[email protected]>
  Date:   2025-10-17 (Fri, 17 Oct 2025)

  Changed paths:
    M Source/WebCore/dom/DocumentMarkerController.cpp
    M Source/WebCore/dom/DocumentMarkerController.h
    M Source/WebCore/dom/FindRevealAlgorithms.cpp
    M Source/WebCore/dom/FindRevealAlgorithms.h
    M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
    M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.h

  Log Message:
  -----------
  Find in Page doesn’t correctly highlight results after revealing content on 
iOS/iPadOS
https://bugs.webkit.org/show_bug.cgi?id=300744
rdar://159801954

Reviewed by Aditya Keerthi.

The issue is that the `FindDecorationStyle::Found` markers are issued before 
the content was revealed in the `FindDecorationStyle::Highlighted` branch of 
`decorateTextRangeWithStyle`.

This leads to the found markers failing to be added.

Since we can't change the order for which UIKit issues these markers, we 
instead:
1. store the markers that fail to be added into a set
2. re-attempt to add those markers if some content got expanded

Not testable, highlights are hard to test since they are cutouts in a layer and 
there is no existing testing infrastructure for them.

* Source/WebCore/dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarker):
* Source/WebCore/dom/DocumentMarkerController.h:
* Source/WebCore/dom/FindRevealAlgorithms.cpp:
(WebCore::revealClosedDetailsAndHiddenUntilFoundAncestors):
* Source/WebCore/dom/FindRevealAlgorithms.h:
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::decorateTextRangeWithStyle):
(WebKit::WebFoundTextRangeController::clearAllDecoratedFoundText):
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.h:

Canonical link: https://commits.webkit.org/301751@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to