[webkit-changes] [WebKit/WebKit] 2809f5: [UnifiedPDF] [iOS] Web process hangs the first tim...

Abrar Rahman Protyasha noreply at github.com
Fri Feb 28 17:36:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2809f525060e8d484414a5caf7b03e7c87673df1
      https://github.com/WebKit/WebKit/commit/2809f525060e8d484414a5caf7b03e7c87673df1
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2025-02-28 (Fri, 28 Feb 2025)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm

  Log Message:
  -----------
  [UnifiedPDF] [iOS] Web process hangs the first time a pointing device is hovered over text annotations
https://bugs.webkit.org/show_bug.cgi?id=288875
rdar://145882906

Reviewed by Aditya Keerthi and Wenson Hsieh.

The first time a pointing device is hovered over a text annotation, we
seem to hit UIScreen initialization code from the web process since we
try to read UIColor.systemBlueColor (to paint hover state on said
annotations). This causes the WP to hang for a while (see
rdar://74127113), because of existing sandbox restrictions.

We fix this bug by simply not painting hover state for text annotations
on iOS. This is wholly unnecessary anyway and may even give the user the
wrong impression, given a user cannot modify a text annotation in any
manner yet.

Furthermore, we also introduce a more principled behavior change by not
reading UIColor.systemBlueColor directly from the WP anymore. Instead,
we delegate system color processing to RenderTheme, and simply call into
RenderTheme::systemColor(CSSValueAppleSystemBlue, ...). This ensures
that when UnifiedPDFPlugin fully supports text annotations on iOS, we
will not face this same problem again.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::paintPDFContent):
(WebKit::UnifiedPDFPlugin::paintPDFSelection):
(WebKit::textAnnotationHoverColor):
(WebKit::UnifiedPDFPlugin::paintHoveredAnnotationOnPage):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list