[webkit-changes] [WebKit/WebKit] b7d0e2: [UnifiedPDF] Select element for choice annotations...

Sammy Gill noreply at github.com
Tue May 28 08:34:54 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b7d0e2efd37914f2c13e5a148dc3213386ac3bc6
      https://github.com/WebKit/WebKit/commit/b7d0e2efd37914f2c13e5a148dc3213386ac3bc6
  Author: Sammy Gill <sammy.gill at apple.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M Source/WebKit/Shared/WebHitTestResultData.cpp
    M Source/WebKit/Shared/WebHitTestResultData.h
    M Source/WebKit/Shared/WebHitTestResultData.serialization.in
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

  Log Message:
  -----------
  [UnifiedPDF] Select element for choice annotations will sometimes flicker
https://bugs.webkit.org/show_bug.cgi?id=274634
rdar://128406464

Reviewed by Abrar Rahman Protyasha.

The choice annotation has a HTML select element backing it for user
interaction. Sometimes clicking on the choice annotation while the
corresponding HTML element is already active will result in the
element disappearing and reappearing resulting in a flicker. It appears
this is due to the logic in WebPageMac::performImmediateActionHitTestAtLocation
taking focus away from the HTML element and giving it to the plugin
document.

To fix this let the plugin note that the the hit test is over an already
active annotation via WebHitTestResultData. If this is the case then
we will not focus the plugin document and keep the focus on the
HTML annotation.

* Source/WebKit/Shared/WebHitTestResultData.cpp:
(WebKit::WebHitTestResultData::WebHitTestResultData):
* Source/WebKit/Shared/WebHitTestResultData.h:
* Source/WebKit/Shared/WebHitTestResultData.serialization.in:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::textForImmediateActionHitTestAtPoint):
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):

Canonical link: https://commits.webkit.org/279381@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