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

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

Issue 1027653002: [Effen] add StyleNode (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: moar Created 5 years, 9 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
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_app.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../fn.dart'; 6 import '../fn.dart';
7 import 'dart:math' as math; 7 import 'dart:math' as math;
8 import 'dart:sky' as sky; 8 import 'dart:sky' as sky;
9 import 'scrollable.dart'; 9 import 'scrollable.dart';
10 10
11 abstract class FixedHeightScrollable extends Scrollable { 11 abstract class FixedHeightScrollable extends Scrollable {
12 // TODO(rafaelw): This component really shouldn't have an opinion
13 // about how it is sized. The owning component should decide whether
14 // it's explicitly sized or flexible or whatever...
15 static final Style _style = new Style(''' 12 static final Style _style = new Style('''
16 overflow: hidden; 13 overflow: hidden;
17 position: relative; 14 position: relative;
18 flex: 1;
19 will-change: transform;''' 15 will-change: transform;'''
20 ); 16 );
21 17
22 static final Style _scrollAreaStyle = new Style(''' 18 static final Style _scrollAreaStyle = new Style('''
23 position:relative; 19 position:relative;
24 will-change: transform;''' 20 will-change: transform;'''
25 ); 21 );
26 22
27 double _height = 0.0; 23 double _height = 0.0;
28 double _itemHeight; 24 double _itemHeight;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 children: [ 75 children: [
80 new Container( 76 new Container(
81 style: _scrollAreaStyle, 77 style: _scrollAreaStyle,
82 inlineStyle: transformStyle, 78 inlineStyle: transformStyle,
83 children: buildItems(itemNumber, drawCount) 79 children: buildItems(itemNumber, drawCount)
84 ) 80 )
85 ] 81 ]
86 ); 82 );
87 } 83 }
88 } 84 }
OLDNEW
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_app.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698