Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / HTMLLabelElement.h
index b0b712c..8b1278e 100644 (file)
 #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;
 
@@ -47,6 +47,10 @@ private:
     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;
@@ -54,10 +58,10 @@ private:
     // 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