| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 126 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
| 127 virtual void requiredAttributeChanged(); | 127 virtual void requiredAttributeChanged(); |
| 128 virtual void disabledAttributeChanged(); | 128 virtual void disabledAttributeChanged(); |
| 129 void attach(const AttachContext& = AttachContext()) override; | 129 void attach(const AttachContext& = AttachContext()) override; |
| 130 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 130 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 131 void removedFrom(ContainerNode*) override; | 131 void removedFrom(ContainerNode*) override; |
| 132 void willChangeForm() override; | 132 void willChangeForm() override; |
| 133 void didChangeForm() override; | 133 void didChangeForm() override; |
| 134 void didMoveToNewDocument(Document& oldDocument) override; | 134 void didMoveToNewDocument(Document& oldDocument) override; |
| 135 | 135 |
| 136 bool isDefaultButtonForForm() const override; |
| 136 bool supportsFocus() const override; | 137 bool supportsFocus() const override; |
| 137 bool isKeyboardFocusable() const override; | 138 bool isKeyboardFocusable() const override; |
| 138 virtual bool shouldShowFocusRingOnMouseFocus() const; | 139 virtual bool shouldShowFocusRingOnMouseFocus() const; |
| 139 bool shouldHaveFocusAppearance() const final; | 140 bool shouldHaveFocusAppearance() const final; |
| 140 void dispatchBlurEvent(Element* newFocusedElement, WebFocusType, InputDevice
Capabilities* sourceCapabilities) override; | 141 void dispatchBlurEvent(Element* newFocusedElement, WebFocusType, InputDevice
Capabilities* sourceCapabilities) override; |
| 141 void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, InputDevic
eCapabilities* sourceCapabilities) override; | 142 void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, InputDevic
eCapabilities* sourceCapabilities) override; |
| 142 void willCallDefaultEventHandler(const Event&) final; | 143 void willCallDefaultEventHandler(const Event&) final; |
| 143 | 144 |
| 144 void didRecalcStyle(StyleRecalcChange) override; | 145 void didRecalcStyle(StyleRecalcChange) override; |
| 145 | 146 |
| 146 // This must be called any time the result of willValidate() has changed. | 147 // This must be called any time the result of willValidate() has changed. |
| 147 void setNeedsWillValidateCheck(); | 148 void setNeedsWillValidateCheck(); |
| 148 virtual bool recalcWillValidate() const; | 149 virtual bool recalcWillValidate() const; |
| 149 | 150 |
| 150 virtual void resetImpl() { } | 151 virtual void resetImpl() { } |
| 151 virtual bool supportsAutofocus() const; | 152 virtual bool supportsAutofocus() const; |
| 152 | 153 |
| 153 private: | 154 private: |
| 154 #if !ENABLE(OILPAN) | 155 #if !ENABLE(OILPAN) |
| 155 void refFormAssociatedElement() final { ref(); } | 156 void refFormAssociatedElement() final { ref(); } |
| 156 void derefFormAssociatedElement() final { deref(); } | 157 void derefFormAssociatedElement() final { deref(); } |
| 157 #endif | 158 #endif |
| 158 | 159 |
| 159 bool isFormControlElement() const final { return true; } | 160 bool isFormControlElement() const final { return true; } |
| 160 bool alwaysCreateUserAgentShadowRoot() const override { return true; } | 161 bool alwaysCreateUserAgentShadowRoot() const override { return true; } |
| 161 | 162 |
| 162 short tabIndex() const final; | 163 short tabIndex() const final; |
| 163 | 164 |
| 164 bool isDefaultButtonForForm() const final; | |
| 165 bool isValidElement() override; | 165 bool isValidElement() override; |
| 166 bool matchesValidityPseudoClasses() const override; | 166 bool matchesValidityPseudoClasses() const override; |
| 167 void updateAncestorDisabledState() const; | 167 void updateAncestorDisabledState() const; |
| 168 | 168 |
| 169 bool isValidationMessageVisible() const; | 169 bool isValidationMessageVisible() const; |
| 170 ValidationMessageClient* validationMessageClient() const; | 170 ValidationMessageClient* validationMessageClient() const; |
| 171 | 171 |
| 172 // Requests validity recalc for the form owner, if one exists. | 172 // Requests validity recalc for the form owner, if one exists. |
| 173 void formOwnerSetNeedsValidityCheck(); | 173 void formOwnerSetNeedsValidityCheck(); |
| 174 // Requests validity recalc for all ancestor fieldsets, if exist. | 174 // Requests validity recalc for all ancestor fieldsets, if exist. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 199 { | 199 { |
| 200 return element.isFormControlElement(); | 200 return element.isFormControlElement(); |
| 201 } | 201 } |
| 202 | 202 |
| 203 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); | 203 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); |
| 204 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro
l->isFormControlElement(), control.isFormControlElement()); | 204 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro
l->isFormControlElement(), control.isFormControlElement()); |
| 205 | 205 |
| 206 } // namespace blink | 206 } // namespace blink |
| 207 | 207 |
| 208 #endif | 208 #endif |
| OLD | NEW |