From 530a19beaf9bbbff8222b49b7df7fd58ec6cc235 Mon Sep 17 00:00:00 2001 From: "qinmin@chromium.org" Date: Wed, 13 Feb 2013 01:10:54 +0000 Subject: Revert pagescale from plugin placeholder For impl-side painting, page scales are directly applied to cc. As a result, we are no longer using old style css based page scale transforms. Revert all the changes we made in https://codereview.chromium.org/11359200/ as this is no longer needed BUG=175121 Review URL: https://codereview.chromium.org/12218122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182076 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/plugins/webview_plugin.cc | 23 +---------------------- webkit/plugins/webview_plugin.h | 3 --- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'webkit') diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc index 975365b..6b80008 100644 --- a/webkit/plugins/webview_plugin.cc +++ b/webkit/plugins/webview_plugin.cc @@ -127,13 +127,6 @@ void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) { paint_rect.Offset(-rect_.x(), -rect_.y()); - float content_scale = 1.0f / GetPageScaleFactor(); - paint_rect.SetRect( - ceil(content_scale * paint_rect.x()), - ceil(content_scale * paint_rect.y()), - ceil(content_scale * paint_rect.width()), - ceil(content_scale * paint_rect.height())); - canvas->translate(SkIntToScalar(rect_.x()), SkIntToScalar(rect_.y())); canvas->save(); @@ -147,13 +140,8 @@ void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) { void WebViewPlugin::updateGeometry( const WebRect& frame_rect, const WebRect& clip_rect, const WebVector& cut_out_rects, bool is_visible) { - if (static_cast(frame_rect) != rect_) { + if (static_cast(frame_rect) != rect_) rect_ = frame_rect; - - float content_scale = 1.0f / GetPageScaleFactor(); - web_view_->resize(WebSize(content_scale * frame_rect.width, - content_scale * frame_rect.height)); - } } bool WebViewPlugin::acceptsInputEvents() { @@ -256,13 +244,4 @@ void WebViewPlugin::didReceiveResponse(WebFrame* frame, WebFrameClient::didReceiveResponse(frame, identifier, response); } -float WebViewPlugin::GetPageScaleFactor() { - if (container_) { - WebFrame* frame = container_->element().document().frame(); - WebView* top_view = frame->top()->view(); - return top_view->pageScaleFactor(); - } - return 1.0f; -} - } // namespace webkit diff --git a/webkit/plugins/webview_plugin.h b/webkit/plugins/webview_plugin.h index 29d609d..c93a73b 100644 --- a/webkit/plugins/webview_plugin.h +++ b/webkit/plugins/webview_plugin.h @@ -143,9 +143,6 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, friend class base::DeleteHelper; virtual ~WebViewPlugin(); - // Get the scale factor for the current page. - float GetPageScaleFactor(); - Delegate* delegate_; // Destroys itself. WebKit::WebCursorInfo current_cursor_; -- cgit v1.1