| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/html/shadow/SpinButtonElement.h" | 35 #include "core/html/shadow/SpinButtonElement.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class FormDataList; | 39 class FormDataList; |
| 40 | 40 |
| 41 // The class represents types of which UI contain text fields. | 41 // The class represents types of which UI contain text fields. |
| 42 // It supports not only the types for BaseTextInputType but also type=number. | 42 // It supports not only the types for BaseTextInputType but also type=number. |
| 43 class TextFieldInputType : public InputType, protected SpinButtonElement::SpinBu
ttonOwner { | 43 class TextFieldInputType : public InputType, protected SpinButtonElement::SpinBu
ttonOwner { |
| 44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TextFieldInputType); | 44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TextFieldInputType); |
| 45 public: |
| 46 virtual void trace(Visitor* visitor) OVERRIDE { InputType::trace(visitor); } |
| 47 |
| 45 protected: | 48 protected: |
| 46 TextFieldInputType(HTMLInputElement&); | 49 TextFieldInputType(HTMLInputElement&); |
| 47 virtual ~TextFieldInputType(); | 50 virtual ~TextFieldInputType(); |
| 48 virtual bool canSetSuggestedValue() OVERRIDE; | 51 virtual bool canSetSuggestedValue() OVERRIDE; |
| 49 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; | 52 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; |
| 50 void handleKeydownEventForSpinButton(KeyboardEvent*); | 53 void handleKeydownEventForSpinButton(KeyboardEvent*); |
| 51 | 54 |
| 52 protected: | |
| 53 virtual bool needsContainer() const { return false; } | 55 virtual bool needsContainer() const { return false; } |
| 54 bool shouldHaveSpinButton() const; | 56 bool shouldHaveSpinButton() const; |
| 55 virtual void createShadowSubtree() OVERRIDE; | 57 virtual void createShadowSubtree() OVERRIDE; |
| 56 virtual void destroyShadowSubtree() OVERRIDE; | 58 virtual void destroyShadowSubtree() OVERRIDE; |
| 57 virtual void attributeChanged() OVERRIDE; | 59 virtual void attributeChanged() OVERRIDE; |
| 58 virtual void disabledAttributeChanged() OVERRIDE; | 60 virtual void disabledAttributeChanged() OVERRIDE; |
| 59 virtual void readonlyAttributeChanged() OVERRIDE; | 61 virtual void readonlyAttributeChanged() OVERRIDE; |
| 60 virtual bool supportsReadOnly() const OVERRIDE; | 62 virtual bool supportsReadOnly() const OVERRIDE; |
| 61 virtual void handleFocusEvent(Element* oldFocusedNode, FocusType) OVERRIDE F
INAL; | 63 virtual void handleFocusEvent(Element* oldFocusedNode, FocusType) OVERRIDE F
INAL; |
| 62 virtual void handleBlurEvent() OVERRIDE FINAL; | 64 virtual void handleBlurEvent() OVERRIDE FINAL; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 virtual void spinButtonStepDown() OVERRIDE FINAL; | 97 virtual void spinButtonStepDown() OVERRIDE FINAL; |
| 96 virtual void spinButtonStepUp() OVERRIDE FINAL; | 98 virtual void spinButtonStepUp() OVERRIDE FINAL; |
| 97 virtual void spinButtonDidReleaseMouseCapture(SpinButtonElement::EventDispat
ch) OVERRIDE FINAL; | 99 virtual void spinButtonDidReleaseMouseCapture(SpinButtonElement::EventDispat
ch) OVERRIDE FINAL; |
| 98 | 100 |
| 99 SpinButtonElement* spinButtonElement() const; | 101 SpinButtonElement* spinButtonElement() const; |
| 100 }; | 102 }; |
| 101 | 103 |
| 102 } // namespace WebCore | 104 } // namespace WebCore |
| 103 | 105 |
| 104 #endif // TextFieldInputType_h | 106 #endif // TextFieldInputType_h |
| OLD | NEW |