#include "core/html/HTMLElement.h"
#include "core/html/LabelableElement.h"
-namespace WebCore {
+namespace blink {
class HTMLLabelElement FINAL : public HTMLElement {
public:
- static PassRefPtr<HTMLLabelElement> create(Document&);
+ DECLARE_NODE_FACTORY(HTMLLabelElement);
LabelableElement* control() const;
virtual bool isInteractiveContent() const OVERRIDE;
virtual void accessKeyAction(bool sendMouseEvents) OVERRIDE;
+ virtual void attributeWillChange(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue) OVERRIDE;
+ virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+ virtual void removedFrom(ContainerNode*) OVERRIDE;
+
// Overridden to update the hover/active state of the corresponding control.
virtual void setActive(bool = true) OVERRIDE;
virtual void setHovered(bool = true) OVERRIDE;
// Overridden to either click() or focus() the corresponding control.
virtual void defaultEventHandler(Event*) OVERRIDE;
- virtual void focus(bool restorePreviousSelection, FocusDirection) OVERRIDE;
-};
+ virtual void focus(bool restorePreviousSelection, FocusType) OVERRIDE;
-DEFINE_NODE_TYPE_CASTS(HTMLLabelElement, hasTagName(HTMLNames::labelTag));
+ void updateLabel(TreeScope&, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue);
+};
} //namespace