[webkit-changes] [WebKit/WebKit] a1f192: REGRESSION (277166 at main): [iOS] Search doesn’t hig...
Aditya Keerthi
noreply at github.com
Thu May 23 08:40:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a1f1924291fba68c7494c7e2b67b31753f8ae9bd
https://github.com/WebKit/WebKit/commit/a1f1924291fba68c7494c7e2b67b31753f8ae9bd
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-05-23 (Thu, 23 May 2024)
Changed paths:
M Source/WebKit/Shared/WebFoundTextRange.h
M Source/WebKit/Shared/WebFoundTextRange.serialization.in
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm
Log Message:
-----------
REGRESSION (277166 at main): [iOS] Search doesn’t highlight text being searched in Mail
https://bugs.webkit.org/show_bug.cgi?id=274571
rdar://127888785
Reviewed by Tim Horton and Charlie Wolfe.
277166 at main replaced unique frame names with `FrameIdentifier` in
`WebFoundTextRange`. While this is a generally desirable change as site
isolation is developed, it is currently incompatible with `UIFindInteraction`
support for Mail.
Mail performs searches using a pool of offscreen web views, to avoid creating
one webview per email in a thread. Consequently, Mail relies on the fact that
a `WebFoundTextRange` acquired from one web view, can be reused to highlight
matches in a different web view with the same web content.
The use of `FrameIdentifier` breaks this functionality, as it is a unique
identifier that will never match across web views with the same content. On the
other hand, frame names match since they are in tree order.
For now, fix by reverting 277166 at main, and add a test to document support for
the behavior that Mail relies on. Eventually, an alternate solution will be
needed to support site isolation. However, that will also require rearchitecting
WebKit's implementation of `UITextSearching`.
* Source/WebKit/Shared/WebFoundTextRange.h:
(WTF::HashTraits<WebKit::WebFoundTextRange>::constructDeletedValue):
* Source/WebKit/Shared/WebFoundTextRange.serialization.in:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFoundTextRange dealloc]):
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::findTextRangesForStringMatches):
(WebKit::WebFoundTextRangeController::documentForFoundTextRange const):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(TEST(WebKit, FindAndHighlightDifferentWebViews)):
Canonical link: https://commits.webkit.org/279205@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list