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) | |
97 TouchEventContext::TouchEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarg
et> currentTarget, PassRefPtr<EventTarget> target) | 96 TouchEventContext::TouchEventContext(PassRefPtr<Node> node, PassRefPtr<EventTarg
et> currentTarget, PassRefPtr<EventTarget> target) |
98 : EventContext(node, currentTarget, target) | 97 : EventContext(node, currentTarget, target) |
99 , m_touches(TouchList::create()) | 98 , m_touches(TouchList::create()) |
100 , m_targetTouches(TouchList::create()) | 99 , m_targetTouches(TouchList::create()) |
101 , m_changedTouches(TouchList::create()) | 100 , m_changedTouches(TouchList::create()) |
102 { | 101 { |
103 } | 102 } |
104 | 103 |
105 TouchEventContext::~TouchEventContext() | 104 TouchEventContext::~TouchEventContext() |
106 { | 105 { |
(...skipping 20 matching lines...) Expand all Loading... |
127 } | 126 } |
128 | 127 |
129 #ifndef NDEBUG | 128 #ifndef NDEBUG |
130 void TouchEventContext::checkReachability(TouchList* touchList) const | 129 void TouchEventContext::checkReachability(TouchList* touchList) const |
131 { | 130 { |
132 for (size_t i = 0; i < touchList->length(); ++i) | 131 for (size_t i = 0; i < touchList->length(); ++i) |
133 ASSERT(isReachable(touchList->item(i)->target()->toNode())); | 132 ASSERT(isReachable(touchList->item(i)->target()->toNode())); |
134 } | 133 } |
135 #endif | 134 #endif |
136 | 135 |
137 #endif // ENABLE(TOUCH_EVENTS) | |
138 | |
139 } | 136 } |
OLD | NEW |