Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c4304291691ca9767872d81459d4a6553fb45869 https://github.com/WebKit/WebKit/commit/c4304291691ca9767872d81459d4a6553fb45869 Author: Abrar Rahman Protyasha <a_protya...@apple.com> Date: 2024-03-13 (Wed, 13 Mar 2024)
Changed paths: M Source/WebCore/page/ImageOverlayController.h M Source/WebCore/page/PageOverlay.h M Source/WebCore/page/mac/ImageOverlayControllerMac.mm M Source/WebCore/page/mac/ServicesOverlayController.h M Source/WebCore/page/mac/ServicesOverlayController.mm M Source/WebCore/platform/mac/DataDetectorHighlight.h M Source/WebCore/platform/mac/DataDetectorHighlight.mm M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h M Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h Log Message: ----------- [UnifiedPDF] WebCore::DataDetectorHighlight should be decoupled from the page https://bugs.webkit.org/show_bug.cgi?id=270883 rdar://124490748 Reviewed by Aditya Keerthi. Currently, DataDetectorHighlight instances require a WebCore::Page object at construction time. This object is used for some IPC needs such as for scheduling rendering updates and for creating graphics layers, among other things. While having a Page object around is convenient, it does not fit well when trying to integrate the DataDetectorHighlight data type in the UnifiedPDF Data Detection code path. This patch rips out the dependency of DataDetectorHighlight on the page object, instead delegating its duties to the abstract interface DataDetectorHighlightClient, which can be satisifed by downstream overlay controllers, or even PDF plugins. We make this change in anticipation of a forthcoming patch where we construct and display DataDetectorHighlight instances in a UnifiedPDFPlugin-specific document overlay controller. Furthermore, we also adopt the changes made to the DataDetectorHighlightClient interface in two notable overlay controllers - ImageOverlayController and ServicesOverlayController. Furthermore, we make a few miscellaneous unified sources build fixes and annotate a couple of `enum class` declarations with the tightest possible data type representation. * Source/WebCore/page/ImageOverlayController.h: * Source/WebCore/page/PageOverlay.h: * Source/WebCore/page/mac/ImageOverlayControllerMac.mm: (WebCore::ImageOverlayController::updateDataDetectorHighlights): (WebCore::ImageOverlayController::scheduleRenderingUpdate): (WebCore::ImageOverlayController::deviceScaleFactor const): (WebCore::ImageOverlayController::createGraphicsLayer): * Source/WebCore/page/mac/ServicesOverlayController.h: (WebCore::ServicesOverlayController::protectedPage const): * Source/WebCore/page/mac/ServicesOverlayController.mm: (WebCore::ServicesOverlayController::buildPhoneNumberHighlights): (WebCore::ServicesOverlayController::buildSelectionHighlight): (WebCore::ServicesOverlayController::scheduleRenderingUpdate): (WebCore::ServicesOverlayController::deviceScaleFactor const): (WebCore::ServicesOverlayController::createGraphicsLayer): * Source/WebCore/platform/mac/DataDetectorHighlight.h: (WebCore::DataDetectorHighlight::range const): Deleted. * Source/WebCore/platform/mac/DataDetectorHighlight.mm: (WebCore::DataDetectorHighlight::createForSelection): (WebCore::DataDetectorHighlight::createForTelephoneNumber): (WebCore::DataDetectorHighlight::createForImageOverlay): (WebCore::DataDetectorHighlight::DataDetectorHighlight): (WebCore::DataDetectorHighlight::invalidate): (WebCore::DataDetectorHighlight::notifyFlushRequired): (WebCore::DataDetectorHighlight::deviceScaleFactor const): (WebCore::DataDetectorHighlight::isRangeSupportingType const): (WebCore::DataDetectorHighlight::range const): (WebCore::areEquivalent): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/WebPage/Cocoa/UnifiedTextReplacementController.mm: (WebKit::UnifiedTextReplacementController::textReplacementSessionDidReceiveTextWithReplacementRange): * Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h: Canonical link: https://commits.webkit.org/276060@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