Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: webkit/plugins/webview_plugin.cc

Issue 12218122: Revert pagescale from plugin placeholder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/webview_plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/webview_plugin.cc
diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc
index 975365bc64987a7fd21c23f73a97f7c165261779..6b80008c697664bbbc8f604e1130c78cdade87b1 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
« no previous file with comments | « webkit/plugins/webview_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698