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

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

Issue 1172123003: Fix the Sky tests (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 | « sky/sdk/lib/framework/app.dart ('k') | sky/sdk/lib/framework/rendering/object.dart » ('j') | 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 'dart:math' as math; 5 import 'dart:math' as math;
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 import 'object.dart'; 8 import 'object.dart';
9 import '../painting/shadows.dart'; 9 import '../painting/shadows.dart';
10 import 'package:vector_math/vector_math.dart'; 10 import 'package:vector_math/vector_math.dart';
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 949
950 ViewConstraints _rootConstraints; 950 ViewConstraints _rootConstraints;
951 ViewConstraints get rootConstraints => _rootConstraints; 951 ViewConstraints get rootConstraints => _rootConstraints;
952 void set rootConstraints(ViewConstraints value) { 952 void set rootConstraints(ViewConstraints value) {
953 if (_rootConstraints == value) 953 if (_rootConstraints == value)
954 return; 954 return;
955 _rootConstraints = value; 955 _rootConstraints = value;
956 markNeedsLayout(); 956 markNeedsLayout();
957 } 957 }
958 958
959 ViewConstraints get constraints => super.constraints as ViewConstraints;
960
961 void performLayout() { 959 void performLayout() {
962 if (_rootConstraints.orientation != _orientation) { 960 if (_rootConstraints.orientation != _orientation) {
963 if (_orientation != null && child != null) 961 if (_orientation != null && child != null)
964 child.rotate(oldAngle: _orientation, newAngle: _rootConstraints.orientat ion, time: timeForRotation); 962 child.rotate(oldAngle: _orientation, newAngle: _rootConstraints.orientat ion, time: timeForRotation);
965 _orientation = _rootConstraints.orientation; 963 _orientation = _rootConstraints.orientation;
966 } 964 }
967 _size = new Size(_rootConstraints.width, _rootConstraints.height); 965 _size = new Size(_rootConstraints.width, _rootConstraints.height);
968 assert(_size.height < double.INFINITY); 966 assert(_size.height < double.INFINITY);
969 assert(_size.width < double.INFINITY); 967 assert(_size.width < double.INFINITY);
970 968
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 1022
1025 void defaultPaint(RenderObjectDisplayList canvas) { 1023 void defaultPaint(RenderObjectDisplayList canvas) {
1026 RenderBox child = firstChild; 1024 RenderBox child = firstChild;
1027 while (child != null) { 1025 while (child != null) {
1028 assert(child.parentData is ParentDataType); 1026 assert(child.parentData is ParentDataType);
1029 canvas.paintChild(child, child.parentData.position); 1027 canvas.paintChild(child, child.parentData.position);
1030 child = child.parentData.nextSibling; 1028 child = child.parentData.nextSibling;
1031 } 1029 }
1032 } 1030 }
1033 } 1031 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/app.dart ('k') | sky/sdk/lib/framework/rendering/object.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698