#include "CSSValueKeywords.h"
#include "HTMLNames.h"
#include "core/css/StylePropertySet.h"
+#include "core/frame/UseCounter.h"
namespace WebCore {
ScriptWrappable::init(this);
}
-PassRefPtr<HTMLPreElement> HTMLPreElement::create(const QualifiedName& tagName, Document& document)
+PassRefPtrWillBeRawPtr<HTMLPreElement> HTMLPreElement::create(const QualifiedName& tagName, Document& document)
{
- return adoptRef(new HTMLPreElement(tagName, document));
+ return adoptRefWillBeRefCountedGarbageCollected(new HTMLPreElement(tagName, document));
}
bool HTMLPreElement::isPresentationAttribute(const QualifiedName& name) const
void HTMLPreElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
{
- if (name == wrapAttr)
+ if (name == wrapAttr) {
+ UseCounter::count(document(), UseCounter::HTMLPreElementWrap);
style->setProperty(CSSPropertyWhiteSpace, CSSValuePreWrap);
- else
+ } else {
HTMLElement::collectStyleForPresentationAttribute(name, value, style);
+ }
}
}