forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
c1b41e0
commit 2b42362
Showing
6 changed files
with
38 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters