Title: [259765] trunk/Source/WebKit
- Revision
- 259765
- Author
- [email protected]
- Date
- 2020-04-08 16:50:38 -0700 (Wed, 08 Apr 2020)
Log Message
Handle [PDFDocument initWithProvider:] returning nil
<rdar://problem/61482395> and https://bugs.webkit.org/show_bug.cgi?id=210224
Reviewed by Geoff Garen.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::threadEntry): Treat a nil PDFDocument as "non-linearized, fallback to normal loading"
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (259764 => 259765)
--- trunk/Source/WebKit/ChangeLog 2020-04-08 22:57:51 UTC (rev 259764)
+++ trunk/Source/WebKit/ChangeLog 2020-04-08 23:50:38 UTC (rev 259765)
@@ -1,3 +1,13 @@
+2020-04-08 Brady Eidson <[email protected]>
+
+ Handle [PDFDocument initWithProvider:] returning nil
+ <rdar://problem/61482395> and https://bugs.webkit.org/show_bug.cgi?id=210224
+
+ Reviewed by Geoff Garen.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::threadEntry): Treat a nil PDFDocument as "non-linearized, fallback to normal loading"
+
2020-04-08 Daniel Bates <[email protected]>
Track editable elements on screen
Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (259764 => 259765)
--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2020-04-08 22:57:51 UTC (rev 259764)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2020-04-08 23:50:38 UTC (rev 259765)
@@ -867,6 +867,11 @@
CGDataProviderSetProperty(dataProvider.get(), kCGDataProviderHasHighLatency, kCFBooleanTrue);
m_backgroundThreadDocument = adoptNS([[pdfDocumentClass() alloc] initWithProvider:dataProvider.get()]);
+ // [PDFDocument initWithProvider:] will return nil in cases where the PDF is non-linearized.
+ // In those cases we'll just keep buffering the entire PDF on the main thread.
+ if (!m_backgroundThreadDocument)
+ return;
+
if (!m_incrementalPDFLoadingEnabled) {
m_backgroundThreadDocument = nil;
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes