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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 virtual bool shouldSpinButtonRespondToWheelEvents() = 0; | 53 virtual bool shouldSpinButtonRespondToWheelEvents() = 0; |
54 virtual void spinButtonDidReleaseMouseCapture(EventDispatch) = 0; | 54 virtual void spinButtonDidReleaseMouseCapture(EventDispatch) = 0; |
55 virtual void spinButtonStepDown() = 0; | 55 virtual void spinButtonStepDown() = 0; |
56 virtual void spinButtonStepUp() = 0; | 56 virtual void spinButtonStepUp() = 0; |
57 }; | 57 }; |
58 | 58 |
59 // The owner of SpinButtonElement must call removeSpinButtonOwner | 59 // The owner of SpinButtonElement must call removeSpinButtonOwner |
60 // because SpinButtonElement can be outlive SpinButtonOwner | 60 // because SpinButtonElement can be outlive SpinButtonOwner |
61 // implementation, e.g. during event handling. | 61 // implementation, e.g. during event handling. |
62 static PassRefPtrWillBeRawPtr<SpinButtonElement> create(Document&, SpinButto
nOwner&); | 62 static PassRefPtrWillBeRawPtr<SpinButtonElement> create(Document&, SpinButto
nOwner&); |
63 UpDownState upDownState() const { return m_upDownState; } | 63 UpDownState getUpDownState() const { return m_upDownState; } |
64 void releaseCapture(EventDispatch = EventDispatchAllowed); | 64 void releaseCapture(EventDispatch = EventDispatchAllowed); |
65 void removeSpinButtonOwner() { m_spinButtonOwner = nullptr; } | 65 void removeSpinButtonOwner() { m_spinButtonOwner = nullptr; } |
66 | 66 |
67 void step(int amount); | 67 void step(int amount); |
68 | 68 |
69 bool willRespondToMouseMoveEvents() override; | 69 bool willRespondToMouseMoveEvents() override; |
70 bool willRespondToMouseClickEvents() override; | 70 bool willRespondToMouseClickEvents() override; |
71 | 71 |
72 void forwardEvent(Event*); | 72 void forwardEvent(Event*); |
73 | 73 |
(...skipping 22 matching lines...) Expand all Loading... |
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 |