Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: sky/sdk/lib/framework/layout2.dart

Issue 1157433006: Remove bogus assert in layout() (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'node.dart'; 5 import 'node.dart';
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 7
8 // ABSTRACT LAYOUT 8 // ABSTRACT LAYOUT
9 9
10 class ParentData { 10 class ParentData {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 void _doLayout() { 119 void _doLayout() {
120 try { 120 try {
121 assert(_relayoutSubtreeRoot == this); 121 assert(_relayoutSubtreeRoot == this);
122 performLayout(); 122 performLayout();
123 } catch (e, stack) { 123 } catch (e, stack) {
124 print('Exception raised during layout of ${this}: ${e}'); 124 print('Exception raised during layout of ${this}: ${e}');
125 print(stack); 125 print(stack);
126 return; 126 return;
127 } 127 }
128 assert(!_needsLayout); // check that the relayout() method marked us "not di rty" 128 _needsLayout = false;
129 } 129 }
130 void layout(dynamic constraints, { bool parentUsesSize: false }) { 130 void layout(dynamic constraints, { bool parentUsesSize: false }) {
131 RenderNode relayoutSubtreeRoot; 131 RenderNode relayoutSubtreeRoot;
132 if (!parentUsesSize || sizedByParent || parent is! RenderNode) 132 if (!parentUsesSize || sizedByParent || parent is! RenderNode)
133 relayoutSubtreeRoot = this; 133 relayoutSubtreeRoot = this;
134 else 134 else
135 relayoutSubtreeRoot = parent._relayoutSubtreeRoot; 135 relayoutSubtreeRoot = parent._relayoutSubtreeRoot;
136 if (!needsLayout && constraints == _constraints && relayoutSubtreeRoot == _r elayoutSubtreeRoot) 136 if (!needsLayout && constraints == _constraints && relayoutSubtreeRoot == _r elayoutSubtreeRoot)
137 return; 137 return;
138 _constraints = constraints; 138 _constraints = constraints;
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 945
946 void hitTestChildren(HitTestResult result, { double x, double y }) { 946 void hitTestChildren(HitTestResult result, { double x, double y }) {
947 // defaultHitTestChildren(result, x: x, y: y); 947 // defaultHitTestChildren(result, x: x, y: y);
948 } 948 }
949 949
950 void paint(RenderNodeDisplayList canvas) { 950 void paint(RenderNodeDisplayList canvas) {
951 super.paint(canvas); 951 super.paint(canvas);
952 _layoutRoot.paint(canvas); 952 _layoutRoot.paint(canvas);
953 } 953 }
954 } 954 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698