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

Unified Diff: sky/sdk/lib/rendering/block.dart

Issue 1230733002: Fix test failures from b9e2a7fd2bb21933c4dd23354a35a2d83bdc3be8 (Closed) Base URL: git@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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/block.dart
diff --git a/sky/sdk/lib/rendering/block.dart b/sky/sdk/lib/rendering/block.dart
index b14e16962de717a449427a1c13b98e34830dace7..e302e00da674ebad0bc776e229eafa210a6af4d0 100644
--- a/sky/sdk/lib/rendering/block.dart
+++ b/sky/sdk/lib/rendering/block.dart
@@ -15,8 +15,6 @@ abstract class RenderBlockBase extends RenderBox with ContainerRenderObjectMixin
// lays out RenderBox children in a vertical stack
// uses the maximum width provided by the parent
- bool _hasVisualOverflow = false;
-
RenderBlockBase({
List<RenderBox> children
}) {
@@ -123,15 +121,18 @@ class RenderBlock extends RenderBlockBase {
RenderBlock({ List<RenderBox> children }) : super(children: children);
+ bool _hasVisualOverflow = false;
+
void performLayout() {
super.performLayout();
+ size = constraints.constrain(new Size(constraints.maxWidth, childrenHeight));
+ assert(!size.isInfinite);
+
// FIXME(eseidel): Block lays out its children with unconstrained height
// yet itself remains constrained. Remember that our children wanted to
// be taller than we are so we know to clip them (and not cause confusing
// mismatch of painting vs. hittesting).
_hasVisualOverflow = childrenHeight > size.height;
- size = constraints.constrain(new Size(constraints.maxWidth, childrenHeight));
- assert(!size.isInfinite);
}
void paint(PaintingCanvas canvas, Offset offset) {
@@ -146,4 +147,3 @@ class RenderBlock extends RenderBlockBase {
}
}
-
« 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