Chromium Code Reviews| Index: sky/sdk/lib/rendering/paragraph.dart |
| diff --git a/sky/sdk/lib/rendering/paragraph.dart b/sky/sdk/lib/rendering/paragraph.dart |
| index b3afa86be6570e8d772b6afa0306aa93a36ba850..ce0502f2213a50e6d9e8a73024734b299e8676d3 100644 |
| --- a/sky/sdk/lib/rendering/paragraph.dart |
| +++ b/sky/sdk/lib/rendering/paragraph.dart |
| @@ -172,7 +172,7 @@ class RenderParagraph extends RenderBox { |
| _applyFloatingPointHack(root.height))); |
| } |
| - void paint(RenderCanvas canvas) { |
| + void paint(RenderCanvas canvas, Offset offset) { |
| // Ideally we could compute the min/max intrinsic width/height with a |
| // non-destructive operation. However, currently, computing these values |
| // will destroy state inside the layout root. If that happens, we need to |
| @@ -181,7 +181,9 @@ class RenderParagraph extends RenderBox { |
| // TODO(abarth): Make computing the min/max intrinsic width/height a |
| // non-destructive operation. |
| _layout(constraints); |
| + canvas.translate(offset.dx, offset.dy); |
| _layoutRoot.paint(canvas); |
| + canvas.translate(-offset.dx, -offset.dy); |
|
abarth-chromium
2015/06/27 00:39:37
Ouch. Can you add a TODO about teaching layoutRoo
|
| } |
| // we should probably expose a way to do precise (inter-glpyh) hit testing |