OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 else if (m_relatedTarget.get() && event->isFocusEvent()) | 86 else if (m_relatedTarget.get() && event->isFocusEvent()) |
87 toFocusEvent(event)->setRelatedTarget(m_relatedTarget.get()); | 87 toFocusEvent(event)->setRelatedTarget(m_relatedTarget.get()); |
88 EventContext::handleLocalEvents(event); | 88 EventContext::handleLocalEvents(event); |
89 } | 89 } |
90 | 90 |
91 bool MouseOrFocusEventContext::isMouseOrFocusEventContext() const | 91 bool MouseOrFocusEventContext::isMouseOrFocusEventContext() const |
92 { | 92 { |
93 return true; | 93 return true; |
94 } | 94 } |
95 | 95 |
| 96 #if ENABLE(TOUCH_EVENTS) |
96 TouchEventContext::TouchEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarg
et> currentTarget, PassRefPtr<EventTarget> target) | 97 TouchEventContext::TouchEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarg
et> currentTarget, PassRefPtr<EventTarget> target) |
97 : EventContext(node, currentTarget, target) | 98 : EventContext(node, currentTarget, target) |
98 , m_touches(TouchList::create()) | 99 , m_touches(TouchList::create()) |
99 , m_targetTouches(TouchList::create()) | 100 , m_targetTouches(TouchList::create()) |
100 , m_changedTouches(TouchList::create()) | 101 , m_changedTouches(TouchList::create()) |
101 { | 102 { |
102 } | 103 } |
103 | 104 |
104 TouchEventContext::~TouchEventContext() | 105 TouchEventContext::~TouchEventContext() |
105 { | 106 { |
(...skipping 20 matching lines...) Expand all Loading... |
126 } | 127 } |
127 | 128 |
128 #ifndef NDEBUG | 129 #ifndef NDEBUG |
129 void TouchEventContext::checkReachability(TouchList* touchList) const | 130 void TouchEventContext::checkReachability(TouchList* touchList) const |
130 { | 131 { |
131 for (size_t i = 0; i < touchList->length(); ++i) | 132 for (size_t i = 0; i < touchList->length(); ++i) |
132 ASSERT(isReachable(touchList->item(i)->target()->toNode())); | 133 ASSERT(isReachable(touchList->item(i)->target()->toNode())); |
133 } | 134 } |
134 #endif | 135 #endif |
135 | 136 |
| 137 #endif // ENABLE(TOUCH_EVENTS) |
| 138 |
136 } | 139 } |
OLD | NEW |