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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual bool shouldSpinButtonRespondToMouseEvents() = 0; | 51 virtual bool shouldSpinButtonRespondToMouseEvents() = 0; |
52 virtual bool shouldSpinButtonRespondToWheelEvents() = 0; | 52 virtual bool shouldSpinButtonRespondToWheelEvents() = 0; |
53 virtual void spinButtonDidReleaseMouseCapture(EventDispatch) = 0; | 53 virtual void spinButtonDidReleaseMouseCapture(EventDispatch) = 0; |
54 virtual void spinButtonStepDown() = 0; | 54 virtual void spinButtonStepDown() = 0; |
55 virtual void spinButtonStepUp() = 0; | 55 virtual void spinButtonStepUp() = 0; |
56 }; | 56 }; |
57 | 57 |
58 // The owner of SpinButtonElement must call removeSpinButtonOwner | 58 // The owner of SpinButtonElement must call removeSpinButtonOwner |
59 // because SpinButtonElement can be outlive SpinButtonOwner | 59 // because SpinButtonElement can be outlive SpinButtonOwner |
60 // implementation, e.g. during event handling. | 60 // implementation, e.g. during event handling. |
61 static PassRefPtr<SpinButtonElement> create(Document&, SpinButtonOwner&); | 61 static PassRefPtrWillBeRawPtr<SpinButtonElement> create(Document&, SpinButto
nOwner&); |
62 UpDownState upDownState() const { return m_upDownState; } | 62 UpDownState upDownState() const { return m_upDownState; } |
63 void releaseCapture(EventDispatch = EventDispatchAllowed); | 63 void releaseCapture(EventDispatch = EventDispatchAllowed); |
64 void removeSpinButtonOwner() { m_spinButtonOwner = nullptr; } | 64 void removeSpinButtonOwner() { m_spinButtonOwner = nullptr; } |
65 | 65 |
66 void step(int amount); | 66 void step(int amount); |
67 | 67 |
68 virtual bool willRespondToMouseMoveEvents() OVERRIDE; | 68 virtual bool willRespondToMouseMoveEvents() OVERRIDE; |
69 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 69 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
70 | 70 |
71 void forwardEvent(Event*); | 71 void forwardEvent(Event*); |
(...skipping 23 matching lines...) Expand all Loading... |
95 UpDownState m_upDownState; | 95 UpDownState m_upDownState; |
96 UpDownState m_pressStartingState; | 96 UpDownState m_pressStartingState; |
97 Timer<SpinButtonElement> m_repeatingTimer; | 97 Timer<SpinButtonElement> m_repeatingTimer; |
98 }; | 98 }; |
99 | 99 |
100 DEFINE_TYPE_CASTS(SpinButtonElement, Node, node, toElement(node)->isSpinButtonEl
ement(), toElement(node).isSpinButtonElement()); | 100 DEFINE_TYPE_CASTS(SpinButtonElement, Node, node, toElement(node)->isSpinButtonEl
ement(), toElement(node).isSpinButtonElement()); |
101 | 101 |
102 } // namespace | 102 } // namespace |
103 | 103 |
104 #endif | 104 #endif |
OLD | NEW |