| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Google Inc. | 3 * Copyright (C) 2008 Google Inc. |
| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return false; | 113 return false; |
| 114 } | 114 } |
| 115 // Make sure MSVC doesn't complain that not all control paths return a value. | 115 // Make sure MSVC doesn't complain that not all control paths return a value. |
| 116 NOTREACHED(); | 116 NOTREACHED(); |
| 117 return false; | 117 return false; |
| 118 } | 118 } |
| 119 #endif // DCHECK_IS_ON() | 119 #endif // DCHECK_IS_ON() |
| 120 | 120 |
| 121 static WebMouseEvent createMouseEvent(DragData* dragData) { | 121 static WebMouseEvent createMouseEvent(DragData* dragData) { |
| 122 WebMouseEvent result( | 122 WebMouseEvent result( |
| 123 WebInputEvent::MouseMove, WebFloatPoint(dragData->clientPosition().x(), | 123 WebInputEvent::MouseMove, |
| 124 dragData->clientPosition().y()), | 124 WebFloatPoint(dragData->clientPosition().x(), |
| 125 dragData->clientPosition().y()), |
| 125 WebFloatPoint(dragData->globalPosition().x(), | 126 WebFloatPoint(dragData->globalPosition().x(), |
| 126 dragData->globalPosition().y()), | 127 dragData->globalPosition().y()), |
| 127 WebPointerProperties::Button::Left, 0, | 128 WebPointerProperties::Button::Left, 0, |
| 128 static_cast<WebInputEvent::Modifiers>(dragData->modifiers()), | 129 static_cast<WebInputEvent::Modifiers>(dragData->modifiers()), |
| 129 TimeTicks::Now().InSeconds()); | 130 TimeTicks::Now().InSeconds()); |
| 130 // TODO(dtapuska): Really we should chnage DragData to store the viewport | 131 // TODO(dtapuska): Really we should chnage DragData to store the viewport |
| 131 // coordinates and scale. | 132 // coordinates and scale. |
| 132 result.setFrameScale(1); | 133 result.setFrameScale(1); |
| 133 return result; | 134 return result; |
| 134 } | 135 } |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 | 1238 |
| 1238 DEFINE_TRACE(DragController) { | 1239 DEFINE_TRACE(DragController) { |
| 1239 visitor->trace(m_page); | 1240 visitor->trace(m_page); |
| 1240 visitor->trace(m_documentUnderMouse); | 1241 visitor->trace(m_documentUnderMouse); |
| 1241 visitor->trace(m_dragInitiator); | 1242 visitor->trace(m_dragInitiator); |
| 1242 visitor->trace(m_dragState); | 1243 visitor->trace(m_dragState); |
| 1243 visitor->trace(m_fileInputElementUnderMouse); | 1244 visitor->trace(m_fileInputElementUnderMouse); |
| 1244 } | 1245 } |
| 1245 | 1246 |
| 1246 } // namespace blink | 1247 } // namespace blink |
| OLD | NEW |