Title: [155138] trunk/Source/WebCore
Revision
155138
Author
[email protected]
Date
2013-09-05 12:25:21 -0700 (Thu, 05 Sep 2013)

Log Message

iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
https://bugs.webkit.org/show_bug.cgi?id=120771

Reviewed by Anders Carlsson.

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::createPDFDocument):
Use the (removed in r155069) PLATFORM(MAC) way of making a CGDataProvider from a SharedBuffer
everywhere; this is what iOS was expecting to use (where I accidentally changed behavior),
and it should also work for Windows, the only other USE(CG) platform.

Since we only createPDFDocument() after all data has been received, I'm not
restoring the comment about the SharedBuffer being secretly written to behind its back.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (155137 => 155138)


--- trunk/Source/WebCore/ChangeLog	2013-09-05 18:58:07 UTC (rev 155137)
+++ trunk/Source/WebCore/ChangeLog	2013-09-05 19:25:21 UTC (rev 155138)
@@ -1,3 +1,19 @@
+2013-09-05  Tim Horton  <[email protected]>
+
+        iOS build broke with change to make Mac use PDFKit for PDFDocumentImage
+        https://bugs.webkit.org/show_bug.cgi?id=120771
+
+        Reviewed by Anders Carlsson.
+
+        * platform/graphics/cg/PDFDocumentImage.cpp:
+        (WebCore::PDFDocumentImage::createPDFDocument):
+        Use the (removed in r155069) PLATFORM(MAC) way of making a CGDataProvider from a SharedBuffer
+        everywhere; this is what iOS was expecting to use (where I accidentally changed behavior),
+        and it should also work for Windows, the only other USE(CG) platform.
+
+        Since we only createPDFDocument() after all data has been received, I'm not
+        restoring the comment about the SharedBuffer being secretly written to behind its back.
+
 2013-09-04  Dean Jackson  <[email protected]>
 
         Rename supportsContext to probablySupportsContext

Modified: trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (155137 => 155138)


--- trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp	2013-09-05 18:58:07 UTC (rev 155137)
+++ trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp	2013-09-05 19:25:21 UTC (rev 155138)
@@ -145,13 +145,8 @@
 #if !USE(PDFKIT_FOR_PDFDOCUMENTIMAGE)
 void PDFDocumentImage::createPDFDocument()
 {
-    // Create a CGDataProvider to wrap the SharedBuffer.
-    // We use the GetBytesAtPosition callback rather than the GetBytePointer one because SharedBuffer
-    // does not provide a way to lock down the byte pointer and guarantee that it won't move, which
-    // is a requirement for using the GetBytePointer callback.
-
-    CGDataProviderDirectCallbacks providerCallbacks = { 0, 0, 0, sharedBufferGetBytesAtPosition, 0 };
-    RetainPtr<CGDataProviderRef> dataProvider = adoptCF(CGDataProviderCreateDirect(this->data(), this->data()->size(), &providerCallbacks));
+    RetainPtr<CFDataRef> data = ""
+    RetainPtr<CGDataProviderRef> dataProvider = adoptCF(CGDataProviderCreateWithCFData(data.get()));
     m_document = CGPDFDocumentCreateWithProvider(dataProvider.get());
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to