mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Effen] Use a Style element instead of inline style for the Text fn node's sky
element with display:paragraph, so that the C++ side shares RenderStyles. (based on review comments on https://codereview.chromium.org/1078973002 ) R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1070243003
This commit is contained in:
parent
3067bb641a
commit
868b53259e
@ -351,10 +351,12 @@ class Text extends SkyNodeWrapper {
|
||||
|
||||
SkyNodeWrapper get _emptyNode => _emptyText;
|
||||
|
||||
static final Style _displayParagraph = new Style('display:paragraph');
|
||||
|
||||
sky.Node _createNode() {
|
||||
return sky.document.createElement('div')
|
||||
..setChild(new sky.Text(this.data))
|
||||
..setAttribute('style', 'display:paragraph');
|
||||
..setAttribute('class', _displayParagraph._className);
|
||||
}
|
||||
|
||||
void _syncNode(SkyNodeWrapper old) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user