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

Side by Side Diff: sky/framework/components/input.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
« no previous file with comments | « sky/framework/components/ink_well.dart ('k') | sky/framework/components/material.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 '../editing/editable_string.dart'; 5 import '../editing/editable_string.dart';
6 import '../editing/editable_text.dart'; 6 import '../editing/editable_text.dart';
7 import '../editing/keyboard.dart'; 7 import '../editing/keyboard.dart';
8 import '../fn.dart'; 8 import '../fn.dart';
9 import '../theme/colors.dart'; 9 import '../theme/colors.dart';
10 import '../theme/typography.dart' as typography; 10 import '../theme/typography.dart' as typography;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 void _handleTextUpdated() { 59 void _handleTextUpdated() {
60 scheduleBuild(); 60 scheduleBuild();
61 if (_value != _editableValue.text) { 61 if (_value != _editableValue.text) {
62 _value = _editableValue.text; 62 _value = _editableValue.text;
63 if (onChanged != null) 63 if (onChanged != null)
64 onChanged(_value); 64 onChanged(_value);
65 } 65 }
66 } 66 }
67 67
68 Node build() { 68 UINode build() {
69 if (focused && !_isAttachedToKeyboard) { 69 if (focused && !_isAttachedToKeyboard) {
70 keyboard.show(_editableValue.stub); 70 keyboard.show(_editableValue.stub);
71 _isAttachedToKeyboard = true; 71 _isAttachedToKeyboard = true;
72 } 72 }
73 73
74 List<Node> children = []; 74 List<UINode> children = [];
75 75
76 if (placeholder != null && _value.isEmpty) { 76 if (placeholder != null && _value.isEmpty) {
77 children.add(new Container( 77 children.add(new Container(
78 style: _placeholderStyle, 78 style: _placeholderStyle,
79 children: [new Text(placeholder)] 79 children: [new Text(placeholder)]
80 )); 80 ));
81 } 81 }
82 82
83 children.add(new EditableText(value: _editableValue, focused: focused)); 83 children.add(new EditableText(value: _editableValue, focused: focused));
84 84
85 return new Container( 85 return new Container(
86 style: _style, 86 style: _style,
87 inlineStyle: focused ? _focusedInlineStyle : null, 87 inlineStyle: focused ? _focusedInlineStyle : null,
88 children: children 88 children: children
89 ); 89 );
90 } 90 }
91 } 91 }
OLDNEW
« no previous file with comments | « sky/framework/components/ink_well.dart ('k') | sky/framework/components/material.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698