Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1804063002: Fix wheel scrolling over scrollbar not scrolling page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made test async Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 the frame scrollbar, scroll the document.
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/wheel-in-scrollbar-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698