WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
209097
Fix the "deliver cached ranges" logic in PDFPlugin (and other small cleanups)
https://bugs.webkit.org/show_bug.cgi?id=209097
Summary
Fix the "deliver cached ranges" logic in PDFPlugin (and other small cleanups)
Brady Eidson
Reported
2020-03-13 17:05:05 PDT
Fix the "deliver cached ranges" logic in PDFPlugin (and other small cleanups) It was pretty broken, but not noticed because we rarely hit that code path. Now we do, so the brokenness was obvious. Noticed at the same time was needing to respond to some requests on the main thread after all data was loaded, along with a new PDFKit SPI to allow for that.
Attachments
Patch
(8.77 KB, patch)
2020-03-13 17:16 PDT
,
Brady Eidson
timothy
: review+
Details
Formatted Diff
Diff
PFL
(9.05 KB, patch)
2020-03-14 17:12 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
PFL
(9.07 KB, patch)
2020-03-14 17:39 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
PFL
(8.88 KB, patch)
2020-03-14 18:30 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2020-03-13 17:16:50 PDT
Created
attachment 393561
[details]
Patch
Brady Eidson
Comment 2
2020-03-13 17:17:11 PDT
<
rdar://problem/60396297
>
Timothy Hatcher
Comment 3
2020-03-13 17:27:01 PDT
Comment on
attachment 393561
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393561&action=review
> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1441 > + if ([m_pdfDocument.get() respondsToSelector:NSSelectorFromString(@"setHasHighLatencyDataProvider:")]) > + [m_pdfDocument.get() setHasHighLatencyDataProvider:NO];
You might need to forward declare this to call it like this. Otherwise you will need to do an objc_msgSend or performSelector:. If you forward declare, you can just do @selector(setHasHighLatencyDataProvider:) instead of NSSelectorFromString.
Timothy Hatcher
Comment 4
2020-03-13 17:27:36 PDT
Needs rebased.
Brady Eidson
Comment 5
2020-03-13 20:33:58 PDT
(In reply to Timothy Hatcher from
comment #3
)
> Comment on
attachment 393561
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=393561&action=review
> > > Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1441 > > + if ([m_pdfDocument.get() respondsToSelector:NSSelectorFromString(@"setHasHighLatencyDataProvider:")]) > > + [m_pdfDocument.get() setHasHighLatencyDataProvider:NO]; > > You might need to forward declare this to call it like this. Otherwise you > will need to do an objc_msgSend or performSelector:. If you forward declare, > you can just do @selector(setHasHighLatencyDataProvider:) instead of > NSSelectorFromString.
Good call.
Brady Eidson
Comment 6
2020-03-13 20:34:52 PDT
Oh I know why everything is red - Locally, it's built on top of the patch in
https://bugs.webkit.org/show_bug.cgi?id=209063
Will figure something out.
Brady Eidson
Comment 7
2020-03-14 17:12:17 PDT
Created
attachment 393599
[details]
PFL
Brady Eidson
Comment 8
2020-03-14 17:39:55 PDT
Created
attachment 393600
[details]
PFL
Brady Eidson
Comment 9
2020-03-14 18:30:21 PDT
Created
attachment 393602
[details]
PFL
WebKit Commit Bot
Comment 10
2020-03-14 20:40:48 PDT
Comment on
attachment 393602
[details]
PFL Clearing flags on attachment: 393602 Committed
r258477
: <
https://trac.webkit.org/changeset/258477
>
WebKit Commit Bot
Comment 11
2020-03-14 20:40:49 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug