Title: [136265] trunk/Source
- Revision
- 136265
- Author
- [email protected]
- Date
- 2012-11-30 13:24:56 -0800 (Fri, 30 Nov 2012)
Log Message
(Simple)PDFPlugin: Support conversion of PostScript documents
https://bugs.webkit.org/show_bug.cgi?id=103289
<rdar://problem/10235708>
Reviewed by Dan Bernstein.
SimplePDFPlugin (and PDFPlugin) should support converting PostScript files
to PDF before handing them off to their respective backends.
As PDFPlugin inherits from SimplePDFPlugin, it gets the new functionality automatically.
* WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add convertPostScriptDataIfNeeded(), and m_isPostScript.
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
(WebKit::SimplePDFPlugin::pluginInfo): SimplePDFPlugin should claim to support PDF and PostScript.
(WebKit::convertPostScriptDataSourceToPDF): PS->PDF conversion code, copied from PDFViewController (which I intend to remove).
(WebKit::SimplePDFPlugin::convertPostScriptDataIfNeeded): Check if the loaded data represents a PS file; if so, convert it.
(WebKit::SimplePDFPlugin::streamDidReceiveResponse): Check if the loaded data is of MIME type application/postscript, and store that in m_isPostScript.
(WebKit::SimplePDFPlugin::streamDidFinishLoading): Call convertPostScriptDataIfNeeded when we finish loading.
(WebKit::SimplePDFPlugin::manualStreamDidReceiveResponse): Ditto from streamDidReceiveResponse.
(WebKit::SimplePDFPlugin::manualStreamDidFinishLoading): Ditto from streamDidFinishLoading.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin): Use (Simple)PDFPlugin for PostScript files too.
* English.lproj/Localizable.strings:
* WebCore.exp.in:
* platform/LocalizedStrings.cpp:
(WebCore::postScriptDocumentTypeDescription):
* platform/LocalizedStrings.h:
Add and export postScriptDocumentTypeDescription, for PostScript files.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (136264 => 136265)
--- trunk/Source/WebCore/ChangeLog 2012-11-30 21:21:45 UTC (rev 136264)
+++ trunk/Source/WebCore/ChangeLog 2012-11-30 21:24:56 UTC (rev 136265)
@@ -1,3 +1,21 @@
+2012-11-30 Tim Horton <[email protected]>
+
+ (Simple)PDFPlugin: Support conversion of PostScript documents
+ https://bugs.webkit.org/show_bug.cgi?id=103289
+ <rdar://problem/10235708>
+
+ Reviewed by Dan Bernstein.
+
+ SimplePDFPlugin (and PDFPlugin) should support converting PostScript files
+ to PDF before handing them off to their respective backends.
+
+ * English.lproj/Localizable.strings:
+ * WebCore.exp.in:
+ * platform/LocalizedStrings.cpp:
+ (WebCore::postScriptDocumentTypeDescription):
+ * platform/LocalizedStrings.h:
+ Add and export postScriptDocumentTypeDescription, for PostScript files.
+
2012-11-30 Justin Novosad <[email protected]>
[Chromium] Animation updates fail when using a canvas as a CSS backround-image style with -webkit-canvas
Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (136264 => 136265)
--- trunk/Source/WebCore/English.lproj/Localizable.strings 2012-11-30 21:21:45 UTC (rev 136264)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings 2012-11-30 21:24:56 UTC (rev 136265)
@@ -316,9 +316,12 @@
/ * W e b K i t E r r o r P l u g I n W i l l H a n d l e L o a d d e s c r i p t i o n * /
"