Title: [294175] trunk/Source/WebKit
Revision
294175
Author
akeer...@apple.com
Date
2022-05-13 14:43:00 -0700 (Fri, 13 May 2022)

Log Message

[iOS] Multiple visible find highlights when searching for text after beginning a "find from selection"
https://bugs.webkit.org/show_bug.cgi?id=240393
rdar://91441895

Reviewed by Wenson Hsieh.

Some WebKit clients use SPI on WKWebView to support "find from selection"
functionality (the Cmd+E shortcut). However, to support general
find functionality, they use new find API that uses a different codepath
to draw highlights. Mixing use of the API and SPI can currently result
in two highlights showing up.

To fix, ensure SPI highlights are removed once the API is being used.
The long term solution is for clients to adopt API for the
"find from selection" functionality, but in the short term the SPI
should remain supported.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::clearAllDecoratedFoundText):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (294174 => 294175)


--- trunk/Source/WebKit/ChangeLog	2022-05-13 21:40:48 UTC (rev 294174)
+++ trunk/Source/WebKit/ChangeLog	2022-05-13 21:43:00 UTC (rev 294175)
@@ -1,3 +1,25 @@
+2022-05-13  Aditya Keerthi  <akeer...@apple.com>
+
+        [iOS] Multiple visible find highlights when searching for text after beginning a "find from selection"
+        https://bugs.webkit.org/show_bug.cgi?id=240393
+        rdar://91441895
+
+        Reviewed by Wenson Hsieh.
+
+        Some WebKit clients use SPI on WKWebView to support "find from selection"
+        functionality (the Cmd+E shortcut). However, to support general
+        find functionality, they use new find API that uses a different codepath
+        to draw highlights. Mixing use of the API and SPI can currently result
+        in two highlights showing up.
+
+        To fix, ensure SPI highlights are removed once the API is being used.
+        The long term solution is for clients to adopt API for the
+        "find from selection" functionality, but in the short term the SPI
+        should remain supported.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::clearAllDecoratedFoundText):
+
 2022-05-13  Kimmo Kinnunen  <kkinnu...@apple.com>
 
         IPC cannot encode, decode Ref<>, causing duplicate code

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (294174 => 294175)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2022-05-13 21:40:48 UTC (rev 294174)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2022-05-13 21:43:00 UTC (rev 294175)
@@ -4875,6 +4875,7 @@
 
 void WebPage::clearAllDecoratedFoundText()
 {
+    hideFindUI();
     foundTextRangeController().clearAllDecoratedFoundText();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to