summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLTableCellElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLTableCellElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLTableCellElement.cpp39
1 files changed, 14 insertions, 25 deletions
diff --git a/Source/WebCore/html/HTMLTableCellElement.cpp b/Source/WebCore/html/HTMLTableCellElement.cpp
index 9a96a3607..84a1c9654 100644
--- a/Source/WebCore/html/HTMLTableCellElement.cpp
+++ b/Source/WebCore/html/HTMLTableCellElement.cpp
@@ -75,23 +75,7 @@ int HTMLTableCellElement::cellIndex() const
return index;
}
-bool HTMLTableCellElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
-{
- if (attrName == nowrapAttr) {
- result = eUniversal;
- return false;
- }
-
- if (attrName == widthAttr ||
- attrName == heightAttr) {
- result = eCell; // Because of the quirky behavior of ignoring 0 values, cells are special.
- return false;
- }
-
- return HTMLTablePartElement::mapToEntry(attrName, result);
-}
-
-void HTMLTableCellElement::parseMappedAttribute(Attribute* attr)
+void HTMLTableCellElement::parseAttribute(Attribute* attr)
{
if (attr->name() == rowspanAttr) {
if (renderer() && renderer()->isTableCell())
@@ -100,25 +84,30 @@ void HTMLTableCellElement::parseMappedAttribute(Attribute* attr)
if (renderer() && renderer()->isTableCell())
toRenderTableCell(renderer())->colSpanOrRowSpanChanged();
} else if (attr->name() == nowrapAttr) {
- if (!attr->isNull())
- addCSSProperty(attr, CSSPropertyWhiteSpace, CSSValueWebkitNowrap);
+ if (attr->isNull())
+ removeCSSProperty(CSSPropertyWhiteSpace);
+ else
+ addCSSProperty(CSSPropertyWhiteSpace, CSSValueWebkitNowrap);
+
} else if (attr->name() == widthAttr) {
if (!attr->value().isEmpty()) {
int widthInt = attr->value().toInt();
if (widthInt > 0) // width="0" is ignored for compatibility with WinIE.
- addCSSLength(attr, CSSPropertyWidth, attr->value());
- }
+ addCSSLength(CSSPropertyWidth, attr->value());
+ } else
+ removeCSSProperty(CSSPropertyWidth);
} else if (attr->name() == heightAttr) {
if (!attr->value().isEmpty()) {
int heightInt = attr->value().toInt();
if (heightInt > 0) // height="0" is ignored for compatibility with WinIE.
- addCSSLength(attr, CSSPropertyHeight, attr->value());
- }
+ addCSSLength(CSSPropertyHeight, attr->value());
+ } else
+ removeCSSProperty(CSSPropertyHeight);
} else
- HTMLTablePartElement::parseMappedAttribute(attr);
+ HTMLTablePartElement::parseAttribute(attr);
}
-PassRefPtr<CSSMutableStyleDeclaration> HTMLTableCellElement::additionalAttributeStyle()
+StylePropertySet* HTMLTableCellElement::additionalAttributeStyle()
{
ContainerNode* p = parentNode();
while (p && !p->hasTagName(tableTag))