/// <summary> /// Measures the bounds of box and children, recursively.<br/> /// Performs layout of the DOM structure creating lines by set bounds restrictions.<br/> /// </summary> /// <param name="g">Device context to use</param> protected virtual void PerformContentLayout(LayoutVisitor lay) { switch (this.CssDisplay) { case Css.CssDisplay.None: { return; } default: { //others ... if (this.NeedComputedValueEvaluation) { this.ReEvaluateComputedValues(lay.SampleIFonts, lay.LatestContainingBlock); } this.MeasureRunsSize(lay); } break; case Css.CssDisplay.Block: case Css.CssDisplay.ListItem: case Css.CssDisplay.Table: case Css.CssDisplay.InlineTable: case Css.CssDisplay.TableCell: case Css.CssDisplay.Flex: case Css.CssDisplay.InlineFlex: { //this box has its own container property //this box may be used for ... // 1) line formatting context , or // 2) block formatting context if (this.NeedComputedValueEvaluation) { this.ReEvaluateComputedValues(lay.SampleIFonts, lay.LatestContainingBlock); } this.MeasureRunsSize(lay); //for general block layout CssLayoutEngine.PerformContentLayout(this, lay); } break; } //set height UpdateIfHigher(this, ExpectedHeight); //update back lay.UpdateRootSize(this); }