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

Unified Diff: chrome/renderer/render_widget.cc

Issue 3547008: Handle resize corner layout entirely in the platform BrowserWindow*/BrowserView* code... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « chrome/common/render_messages_params.cc ('k') | chrome/test/test_browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_widget.cc
===================================================================
--- chrome/renderer/render_widget.cc (revision 66034)
+++ chrome/renderer/render_widget.cc (working copy)
@@ -103,7 +103,7 @@
// static
WebWidget* RenderWidget::CreateWebWidget(RenderWidget* render_widget) {
switch (render_widget->popup_type_) {
- case WebKit::WebPopupTypeNone: // Nothing to create.
+ case WebKit::WebPopupTypeNone: // Nothing to create.
break;
case WebKit::WebPopupTypeSelect:
case WebKit::WebPopupTypeSuggestion:
@@ -232,15 +232,19 @@
if (!webwidget_)
return;
+ // We shouldn't be asked to resize to our current size.
+ DCHECK(size_ != new_size || resizer_rect_ != resizer_rect);
+
// Remember the rect where the resize corner will be drawn.
resizer_rect_ = resizer_rect;
+ if (size_ == new_size)
+ return;
+
// TODO(darin): We should not need to reset this here.
SetHidden(false);
needs_repainting_on_restore_ = false;
- // We shouldn't be asked to resize to our current size.
- DCHECK(size_ != new_size);
size_ = new_size;
// We should not be sent a Resize message if we have not ACK'd the previous
@@ -565,6 +569,7 @@
params.copy_rects.swap(copy_rects); // TODO(darin): clip to bounds?
}
params.view_size = size_;
+ params.resizer_rect = resizer_rect_;
params.plugin_window_moves.swap(plugin_window_moves_);
params.flags = next_paint_flags_;
@@ -661,7 +666,7 @@
// important for the accelerated compositing case. The option of simply
// duplicating all that code is less desirable than "faking out" the
// invalidation path using a magical damage rect.
- didInvalidateRect(WebRect(0,0,1,1));
+ didInvalidateRect(WebRect(0, 0, 1, 1));
}
void RenderWidget::didChangeCursor(const WebCursorInfo& cursor_info) {
« no previous file with comments | « chrome/common/render_messages_params.cc ('k') | chrome/test/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698