Title: [149536] trunk/Source/WebKit2
- Revision
- 149536
- Author
- [email protected]
- Date
- 2013-05-03 13:56:44 -0700 (Fri, 03 May 2013)
Log Message
PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
https://bugs.webkit.org/show_bug.cgi?id=115544
<rdar://problem/13801789>
Reviewed by Alexey Proskuryakov.
Commit changes to the active annotation (if there is one) before
returning the live PDF data, so that said changes are represented
in the exported or printed output.
* WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
(SimplePDFPlugin): Make liveData virtual.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (149535 => 149536)
--- trunk/Source/WebKit2/ChangeLog 2013-05-03 20:56:22 UTC (rev 149535)
+++ trunk/Source/WebKit2/ChangeLog 2013-05-03 20:56:44 UTC (rev 149536)
@@ -1,5 +1,23 @@
2013-05-03 Tim Horton <[email protected]>
+ PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
+ https://bugs.webkit.org/show_bug.cgi?id=115544
+ <rdar://problem/13801789>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Commit changes to the active annotation (if there is one) before
+ returning the live PDF data, so that said changes are represented
+ in the exported or printed output.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
+ * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
+ (SimplePDFPlugin): Make liveData virtual.
+
+2013-05-03 Tim Horton <[email protected]>
+
Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
https://bugs.webkit.org/show_bug.cgi?id=115056
<rdar://problem/13719543>
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h (149535 => 149536)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2013-05-03 20:56:22 UTC (rev 149535)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2013-05-03 20:56:44 UTC (rev 149536)
@@ -142,6 +142,8 @@
WebCore::IntPoint convertFromPDFViewToRootView(const WebCore::IntPoint&) const;
+ virtual NSData *liveData() const OVERRIDE;
+
enum UpdateCursorMode {
UpdateIfNeeded,
ForceUpdate
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (149535 => 149536)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2013-05-03 20:56:22 UTC (rev 149535)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2013-05-03 20:56:44 UTC (rev 149536)
@@ -1099,6 +1099,14 @@
return SimplePDFPlugin::handleWheelEvent(event);
}
+NSData *PDFPlugin::liveData() const
+{
+ if (m_activeAnnotation)
+ m_activeAnnotation->commit();
+
+ return SimplePDFPlugin::liveData();
+}
+
} // namespace WebKit
#endif // ENABLE(PDFKIT_PLUGIN)
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h (149535 => 149536)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h 2013-05-03 20:56:22 UTC (rev 149535)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h 2013-05-03 20:56:44 UTC (rev 149536)
@@ -73,7 +73,7 @@
const String& suggestedFilename() { return m_suggestedFilename; }
- NSData *liveData() const;
+ virtual NSData *liveData() const;
NSData *rawData() const { return (NSData *)m_data.get(); }
bool pdfDocumentWasMutated() const { return m_pdfDocumentWasMutated; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes