| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3204 } | 3204 } |
| 3205 | 3205 |
| 3206 static bool exactlyOneBitSet(DragSourceAction n) | 3206 static bool exactlyOneBitSet(DragSourceAction n) |
| 3207 { | 3207 { |
| 3208 return n && !(n & (n - 1)); | 3208 return n && !(n & (n - 1)); |
| 3209 } | 3209 } |
| 3210 | 3210 |
| 3211 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
agHysteresis checkDragHysteresis) | 3211 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
agHysteresis checkDragHysteresis) |
| 3212 { | 3212 { |
| 3213 // Callers must protect the reference to FrameView, since this function may
dispatch DOM | 3213 // Callers must protect the reference to FrameView, since this function may
dispatch DOM |
| 3214 // events, causing Frame/FrameView to go away. | 3214 // events, causing page/FrameView to go away. |
| 3215 ASSERT(m_frame); | 3215 ASSERT(m_frame); |
| 3216 ASSERT(m_frame->view()); | 3216 ASSERT(m_frame->view()); |
| 3217 if (!m_frame->page()) | 3217 if (!m_frame->page()) |
| 3218 return false; | 3218 return false; |
| 3219 | 3219 |
| 3220 if (event.event().button() != LeftButton || event.event().type() != Platform
Event::MouseMoved) { | 3220 if (event.event().button() != LeftButton || event.event().type() != Platform
Event::MouseMoved) { |
| 3221 // If we allowed the other side of the bridge to handle a drag | 3221 // If we allowed the other side of the bridge to handle a drag |
| 3222 // last time, then m_mousePressed might still be set. So we | 3222 // last time, then m_mousePressed might still be set. So we |
| 3223 // clear it now to make sure the next move after a drag | 3223 // clear it now to make sure the next move after a drag |
| 3224 // doesn't look like a drag. | 3224 // doesn't look like a drag. |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3869 unsigned EventHandler::accessKeyModifiers() | 3869 unsigned EventHandler::accessKeyModifiers() |
| 3870 { | 3870 { |
| 3871 #if OS(MACOSX) | 3871 #if OS(MACOSX) |
| 3872 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3872 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3873 #else | 3873 #else |
| 3874 return PlatformEvent::AltKey; | 3874 return PlatformEvent::AltKey; |
| 3875 #endif | 3875 #endif |
| 3876 } | 3876 } |
| 3877 | 3877 |
| 3878 } // namespace WebCore | 3878 } // namespace WebCore |
| OLD | NEW |