didAttachRenderer method

  1. @override
void didAttachRenderer()
override

Implementation

@override
void didAttachRenderer() {
  if (enableWebFProfileTracking) {
    WebFProfiler.instance.startTrackUICommandStep('$this.didAttachRenderer');
  }
  super.didAttachRenderer();
  // The node attach may affect the whitespace of the nextSibling and previousSibling text node so prev and next node require layout.
  renderBoxModel?.markAdjacentRenderParagraphNeedsLayout();
  // Ensure that the child is attached.
  ensureChildAttached();

  // Reconfigure scrollable contents.
  bool needUpdateOverflowRenderBox = false;
  if (renderStyle.overflowX != CSSOverflowType.visible) {
    needUpdateOverflowRenderBox = true;
    updateRenderBoxModelWithOverflowX(_handleScroll);
  }
  if (renderStyle.overflowY != CSSOverflowType.visible) {
    needUpdateOverflowRenderBox = true;
    updateRenderBoxModelWithOverflowY(_handleScroll);
  }
  if (needUpdateOverflowRenderBox) {
    updateOverflowRenderBox();
  }
  if (enableWebFProfileTracking) {
    WebFProfiler.instance.finishTrackUICommandStep();
  }
}