Commit 1e39e214 authored by hyatt's avatar hyatt
Browse files

Fix for 2953367, padding is incorrectly inherited into table cells

	and also incorrectly overrides cellpadding on the table itself.
	Fixes dailyf1.com.

        * khtml/css/html4.css:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::parseAttribute):
        (HTMLTableCellElementImpl::init):
        * khtml/html/html_tableimpl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f07e9c04
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 2953367, padding is incorrectly inherited into table cells
and also incorrectly overrides cellpadding on the table itself.
Fixes dailyf1.com.
* khtml/css/html4.css:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
(HTMLTableCellElementImpl::init):
* khtml/html/html_tableimpl.h:
2002-11-12 David Hyatt <hyatt@apple.com>
 
For now make text/xml files use HTML parsing/documents.
......
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 2953367, padding is incorrectly inherited into table cells
and also incorrectly overrides cellpadding on the table itself.
Fixes dailyf1.com.
* khtml/css/html4.css:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
(HTMLTableCellElementImpl::init):
* khtml/html/html_tableimpl.h:
2002-11-12 David Hyatt <hyatt@apple.com>
 
For now make text/xml files use HTML parsing/documents.
......
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 2953367, padding is incorrectly inherited into table cells
and also incorrectly overrides cellpadding on the table itself.
Fixes dailyf1.com.
* khtml/css/html4.css:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
(HTMLTableCellElementImpl::init):
* khtml/html/html_tableimpl.h:
2002-11-12 David Hyatt <hyatt@apple.com>
 
For now make text/xml files use HTML parsing/documents.
......
......@@ -218,8 +218,7 @@ THEAD {
TBODY {
display: table-row-group;
vertical-align: inherit;
border: inherit;
padding: inherit;
border: inherit;
}
TFOOT {
......@@ -238,15 +237,13 @@ COLGROUP {
TR {
display: table-row;
vertical-align: inherit;
border-color: inherit;
padding: inherit;
border-color: inherit;
}
TD, TH {
display: table-cell;
vertical-align: inherit;
padding: inherit;
}
TH {
......
......@@ -414,18 +414,10 @@ void HTMLTableElementImpl::parseAttribute(AttributeImpl *attr)
removeCSSProperty(CSS_PROP_BORDER_SPACING);
break;
case ATTR_CELLPADDING:
if (!attr->value().isEmpty()) {
addCSSLength(CSS_PROP_PADDING_TOP, attr->value());
addCSSLength(CSS_PROP_PADDING_LEFT, attr->value());
addCSSLength(CSS_PROP_PADDING_BOTTOM, attr->value());
addCSSLength(CSS_PROP_PADDING_RIGHT, attr->value());
}
else {
removeCSSProperty(CSS_PROP_PADDING_TOP);
removeCSSProperty(CSS_PROP_PADDING_LEFT);
removeCSSProperty(CSS_PROP_PADDING_BOTTOM);
removeCSSProperty(CSS_PROP_PADDING_RIGHT);
}
if (!attr->value().isEmpty())
cellPadding = attr->value();
else // XXXdwh Need to update all cells to remove the padding property.
cellPadding = "";
break;
case ATTR_COLS:
{
......@@ -752,6 +744,13 @@ void HTMLTableCellElementImpl::init()
if (!m_solid)
addCSSProperty(CSS_PROP_BORDER_COLOR, "inherit");
}
if (!table->cellPadding.isEmpty()) {
addCSSLength(CSS_PROP_PADDING_TOP, table->cellPadding);
addCSSLength(CSS_PROP_PADDING_LEFT, table->cellPadding);
addCSSLength(CSS_PROP_PADDING_BOTTOM, table->cellPadding);
addCSSLength(CSS_PROP_PADDING_RIGHT, table->cellPadding);
}
}
}
......
......@@ -110,6 +110,8 @@ protected:
Frame frame;
Rules rules;
DOMString cellPadding;
bool incremental : 1;
bool m_noBorder : 1;
bool m_solid : 1;
......
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