summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 22:45:40 +0000
committerchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 22:45:40 +0000
commit3edda45e32aa20c160b0f478358ac92cb3c6f7b4 (patch)
treecf4db584e685d0fa7480b49064b894991c825d67 /chrome/browser/gtk
parentdc818ae3e3e573115aff37330ed61169eebee184 (diff)
downloadchromium_src-3edda45e32aa20c160b0f478358ac92cb3c6f7b4.zip
chromium_src-3edda45e32aa20c160b0f478358ac92cb3c6f7b4.tar.gz
chromium_src-3edda45e32aa20c160b0f478358ac92cb3c6f7b4.tar.bz2
Revert 41316 - gtk: Only notify the TabContents that the browser window has moved or resized if the window has actually moved or resized. This fixes a ~20ms startup performance regression.
BUG=37975 TEST=none TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/868002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 46adb2f..2c1bb32 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1210,16 +1210,11 @@ void BrowserWindowGtk::DestroyBrowser() {
void BrowserWindowGtk::OnBoundsChanged(const gfx::Rect& bounds) {
GetLocationBar()->location_entry()->ClosePopup();
- // Only notify the TabContents about the move or resize if we actually have
- // moved or resized. We also don't need to notify for the initial
- // configuration when the browser window is created.
- if (!bounds_.IsEmpty() && !bounds_.Equals(bounds)) {
- // Notify the TabContents that the browser window has been resized or moved.
- // This is used to close AutoFill popups in the renderer.
- TabContents* tab_contents = browser_->GetSelectedTabContents();
- if (tab_contents)
- tab_contents->WindowMoveOrResizeStarted();
- }
+ // Notify the TabContents that the browser window has been resized or moved.
+ // This is used to close AutoFill popups in the renderer.
+ TabContents* tab_contents = browser_->GetSelectedTabContents();
+ if (tab_contents)
+ tab_contents->WindowMoveOrResizeStarted();
if (bounds_.size() != bounds.size())
OnSizeChanged(bounds.width(), bounds.height());