Commit 76b81603 authored by hyatt's avatar hyatt
Browse files

Fix the top of moveabletype.org. The maxwidth/minwidth

	calculation for blocks with inline content did not properly
	deal with margins and padding on inline elements like <a>.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1e39e214
2002-11-12 David Hyatt <hyatt@apple.com>
Fix the top of moveabletype.org. The maxwidth/minwidth
calculation for blocks with inline content did not properly
deal with margins and padding on inline elements like <a>.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-12 David Hyatt <hyatt@apple.com>
 
Fix for 2953367, padding is incorrectly inherited into table cells
......
2002-11-12 David Hyatt <hyatt@apple.com>
Fix the top of moveabletype.org. The maxwidth/minwidth
calculation for blocks with inline content did not properly
deal with margins and padding on inline elements like <a>.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-12 David Hyatt <hyatt@apple.com>
 
Fix for 2953367, padding is incorrectly inherited into table cells
......
2002-11-12 David Hyatt <hyatt@apple.com>
Fix the top of moveabletype.org. The maxwidth/minwidth
calculation for blocks with inline content did not properly
deal with margins and padding on inline elements like <a>.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-12 David Hyatt <hyatt@apple.com>
 
Fix for 2953367, padding is incorrectly inherited into table cells
......
......@@ -1337,6 +1337,23 @@ void RenderFlow::calcInlineMinMaxWidth()
margins += (type == Fixed ? cstyle->marginRight().value : child->marginRight());
childMin += margins;
childMax += margins;
if (child->isInline() && child->isFlow()) {
// Add in padding for inline flow elements. This is wrong in the
// same way the margin addition is wrong. XXXdwh fixme.
int padding = 0;
type = cstyle->paddingLeft().type;
if ( type != Variable )
padding += (type == Fixed ? cstyle->paddingLeft().value : child->paddingLeft());
type = cstyle->paddingRight().type;
if ( type != Variable )
padding += (type == Fixed ? cstyle->paddingRight().value : child->paddingRight());
childMin += padding;
childMax += padding;
inlineMin += childMin;
inlineMax += childMax;
}
}
if (!(child->isInline() && child->isFlow()) && !child->isText()) {
......
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