layoutPositionedChild static method
void
layoutPositionedChild(
- RenderBoxModel parent,
- RenderBoxModel child, {
- bool needsRelayout = false,
Implementation
static void layoutPositionedChild(RenderBoxModel parent, RenderBoxModel child, {bool needsRelayout = false}) {
BoxConstraints childConstraints = child.getConstraints();
// Whether child need to layout
bool isChildNeedsLayout = true;
if (child.hasSize && !needsRelayout && (childConstraints == child.constraints) && (!child.needsLayout)) {
isChildNeedsLayout = false;
}
if (isChildNeedsLayout) {
if (enableWebFProfileTracking) {
WebFProfiler.instance.pauseCurrentLayoutOp();
}
// Should create relayoutBoundary for positioned child.
child.layout(childConstraints, parentUsesSize: false);
if (enableWebFProfileTracking) {
WebFProfiler.instance.resumeCurrentLayoutOp();
}
}
}