Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2fc8e7a44d9568e96a580f9ecaae7fe4853aa795 https://github.com/WebKit/WebKit/commit/2fc8e7a44d9568e96a580f9ecaae7fe4853aa795 Author: Abrar Rahman Protyasha <a_protya...@apple.com> Date: 2025-04-04 (Fri, 04 Apr 2025)
Changed paths: M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm M Source/WebKit/WebProcess/Plugins/PluginView.cpp M Source/WebKit/WebProcess/Plugins/PluginView.h M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm Log Message: ----------- REGRESSION(287912@main): [UnifiedPDF] [iOS] When clicking and holding over a link the link image gets pixelated https://bugs.webkit.org/show_bug.cgi?id=291071 rdar://146107036 Reviewed by Wenson Hsieh. In 287912@main, we start providing the URL and root view bounds of a link for the interaction information under a tap. Since we do not provide text indicator data for this link, we end up creating a fallback targeted preview corresponding to the suggested bounds. The snapshot view for this fallback suffers from the same under-application of main frame scale diagnosed in 293180@main and thus leads to a blurry preview. This patch fixes the blurry content by simply driving text indicator data generation for the link annotation through the plugin during hit testing, so that we do not have to end up using this fallback targeted preview. To facilitate this behavior change, we introduce a few refactors. More details inline. * Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h: (WebKit::PDFPluginBase::linkDataAtPoint): Supplants linkURLAndBoundsAtPoint() by also providing a TextIndicator for the link annotation, which callers can use to populate `linkIndicator` field in InteractionInformationAtPosition instances. * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::textIndicatorDataForPageRect): Common function to generate TextIndicator data used for both selections and (link) annotations. This method only needs to know the page index and the page bounds around which to create said data. (WebKit::UnifiedPDFPlugin::selectionTextIndicatorHighlightColor): Make this a static getter. We were previously instantiating color instances on every textIndicatorForSelection() call. (WebKit::UnifiedPDFPlugin::textIndicatorForSelection): (WebKit::UnifiedPDFPlugin::textIndicatorForAnnotation): Forwards the necessary page bound/index information for a (link) annotation to textIndicatorDataForPageRect(), allowing to create an actionable TextIndicator. (WebKit::UnifiedPDFPlugin::linkURLAndBoundsForAnnotation const): Common method used to query URL/bound information about any PDF annotation. (WebKit::UnifiedPDFPlugin::linkURLAndBoundsAtPoint const): Now that this is supplanted, it is still the primary source of information for UnifiedPDFPlugin::highlightRectForTapAtPoint(), but is also used to build up the return value of UnifiedPDFPlugin::linkDataAtPoint(). (WebKit::UnifiedPDFPlugin::linkDataAtPoint): * Source/WebKit/WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::linkDataAtPoint): * Source/WebKit/WebProcess/Plugins/PluginView.h: * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::positionInformation): Canonical link: https://commits.webkit.org/293279@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