OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class TextFieldInputType : public InputType, protected SpinButtonElement::SpinBu
ttonOwner { | 43 class TextFieldInputType : public InputType, protected SpinButtonElement::SpinBu
ttonOwner { |
44 protected: | 44 protected: |
45 TextFieldInputType(HTMLInputElement&); | 45 TextFieldInputType(HTMLInputElement&); |
46 virtual ~TextFieldInputType(); | 46 virtual ~TextFieldInputType(); |
47 virtual bool canSetSuggestedValue() OVERRIDE; | 47 virtual bool canSetSuggestedValue() OVERRIDE; |
48 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; | 48 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; |
49 void handleKeydownEventForSpinButton(KeyboardEvent*); | 49 void handleKeydownEventForSpinButton(KeyboardEvent*); |
50 | 50 |
51 protected: | 51 protected: |
52 virtual bool needsContainer() const; | 52 virtual bool needsContainer() const; |
53 virtual bool shouldHaveSpinButton() const; | 53 bool shouldHaveSpinButton() const; |
54 virtual void createShadowSubtree() OVERRIDE; | 54 virtual void createShadowSubtree() OVERRIDE; |
55 virtual void destroyShadowSubtree() OVERRIDE; | 55 virtual void destroyShadowSubtree() OVERRIDE; |
56 virtual void attributeChanged() OVERRIDE; | 56 virtual void attributeChanged() OVERRIDE; |
57 virtual void disabledAttributeChanged() OVERRIDE; | 57 virtual void disabledAttributeChanged() OVERRIDE; |
58 virtual void readonlyAttributeChanged() OVERRIDE; | 58 virtual void readonlyAttributeChanged() OVERRIDE; |
59 virtual bool supportsReadOnly() const OVERRIDE; | 59 virtual bool supportsReadOnly() const OVERRIDE; |
60 virtual void handleFocusEvent(Element* oldFocusedNode, FocusDirection) OVERR
IDE; | 60 virtual void handleFocusEvent(Element* oldFocusedNode, FocusDirection) OVERR
IDE FINAL; |
61 virtual void handleBlurEvent() OVERRIDE; | 61 virtual void handleBlurEvent() OVERRIDE FINAL; |
62 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) OVERRIDE; | 62 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) OVERRIDE; |
63 virtual void updateView() OVERRIDE; | 63 virtual void updateView() OVERRIDE; |
64 | 64 |
65 virtual String convertFromVisibleValue(const String&) const; | 65 virtual String convertFromVisibleValue(const String&) const; |
66 enum ValueChangeState { | 66 enum ValueChangeState { |
67 ValueChangeStateNone, | 67 ValueChangeStateNone, |
68 ValueChangeStateChanged | 68 ValueChangeStateChanged |
69 }; | 69 }; |
70 virtual void didSetValueByUserEdit(ValueChangeState); | 70 virtual void didSetValueByUserEdit(ValueChangeState); |
71 | 71 |
72 Element* containerElement() const; | 72 Element* containerElement() const; |
73 | 73 |
74 private: | 74 private: |
75 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE; | 75 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE FINAL; |
76 virtual bool isTextField() const OVERRIDE; | 76 virtual bool isTextField() const OVERRIDE FINAL; |
77 virtual bool valueMissing(const String&) const OVERRIDE; | 77 virtual bool valueMissing(const String&) const OVERRIDE; |
78 virtual void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) OVERRID
E; | 78 virtual void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) OVERRID
E; |
79 virtual void forwardEvent(Event*) OVERRIDE; | 79 virtual void forwardEvent(Event*) OVERRIDE FINAL; |
80 virtual bool shouldSubmitImplicitly(Event*) OVERRIDE; | 80 virtual bool shouldSubmitImplicitly(Event*) OVERRIDE FINAL; |
81 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; | 81 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; |
82 virtual bool shouldUseInputMethod() const OVERRIDE; | 82 virtual bool shouldUseInputMethod() const OVERRIDE; |
83 virtual String sanitizeValue(const String&) const OVERRIDE; | 83 virtual String sanitizeValue(const String&) const OVERRIDE; |
84 virtual bool shouldRespectListAttribute() OVERRIDE; | 84 virtual bool shouldRespectListAttribute() OVERRIDE; |
85 virtual void listAttributeTargetChanged() OVERRIDE; | 85 virtual void listAttributeTargetChanged() OVERRIDE; |
86 virtual void updatePlaceholderText() OVERRIDE; | 86 virtual void updatePlaceholderText() OVERRIDE FINAL; |
87 virtual bool appendFormData(FormDataList&, bool multipart) const OVERRIDE; | 87 virtual bool appendFormData(FormDataList&, bool multipart) const OVERRIDE; |
88 virtual void subtreeHasChanged() OVERRIDE; | 88 virtual void subtreeHasChanged() OVERRIDE FINAL; |
89 | 89 |
90 // SpinButtonElement::SpinButtonOwner functions. | 90 // SpinButtonElement::SpinButtonOwner functions. |
91 virtual void focusAndSelectSpinButtonOwner() OVERRIDE; | 91 virtual void focusAndSelectSpinButtonOwner() OVERRIDE FINAL; |
92 virtual bool shouldSpinButtonRespondToMouseEvents() OVERRIDE; | 92 virtual bool shouldSpinButtonRespondToMouseEvents() OVERRIDE FINAL; |
93 virtual bool shouldSpinButtonRespondToWheelEvents() OVERRIDE; | 93 virtual bool shouldSpinButtonRespondToWheelEvents() OVERRIDE FINAL; |
94 virtual void spinButtonStepDown() OVERRIDE; | 94 virtual void spinButtonStepDown() OVERRIDE FINAL; |
95 virtual void spinButtonStepUp() OVERRIDE; | 95 virtual void spinButtonStepUp() OVERRIDE FINAL; |
96 | 96 |
97 SpinButtonElement* spinButtonElement() const; | 97 SpinButtonElement* spinButtonElement() const; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace WebCore | 100 } // namespace WebCore |
101 | 101 |
102 #endif // TextFieldInputType_h | 102 #endif // TextFieldInputType_h |
OLD | NEW |