Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 89e077d36e3b3e61b9483d1dc37fd8cd21f33635..18975861c7b60a266503788c9a0a56fe860901f7 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -937,6 +937,10 @@ RenderViewImpl* RenderViewImpl::Create( |
render_view = new RenderViewImpl(¶ms); |
render_view->Initialize(¶ms); |
+ bool uses_temporary_zoom_settings = |
+ render_view->webview()->mainFrame()->document().isPluginDocument(); |
Fady Samuel
2014/05/15 23:26:53
This check is probably too early to know what we a
wjmaclean
2014/05/16 01:57:08
Actually, for a mainFrame document, I think this s
Fady Samuel
2014/05/16 19:20:07
Yes, it can, at least for a <webview>. We keep aro
wjmaclean
2014/05/16 19:32:49
Will investigate that.
wjmaclean
2014/05/21 20:59:13
The way the temporary zoom settings are currently
|
+ render_view->Send(new ViewHostMsg_DidCreateDocument( |
+ render_view->GetRoutingID(), uses_temporary_zoom_settings)); |
return render_view; |
} |
@@ -1071,7 +1075,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind) |
IPC_MESSAGE_HANDLER(ViewMsg_StopFinding, OnStopFinding) |
IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) |
- IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevel, OnSetZoomLevel) |
IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, |
OnSetZoomLevelForLoadingURL) |
IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding) |
@@ -2692,12 +2695,6 @@ void RenderViewImpl::OnZoom(PageZoom zoom) { |
zoomLevelChanged(); |
} |
-void RenderViewImpl::OnSetZoomLevel(double zoom_level) { |
- webview()->hidePopups(); |
- webview()->setZoomLevel(zoom_level); |
- zoomLevelChanged(); |
-} |
- |
void RenderViewImpl::OnSetZoomLevelForLoadingURL(const GURL& url, |
double zoom_level) { |
#if !defined(OS_ANDROID) |
@@ -3685,22 +3682,16 @@ blink::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() { |
void RenderViewImpl::zoomLimitsChanged(double minimum_level, |
double maximum_level) { |
- // For now, don't remember plugin zoom values. We don't want to mix them with |
- // normal web content (i.e. a fixed layout plugin would usually want them |
- // different). |
- bool remember = !webview()->mainFrame()->document().isPluginDocument(); |
- |
int minimum_percent = static_cast<int>( |
ZoomLevelToZoomFactor(minimum_level) * 100); |
int maximum_percent = static_cast<int>( |
ZoomLevelToZoomFactor(maximum_level) * 100); |
Send(new ViewHostMsg_UpdateZoomLimits( |
- routing_id_, minimum_percent, maximum_percent, remember)); |
+ routing_id_, minimum_percent, maximum_percent)); |
} |
void RenderViewImpl::zoomLevelChanged() { |
- bool remember = !webview()->mainFrame()->document().isPluginDocument(); |
double zoom_level = webview()->zoomLevel(); |
FOR_EACH_OBSERVER(RenderViewObserver, observers_, ZoomLevelChanged()); |
@@ -3711,7 +3702,7 @@ void RenderViewImpl::zoomLevelChanged() { |
// Tell the browser which url got zoomed so it can update the menu and the |
// saved values if necessary |
Send(new ViewHostMsg_DidZoomURL( |
- routing_id_, zoom_level, remember, |
+ routing_id_, zoom_level, |
GURL(webview()->mainFrame()->document().url()))); |
} |
} |