Bug 208669

Summary: Pre-fetch first page in new PDF loading model
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
achristensen: review+
PFL none

Description Brady Eidson 2020-03-05 15:39:23 PST
Pre-fetch first page in new PDF loading model
Comment 1 Brady Eidson 2020-03-05 15:44:19 PST
Created attachment 392638 [details]
Patch
Comment 2 Alex Christensen 2020-03-05 15:54:28 PST
Comment on attachment 392638 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=392638&action=review

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:98
> +-(void) preloadDataOfPagesInRange:(NSRange)range onQueue:(dispatch_queue_t)queue completion:(void (^)(NSIndexSet* loadedPageIndexes))completionBlock;

Space in wrong place.
Same with previous line.

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:711
> +    auto firstPageQueue = WorkQueue::create("PDF first page work queue");

We should reuse this.
Comment 3 Brady Eidson 2020-03-05 16:11:24 PST
(In reply to Alex Christensen from comment #2)
> Comment on attachment 392638 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=392638&action=review
> 
> > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:98
> > +-(void) preloadDataOfPagesInRange:(NSRange)range onQueue:(dispatch_queue_t)queue completion:(void (^)(NSIndexSet* loadedPageIndexes))completionBlock;
> 
> Space in wrong place.
> Same with previous line.
> 
> > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:711
> > +    auto firstPageQueue = WorkQueue::create("PDF first page work queue");
> 
> We should reuse this.

There's only ever one per PDFPlugin, and there's (generally) only ever one PDFPlugin per WebContent process.

So I agree in principal, but in practice it's a non-issue.
Comment 4 Brady Eidson 2020-03-05 16:12:59 PST
Created attachment 392643 [details]
PFL
Comment 5 Radar WebKit Bug Importer 2020-03-05 18:16:36 PST
<rdar://problem/60112775>
Comment 6 Radar WebKit Bug Importer 2020-03-05 18:16:37 PST
<rdar://problem/60112772>
Comment 7 WebKit Commit Bot 2020-03-05 19:00:06 PST
Comment on attachment 392643 [details]
PFL

Clearing flags on attachment: 392643

Committed r257964: <https://trac.webkit.org/changeset/257964>
Comment 8 WebKit Commit Bot 2020-03-05 19:00:08 PST
All reviewed patches have been landed.  Closing bug.