HTMLPreElement.cpp [plain text]
#include "config.h"
#include "HTMLPreElement.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "HTMLNames.h"
#include "StyleProperties.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
WTF_MAKE_ISO_ALLOCATED_IMPL(HTMLPreElement);
using namespace HTMLNames;
inline HTMLPreElement::HTMLPreElement(const QualifiedName& tagName, Document& document)
: HTMLElement(tagName, document)
{
}
Ref<HTMLPreElement> HTMLPreElement::create(const QualifiedName& tagName, Document& document)
{
return adoptRef(*new HTMLPreElement(tagName, document));
}
bool HTMLPreElement::isPresentationAttribute(const QualifiedName& name) const
{
if (name == wrapAttr)
return true;
return HTMLElement::isPresentationAttribute(name);
}
void HTMLPreElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomString& value, MutableStyleProperties& style)
{
if (name == wrapAttr)
style.setProperty(CSSPropertyWhiteSpace, CSSValuePreWrap);
else
HTMLElement::collectStyleForPresentationAttribute(name, value, style);
}
}