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

Unified Diff: chrome/browser/ui/panels/panel_gtk.cc

Issue 10836324: Panels test cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback change to remove redundant if-check Created 8 years, 4 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/ui/panels/panel_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_gtk.cc b/chrome/browser/ui/panels/panel_gtk.cc
index 869b88fbb8c752d45b2d432197749fbcaf4b7211..001549c1516a642c6246ab39699e7e3deebf5d56 100644
--- a/chrome/browser/ui/panels/panel_gtk.cc
+++ b/chrome/browser/ui/panels/panel_gtk.cc
@@ -344,7 +344,7 @@ gboolean PanelGtk::OnConfigure(GtkWidget* widget,
if (!GetFrameSize().IsEmpty())
return FALSE;
- // Save the frame size allocated by the system after as the
+ // Save the frame size allocated by the system as the
// frame size will be affected when we shrink the panel smaller
// than the frame (e.g. when the panel is minimized).
SetFrameSize(GetNonClientFrameSize());
@@ -764,15 +764,17 @@ void PanelGtk::SetBoundsInternal(const gfx::Rect& bounds, bool animate) {
if (bounds == bounds_)
return;
- if (!animate) {
- // If no animation is in progress, apply bounds change instantly. Otherwise,
- // continue the animation with new target bounds.
- if (!IsAnimatingBounds())
- gdk_window_move_resize(gtk_widget_get_window(GTK_WIDGET(window_)),
- bounds.x(), bounds.y(),
- bounds.width(), bounds.height());
- } else if (is_shown_) {
- StartBoundsAnimation(bounds_, bounds);
+ if (is_shown_) {
+ if (!animate) {
+ // If no animation is in progress, apply bounds change instantly.
+ // Otherwise, continue the animation with new target bounds.
+ if (!IsAnimatingBounds())
+ gdk_window_move_resize(gtk_widget_get_window(GTK_WIDGET(window_)),
+ bounds.x(), bounds.y(),
+ bounds.width(), bounds.height());
+ } else {
+ StartBoundsAnimation(bounds_, bounds);
+ }
}
bounds_ = bounds;
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698