| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void removeEventHandler() { m_fieldOwner = nullptr; } | 70 void removeEventHandler() { m_fieldOwner = nullptr; } |
| 71 void setDisabled(); | 71 void setDisabled(); |
| 72 virtual void setEmptyValue(EventBehavior = DispatchNoEvent) = 0; | 72 virtual void setEmptyValue(EventBehavior = DispatchNoEvent) = 0; |
| 73 virtual void setValueAsDate(const DateComponents&) = 0; | 73 virtual void setValueAsDate(const DateComponents&) = 0; |
| 74 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) = 0; | 74 virtual void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) = 0; |
| 75 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) = 0; | 75 virtual void setValueAsInteger(int, EventBehavior = DispatchNoEvent) = 0; |
| 76 virtual void stepDown() = 0; | 76 virtual void stepDown() = 0; |
| 77 virtual void stepUp() = 0; | 77 virtual void stepUp() = 0; |
| 78 virtual String value() const = 0; | 78 virtual String value() const = 0; |
| 79 virtual String visibleValue() const = 0; | 79 virtual String visibleValue() const = 0; |
| 80 virtual void trace(Visitor*) override; | 80 DECLARE_VIRTUAL_TRACE(); |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 DateTimeFieldElement(Document&, FieldOwner&); | 83 DateTimeFieldElement(Document&, FieldOwner&); |
| 84 void focusOnNextField(); | 84 void focusOnNextField(); |
| 85 virtual void handleKeyboardEvent(KeyboardEvent*) = 0; | 85 virtual void handleKeyboardEvent(KeyboardEvent*) = 0; |
| 86 void initialize(const AtomicString& pseudo, const String& axHelpText, int ax
Minimum, int axMaximum); | 86 void initialize(const AtomicString& pseudo, const String& axHelpText, int ax
Minimum, int axMaximum); |
| 87 Locale& localeForOwner() const; | 87 Locale& localeForOwner() const; |
| 88 AtomicString localeIdentifier() const; | 88 AtomicString localeIdentifier() const; |
| 89 void updateVisibleValue(EventBehavior); | 89 void updateVisibleValue(EventBehavior); |
| 90 virtual int valueAsInteger() const = 0; | 90 virtual int valueAsInteger() const = 0; |
| 91 virtual int valueForARIAValueNow() const; | 91 virtual int valueForARIAValueNow() const; |
| 92 | 92 |
| 93 // Node functions. | 93 // Node functions. |
| 94 virtual void setFocus(bool) override; | 94 virtual void setFocus(bool) override; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 void defaultKeyboardEventHandler(KeyboardEvent*); | 97 void defaultKeyboardEventHandler(KeyboardEvent*); |
| 98 virtual bool isDateTimeFieldElement() const override final; | 98 virtual bool isDateTimeFieldElement() const override final; |
| 99 bool isFieldOwnerDisabled() const; | 99 bool isFieldOwnerDisabled() const; |
| 100 bool isFieldOwnerReadOnly() const; | 100 bool isFieldOwnerReadOnly() const; |
| 101 virtual bool supportsFocus() const override final; | 101 virtual bool supportsFocus() const override final; |
| 102 | 102 |
| 103 RawPtrWillBeMember<FieldOwner> m_fieldOwner; | 103 RawPtrWillBeMember<FieldOwner> m_fieldOwner; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace blink | 106 } // namespace blink |
| 107 | 107 |
| 108 #endif | 108 #endif |
| 109 #endif | 109 #endif |
| OLD | NEW |