| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 WTF_MAKE_NONCOPYABLE(DateTimeFieldElement); | 42 WTF_MAKE_NONCOPYABLE(DateTimeFieldElement); |
| 43 | 43 |
| 44 public: | 44 public: |
| 45 enum EventBehavior { | 45 enum EventBehavior { |
| 46 DispatchNoEvent, | 46 DispatchNoEvent, |
| 47 DispatchEvent, | 47 DispatchEvent, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // FieldOwner implementer must call removeEventHandler when | 50 // FieldOwner implementer must call removeEventHandler when |
| 51 // it doesn't handle event, e.g. at destruction. | 51 // it doesn't handle event, e.g. at destruction. |
| 52 class FieldOwner : public WillBeGarbageCollectedMixin { | 52 class FieldOwner : public GarbageCollectedMixin { |
| 53 public: | 53 public: |
| 54 virtual ~FieldOwner(); | 54 virtual ~FieldOwner(); |
| 55 virtual void didBlurFromField() = 0; | 55 virtual void didBlurFromField() = 0; |
| 56 virtual void didFocusOnField() = 0; | 56 virtual void didFocusOnField() = 0; |
| 57 virtual void fieldValueChanged() = 0; | 57 virtual void fieldValueChanged() = 0; |
| 58 virtual bool focusOnNextField(const DateTimeFieldElement&) = 0; | 58 virtual bool focusOnNextField(const DateTimeFieldElement&) = 0; |
| 59 virtual bool focusOnPreviousField(const DateTimeFieldElement&) = 0; | 59 virtual bool focusOnPreviousField(const DateTimeFieldElement&) = 0; |
| 60 virtual bool isFieldOwnerDisabled() const = 0; | 60 virtual bool isFieldOwnerDisabled() const = 0; |
| 61 virtual bool isFieldOwnerReadOnly() const = 0; | 61 virtual bool isFieldOwnerReadOnly() const = 0; |
| 62 virtual AtomicString localeIdentifier() const = 0; | 62 virtual AtomicString localeIdentifier() const = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Node functions. | 96 // Node functions. |
| 97 void setFocus(bool) override; | 97 void setFocus(bool) override; |
| 98 | 98 |
| 99 private: | 99 private: |
| 100 void defaultKeyboardEventHandler(KeyboardEvent*); | 100 void defaultKeyboardEventHandler(KeyboardEvent*); |
| 101 bool isDateTimeFieldElement() const final; | 101 bool isDateTimeFieldElement() const final; |
| 102 bool isFieldOwnerDisabled() const; | 102 bool isFieldOwnerDisabled() const; |
| 103 bool isFieldOwnerReadOnly() const; | 103 bool isFieldOwnerReadOnly() const; |
| 104 bool supportsFocus() const final; | 104 bool supportsFocus() const final; |
| 105 | 105 |
| 106 RawPtrWillBeMember<FieldOwner> m_fieldOwner; | 106 Member<FieldOwner> m_fieldOwner; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| 110 | 110 |
| 111 #endif | 111 #endif |
| 112 #endif | 112 #endif |
| OLD | NEW |