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

Unified Diff: sky/framework/editing/editable_text.dart

Issue 1139123007: [Effen] remove the last traces of the 'display' property from the effen component library. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update test Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/framework/components/input.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/editing/editable_text.dart
diff --git a/sky/framework/editing/editable_text.dart b/sky/framework/editing/editable_text.dart
index 8acff25b04409d1d3ee8379776df9f8452bb0aa7..c8a7bf7ed91577f701c82871e3043cd5c52e7570 100644
--- a/sky/framework/editing/editable_text.dart
+++ b/sky/framework/editing/editable_text.dart
@@ -8,12 +8,8 @@ import 'dart:async';
import 'editable_string.dart';
class EditableText extends Component {
- static final Style _style = new Style('''
- display: inline;'''
- );
static final Style _cursorStyle = new Style('''
- display: inline-flex;
width: 2px;
height: 1.2em;
vertical-align: top;
@@ -21,7 +17,6 @@ class EditableText extends Component {
);
static final Style _composingStyle = new Style('''
- display: inline;
text-decoration: underline;'''
);
@@ -65,31 +60,30 @@ class EditableText extends Component {
List<UINode> children = new List<UINode>();
if (!value.composing.isValid) {
- children.add(new Text(value.text));
+ children.add(new TextFragment(value.text));
} else {
String beforeComposing = value.textBefore(value.composing);
if (!beforeComposing.isEmpty)
- children.add(new Text(beforeComposing));
+ children.add(new TextFragment(beforeComposing));
String composing = value.textInside(value.composing);
if (!composing.isEmpty) {
- children.add(new Container(
+ children.add(new TextFragment(
+ composing,
key: 'composing',
- style: _composingStyle,
- children: [new Text(composing)]
+ style: _composingStyle
));
}
String afterComposing = value.textAfter(value.composing);
if (!afterComposing.isEmpty)
- children.add(new Text(afterComposing));
+ children.add(new TextFragment(afterComposing));
}
if (_showCursor)
children.add(new Container(key: 'cursor', style: _cursorStyle));
- return new Container(
- style: _style,
+ return new Paragraph(
children: children
);
}
« no previous file with comments | « sky/framework/components/input.dart ('k') | sky/framework/fn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698