Commit 2306f20a authored by ddkilzer's avatar ddkilzer

WebCore:

        Reviewed by Hyatt.

        - http://bugs.webkit.org/show_bug.cgi?id=12049
          RenderBlock::calcMinMaxWidth() should not examine children of fixed-width blocks

        No test possible (no change to functionality).

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::calcMinMaxWidth): Call calc{Inline,Block}MinMaxWidth()
        only if their result is needed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 63a634e5
2006-12-31 Mitz Pettel <mitz@webkit.org>
Reviewed by Hyatt.
- http://bugs.webkit.org/show_bug.cgi?id=12049
RenderBlock::calcMinMaxWidth() should not examine children of fixed-width blocks
No test possible (no change to functionality).
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::calcMinMaxWidth): Call calc{Inline,Block}MinMaxWidth()
only if their result is needed.
== Rolled over to ChangeLog-2006-12-31 ==
......@@ -2769,30 +2769,33 @@ void RenderBlock::calcMinMaxWidth()
kdDebug( 6040 ) << renderName() << "(RenderBlock)::calcMinMaxWidth() this=" << this << endl;
#endif
m_minWidth = 0;
m_maxWidth = 0;
if (!isTableCell() && style()->width().isFixed() && style()->width().value() > 0)
m_minWidth = m_maxWidth = calcContentBoxWidth(style()->width().value());
else {
m_minWidth = 0;
m_maxWidth = 0;
if (childrenInline())
calcInlineMinMaxWidth();
else
calcBlockMinMaxWidth();
if (childrenInline())
calcInlineMinMaxWidth();
else
calcBlockMinMaxWidth();
if(m_maxWidth < m_minWidth) m_maxWidth = m_minWidth;
if(m_maxWidth < m_minWidth) m_maxWidth = m_minWidth;
if (!style()->autoWrap() && childrenInline()) {
m_minWidth = m_maxWidth;
// A horizontal marquee with inline children has no minimum width.
if (m_layer && m_layer->marquee() && m_layer->marquee()->isHorizontal() && !m_layer->marquee()->isUnfurlMarquee())
m_minWidth = 0;
}
if (!style()->autoWrap() && childrenInline()) {
m_minWidth = m_maxWidth;
// A horizontal marquee with inline children has no minimum width.
if (m_layer && m_layer->marquee() && m_layer->marquee()->isHorizontal() && !m_layer->marquee()->isUnfurlMarquee())
m_minWidth = 0;
}
if (isTableCell()) {
Length w = static_cast<RenderTableCell*>(this)->styleOrColWidth();
if (w.isFixed() && w.value() > 0)
m_maxWidth = max(m_minWidth, calcContentBoxWidth(w.value()));
} else if (style()->width().isFixed() && style()->width().value() > 0)
m_minWidth = m_maxWidth = calcContentBoxWidth(style()->width().value());
if (isTableCell()) {
Length w = static_cast<RenderTableCell*>(this)->styleOrColWidth();
if (w.isFixed() && w.value() > 0)
m_maxWidth = max(m_minWidth, calcContentBoxWidth(w.value()));
}
}
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
m_maxWidth = max(m_maxWidth, calcContentBoxWidth(style()->minWidth().value()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment