-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
10 changed files
with
139 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.