From 8d473cf9743f1d30a16a27114e93bd5af5648d23 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 18 May 2012 14:03:11 +0200 Subject: Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578) Weekly snapshot --- Source/WebKit/chromium/src/WebPluginContainerImpl.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Source/WebKit/chromium/src/WebPluginContainerImpl.cpp') diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp index 6ee01efdd..400aabb00 100644 --- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp +++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp @@ -72,6 +72,7 @@ #include "ScrollView.h" #include "ScrollbarTheme.h" #include "UserGestureIndicator.h" +#include "WebPrintParams.h" #include "WheelEvent.h" #include #include @@ -233,6 +234,14 @@ void WebPluginContainerImpl::setParent(ScrollView* view) reportGeometry(); } +void WebPluginContainerImpl::setPlugin(WebPlugin* plugin) +{ + if (plugin != m_webPlugin) { + m_element->resetInstance(); + m_webPlugin = plugin; + } +} + bool WebPluginContainerImpl::supportsPaginatedPrint() const { return m_webPlugin->supportsPaginatedPrint(); @@ -243,10 +252,12 @@ bool WebPluginContainerImpl::isPrintScalingDisabled() const return m_webPlugin->isPrintScalingDisabled(); } -int WebPluginContainerImpl::printBegin(const IntRect& printableArea, - int printerDPI) const +int WebPluginContainerImpl::printBegin(const WebPrintParams& printParams) const { - return m_webPlugin->printBegin(printableArea, printerDPI); + return m_webPlugin->printBegin(printParams.printContentArea, printParams.printerDPI); + // FIXME: After committing this CL, update the chrome plugin printBegin() + // function to use the overloaded printBegin function. + // return m_webPlugin->printBegin(printParams); } bool WebPluginContainerImpl::printPage(int pageNumber, -- cgit v1.2.1