This source file includes following definitions.
- create
- name
- value
- isURLParameter
- isURLAttribute
#include "config.h"
#include "core/html/HTMLParamElement.h"
#include "HTMLNames.h"
#include "core/dom/Attribute.h"
#include "core/dom/Document.h"
namespace WebCore {
using namespace HTMLNames;
inline HTMLParamElement::HTMLParamElement(Document& document)
: HTMLElement(paramTag, document)
{
ScriptWrappable::init(this);
}
PassRefPtr<HTMLParamElement> HTMLParamElement::create(Document& document)
{
return adoptRef(new HTMLParamElement(document));
}
const AtomicString& HTMLParamElement::name() const
{
if (hasName())
return getNameAttribute();
return document().isHTMLDocument() ? emptyAtom : getIdAttribute();
}
const AtomicString& HTMLParamElement::value() const
{
return fastGetAttribute(valueAttr);
}
bool HTMLParamElement::isURLParameter(const String& name)
{
return equalIgnoringCase(name, "data") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "src");
}
bool HTMLParamElement::isURLAttribute(const Attribute& attribute) const
{
if (attribute.name() == valueAttr && isURLParameter(name()))
return true;
return HTMLElement::isURLAttribute(attribute);
}
}