[webkit-changes] [WebKit/WebKit] af2b37: [UnifiedPDF] Hide the selection layer when there i...

Simon Fraser noreply at github.com
Thu May 30 21:00:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af2b37e3e31f37e7295b93568c24aac51fe1bf46
      https://github.com/WebKit/WebKit/commit/af2b37e3e31f37e7295b93568c24aac51fe1bf46
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2024-05-30 (Thu, 30 May 2024)

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

  Log Message:
  -----------
  [UnifiedPDF] Hide the selection layer when there is no selection
https://bugs.webkit.org/show_bug.cgi?id=274939
rdar://128971102

Reviewed by Abrar Rahman Protyasha.

If the current selection is empty, we can unparent the selection layer to avoid
having to repaint it on resize. When there is a non-empty selection, we reparent
and mark it as being in the window.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::ensureLayers):
(WebKit::UnifiedPDFPlugin::repaintOnSelectionChange):
(WebKit::UnifiedPDFPlugin::showOrHideSelectionLayerAsNecessary):

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