提交 749bd906 编写于 作者: A Adam Barth

Set the default whitespace mode to pre-wrap

This CL makes it easier to insert line breaks into text runs.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1221913003.
上级 d94e1d62
......@@ -1029,7 +1029,7 @@ public:
static EPosition initialPosition() { return StaticPosition; }
static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
static EVisibility initialVisibility() { return VISIBLE; }
static EWhiteSpace initialWhiteSpace() { return NORMAL; }
static EWhiteSpace initialWhiteSpace() { return PRE_WRAP; }
static short initialHorizontalBorderSpacing() { return 0; }
static short initialVerticalBorderSpacing() { return 0; }
static Color initialColor() { return Color::white; }
......
......@@ -13,28 +13,28 @@ PAINT FOR FRAME #2 ----------------------------------------------
2 | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 600.0), Paint(color:Color(0x7f000000)))
2 | | paintChild RenderPositionedBox at Point(0.0, 0.0)
2 | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | paintChild RenderPadding at Point(220.0, 206.0)
2 | | | paintChild RenderPadding at Point(220.0, 194.0)
2 | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | paintChild RenderConstrainedBox at Point(260.0, 230.0)
2 | | | | paintChild RenderConstrainedBox at Point(260.0, 218.0)
2 | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | drawRRect(Instance of 'RRect', Paint(color:Color(0xffffffff), drawLooper:true))
2 | | | | | paintChild RenderPadding at Point(260.0, 230.0)
2 | | | | | paintChild RenderPadding at Point(260.0, 218.0)
2 | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | | paintChild RenderParagraph at Point(284.0, 254.0)
2 | | | | | | paintChild RenderParagraph at Point(284.0, 242.0)
2 | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | | | translate(284.0, 254.0)
2 | | | | | | | translate(-284.0, -254.0)
2 | | | | | paintChild RenderPadding at Point(260.0, 282.0)
2 | | | | | | | translate(284.0, 242.0)
2 | | | | | | | translate(-284.0, -242.0)
2 | | | | | paintChild RenderPadding at Point(260.0, 270.0)
2 | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | | paintChild RenderParagraph at Point(284.0, 302.0)
2 | | | | | | paintChild RenderParagraph at Point(284.0, 290.0)
2 | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | | | translate(284.0, 302.0)
2 | | | | | | | translate(-284.0, -302.0)
2 | | | | | paintChild RenderFlex at Point(260.0, 350.0)
2 | | | | | | | translate(284.0, 290.0)
2 | | | | | | | translate(-284.0, -290.0)
2 | | | | | paintChild RenderFlex at Point(260.0, 362.0)
2 | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | | paintChild RenderParagraph at Point(411.0, 350.0)
2 | | | | | | paintChild RenderParagraph at Point(411.0, 362.0)
2 | | | | | | | TestPaintingCanvas() constructor: 800.0 x 600.0
2 | | | | | | | translate(411.0, 350.0)
2 | | | | | | | translate(-411.0, -350.0)
2 | | | | | | | translate(411.0, 362.0)
2 | | | | | | | translate(-411.0, -362.0)
------------------------------------------------------------------------
PAINTED 2 FRAMES
......@@ -13,7 +13,7 @@ main() async {
await tester.test(() {
return new Dialog(
title: new Text("I am a title"),
content: new Text("I am some content"),
content: new Text("I am some content\nwith a line break"),
actions: [new Text("I am some actions")]
);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册