Title: [294252] branches/safari-7614.1.14.0-branch/Source/WebKit
Revision
294252
Author
alanc...@apple.com
Date
2022-05-16 13:43:35 -0700 (Mon, 16 May 2022)

Log Message

Cherry-pick r294175. rdar://problem/91441895

    [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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294175 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-7614.1.14.0-branch/Source/WebKit/ChangeLog (294251 => 294252)


--- branches/safari-7614.1.14.0-branch/Source/WebKit/ChangeLog	2022-05-16 20:38:41 UTC (rev 294251)
+++ branches/safari-7614.1.14.0-branch/Source/WebKit/ChangeLog	2022-05-16 20:43:35 UTC (rev 294252)
@@ -1,3 +1,52 @@
+2022-05-16  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r294175. rdar://problem/91441895
+
+    [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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-12  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r293994. rdar://problem/87157773

Modified: branches/safari-7614.1.14.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (294251 => 294252)


--- branches/safari-7614.1.14.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2022-05-16 20:38:41 UTC (rev 294251)
+++ branches/safari-7614.1.14.0-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2022-05-16 20:43:35 UTC (rev 294252)
@@ -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