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

Issue 131026: A long standing bug in views!... (Closed)

Created:
11 years, 6 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

A long standing bug in views! Every time a widget is resized, we call Layout on its view hierarchy TWICE! A while ago, I added code to views::View's default implementation of DidChangeBounds to automatically call Layout. So, after calling SetBounds on a widget, it is not necessary to call Layout. However this is exactly what WidgetWin/WidgetGtk do o_O. It turns out this doesn't matter on windows because size changes in child widgets never affect the sizes of their parents - they're just clipped to their parent's bounds. However, on Gtk it seems like sizing a child causes a size-allocate signal to be sent to the parent widget, which means we end up in infinite resize loops. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=18714

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -2 lines) Patch
M views/widget/widget_gtk.cc View 1 chunk +0 lines, -1 line 0 comments Download
M views/widget/widget_win.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Ben Goodger (Google)
11 years, 6 months ago (2009-06-18 06:57:41 UTC) #1
sky
11 years, 6 months ago (2009-06-18 15:19:06 UTC) #2
Nice. LGTM

Powered by Google App Engine
This is Rietveld 408576698