scrollShouldInheritConstraints method
Implementation
bool scrollShouldInheritConstraints(RenderLayoutBox layoutBox, bool horizontal) {
RenderBox? childBox = layoutBox.firstChild;
while (childBox != null && childBox.parentData is RenderLayoutParentData) {
final RenderLayoutParentData childParentData = childBox.parentData as RenderLayoutParentData;
if (childBox is RenderLayoutBox) {
if (childBox.renderScrollingContent != null) {
return true;
}
CSSOverflowType childOverflow = horizontal ? childBox.renderStyle.overflowX : childBox.renderStyle.overflowY;
// this condition comes from h5 test
if (childOverflow == CSSOverflowType.hidden || childOverflow == CSSOverflowType.clip) {
if (scrollShouldInheritConstraints(childBox, horizontal)) {
return true;
}
}
}
childBox = childParentData.nextSibling;
}
return false;
}