TextFieldInputType.h [plain text]
#ifndef TextFieldInputType_h
#define TextFieldInputType_h
#include "InputType.h"
namespace WebCore {
class FormDataList;
class SpinButtonElement;
class TextFieldInputType : public InputType {
protected:
TextFieldInputType(HTMLInputElement*);
virtual ~TextFieldInputType();
virtual bool canSetSuggestedValue() OVERRIDE;
virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE;
void handleKeydownEventForSpinButton(KeyboardEvent*);
void handleWheelEventForSpinButton(WheelEvent*);
virtual HTMLElement* containerElement() const OVERRIDE;
virtual HTMLElement* innerBlockElement() const OVERRIDE;
virtual HTMLElement* innerTextElement() const OVERRIDE;
virtual HTMLElement* innerSpinButtonElement() const OVERRIDE;
#if ENABLE(INPUT_SPEECH)
virtual HTMLElement* speechButtonElement() const OVERRIDE;
#endif
protected:
virtual bool needsContainer() const;
virtual bool shouldHaveSpinButton() const;
virtual void createShadowSubtree() OVERRIDE;
virtual void destroyShadowSubtree() OVERRIDE;
virtual void disabledAttributeChanged() OVERRIDE;
virtual void readonlyAttributeChanged() OVERRIDE;
virtual void handleBlurEvent() OVERRIDE;
private:
virtual bool isTextField() const OVERRIDE;
virtual bool valueMissing(const String&) const OVERRIDE;
virtual void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) OVERRIDE;
virtual void forwardEvent(Event*) OVERRIDE;
virtual bool shouldSubmitImplicitly(Event*) OVERRIDE;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) const OVERRIDE;
virtual bool shouldUseInputMethod() const OVERRIDE;
virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavior) OVERRIDE;
virtual String sanitizeValue(const String&) const OVERRIDE;
virtual bool shouldRespectListAttribute() OVERRIDE;
virtual HTMLElement* placeholderElement() const OVERRIDE;
virtual void updatePlaceholderText() OVERRIDE;
virtual bool appendFormData(FormDataList&, bool multipart) const OVERRIDE;
RefPtr<HTMLElement> m_container;
RefPtr<HTMLElement> m_innerBlock;
RefPtr<HTMLElement> m_innerText;
RefPtr<HTMLElement> m_placeholder;
RefPtr<SpinButtonElement> m_innerSpinButton;
#if ENABLE(INPUT_SPEECH)
RefPtr<HTMLElement> m_speechButton;
#endif
};
}
#endif // TextFieldInputType_h