[webkit-changes] [WebKit/WebKit] 89bc7d: Find in Note: Dark gray outline (shadow) appears b...

megangardner noreply at github.com
Sat Mar 9 01:47:20 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 89bc7dd33ce84e204457c2f54d27bafa85cf8ace
      https://github.com/WebKit/WebKit/commit/89bc7dd33ce84e204457c2f54d27bafa85cf8ace
  Author: Megan Gardner <megan_gardner at apple.com>
  Date:   2024-03-09 (Sat, 09 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm

  Log Message:
  -----------
  Find in Note: Dark gray outline (shadow) appears behind gray/yellow highlights when matched text found in HTML note.
https://bugs.webkit.org/show_bug.cgi?id=270666
rdar://122843511

Reviewed by Aditya Keerthi.

In notes, the WKContentView is transparent, so our original solution of putting an additional
grey layer behind the content view that filled up the empty parts of the scroll view would show
through and make the find ui have a incorrect grey cast. So instead, we make four views that surround
the WKContentView to fill in any part of the scrollView that isn't covered by the contentView.
These are arranged around the content view like so:

----- -----------
|    |          |
|    |----------|
|    |     |    |
|    |     |    |
----- ------    |
|          |    |
|__________|____|

Each view is expanded to reach the edges of the scroll view every time the view is scrolled or the bounds change.
This means that no matter where the content view is scrolled to, there will be a view that gives the correct
grey cast to the scroll view.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView _frameOrBoundsMayHaveChanged]):
(-[WKWebView _updateFindOverlayForOverflowScrollPositions]):
(-[WKWebView _showFindOverlay]):
(-[WKWebView _hideFindOverlay]):
(-[WKWebView _didAddLayerForFindOverlay:]):
(-[WKWebView _updateFindOverlayPosition]): Deleted.

Canonical link: https://commits.webkit.org/275873@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