Chromium Code Reviews| 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) |
| @@ -251,8 +251,7 @@ |
| // 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. |
|
brettw
2011/01/21 21:42:30
Can you remove the reference to PDF in this commen
|
| - WebFrame* frame = instance->container()->element().document().frame(); |
| - if (!frame->view()->mainFrame()->document().isPluginDocument()) |
| + 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 |