Commit d6e471b6 authored by hyatt's avatar hyatt

Fix bustage with <nobr> tags. Inline nowrap elements were

	breaking on images when they shouldn't have.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::calcInlineMinMaxWidth):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4ea6a4b6
2002-11-15 David Hyatt <hyatt@apple.com>
Fix bustage with <nobr> tags. Inline nowrap elements were
breaking on images when they shouldn't have.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-15 Ken Kocienda <kocienda@apple.com>
Fix for this bug:
......
2002-11-15 David Hyatt <hyatt@apple.com>
Fix bustage with <nobr> tags. Inline nowrap elements were
breaking on images when they shouldn't have.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-15 Ken Kocienda <kocienda@apple.com>
Fix for this bug:
......
2002-11-15 David Hyatt <hyatt@apple.com>
Fix bustage with <nobr> tags. Inline nowrap elements were
breaking on images when they shouldn't have.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-15 Ken Kocienda <kocienda@apple.com>
Fix for this bug:
......
......@@ -1295,6 +1295,9 @@ void RenderFlow::calcInlineMinMaxWidth()
bool stripFrontSpaces = true;
RenderObject* trailingSpaceChild = 0;
bool nowrap, oldnowrap;
nowrap = oldnowrap = style()->whiteSpace() == NOWRAP;
while(child != 0)
{
// positioned children don't affect the minmaxwidth
......@@ -1304,6 +1307,8 @@ void RenderFlow::calcInlineMinMaxWidth()
continue;
}
nowrap = child->style()->whiteSpace() == NOWRAP;
if( !child->isBR() )
{
// Step One: determine whether or not we need to go ahead and
......@@ -1387,18 +1392,24 @@ void RenderFlow::calcInlineMinMaxWidth()
childMin += child->minWidth();
childMax += child->maxWidth();
if(m_minWidth < inlineMin) m_minWidth = inlineMin;
inlineMin = 0;
if (nowrap && !oldnowrap) {
if(m_minWidth < inlineMin) m_minWidth = inlineMin;
inlineMin = 0;
}
// Add our width to the max.
inlineMax += childMax;
// Now check our line.
inlineMin = childMin;
if(m_minWidth < inlineMin) m_minWidth = inlineMin;
// Now start a new line.
inlineMin = 0;
if (nowrap)
inlineMin += childMin;
else {
// Now check our line.
inlineMin = childMin;
if(m_minWidth < inlineMin) m_minWidth = inlineMin;
// Now start a new line.
inlineMin = 0;
}
// We are no longer stripping whitespace at the start of
// a line.
......@@ -1479,6 +1490,8 @@ void RenderFlow::calcInlineMinMaxWidth()
trailingSpaceChild = 0;
}
oldnowrap = nowrap;
child = next(this, child);
}
......
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