mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix test failures from b9e2a7fd2bb21933c4dd23354a35a2d83bdc3be8
We need to test for visual overflow after writing size because we need to use the up-to-date value of size. TBR=ianh@google.com Review URL: https://codereview.chromium.org/1230733002 .
This commit is contained in:
parent
9bf06b6c1b
commit
e0d06791ef
@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user