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

Unified Diff: webkit/glue/plugins/webplugin_delegate_impl_mac.mm

Issue 373015: Fix dummy plugin window update (Mac) (Closed)
Patch Set: Created 11 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/webplugin_delegate_impl_mac.mm
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 36e115cc675faf8bdadf218e1bfd9d3294140fa4..3e66d081aaf8c198e407d86790639305dde0a1d7 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -323,12 +323,14 @@ static void UpdateDummyWindowBoundsWithOffset(WindowRef window,
int target_y = g_current_y_offset + y_offset;
Rect window_bounds;
GetWindowBounds(window, kWindowContentRgn, &window_bounds);
- if ((window_bounds.left != target_x) ||
- (window_bounds.top != target_y)) {
- int height = new_height ? new_height
- : window_bounds.bottom - window_bounds.top;
- int width = new_width ? new_width
- : window_bounds.right - window_bounds.left;
+ int old_width = window_bounds.right - window_bounds.left;
+ int old_height = window_bounds.bottom - window_bounds.top;
+ if (window_bounds.left != target_x ||
+ window_bounds.top != target_y ||
+ (new_width && new_width != old_width) ||
+ (new_height && new_height != old_height)) {
+ int height = new_height ? new_height : old_height;
+ int width = new_width ? new_width : old_width;
window_bounds.left = target_x;
window_bounds.top = target_y;
window_bounds.right = window_bounds.left + width;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698