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

Side by Side Diff: sky/sdk/lib/rendering/box.dart

Issue 1222913013: Introduce BlockViewport. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
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 'dart:math' as math; 5 import 'dart:math' as math;
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 7
8 import 'package:vector_math/vector_math.dart'; 8 import 'package:vector_math/vector_math.dart';
9 9
10 import '../base/debug.dart'; 10 import '../base/debug.dart';
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // other than us, the only object that's allowed to read our size is our parent, if they're said they will 413 // other than us, the only object that's allowed to read our size is our parent, if they're said they will
414 // if you hit this assert trying to access a child's size, pass parentUs esSize: true in layout() 414 // if you hit this assert trying to access a child's size, pass parentUs esSize: true in layout()
415 assert(debugDoingThisResize || debugDoingThisLayout || 415 assert(debugDoingThisResize || debugDoingThisLayout ||
416 (RenderObject.debugActiveLayout == parent && _size._canBeUsedByPa rent)); 416 (RenderObject.debugActiveLayout == parent && _size._canBeUsedByPa rent));
417 } 417 }
418 assert(_size == this._size); // TODO(ianh): Remove this once the analyzer is cleverer 418 assert(_size == this._size); // TODO(ianh): Remove this once the analyzer is cleverer
419 } 419 }
420 return _size; 420 return _size;
421 } 421 }
422 void set size(Size value) { 422 void set size(Size value) {
423 assert(RenderObject.debugDoingLayout);
424 assert((sizedByParent && debugDoingThisResize) || 423 assert((sizedByParent && debugDoingThisResize) ||
425 (!sizedByParent && debugDoingThisLayout)); 424 (!sizedByParent && debugDoingThisLayout));
426 if (value is _DebugSize) { 425 if (value is _DebugSize) {
427 assert(value._canBeUsedByParent); 426 assert(value._canBeUsedByParent);
428 assert(value._owner.parent == this); 427 assert(value._owner.parent == this);
429 } 428 }
430 _size = inDebugBuild ? new _DebugSize(value, this, debugCanParentUseSize) : value; 429 _size = inDebugBuild ? new _DebugSize(value, this, debugCanParentUseSize) : value;
431 } 430 }
432 431
433 String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings( prefix)}${prefix}size: ${size}\n'; 432 String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings( prefix)}${prefix}size: ${size}\n';
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 1434
1436 void defaultPaint(PaintingCanvas canvas, Offset offset) { 1435 void defaultPaint(PaintingCanvas canvas, Offset offset) {
1437 RenderBox child = firstChild; 1436 RenderBox child = firstChild;
1438 while (child != null) { 1437 while (child != null) {
1439 assert(child.parentData is ParentDataType); 1438 assert(child.parentData is ParentDataType);
1440 canvas.paintChild(child, child.parentData.position + offset); 1439 canvas.paintChild(child, child.parentData.position + offset);
1441 child = child.parentData.nextSibling; 1440 child = child.parentData.nextSibling;
1442 } 1441 }
1443 } 1442 }
1444 } 1443 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698