| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 int MouseRelatedEvent::layerY() | 178 int MouseRelatedEvent::layerY() |
| 179 { | 179 { |
| 180 if (!m_hasCachedRelativePosition) | 180 if (!m_hasCachedRelativePosition) |
| 181 computeRelativePosition(); | 181 computeRelativePosition(); |
| 182 return m_layerLocation.y(); | 182 return m_layerLocation.y(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 int MouseRelatedEvent::offsetX() | 185 int MouseRelatedEvent::offsetX() |
| 186 { | 186 { |
| 187 if (isSimulated()) |
| 188 return 0; |
| 187 if (!m_hasCachedRelativePosition) | 189 if (!m_hasCachedRelativePosition) |
| 188 computeRelativePosition(); | 190 computeRelativePosition(); |
| 189 return roundToInt(m_offsetLocation.x()); | 191 return roundToInt(m_offsetLocation.x()); |
| 190 } | 192 } |
| 191 | 193 |
| 192 int MouseRelatedEvent::offsetY() | 194 int MouseRelatedEvent::offsetY() |
| 193 { | 195 { |
| 196 if (isSimulated()) |
| 197 return 0; |
| 194 if (!m_hasCachedRelativePosition) | 198 if (!m_hasCachedRelativePosition) |
| 195 computeRelativePosition(); | 199 computeRelativePosition(); |
| 196 return roundToInt(m_offsetLocation.y()); | 200 return roundToInt(m_offsetLocation.y()); |
| 197 } | 201 } |
| 198 | 202 |
| 199 int MouseRelatedEvent::pageX() const | 203 int MouseRelatedEvent::pageX() const |
| 200 { | 204 { |
| 201 return m_pageLocation.x(); | 205 return m_pageLocation.x(); |
| 202 } | 206 } |
| 203 | 207 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 219 // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events
.html>. | 223 // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events
.html>. |
| 220 return m_clientLocation.y(); | 224 return m_clientLocation.y(); |
| 221 } | 225 } |
| 222 | 226 |
| 223 void MouseRelatedEvent::trace(Visitor* visitor) | 227 void MouseRelatedEvent::trace(Visitor* visitor) |
| 224 { | 228 { |
| 225 UIEventWithKeyState::trace(visitor); | 229 UIEventWithKeyState::trace(visitor); |
| 226 } | 230 } |
| 227 | 231 |
| 228 } // namespace WebCore | 232 } // namespace WebCore |
| OLD | NEW |