Chromium Code Reviews| 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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1791 | 1791 |
| 1792 HitTestRequest request(HitTestRequest::ReadOnly); | 1792 HitTestRequest request(HitTestRequest::ReadOnly); |
| 1793 HitTestResult result(request, vPoint); | 1793 HitTestResult result(request, vPoint); |
| 1794 doc->layoutView()->hitTest(result); | 1794 doc->layoutView()->hitTest(result); |
| 1795 | 1795 |
| 1796 Node* node = result.innerNode(); | 1796 Node* node = result.innerNode(); |
| 1797 // Wheel events should not dispatch to text nodes. | 1797 // Wheel events should not dispatch to text nodes. |
| 1798 if (node && node->isTextNode()) | 1798 if (node && node->isTextNode()) |
| 1799 node = FlatTreeTraversal::parent(*node); | 1799 node = FlatTreeTraversal::parent(*node); |
| 1800 | 1800 |
| 1801 // If we're over a scrollbar, scroll the document. | |
|
jbroman
2016/03/16 15:41:00
Just the (root?) frame scrollbars, right? Presumab
bokan
2016/03/16 18:01:45
Yah, if it's over an overflow div innerNode will h
| |
| 1802 if (!node && result.scrollbar()) | |
| 1803 node = doc->documentElement(); | |
| 1804 | |
| 1801 bool sendDOMEvent = true; | 1805 bool sendDOMEvent = true; |
| 1802 LocalFrame* subframe = subframeForTargetNode(node); | 1806 LocalFrame* subframe = subframeForTargetNode(node); |
| 1803 if (subframe) { | 1807 if (subframe) { |
| 1804 WebInputEventResult result = subframe->eventHandler().handleWheelEvent(e vent); | 1808 WebInputEventResult result = subframe->eventHandler().handleWheelEvent(e vent); |
| 1805 if (result != WebInputEventResult::NotHandled) { | 1809 if (result != WebInputEventResult::NotHandled) { |
| 1806 setFrameWasScrolledByUser(); | 1810 setFrameWasScrolledByUser(); |
| 1807 return result; | 1811 return result; |
| 1808 } | 1812 } |
| 1809 // TODO(dtapuska): Remove this once wheel gesture scroll has | 1813 // TODO(dtapuska): Remove this once wheel gesture scroll has |
| 1810 // been enabled everywhere; as we can just return early. | 1814 // been enabled everywhere; as we can just return early. |
| (...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3969 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 3973 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 3970 { | 3974 { |
| 3971 #if OS(MACOSX) | 3975 #if OS(MACOSX) |
| 3972 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); | 3976 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); |
| 3973 #else | 3977 #else |
| 3974 return PlatformEvent::AltKey; | 3978 return PlatformEvent::AltKey; |
| 3975 #endif | 3979 #endif |
| 3976 } | 3980 } |
| 3977 | 3981 |
| 3978 } // namespace blink | 3982 } // namespace blink |
| OLD | NEW |