Chromium Code Reviews| Index: components/plugins/renderer/loadable_plugin_placeholder.cc |
| diff --git a/components/plugins/renderer/loadable_plugin_placeholder.cc b/components/plugins/renderer/loadable_plugin_placeholder.cc |
| index 4a32ee355ffefad22f4e6a6e29db35ae593263da..4b05f0f9940259a59457047732a28e00b95c2ed4 100644 |
| --- a/components/plugins/renderer/loadable_plugin_placeholder.cc |
| +++ b/components/plugins/renderer/loadable_plugin_placeholder.cc |
| @@ -181,8 +181,9 @@ v8::Local<v8::Object> LoadablePluginPlaceholder::GetV8ScriptableObject( |
| void LoadablePluginPlaceholder::OnUnobscuredRectUpdate( |
| const gfx::Rect& unobscured_rect) { |
| DCHECK(content::RenderThread::Get()); |
| - if (!power_saver_enabled_ || !finished_loading_) |
| + if (!power_saver_enabled_ || !finished_loading_) { |
| return; |
| + } |
|
groby-ooo-7-16
2015/12/04 22:06:56
??
tommycli
2015/12/07 22:06:18
Done.
|
| // Only update the unobscured rect during the recheck phase. Also early exit |
| // to prevent reentrancy issues. |
| @@ -269,6 +270,10 @@ void LoadablePluginPlaceholder::DidFinishLoadingCallback() { |
| // This is necessary to prevent a flicker. |
| if (premade_throttler_ && power_saver_enabled_) |
| premade_throttler_->SetHiddenForPlaceholder(true /* hidden */); |
| + |
| + // In case our initial geometry was reported before the placeholder finished |
| + // loading, request another one. Needed for correct large poster unthrottling. |
|
groby-ooo-7-16
2015/12/04 22:06:56
Is it, even if large posters don't get throttled?
tommycli
2015/12/07 22:06:18
Yes, as large posters are throttled, and then beco
groby-ooo-7-16
2015/12/07 22:16:04
That's... limited happiness. Will that mean poster
tommycli
2015/12/07 22:22:13
This patch makes the "flash" imperceptible on my m
|
| + plugin()->container()->reportGeometry(); |
| } |
| void LoadablePluginPlaceholder::DidFinishIconRepositionForTestingCallback() { |