private SetCssBoxHeight ( float height ) : void | ||
height | float | |
return | void |
static void SetFinalInnerContentSize(CssBox box, float innerContentW, float innerContentH, LayoutVisitor lay) { box.InnerContentWidth = innerContentW; box.InnerContentHeight = innerContentH; if (!box.Height.IsEmptyOrAuto) { var h = CssValueParser.ConvertToPx(box.Height, lay.LatestContainingBlock.VisualWidth, lay.LatestContainingBlock); box.SetExpectedSize(box.ExpectedWidth, h); box.SetVisualHeight(h); box.SetCssBoxHeight(h); } else { switch (box.Position) { case CssPosition.Fixed: case CssPosition.Absolute: box.SetVisualHeight(box.InnerContentHeight); break; } } if (!box.Width.IsEmptyOrAuto) { //find max line width var w = CssValueParser.ConvertToPx(box.Width, lay.LatestContainingBlock.VisualWidth, lay.LatestContainingBlock); box.SetExpectedSize(w, box.ExpectedHeight); box.SetVisualWidth(w); box.SetCssBoxWidth(w); } else { switch (box.Position) { case CssPosition.Fixed: case CssPosition.Absolute: box.SetVisualWidth(box.InnerContentWidth); break; } } switch (box.Overflow) { case CssOverflow.Scroll: case CssOverflow.Auto: { if ((box.InnerContentHeight > box.VisualHeight) || (box.InnerContentWidth > box.VisualWidth)) { lay.RequestScrollView(box); } } break; } }