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

Issue 2445633003: Experimental alignment layout manager using state retained in the layout manager

Created:
4 years, 1 month ago by kylix_rd
Modified:
4 years, 1 month ago
Reviewers:
robliao, sky
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+619 lines, -190 lines) Patch
M ui/views/BUILD.gn View 2 chunks +4 lines, -0 lines 0 comments Download
A ui/views/layout/align_layout_state.h View 1 chunk +84 lines, -0 lines 0 comments Download
A ui/views/layout/align_layout_state.cc View 1 chunk +347 lines, -0 lines 0 comments Download
A + ui/views/layout/align_layout_state_unittest.cc View 1 21 chunks +99 lines, -97 lines 0 comments Download
A + ui/views/layout/anchor_layout_state_unittest.cc View 20 chunks +85 lines, -93 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 5 (2 generated)
kylix_rd
This CL and patch(es) are based on https://codereview.chromium.org/2230913003/ which pushes the state management from the ...
4 years, 1 month ago (2016-10-24 22:11:42 UTC) #3
sky
I can't quite tell if this is ready for review. It depends upon another patch, ...
4 years, 1 month ago (2016-10-25 02:55:03 UTC) #4
kylix_rd
4 years, 1 month ago (2016-10-25 17:01:58 UTC) #5
On 2016/10/25 02:55:03, sky wrote:
> I can't quite tell if this is ready for review. It depends upon another patch,
> but that hasn't landed.
> 
> In order to review this patch there needs to be a good description of what it
> does. The docs that are there now aren't clear and would require me to dig
> through the code to understand how it works. Consumers of this layout manager
> shouldn't need to do that. Additionally any new layer manager increases the
> complexity with views, so I would like to understand what it is about this
> layout manager that makes it better than existing ones. Good documentation
would
> help illustrate this as well as showing how existing code converted to this
> layout manager is easier and more succinct.

The purpose here was to, hopefully, show that moving all the state information
into the layout manager made the code a little more complicated than keeping the
view-specific state attached to the views via the attributes. The housekeeping
for the state information is less "automatic".

Clearly, the code review tool isn't very good at showing deltas between CLs.

Some key points:

 o Core algorithms remain unchanged.
 o All child view bounds changes must be done via the layout.
   o Call SetBounds directly on the child view can cause undesirable behavior.
 o Layout API is a little more complicated.
 o Moving state into the layout does follow semantics of existing layouts.

I'd like to investigate reworking the existing layout managers to use attributes
where appropriate.

Powered by Google App Engine
This is Rietveld 408576698