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

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

Issue 1200233002: Use the baseline information exposed by C++ to pipe baseline data through RenderBox. (Closed) Base URL: https://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/rendering/paragraph.dart ('k') | 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 'dart:math' as math; 5 import 'dart:math' as math;
6 6
7 import 'box.dart'; 7 import 'box.dart';
8 import 'object.dart'; 8 import 'object.dart';
9 9
10 class StackParentData extends BoxParentData with ContainerParentDataMixin<Render Box> { 10 class StackParentData extends BoxParentData with ContainerParentDataMixin<Render Box> {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 height = math.max(height, child.getMaxIntrinsicHeight(constraints)); 100 height = math.max(height, child.getMaxIntrinsicHeight(constraints));
101 } 101 }
102 child = child.parentData.nextSibling; 102 child = child.parentData.nextSibling;
103 } 103 }
104 if (!hasNonPositionedChildren) 104 if (!hasNonPositionedChildren)
105 return constraints.constrainHeight(double.INFINITY); 105 return constraints.constrainHeight(double.INFINITY);
106 assert(height == constraints.constrainHeight(height)); 106 assert(height == constraints.constrainHeight(height));
107 return height; 107 return height;
108 } 108 }
109 109
110 double getDistanceToActualBaseline(TextBaseline baseline) {
111 return defaultGetDistanceToHighestActualBaseline(baseline);
112 }
113
110 void performLayout() { 114 void performLayout() {
111 bool hasNonPositionedChildren = false; 115 bool hasNonPositionedChildren = false;
112 116
113 double width = 0.0; 117 double width = 0.0;
114 double height = 0.0; 118 double height = 0.0;
115 119
116 RenderBox child = firstChild; 120 RenderBox child = firstChild;
117 while (child != null) { 121 while (child != null) {
118 assert(child.parentData is StackParentData); 122 assert(child.parentData is StackParentData);
119 final StackParentData parentData = child.parentData; 123 final StackParentData parentData = child.parentData;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 194 }
191 195
192 void hitTestChildren(HitTestResult result, { Point position }) { 196 void hitTestChildren(HitTestResult result, { Point position }) {
193 defaultHitTestChildren(result, position: position); 197 defaultHitTestChildren(result, position: position);
194 } 198 }
195 199
196 void paint(RenderCanvas canvas) { 200 void paint(RenderCanvas canvas) {
197 defaultPaint(canvas); 201 defaultPaint(canvas);
198 } 202 }
199 } 203 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/rendering/paragraph.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698