diff options
author | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 01:10:54 +0000 |
---|---|---|
committer | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 01:10:54 +0000 |
commit | 530a19beaf9bbbff8222b49b7df7fd58ec6cc235 (patch) | |
tree | 20f942120947e60391153cc321c5ae674e0455e0 /webkit | |
parent | e9a77a4af931c4ff8f08de58dcd5ac7f1f16c494 (diff) | |
download | chromium_src-530a19beaf9bbbff8222b49b7df7fd58ec6cc235.zip chromium_src-530a19beaf9bbbff8222b49b7df7fd58ec6cc235.tar.gz chromium_src-530a19beaf9bbbff8222b49b7df7fd58ec6cc235.tar.bz2 |
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
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/webview_plugin.cc | 23 | ||||
-rw-r--r-- | webkit/plugins/webview_plugin.h | 3 |
2 files changed, 1 insertions, 25 deletions
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<WebRect>& cut_out_rects, bool is_visible) { - if (static_cast<gfx::Rect>(frame_rect) != rect_) { + if (static_cast<gfx::Rect>(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<WebViewPlugin>; virtual ~WebViewPlugin(); - // Get the scale factor for the current page. - float GetPageScaleFactor(); - Delegate* delegate_; // Destroys itself. WebKit::WebCursorInfo current_cursor_; |