Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b42362df0287dfaed6d74d1f280176ed0e4c19c
      
https://github.com/WebKit/WebKit/commit/2b42362df0287dfaed6d74d1f280176ed0e4c19c
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.h
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.h
    M 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm

  Log Message:
  -----------
  UnifiedPDF: Page previews disappear when zoomed enough
https://bugs.webkit.org/show_bug.cgi?id=284458
rdar://141280757

Reviewed by Simon Fraser.

Page overview layer would turn to tiled backing layer when zoomed enough.
Changing to tiled backing would change GraphicsLayer primary layer id.
The presentation controller would disambiguate what to paint as contents
based on which primary layer the updated GraphicsLayer has. Since
the presentation controller would not know the new id, the layer would
stay empty.

Fix by:
Force the background layer to not allow tiling.

To avoid similar bugs in the future, disambiguate the contents based on
the GraphicsLayer, not based on the primary layer id of the
GraphicsLayer. The primary layer is a implementation detail of the
GraphicsLayer, and its behavior cannot be anticipated by the client,
PDFPresentationController. AsyncPDFRenderer has similar problem, but
this cannot be solved as we cannot navigate from tile grid id to
graphics layer.

* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm:
(WebKit::AsyncPDFRenderer::releaseMemory):
(WebKit::AsyncPDFRenderer::startTrackingLayer):
(WebKit::AsyncPDFRenderer::stopTrackingLayer):
(WebKit::AsyncPDFRenderer::layerForTileGrid const):
(WebKit::AsyncPDFRenderer::coverageRectDidChange):
(WebKit::AsyncPDFRenderer::renderInfoForTile const):
* 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.h:
* 
Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDiscretePresentationController.mm:
(WebKit::PDFDiscretePresentationController::buildRows):
(WebKit::PDFDiscretePresentationController::customContentsScale const):
(WebKit::PDFDiscretePresentationController::layerNeedsPlatformContext const):
(WebKit::PDFDiscretePresentationController::rowDataForLayer const const):
(WebKit::PDFDiscretePresentationController::rowForLayer const):
(WebKit::PDFDiscretePresentationController::paintContents):
(WebKit::PDFDiscretePresentationController::rowDataForLayerID const const): 
Deleted.
(WebKit::PDFDiscretePresentationController::rowForLayerID const): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.h:
(WebKit::PDFPresentationController::rowForLayer const):
(WebKit::PDFPresentationController::rowForLayerID const): Deleted.
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFPresentationController.mm:
(WebKit::PDFPresentationController::makePageContainerLayer):

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

Reply via email to