Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 16b1f218b34090cb7e7f23569bebd49966b7df45
      
https://github.com/WebKit/WebKit/commit/16b1f218b34090cb7e7f23569bebd49966b7df45
  Author: Etienne Segonzac <s...@apple.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/ios/WKBaseScrollView.h
    M Source/WebKit/UIProcess/ios/WKBaseScrollView.mm
    M Source/WebKit/UIProcess/ios/WKPDFView.mm

  Log Message:
  -----------
  Overlay Regions should be updated when loading a PDF
https://bugs.webkit.org/show_bug.cgi?id=277556
<rdar://125667363>

Reviewed by Abrar Rahman Protyasha.

We need to observe the contentSize updates made from PDFKit to properly
maintain Overlay Regions when a PDF is loaded.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _updateOverlayRegionsForCustomContentView]):
Introduce a new method to refresh the Overlay Region settings for custom
content views.

* Source/WebKit/UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):
Add an observer on the scrollview's contentSize.
(-[WKPDFView dealloc]):
Remove the observer.
(-[WKPDFView observeValueForKeyPath:ofObject:change:context:]):
Update Overlay Regions when the contentSize is updated.

* Source/WebKit/UIProcess/ios/WKBaseScrollView.h:
* Source/WebKit/UIProcess/ios/WKBaseScrollView.mm:
(-[WKBaseScrollView _updateOverlayRegionRects:]):
Switch to a const ref.

Canonical link: https://commits.webkit.org/281936@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to