updateOverflowRenderBox method

void updateOverflowRenderBox()

Implementation

void updateOverflowRenderBox() {
  CSSOverflowType effectiveOverflowY = renderStyle.effectiveOverflowY;
  CSSOverflowType effectiveOverflowX = renderStyle.effectiveOverflowX;

  if (renderBoxModel is RenderLayoutBox) {
    // Create two repaintBoundary for scroll container if any direction is scrollable.
    bool shouldScrolling = (effectiveOverflowX == CSSOverflowType.auto || effectiveOverflowX == CSSOverflowType.scroll)
      || (effectiveOverflowY == CSSOverflowType.auto || effectiveOverflowY == CSSOverflowType.scroll);

    if (shouldScrolling) {
      _attachScrollingContentBox();
    } else {
      _detachScrollingContentBox();
    }
  }
}