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

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

Issue 1223153004: Make the drawer, popup menus, dialogs, and settings page scrollable. (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 side-by-side diff with in-line comments
Download patch
Index: sky/sdk/lib/rendering/block.dart
diff --git a/sky/sdk/lib/rendering/block.dart b/sky/sdk/lib/rendering/block.dart
index 3a1ea069f5788406b7cabce2abb83a163d9facef..ba5fa1fd7f629013f23f5ee443778f0732d456bd 100644
--- a/sky/sdk/lib/rendering/block.dart
+++ b/sky/sdk/lib/rendering/block.dart
@@ -109,29 +109,15 @@ class RenderBlock extends RenderBlockBase {
return defaultComputeDistanceToFirstActualBaseline(baseline);
}
- bool _hasVisualOverflow = false;
-
void performLayout() {
+ assert(constraints.maxHeight >= double.INFINITY);
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;
}
void paint(PaintingCanvas canvas, Offset offset) {
- if (_hasVisualOverflow) {
- canvas.save();
- canvas.clipRect(offset & size);
- }
defaultPaint(canvas, offset);
- if (_hasVisualOverflow) {
- canvas.restore();
- }
}
void hitTestChildren(HitTestResult result, { Point position }) {
@@ -204,6 +190,7 @@ class RenderBlockViewport extends RenderBlockBase {
bool get debugDoesLayoutWithCallback => true;
void performLayout() {
+ assert(constraints.maxHeight < double.INFINITY);
if (_callback != null) {
try {
_inCallback = true;

Powered by Google App Engine
This is Rietveld 408576698