Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bc3a3d94e49ea4c9bbef02dba14d71be8191c540
      
https://github.com/WebKit/WebKit/commit/bc3a3d94e49ea4c9bbef02dba14d71be8191c540
  Author: Sammy Gill <[email protected]>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [UnifiedPDF][iOS] Start zooming in the plugin.
https://bugs.webkit.org/show_bug.cgi?id=279689
rdar://120425065

Reviewed by Abrar Rahman Protyasha and Wenson Hsieh.

This patch serves as a first step towards allowing the plugin to be completely 
responsible
for zooming on iOS and focuses on allowing this behavior for main frame PDFs.

When the UIScrollView is zoomed and the delegate is informed of the zoom events 
we will
check to see if the web content process has a main framed plugin that is 
responsible for
handling the page scale gesture. If it does we will inform it about the 
beginning of
the gesture and the end. This information gets plumbed to the PDFPlugin which 
keeps track
of it as an extra bit of state.

Whenever the WebPage is handling a content rect update from the UIProcess we 
will forward
over the new page scale to the plugin to handle rather than sending it over to 
the page.
The origin that is passed along to the plugin is just the origin of the visible 
content
rect that we got from the UIProcess so we will just simply scroll to its 
position in
the ScrolledContents coordinate space.

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView scrollViewWillBeginZooming:withView:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didEndUserTriggeredZooming):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::setScaleFactor):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
(WebKit::WebPage::willStartUserTriggeredZooming):
(WebKit::WebPage::didEndUserTriggeredZooming):

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



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

Reply via email to