Commit f07f43b9 authored by Ian Hickson's avatar Ian Hickson

Merge pull request #2465 from Hixie/cleanup

Cleanup around viewports
parents b193854b 79c3905e
......@@ -195,6 +195,14 @@ class RenderViewportBase extends RenderBox implements HasScrollDirection {
super.applyPaintTransform(child, transform.translate(effectivePaintOffset.dx, effectivePaintOffset.dy));
}
void debugFillDescription(List<String> description) {
super.debugFillDescription(description);
description.add('paintOffset: $paintOffset');
description.add('scrollDirection: $scrollDirection');
description.add('scrollAnchor: $scrollAnchor');
if (overlayPainter != null)
description.add('overlay painter: $overlayPainter');
}
}
typedef Offset ViewportDimensionsChangeCallback(ViewportDimensions dimensions);
......@@ -373,4 +381,9 @@ abstract class RenderVirtualViewport<T extends ContainerBoxParentDataMixin<Rende
}
Rect describeApproximatePaintClip(RenderObject child) => Point.origin & size;
void debugFillDescription(List<String> description) {
super.debugFillDescription(description);
description.add('virtual child count: $virtualChildCount');
}
}
......@@ -71,6 +71,7 @@ abstract class ExtentScrollBehavior extends ScrollBehavior<double, double> {
double containerExtent,
double scrollOffset: 0.0
}) {
assert(minScrollOffset <= maxScrollOffset);
if (contentExtent != null)
_contentExtent = contentExtent;
if (containerExtent != null)
......@@ -109,8 +110,10 @@ class BoundedBehavior extends ExtentScrollBehavior {
double minScrollOffset,
double scrollOffset: 0.0
}) {
if (minScrollOffset != null)
if (minScrollOffset != null) {
_minScrollOffset = minScrollOffset;
assert(minScrollOffset <= maxScrollOffset);
}
return super.updateExtents(
contentExtent: contentExtent,
containerExtent: containerExtent,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment