| Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| index 0811eba1f5d5c7cb0426baa15a1a18be97af67d4..4853e386d6dc1f0a311a754d3e96984e9b06415f 100644
|
| --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| @@ -1204,6 +1204,18 @@ void PepperPluginInstanceImpl::ViewChanged(
|
| view_data_.css_scale =
|
| container_->pageZoomFactor() * container_->pageScaleFactor();
|
|
|
| + // Only set the scroll offset if the plugin is visible.
|
| + if (!view_data_.is_page_visible ||
|
| + view_data_.clip_rect.size.width == 0 ||
|
| + view_data_.clip_rect.size.height == 0) {
|
| + view_data_.scroll_offset = PP_MakePoint(0, 0);
|
| + } else {
|
| + gfx::Size scroll_offset =
|
| + container_->element().document().frame()->scrollOffset();
|
| + view_data_.scroll_offset = PP_MakePoint(scroll_offset.width(),
|
| + scroll_offset.height());
|
| + }
|
| +
|
| if (desired_fullscreen_state_ || view_data_.is_fullscreen) {
|
| WebElement element = container_->element();
|
| WebDocument document = element.document();
|
|
|