void RenderView::calcMinMaxWidth() { ASSERT( !minMaxKnown() ); RenderBlock::calcMinMaxWidth(); m_maxWidth = m_minWidth; setMinMaxKnown(); }
void RenderReplaced::calcMinMaxWidth() { ASSERT(!minMaxKnown()); int width = calcReplacedWidth() + paddingLeft() + paddingRight() + borderLeft() + borderRight(); if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent())) { m_minWidth = 0; m_maxWidth = width; } else m_minWidth = m_maxWidth = width; setMinMaxKnown(); }
void RenderView::layout() { if (m_printingMode) m_minWidth = m_width; // FIXME: This is all just a terrible workaround for bugs in layout when the view height changes. // Find a better way to detect view height changes. We're guessing that if we don't need layout that the reason // we were called is because of a FrameView bounds change. if (!needsLayout()) { setChildNeedsLayout(true, false); setMinMaxKnown(false); for (RenderObject *c = firstChild(); c; c = c->nextSibling()) c->setChildNeedsLayout(true, false); } if (recalcMinMax()) recalcMinMaxWidths(); RenderBlock::layout(); int docw = docWidth(); int doch = docHeight(); if (!m_printingMode) { setWidth(m_frameView->visibleWidth()); setHeight(m_frameView->visibleHeight()); } // ### we could maybe do the call below better and only pass true if the docsize changed. layoutPositionedObjects( true ); layer()->setHeight(max(doch, m_height)); layer()->setWidth(max(docw, m_width)); setNeedsLayout(false); }