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

Unified Diff: sky/framework/fn.dart

Issue 1078973002: [Effen] make fn wrap text in display:paragraph nodes (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/fn.dart
diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart
index 6f9543114bba9c2f5314a827d57d43a72194e5ee..a63e521701cc6e059602f3ab5f81108423d17c2e 100644
--- a/sky/framework/fn.dart
+++ b/sky/framework/fn.dart
@@ -352,14 +352,16 @@ class Text extends SkyNodeWrapper {
SkyNodeWrapper get _emptyNode => _emptyText;
sky.Node _createNode() {
- return new sky.Text(data);
+ return sky.document.createElement('div')
+ ..setChild(new sky.Text(this.data))
+ ..setAttribute('style', 'display:paragraph');
abarth-chromium 2015/04/09 22:48:45 We should do this with a class rather than inline
}
void _syncNode(SkyNodeWrapper old) {
if (old == _emptyText)
return; // we set inside _createNode();
- (_root as sky.Text).data = data;
+ (_root.firstChild as sky.Text).data = data;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698