Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ad6bac3e96733804da0ddf32b8987d09dd3e987e
https://github.com/WebKit/WebKit/commit/ad6bac3e96733804da0ddf32b8987d09dd3e987e
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2025-04-03 (Thu, 03 Apr 2025)
Changed paths:
M Source/WebCore/platform/graphics/Image.h
M Source/WebCore/platform/graphics/IntSize.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
Log Message:
-----------
REGRESSION(290563@main): [Unified PDF] [iOS] Find in page results look blurry
when zooming in
https://bugs.webkit.org/show_bug.cgi?id=290986
rdar://147420275
Reviewed by Tim Horton and Megan Gardner.
In 290563@main, we made the plugin-to-root-view transform a no-op for
full main frame plugins that do not handle page scale gesture (i.e. iOS)
becauseflows driven externally from the plugin, such as text selections,
ended up double applying the page scale, first in the main frame's
handling of scale updates, and second in the aforementioned transform.
However, this had the subtle effect of dropping the page scale for flows
driven internally from the plugin, such as text indicator data creation.
To account for this under-application, we compute a correction factor
"mainFrameScaleForTextIndicator" and scale the text indicator image
buffer size appropriately. Note that this factor is 1 when the plugin
handles page scale factors because it is then included in the
plugin-to-root-view transform.
* Source/WebCore/platform/graphics/Image.h:
Export the textstream operator<< overload to log Image data from
UnifiedPDFPlugin.
* Source/WebCore/platform/graphics/IntSize.h:
(WebCore::IntSize::scaled const):
Port the namesake helper from FloatSize.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::textIndicatorForTextMatch):
Drive-by fix: OptionSet has a single case constructor, so an
initializer list is unnecessary.
(WebKit::UnifiedPDFPlugin::textIndicatorForSelection):
Drive-by fix: Using the enclosed IntRect representing the selection
bounds meant that we lost some precision in the rect size. This
manifested in some unexpected misalignment between the text indicator
image and the rest of the string, especially at higher scales. Plumbing
a FloatRect all the way through helped alleviate this issue.
Canonical link: https://commits.webkit.org/293180@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