New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627663 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Introduce View::ScheduleLayout

Project Member Reported by sadrul@chromium.org, Jul 13 2016

Issue description

We have code in views that need to explicitly call Layout() in various places, e.g. when bounds or some other state changes. It may be interesting to introduce View::ScheduleLayout(), somewhat like a SchedulePaint(). Alternatively, the code that does an explicit Layout() could instead simply do a SchedulePaint(), and before calling GetRootView()->Paint() in Widget::OnNativeWidgetPaint(), we do a Layout() on the root-view if the layout has been invalidated.

Some context: https://codereview.chromium.org/2143473002/
 

Comment 1 by sky@chromium.org, Jul 18 2016

Cc: est...@chromium.org
I think a ScheduleLayout by itself isn't enough. If we do this we should also tie in what ancestors layout should occur from. For example, if a button needs to be relayed out chances are it's preferred size changed in which case the parent (or some ancestor) needs to trigger a layout.

Other toolkits I'm familiar with have the notion of a validation root: the view from which layout happens when a descendant calls the equivalent of ScheduleLayout. It is not always straightforward as to which views should be the validation root and can be just as error prone as what we have now.

I've talked with Ben in the past about doing a ScheduleLayout as has estade@. Ben has not been enthusiastic, and in fact wants to remove some of the layout invalidation code we have now (see TODO in View::InvalidateLayout()).

Comment 2 by sky@chromium.org, Jul 18 2016

Cc: ben@chromium.org
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 19 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Archived (was: Untriaged)
Archiving old bugs that have Hotlist-Recharge-Cold and haven't been modified in over a year. 

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue

Sign in to add a comment