This source file includes following definitions.
- create
- isPresentationAttribute
- collectStyleForPresentationAttribute
#include "config.h"
#include "core/html/HTMLPreElement.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "HTMLNames.h"
#include "core/css/StylePropertySet.h"
namespace WebCore {
using namespace HTMLNames;
inline HTMLPreElement::HTMLPreElement(const QualifiedName& tagName, Document& document)
: HTMLElement(tagName, document)
{
ScriptWrappable::init(this);
}
PassRefPtr<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 AtomicString& value, MutableStylePropertySet* style)
{
if (name == wrapAttr)
style->setProperty(CSSPropertyWhiteSpace, CSSValuePreWrap);
else
HTMLElement::collectStyleForPresentationAttribute(name, value, style);
}
}