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

Issue 1234863004: Remove redundant setState() calls around scroll behaviour updates. (Closed)

Created:
5 years, 5 months ago by Hixie
Modified:
5 years, 5 months ago
Reviewers:
hansmuller, jackson
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, gregsimon, jackson_old, abarth-chromium
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Remove redundant setState() calls around scroll behaviour updates. We don't need to rebuild when those change; we only got the change because we rebuilt in the first place. R=jackson@google.com Committed: https://chromium.googlesource.com/external/mojo/+/c26915502dd50336603c00da37a38e6778db3079

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -15 lines) Patch
M sky/sdk/lib/widgets/fixed_height_scrollable.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sky/sdk/lib/widgets/scrollable_viewport.dart View 1 chunk +4 lines, -8 lines 0 comments Download
M sky/sdk/lib/widgets/variable_height_scrollable.dart View 1 chunk +6 lines, -7 lines 1 comment Download

Messages

Total messages: 7 (2 generated)
jackson
lgtm
5 years, 5 months ago (2015-07-13 19:00:34 UTC) #2
hansmuller
https://codereview.chromium.org/1234863004/diff/1/sky/sdk/lib/widgets/variable_height_scrollable.dart File sky/sdk/lib/widgets/variable_height_scrollable.dart (right): https://codereview.chromium.org/1234863004/diff/1/sky/sdk/lib/widgets/variable_height_scrollable.dart#newcode33 sky/sdk/lib/widgets/variable_height_scrollable.dart:33: scrollBehavior.containerSize = newSize.height; If the viewport's size changes, don't ...
5 years, 5 months ago (2015-07-13 19:03:53 UTC) #4
Hixie
On 2015/07/13 at 19:03:53, hansmuller wrote: > https://codereview.chromium.org/1234863004/diff/1/sky/sdk/lib/widgets/variable_height_scrollable.dart > File sky/sdk/lib/widgets/variable_height_scrollable.dart (right): > > https://codereview.chromium.org/1234863004/diff/1/sky/sdk/lib/widgets/variable_height_scrollable.dart#newcode33 ...
5 years, 5 months ago (2015-07-13 19:05:42 UTC) #5
Hixie
Committed patchset #1 (id:1) manually as c26915502dd50336603c00da37a38e6778db3079 (presubmit successful).
5 years, 5 months ago (2015-07-13 19:05:59 UTC) #6
hansmuller
5 years, 5 months ago (2015-07-13 19:07:47 UTC) #7
Message was sent while issue was closed.
On 2015/07/13 19:05:42, Hixie wrote:
> On 2015/07/13 at 19:03:53, hansmuller wrote:
> >
>
https://codereview.chromium.org/1234863004/diff/1/sky/sdk/lib/widgets/variabl...
> > File sky/sdk/lib/widgets/variable_height_scrollable.dart (right):
> > 
> >
>
https://codereview.chromium.org/1234863004/diff/1/sky/sdk/lib/widgets/variabl...
> > sky/sdk/lib/widgets/variable_height_scrollable.dart:33:
> scrollBehavior.containerSize = newSize.height;
> > If the viewport's size changes, don't you want to layout/paint?
> 
> If the viewport's size changes, you've already laid out / painted. Otherwise
you
> wouldn't know it had changed.

So when the phone shifts from portrait to landscape mode, we relayout, paint,
and then notify size observers?

Powered by Google App Engine
This is Rietveld 408576698