| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 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: | 45 public: |
| 46 virtual void trace(Visitor* visitor) OVERRIDE { InputType::trace(visitor); } | 46 virtual void trace(Visitor* visitor) override { InputType::trace(visitor); } |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 TextFieldInputType(HTMLInputElement&); | 49 TextFieldInputType(HTMLInputElement&); |
| 50 virtual ~TextFieldInputType(); | 50 virtual ~TextFieldInputType(); |
| 51 virtual bool canSetSuggestedValue() OVERRIDE; | 51 virtual bool canSetSuggestedValue() override; |
| 52 virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE; | 52 virtual void handleKeydownEvent(KeyboardEvent*) override; |
| 53 void handleKeydownEventForSpinButton(KeyboardEvent*); | 53 void handleKeydownEventForSpinButton(KeyboardEvent*); |
| 54 | 54 |
| 55 virtual bool needsContainer() const { return false; } | 55 virtual bool needsContainer() const { return false; } |
| 56 bool shouldHaveSpinButton() const; | 56 bool shouldHaveSpinButton() const; |
| 57 virtual void createShadowSubtree() OVERRIDE; | 57 virtual void createShadowSubtree() override; |
| 58 virtual void destroyShadowSubtree() OVERRIDE; | 58 virtual void destroyShadowSubtree() override; |
| 59 virtual void attributeChanged() OVERRIDE; | 59 virtual void attributeChanged() override; |
| 60 virtual void disabledAttributeChanged() OVERRIDE; | 60 virtual void disabledAttributeChanged() override; |
| 61 virtual void readonlyAttributeChanged() OVERRIDE; | 61 virtual void readonlyAttributeChanged() override; |
| 62 virtual bool supportsReadOnly() const OVERRIDE; | 62 virtual bool supportsReadOnly() const override; |
| 63 virtual void handleFocusEvent(Element* oldFocusedNode, FocusType) OVERRIDE F
INAL; | 63 virtual void handleFocusEvent(Element* oldFocusedNode, FocusType) override f
inal; |
| 64 virtual void handleBlurEvent() OVERRIDE FINAL; | 64 virtual void handleBlurEvent() override final; |
| 65 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) OVERRIDE; | 65 virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavi
or) override; |
| 66 virtual void updateView() OVERRIDE; | 66 virtual void updateView() override; |
| 67 | 67 |
| 68 virtual String convertFromVisibleValue(const String&) const; | 68 virtual String convertFromVisibleValue(const String&) const; |
| 69 enum ValueChangeState { | 69 enum ValueChangeState { |
| 70 ValueChangeStateNone, | 70 ValueChangeStateNone, |
| 71 ValueChangeStateChanged | 71 ValueChangeStateChanged |
| 72 }; | 72 }; |
| 73 virtual void didSetValueByUserEdit(ValueChangeState); | 73 virtual void didSetValueByUserEdit(ValueChangeState); |
| 74 | 74 |
| 75 Element* containerElement() const; | 75 Element* containerElement() const; |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE FINAL; | 78 virtual bool shouldShowFocusRingOnMouseFocus() const override final; |
| 79 virtual bool isTextField() const OVERRIDE FINAL; | 79 virtual bool isTextField() const override final; |
| 80 virtual bool valueMissing(const String&) const OVERRIDE; | 80 virtual bool valueMissing(const String&) const override; |
| 81 virtual void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) OVERRID
E; | 81 virtual void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) overrid
e; |
| 82 virtual void forwardEvent(Event*) OVERRIDE FINAL; | 82 virtual void forwardEvent(Event*) override final; |
| 83 virtual bool shouldSubmitImplicitly(Event*) OVERRIDE FINAL; | 83 virtual bool shouldSubmitImplicitly(Event*) override final; |
| 84 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; | 84 virtual RenderObject* createRenderer(RenderStyle*) const override; |
| 85 virtual String sanitizeValue(const String&) const OVERRIDE; | 85 virtual String sanitizeValue(const String&) const override; |
| 86 virtual bool shouldRespectListAttribute() OVERRIDE; | 86 virtual bool shouldRespectListAttribute() override; |
| 87 virtual void listAttributeTargetChanged() OVERRIDE; | 87 virtual void listAttributeTargetChanged() override; |
| 88 virtual void updatePlaceholderText() OVERRIDE FINAL; | 88 virtual void updatePlaceholderText() override final; |
| 89 virtual bool appendFormData(FormDataList&, bool multipart) const OVERRIDE; | 89 virtual bool appendFormData(FormDataList&, bool multipart) const override; |
| 90 virtual void subtreeHasChanged() OVERRIDE FINAL; | 90 virtual void subtreeHasChanged() override final; |
| 91 | 91 |
| 92 // SpinButtonElement::SpinButtonOwner functions. | 92 // SpinButtonElement::SpinButtonOwner functions. |
| 93 virtual void focusAndSelectSpinButtonOwner() OVERRIDE FINAL; | 93 virtual void focusAndSelectSpinButtonOwner() override final; |
| 94 virtual bool shouldSpinButtonRespondToMouseEvents() OVERRIDE FINAL; | 94 virtual bool shouldSpinButtonRespondToMouseEvents() override final; |
| 95 virtual bool shouldSpinButtonRespondToWheelEvents() OVERRIDE FINAL; | 95 virtual bool shouldSpinButtonRespondToWheelEvents() override final; |
| 96 virtual void spinButtonStepDown() OVERRIDE FINAL; | 96 virtual void spinButtonStepDown() override final; |
| 97 virtual void spinButtonStepUp() OVERRIDE FINAL; | 97 virtual void spinButtonStepUp() override final; |
| 98 virtual void spinButtonDidReleaseMouseCapture(SpinButtonElement::EventDispat
ch) OVERRIDE FINAL; | 98 virtual void spinButtonDidReleaseMouseCapture(SpinButtonElement::EventDispat
ch) override final; |
| 99 | 99 |
| 100 SpinButtonElement* spinButtonElement() const; | 100 SpinButtonElement* spinButtonElement() const; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace blink | 103 } // namespace blink |
| 104 | 104 |
| 105 #endif // TextFieldInputType_h | 105 #endif // TextFieldInputType_h |
| OLD | NEW |