-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UnifiedPDF] When an incremental PDF completes its load, blank pages are still visible #28318
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
smfr:eng/UnifiedPDF-When-an-incremental-PDF-completes-its-load-blank-pages-are-still-visible
May 10, 2024
Merged
Conversation
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
EWS run on previous version of this PR (hash 717b2af) |
hortont424
approved these changes
May 9, 2024
717b2af
to
41b1367
Compare
EWS run on previous version of this PR (hash 41b1367) |
41b1367
to
d648943
Compare
EWS run on current version of this PR (hash d648943) |
β¦are still visible https://bugs.webkit.org/show_bug.cgi?id=273917 rdar://127713604 Reviewed by Tim Horton. While loading an incremental PDF (potentially over a slow network connection), nothing currently triggers repaints, so we never show pages as they load, nor do we repaint all the pages when the load completes. This can leave you with blank pages until you scroll or zoom. Fix by hooking up some virtual functions on the plugin to give UnifiedPDFPlugin a way to know when incremental loads progress, finish or cancel. While progressing, fire a repeating timer every 1s to trigger repaints (we currently can't know which pages become valid based on data ranges). Also trigger a repaint when the load completes. This repaints use the coverage rect to only invalidate visible pages. * Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h: (WebKit::PDFPluginBase::incrementalLoadingDidProgress): (WebKit::PDFPluginBase::incrementalLoadingDidCancel): (WebKit::PDFPluginBase::incrementalLoadingDidFinish): * Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm: (WebKit::PDFPluginBase::streamDidReceiveData): (WebKit::PDFPluginBase::streamDidFinishLoading): (WebKit::PDFPluginBase::streamDidFail): (WebKit::PDFPluginBase::receivedNonLinearizedPDFSentinel): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/AsyncPDFRenderer.mm: (WebKit::AsyncPDFRenderer::coverageRectDidChange): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/PDFDocumentLayout.mm: (WebKit::PDFDocumentLayout::contentsSize const): * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h: * Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm: (WebKit::UnifiedPDFPlugin::installPDFDocument): (WebKit::UnifiedPDFPlugin::incrementalLoadingDidProgress): (WebKit::UnifiedPDFPlugin::incrementalLoadingDidCancel): (WebKit::UnifiedPDFPlugin::incrementalLoadingDidFinish): (WebKit::UnifiedPDFPlugin::updatePageBackgroundLayers): (WebKit::UnifiedPDFPlugin::incrementalLoadingRepaintTimerFired): (WebKit::UnifiedPDFPlugin::repaintForIncrementalLoad): (WebKit::UnifiedPDFPlugin::paintContents): Canonical link: https://commits.webkit.org/278597@main
d648943
to
7208a15
Compare
Committed 278597@main (7208a15): https://commits.webkit.org/278597@main Reviewed commits have been landed. Closing PR #28318 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
7208a15
d648943
π§ͺ wpe-wk2π§ͺ ios-wk2-wptπ§ͺ mac-AS-debug-wk2