Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc |
=================================================================== |
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 71882) |
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy) |
@@ -250,9 +250,8 @@ |
return; |
// We only want to tell the page to change its zoom if the whole page is the |
- // PDF. If we're in an iframe, then don't do anything. |
- WebFrame* frame = instance->container()->element().document().frame(); |
- if (!frame->view()->mainFrame()->document().isPluginDocument()) |
+ // plugin. If we're in an iframe, then don't do anything. |
+ if (!instance->IsFullPagePlugin()) |
return; |
double zoom_level = WebView::zoomFactorToZoomLevel(factor); |
@@ -1231,5 +1230,10 @@ |
return found->second; |
} |
+bool PluginInstance::IsFullPagePlugin() const { |
+ WebFrame* frame = container()->element().document().frame(); |
+ return frame->view()->mainFrame()->document().isPluginDocument(); |
+} |
+ |
} // namespace ppapi |
} // namespace webkit |