| Index: sky/sdk/lib/rendering/object.dart
|
| diff --git a/sky/sdk/lib/rendering/object.dart b/sky/sdk/lib/rendering/object.dart
|
| index 0a56f1e974d2cb111e8f0dda85c89221e91bdd1e..2e5080eb0204f97f739536fb8716a6cc0c3066c7 100644
|
| --- a/sky/sdk/lib/rendering/object.dart
|
| +++ b/sky/sdk/lib/rendering/object.dart
|
| @@ -65,10 +65,7 @@ abstract class RenderObject extends AbstractNode {
|
| assert(child != null);
|
| assert(child.parentData != null);
|
| child.parentData.detach();
|
| - if (child._relayoutSubtreeRoot != child) {
|
| - child._relayoutSubtreeRoot = null;
|
| - child._needsLayout = true;
|
| - }
|
| + child._cleanRelayoutSubtreeRoot();
|
| super.dropChild(child);
|
| markNeedsLayout();
|
| }
|
| @@ -114,6 +111,14 @@ abstract class RenderObject extends AbstractNode {
|
| scheduler.ensureVisualUpdate();
|
| }
|
| }
|
| + void _cleanRelayoutSubtreeRoot() {
|
| + if (_relayoutSubtreeRoot != this) {
|
| + _relayoutSubtreeRoot = null;
|
| + _needsLayout = true;
|
| + _cleanRelayoutSubtreeRootChildren();
|
| + }
|
| + }
|
| + void _cleanRelayoutSubtreeRootChildren() { } // workaround for lack of inter-class mixins in Dart
|
| void scheduleInitialLayout() {
|
| assert(attached);
|
| assert(parent == null);
|
| @@ -297,6 +302,10 @@ abstract class RenderObjectWithChildMixin<ChildType extends RenderObject> implem
|
| if (_child != null)
|
| _child.detach();
|
| }
|
| + void _cleanRelayoutSubtreeRootChildren() {
|
| + if (_child != null)
|
| + _child._cleanRelayoutSubtreeRoot();
|
| + }
|
| String debugDescribeChildren(String prefix) {
|
| if (child != null)
|
| return '${prefix}child: ${child.toString(prefix)}';
|
| @@ -444,6 +453,14 @@ abstract class ContainerRenderObjectMixin<ChildType extends RenderObject, Parent
|
| child = child.parentData.nextSibling;
|
| }
|
| }
|
| + void _cleanRelayoutSubtreeRootChildren() {
|
| + ChildType child = _firstChild;
|
| + while (child != null) {
|
| + child._cleanRelayoutSubtreeRoot();
|
| + assert(child.parentData is ParentDataType);
|
| + child = child.parentData.nextSibling;
|
| + }
|
| + }
|
|
|
| ChildType get firstChild => _firstChild;
|
| ChildType get lastChild => _lastChild;
|
|
|