Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 2021363002: Fix positioning of widgets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index e9c4bffa2026929460e6c3db5d78ccfa22e1dfb1..f6d33c88545b2ee87e50bf75490a9e7bb0df4ff4 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -377,13 +377,15 @@ void BrowserPlugin::updateGeometry(const WebRect& plugin_rect_in_viewport,
ready_ = true;
}
- if (delegate_ && (view_rect_.size() != old_view_rect.size()))
+ bool rect_size_changed = view_rect_.size() != old_view_rect.size();
+ if (delegate_ && rect_size_changed)
delegate_->DidResizeElement(view_rect_.size());
if (!attached())
return;
- if (old_view_rect.size() == view_rect_.size()) {
+ if ((!delegate_ && rect_size_changed) ||
+ view_rect_.origin() != old_view_rect.origin()) {
// Let the browser know about the updated view rect.
BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateGeometry(
browser_plugin_instance_id_, view_rect_));
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698