OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 void forwardEvent(Event*); | 72 void forwardEvent(Event*); |
73 | 73 |
74 DECLARE_VIRTUAL_TRACE(); | 74 DECLARE_VIRTUAL_TRACE(); |
75 | 75 |
76 private: | 76 private: |
77 SpinButtonElement(Document&, SpinButtonOwner&); | 77 SpinButtonElement(Document&, SpinButtonOwner&); |
78 | 78 |
79 void detachLayoutTree(const AttachContext&) override; | 79 void detachLayoutTree(const AttachContext&) override; |
80 bool isSpinButtonElement() const override { return true; } | 80 bool isSpinButtonElement() const override { return true; } |
81 bool isDisabledFormControl() const override { return shadowHost() && shadowH
ost()->isDisabledFormControl(); } | 81 bool isDisabledFormControl() const override { return ownerShadowHost() && ow
nerShadowHost()->isDisabledFormControl(); } |
82 bool matchesReadOnlyPseudoClass() const override; | 82 bool matchesReadOnlyPseudoClass() const override; |
83 bool matchesReadWritePseudoClass() const override; | 83 bool matchesReadWritePseudoClass() const override; |
84 void defaultEventHandler(Event*) override; | 84 void defaultEventHandler(Event*) override; |
85 void willOpenPopup() override; | 85 void willOpenPopup() override; |
86 void doStepAction(int); | 86 void doStepAction(int); |
87 void startRepeatingTimer(); | 87 void startRepeatingTimer(); |
88 void stopRepeatingTimer(); | 88 void stopRepeatingTimer(); |
89 void repeatingTimerFired(TimerBase*); | 89 void repeatingTimerFired(TimerBase*); |
90 void setHovered(bool = true) override; | 90 void setHovered(bool = true) override; |
91 bool shouldRespondToMouseEvents(); | 91 bool shouldRespondToMouseEvents(); |
92 bool isMouseFocusable() const override { return false; } | 92 bool isMouseFocusable() const override { return false; } |
93 | 93 |
94 Member<SpinButtonOwner> m_spinButtonOwner; | 94 Member<SpinButtonOwner> m_spinButtonOwner; |
95 bool m_capturing; | 95 bool m_capturing; |
96 UpDownState m_upDownState; | 96 UpDownState m_upDownState; |
97 UpDownState m_pressStartingState; | 97 UpDownState m_pressStartingState; |
98 Timer<SpinButtonElement> m_repeatingTimer; | 98 Timer<SpinButtonElement> m_repeatingTimer; |
99 }; | 99 }; |
100 | 100 |
101 DEFINE_TYPE_CASTS(SpinButtonElement, Node, node, toElement(node)->isSpinButtonEl
ement(), toElement(node).isSpinButtonElement()); | 101 DEFINE_TYPE_CASTS(SpinButtonElement, Node, node, toElement(node)->isSpinButtonEl
ement(), toElement(node).isSpinButtonElement()); |
102 | 102 |
103 } // namespace blink | 103 } // namespace blink |
104 | 104 |
105 #endif | 105 #endif |
OLD | NEW |