summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLTableCellElement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebCore/html/HTMLTableCellElement.cpp
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
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))