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

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

Issue 1289753006: Fallback to root layer if hit-testing does not hit anything in iframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove "active" hack for wheel event hit-test & using document.documentElement.scrollTop for scroll… Created 5 years, 4 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
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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 return false; 1730 return false;
1731 1731
1732 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); 1732 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view());
1733 1733
1734 FrameView* view = m_frame->view(); 1734 FrameView* view = m_frame->view();
1735 if (!view) 1735 if (!view)
1736 return false; 1736 return false;
1737 1737
1738 LayoutPoint vPoint = view->rootFrameToContents(event.position()); 1738 LayoutPoint vPoint = view->rootFrameToContents(event.position());
1739 1739
1740 // Pass Active to ensure that hit-test result in current document if otherwi se empty 1740 HitTestRequest request(HitTestRequest::ReadOnly);
1741 // TODO(majidvp): Avoid using Active to trigger hit-testing fallback. See ht tp://crbug.com/505825
1742 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
1743 HitTestResult result(request, vPoint); 1741 HitTestResult result(request, vPoint);
1744 doc->layoutView()->hitTest(result); 1742 doc->layoutView()->hitTest(result);
1745 1743
1746 Node* node = result.innerNode(); 1744 Node* node = result.innerNode();
1747 // Wheel events should not dispatch to text nodes. 1745 // Wheel events should not dispatch to text nodes.
1748 if (node && node->isTextNode()) 1746 if (node && node->isTextNode())
1749 node = ComposedTreeTraversal::parent(*node); 1747 node = ComposedTreeTraversal::parent(*node);
1750 1748
1751 if (m_previousWheelScrolledNode) 1749 if (m_previousWheelScrolledNode)
1752 m_previousWheelScrolledNode = nullptr; 1750 m_previousWheelScrolledNode = nullptr;
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
3996 unsigned EventHandler::accessKeyModifiers() 3994 unsigned EventHandler::accessKeyModifiers()
3997 { 3995 {
3998 #if OS(MACOSX) 3996 #if OS(MACOSX)
3999 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3997 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4000 #else 3998 #else
4001 return PlatformEvent::AltKey; 3999 return PlatformEvent::AltKey;
4002 #endif 4000 #endif
4003 } 4001 }
4004 4002
4005 } // namespace blink 4003 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698