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

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: fix layout test Created 5 years, 3 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 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 return false; 1723 return false;
1724 1724
1725 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); 1725 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view());
1726 1726
1727 FrameView* view = m_frame->view(); 1727 FrameView* view = m_frame->view();
1728 if (!view) 1728 if (!view)
1729 return false; 1729 return false;
1730 1730
1731 LayoutPoint vPoint = view->rootFrameToContents(event.position()); 1731 LayoutPoint vPoint = view->rootFrameToContents(event.position());
1732 1732
1733 // Pass Active to ensure that hit-test result in current document if otherwi se empty 1733 HitTestRequest request(HitTestRequest::ReadOnly);
1734 // TODO(majidvp): Avoid using Active to trigger hit-testing fallback. See ht tp://crbug.com/505825
1735 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
1736 HitTestResult result(request, vPoint); 1734 HitTestResult result(request, vPoint);
1737 doc->layoutView()->hitTest(result); 1735 doc->layoutView()->hitTest(result);
1738 1736
1739 Node* node = result.innerNode(); 1737 Node* node = result.innerNode();
1740 // Wheel events should not dispatch to text nodes. 1738 // Wheel events should not dispatch to text nodes.
1741 if (node && node->isTextNode()) 1739 if (node && node->isTextNode())
1742 node = ComposedTreeTraversal::parent(*node); 1740 node = ComposedTreeTraversal::parent(*node);
1743 1741
1744 if (m_previousWheelScrolledNode) 1742 if (m_previousWheelScrolledNode)
1745 m_previousWheelScrolledNode = nullptr; 1743 m_previousWheelScrolledNode = nullptr;
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
3989 unsigned EventHandler::accessKeyModifiers() 3987 unsigned EventHandler::accessKeyModifiers()
3990 { 3988 {
3991 #if OS(MACOSX) 3989 #if OS(MACOSX)
3992 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3990 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3993 #else 3991 #else
3994 return PlatformEvent::AltKey; 3992 return PlatformEvent::AltKey;
3995 #endif 3993 #endif
3996 } 3994 }
3997 3995
3998 } // namespace blink 3996 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/resources/body-overflow-iframe.html ('k') | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698