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 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 const bool wasLastScrollBar = mev.scrollbar() == m_lastScrollbarUnderMou
se.get(); | 1281 const bool wasLastScrollBar = mev.scrollbar() == m_lastScrollbarUnderMou
se.get(); |
1282 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active
| HitTestRequest::ConfusingAndOftenMisusedDisallowShadowContent); | 1282 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active
| HitTestRequest::ConfusingAndOftenMisusedDisallowShadowContent); |
1283 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mou
seEvent); | 1283 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mou
seEvent); |
1284 if (wasLastScrollBar && mev.scrollbar() != m_lastScrollbarUnderMouse.get
()) | 1284 if (wasLastScrollBar && mev.scrollbar() != m_lastScrollbarUnderMouse.get
()) |
1285 m_lastScrollbarUnderMouse = nullptr; | 1285 m_lastScrollbarUnderMouse = nullptr; |
1286 } | 1286 } |
1287 | 1287 |
1288 if (swallowEvent) { | 1288 if (swallowEvent) { |
1289 // scrollbars should get events anyway, even disabled controls might be
scrollable | 1289 // scrollbars should get events anyway, even disabled controls might be
scrollable |
1290 Scrollbar* scrollbar = mev.scrollbar(); | 1290 Scrollbar* scrollbar = mev.scrollbar(); |
| 1291 if (!scrollbar) { |
| 1292 FrameView* view = m_frame->view(); |
| 1293 scrollbar = view ? view->scrollbarAtPoint(mouseEvent.position()) : 0
; |
| 1294 } |
1291 | 1295 |
1292 updateLastScrollbarUnderMouse(scrollbar, true); | 1296 updateLastScrollbarUnderMouse(scrollbar, true); |
1293 | 1297 |
1294 if (scrollbar) | 1298 if (scrollbar) |
1295 passMousePressEventToScrollbar(mev, scrollbar); | 1299 passMousePressEventToScrollbar(mev, scrollbar); |
1296 } else { | 1300 } else { |
1297 if (shouldRefetchEventTarget(mev)) { | 1301 if (shouldRefetchEventTarget(mev)) { |
1298 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Ac
tive | HitTestRequest::ConfusingAndOftenMisusedDisallowShadowContent); | 1302 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Ac
tive | HitTestRequest::ConfusingAndOftenMisusedDisallowShadowContent); |
1299 mev = m_frame->document()->prepareMouseEvent(request, documentPoint,
mouseEvent); | 1303 mev = m_frame->document()->prepareMouseEvent(request, documentPoint,
mouseEvent); |
1300 } | 1304 } |
(...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3731 unsigned EventHandler::accessKeyModifiers() | 3735 unsigned EventHandler::accessKeyModifiers() |
3732 { | 3736 { |
3733 #if OS(MACOSX) | 3737 #if OS(MACOSX) |
3734 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3738 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3735 #else | 3739 #else |
3736 return PlatformEvent::AltKey; | 3740 return PlatformEvent::AltKey; |
3737 #endif | 3741 #endif |
3738 } | 3742 } |
3739 | 3743 |
3740 } // namespace WebCore | 3744 } // namespace WebCore |
OLD | NEW |