#include "core/html/HTMLElement.h"
-namespace WebCore {
+namespace blink {
+
+class LabelsNodeList;
// LabelableElement represents "labelable element" defined in the HTML
// specification, and provides the implementation of the "labels" attribute.
class LabelableElement : public HTMLElement {
public:
virtual ~LabelableElement();
- PassRefPtr<NodeList> labels();
+ PassRefPtrWillBeRawPtr<LabelsNodeList> labels();
virtual bool supportLabels() const { return false; }
+ virtual void trace(Visitor*) OVERRIDE;
+
protected:
LabelableElement(const QualifiedName& tagName, Document&);
virtual bool isLabelable() const OVERRIDE FINAL { return true; }
};
-inline bool isLabelableElement(const Element& element)
-{
- return element.isHTMLElement() && toHTMLElement(element).isLabelable();
-}
-
inline bool isLabelableElement(const HTMLElement& element)
{
return element.isLabelable();
DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(LabelableElement);
-} // namespace WebCore
+} // namespace blink
#endif