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

Side by Side Diff: sky/framework/components/fixed_height_scrollable.dart

Issue 1043283003: [Effen] s/Node/UINode/, s/Element/WrapperNode/, s/EventTarget/EventListenerNode/ (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../animation/scroll_behavior.dart'; 5 import '../animation/scroll_behavior.dart';
6 import '../debug/tracing.dart'; 6 import '../debug/tracing.dart';
7 import '../fn.dart'; 7 import '../fn.dart';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 import 'dart:sky' as sky; 9 import 'dart:sky' as sky;
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 assert(scrollRect.height > 0); 45 assert(scrollRect.height > 0);
46 assert(itemRect.height > 0); 46 assert(itemRect.height > 0);
47 47
48 setState(() { 48 setState(() {
49 _height = scrollRect.height; 49 _height = scrollRect.height;
50 _itemHeight = itemRect.height; 50 _itemHeight = itemRect.height;
51 }); 51 });
52 }); 52 });
53 } 53 }
54 54
55 Node buildContent() { 55 UINode buildContent() {
56 var itemNumber = 0; 56 var itemNumber = 0;
57 var drawCount = 1; 57 var drawCount = 1;
58 var transformStyle = ''; 58 var transformStyle = '';
59 59
60 if (_itemHeight == null) 60 if (_itemHeight == null)
61 new Future.microtask(_measureHeights); 61 new Future.microtask(_measureHeights);
62 62
63 if (_height > 0.0 && _itemHeight != null) { 63 if (_height > 0.0 && _itemHeight != null) {
64 if (scrollOffset < 0.0) { 64 if (scrollOffset < 0.0) {
65 double visibleHeight = _height + scrollOffset; 65 double visibleHeight = _height + scrollOffset;
(...skipping 20 matching lines...) Expand all
86 children: [ 86 children: [
87 new Container( 87 new Container(
88 style: _scrollAreaStyle, 88 style: _scrollAreaStyle,
89 inlineStyle: transformStyle, 89 inlineStyle: transformStyle,
90 children: buildItems(itemNumber, drawCount) 90 children: buildItems(itemNumber, drawCount)
91 ) 91 )
92 ] 92 ]
93 ); 93 );
94 } 94 }
95 } 95 }
OLDNEW
« no previous file with comments | « sky/framework/components/drawer_header.dart ('k') | sky/framework/components/floating_action_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698