HTMLTableCaptionElement.cpp [plain text]
#include "config.h"
#include "HTMLTableCaptionElement.h"
#include "CSSPropertyNames.h"
#include "HTMLNames.h"
namespace WebCore {
using namespace HTMLNames;
inline HTMLTableCaptionElement::HTMLTableCaptionElement(const QualifiedName& tagName, Document& document)
: HTMLElement(tagName, document)
{
ASSERT(hasTagName(captionTag));
}
Ref<HTMLTableCaptionElement> HTMLTableCaptionElement::create(const QualifiedName& tagName, Document& document)
{
return adoptRef(*new HTMLTableCaptionElement(tagName, document));
}
bool HTMLTableCaptionElement::isPresentationAttribute(const QualifiedName& name) const
{
if (name == alignAttr)
return true;
return HTMLElement::isPresentationAttribute(name);
}
void HTMLTableCaptionElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style)
{
if (name == alignAttr) {
if (!value.isEmpty())
addPropertyToPresentationAttributeStyle(style, CSSPropertyCaptionSide, value);
} else
HTMLElement::collectStyleForPresentationAttribute(name, value, style);
}
}