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

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

Issue 1958903005: Fix positioning of Browser Plugins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update less 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 1fbf3a4aca7b9cf4525f21c26b2304845f504525..3731f8e833be2091a9f9ca69a279ec617b817079 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -376,13 +376,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