| Index: sky/sdk/lib/rendering/block.dart
|
| diff --git a/sky/sdk/lib/rendering/block.dart b/sky/sdk/lib/rendering/block.dart
|
| index 1573f3833744d54751c342fbe888ad69caf986a1..bc2b82e2042d8899f5985baab5ab9a2bf525880b 100644
|
| --- a/sky/sdk/lib/rendering/block.dart
|
| +++ b/sky/sdk/lib/rendering/block.dart
|
| @@ -26,6 +26,50 @@ abstract class RenderBlockBase extends RenderBox with ContainerRenderObjectMixin
|
| child.parentData = new BlockParentData();
|
| }
|
|
|
| + double computeDistanceToActualBaseline(TextBaseline baseline) {
|
| + return defaultComputeDistanceToFirstActualBaseline(baseline);
|
| + }
|
| +
|
| + double _childrenHeight;
|
| + double get childrenHeight => _childrenHeight;
|
| +
|
| + void markNeedsLayout() {
|
| + _childrenHeight = null;
|
| + super.markNeedsLayout();
|
| + }
|
| +
|
| + void performLayout() {
|
| + assert(constraints is BoxConstraints);
|
| + double width = constraints.constrainWidth(constraints.maxWidth);
|
| + BoxConstraints innerConstraints = _getInnerConstraintsForWidth(width);
|
| + double y = 0.0;
|
| + RenderBox child = firstChild;
|
| + while (child != null) {
|
| + child.layout(innerConstraints, parentUsesSize: true);
|
| + assert(child.parentData is BlockParentData);
|
| + child.parentData.position = new Point(0.0, y);
|
| + y += child.size.height;
|
| + child = child.parentData.nextSibling;
|
| + }
|
| + _childrenHeight = y;
|
| + }
|
| +
|
| + void hitTestChildren(HitTestResult result, { Point position }) {
|
| + defaultHitTestChildren(result, position: position);
|
| + }
|
| +
|
| + void paint(PaintingCanvas canvas, Offset offset) {
|
| + defaultPaint(canvas, offset);
|
| + }
|
| +
|
| +}
|
| +
|
| +class RenderBlock extends RenderBlockBase {
|
| +
|
| + // sizes itself to the height of its child stack
|
| +
|
| + RenderBlock({ List<RenderBox> children }) : super(children: children);
|
| +
|
| double getMinIntrinsicWidth(BoxConstraints constraints) {
|
| double width = 0.0;
|
| BoxConstraints innerConstraints = constraints.widthConstraints();
|
| @@ -77,50 +121,6 @@ abstract class RenderBlockBase extends RenderBox with ContainerRenderObjectMixin
|
| return _getIntrinsicHeight(constraints);
|
| }
|
|
|
| - double computeDistanceToActualBaseline(TextBaseline baseline) {
|
| - return defaultComputeDistanceToFirstActualBaseline(baseline);
|
| - }
|
| -
|
| - double _childrenHeight;
|
| - double get childrenHeight => _childrenHeight;
|
| -
|
| - void markNeedsLayout() {
|
| - _childrenHeight = null;
|
| - super.markNeedsLayout();
|
| - }
|
| -
|
| - void performLayout() {
|
| - assert(constraints is BoxConstraints);
|
| - double width = constraints.constrainWidth(constraints.maxWidth);
|
| - BoxConstraints innerConstraints = _getInnerConstraintsForWidth(width);
|
| - double y = 0.0;
|
| - RenderBox child = firstChild;
|
| - while (child != null) {
|
| - child.layout(innerConstraints, parentUsesSize: true);
|
| - assert(child.parentData is BlockParentData);
|
| - child.parentData.position = new Point(0.0, y);
|
| - y += child.size.height;
|
| - child = child.parentData.nextSibling;
|
| - }
|
| - _childrenHeight = y;
|
| - }
|
| -
|
| - void hitTestChildren(HitTestResult result, { Point position }) {
|
| - defaultHitTestChildren(result, position: position);
|
| - }
|
| -
|
| - void paint(PaintingCanvas canvas, Offset offset) {
|
| - defaultPaint(canvas, offset);
|
| - }
|
| -
|
| -}
|
| -
|
| -class RenderBlock extends RenderBlockBase {
|
| -
|
| - // sizes itself to the height of its child stack
|
| -
|
| - RenderBlock({ List<RenderBox> children }) : super(children: children);
|
| -
|
| bool _hasVisualOverflow = false;
|
|
|
| void performLayout() {
|
| @@ -182,6 +182,22 @@ class RenderBlockViewport extends RenderBlockBase {
|
| markNeedsLayout();
|
| }
|
|
|
| + double getMinIntrinsicWidth(BoxConstraints constraints) {
|
| + return constraints.constrainWidth();
|
| + }
|
| +
|
| + double getMaxIntrinsicWidth(BoxConstraints constraints) {
|
| + return constraints.constrainWidth();
|
| + }
|
| +
|
| + double getMinIntrinsicHeight(BoxConstraints constraints) {
|
| + return constraints.constrainHeight();
|
| + }
|
| +
|
| + double getMaxIntrinsicHeight(BoxConstraints constraints) {
|
| + return constraints.constrainHeight();
|
| + }
|
| +
|
| bool get sizedByParent => true;
|
|
|
| void performResize() {
|
|
|