[Webkit-unassigned] [Bug 183658] New: [iOS] Text hightlighted by the Find UI overlaps with NBC news header on google.com

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 15 08:06:18 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=183658

            Bug ID: 183658
           Summary: [iOS] Text hightlighted by the Find UI overlaps with
                    NBC news header on google.com
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Frames
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fred.wang at free.fr
                CC: dvoytenko at google.com, malteubl at google.com,
                    simon.fraser at apple.com, thorton at apple.com,
                    webkit-bug-importer at group.apple.com
        Depends on: 178789

Created attachment 335845

  --> https://bugs.webkit.org/attachment.cgi?id=335845&action=review

Screenshot

This was reported by Ali Ghassemi (Google AMP) who tested the patch from bug 178789. See also his video: https://photos.google.com/share/AF1QipP8FzbWiprlR7RLgzsNhrJeVTzmo34pWwT3pg_IvsKC_SRxNf6EUvUkgTsDAZNVrA/photo/AF1QipNUqsRFPMJl3DWl7xGu-BQUPHTnqKPJXLo0GXou?key=Y1dNcWtTMmFweGhwbUF3aWRsRDJIcmhIaG1oZm13

With the iOS simulator, go to

https://www.google.com/amp/s/www.nbcnews.com/news/us-news/amp/michael-cohen-used-trump-org-email-stormy-daniels-arrangements-n855021

Use Ctrl+F to open the find UI and search forward for the word "cohen". Continue to search forward until the page scrolls and the title of the article is no longer visible. Then search backward until the word "cohen" in the title of the article. The nbcnews.com header may appear and overlap with the result (see attached screenshot).

Note that the highlighted text match appears over the header, which is a behavior different from Gecko or Chromium but is the same as Safari Desktop. Quoting Ali:

"Displaying highlighted text over seems actually better than under, I guess the issue is - given many sites have overlay headers that hide/show - it might make sense to scroll more so the highlighted text comes to the middle of the viewport (or at least not in the top 25% of viewport) rather than just scrolling enough to make it visible on very top."

What do people think? Does that proposal make sense?

Here is a trivial patch to make the highlighted text always come to the middle of the viewport:

diff --git a/Source/WebKit/WebProcess/WebPage/ios/FindControllerIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/FindControllerIOS.mm
index f493d6ce092..05528de202b 100644
--- a/Source/WebKit/WebProcess/WebPage/ios/FindControllerIOS.mm
+++ b/Source/WebKit/WebProcess/WebPage/ios/FindControllerIOS.mm
@@ -160,7 +160,7 @@ void FindController::didFindString()

     // Scrolling the main frame is handled by the SmartMagnificationController class but we still
     // need to consider overflow nodes and subframes here.
-    frame.selection().revealSelection(SelectionRevealMode::RevealUpToMainFrame, ScrollAlignment::alignToEdgeIfNeeded, WebCore::DoNotRevealExtent);
+    frame.selection().revealSelection(SelectionRevealMode::RevealUpToMainFrame, ScrollAlignment::AlignCenter, WebCore::DoNotRevealExtent);
 }
 void FindController::didFailToFindString()


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=178789
[Bug 178789] Make iOS Find UI reveal matches in scrollable elements
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180315/3e0ee302/attachment-0001.html>


More information about the webkit-unassigned mailing list