Commit 5066da21 authored by hyatt's avatar hyatt

Revert the redundancy that dirk noticed.

	Fixing issue #3 on diveintomark.org's list, which actually involved
	merging calcAbsoluteVertical to KHTML's trunk and then fixing
	a math error in the bottom computation.

        Reviewed by NOBODY (OOPS!).

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteVertical):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0ce577a1
2003-01-08 David Hyatt <hyatt@apple.com>
Revert the redundancy that dirk noticed.
Fixing issue #3 on diveintomark.org's list, which actually involved
merging calcAbsoluteVertical to KHTML's trunk and then fixing
a math error in the bottom computation.
Reviewed by NOBODY (OOPS!).
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
2003-01-08 Chris Blumenberg <cblu@apple.com>
Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html
......
2003-01-08 David Hyatt <hyatt@apple.com>
Revert the redundancy that dirk noticed.
Fixing issue #3 on diveintomark.org's list, which actually involved
merging calcAbsoluteVertical to KHTML's trunk and then fixing
a math error in the bottom computation.
Reviewed by NOBODY (OOPS!).
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
2003-01-08 Chris Blumenberg <cblu@apple.com>
Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html
......
......@@ -85,18 +85,14 @@ void HTMLBodyElementImpl::parseAttribute(AttributeImpl *attr)
break;
}
case ATTR_MARGINWIDTH:
// Marginwidth applies to both left and right margins -dwh
addCSSLength(CSS_PROP_MARGIN_RIGHT, attr->value() );
addCSSLength(CSS_PROP_MARGIN_LEFT, attr->value());
/* nobreak; */
case ATTR_LEFTMARGIN:
addCSSLength(CSS_PROP_MARGIN_LEFT, attr->value() );
break;
case ATTR_MARGINHEIGHT:
// Marginheight applies to both top and bottom margins -dwh
addCSSLength(CSS_PROP_MARGIN_BOTTOM, attr->value());
addCSSLength(CSS_PROP_MARGIN_TOP, attr->value());
/* nobreak */
/* nobreak */
case ATTR_TOPMARGIN:
addCSSLength(CSS_PROP_MARGIN_TOP, attr->value());
break;
......
......@@ -1010,17 +1010,18 @@ void RenderBox::calcAbsoluteVertical()
int pab = borderTop()+borderBottom()+paddingTop()+paddingBottom();
Length hl = containingBlock()->style()->height();
RenderObject* cb = containingBlock();
Length hl = cb->style()->height();
if (hl.isFixed())
ch = hl.value + containingBlock()->paddingTop()
+ containingBlock()->paddingBottom();
ch = hl.value + cb->paddingTop()
+ cb->paddingBottom();
else
ch = containingBlock()->height();
ch = cb->height();
if(!style()->top().isVariable())
t = style()->top().width(ch);
t = style()->top().width(ch) + cb->borderTop();
if(!style()->bottom().isVariable())
b = style()->bottom().width(ch);
b = style()->bottom().width(ch) + cb->borderBottom();
if(!style()->height().isVariable())
{
h = style()->height().width(ch);
......@@ -1053,12 +1054,9 @@ void RenderBox::calcAbsoluteVertical()
if (ro) static_top = ro->yPos()+ro->marginBottom()+ro->height();
RenderObject* po = parent();
while (po && po!=containingBlock()) {
for (RenderObject* po = parent(); po && po != cb; po = po->parent())
static_top+=po->yPos();
po=po->parent();
}
if (h==AUTO || style()->top().isStatic())
t = static_top;
}
......@@ -1143,8 +1141,8 @@ void RenderBox::calcAbsoluteVertical()
m_marginTop = mt;
m_marginBottom = mb;
m_y = t + mt + containingBlock()->borderTop();
m_y = t + mt;
// printf("v: h=%d, t=%d, b=%d, mt=%d, mb=%d, m_y=%d\n",h,t,b,mt,mb,m_y);
}
......
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