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 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2492 | 2492 |
2493 // FIXME: Should be able to handle targetNode being a shadow DOM node to avo
id performing uncessary hit tests | 2493 // FIXME: Should be able to handle targetNode being a shadow DOM node to avo
id performing uncessary hit tests |
2494 // in the case where further processing on the node is required. Returning t
he shadow ancestor prevents a | 2494 // in the case where further processing on the node is required. Returning t
he shadow ancestor prevents a |
2495 // regression in touchadjustment/html-label.html. Some refinement is require
d to testing/internals to | 2495 // regression in touchadjustment/html-label.html. Some refinement is require
d to testing/internals to |
2496 // handle targetNode being a shadow DOM node. | 2496 // handle targetNode being a shadow DOM node. |
2497 | 2497 |
2498 // FIXME: the explicit Vector conversion copies into a temporary and is wast
eful. | 2498 // FIXME: the explicit Vector conversion copies into a temporary and is wast
eful. |
2499 // FIXME: targetNode and success are only used by Internals functions. We sh
ould | 2499 // FIXME: targetNode and success are only used by Internals functions. We sh
ould |
2500 // instead have dedicated test methods so we only do this work in tests. | 2500 // instead have dedicated test methods so we only do this work in tests. |
2501 bool success = findBestClickableCandidate(targetNode, targetPoint, touchCent
er, touchRect, WillBeHeapVector<RefPtrWillBeMember<Node> > (nodes)); | 2501 bool success = findBestClickableCandidate(targetNode, targetPoint, touchCent
er, touchRect, WillBeHeapVector<RefPtrWillBeMember<Node> > (nodes)); |
2502 if (success && targetNode) | 2502 if (success && targetNode) { |
2503 targetNode = targetNode->deprecatedShadowAncestorNode(); | 2503 if (targetNode->isInShadowTree()) |
| 2504 targetNode = targetNode->shadowHost(); |
| 2505 } |
2504 return success; | 2506 return success; |
2505 } | 2507 } |
2506 | 2508 |
2507 bool EventHandler::bestContextMenuNodeForHitTestResult(const HitTestResult& resu
lt, IntPoint& targetPoint, Node*& targetNode) | 2509 bool EventHandler::bestContextMenuNodeForHitTestResult(const HitTestResult& resu
lt, IntPoint& targetPoint, Node*& targetNode) |
2508 { | 2510 { |
2509 ASSERT(result.isRectBasedTest()); | 2511 ASSERT(result.isRectBasedTest()); |
2510 IntPoint touchCenter = m_frame->view()->contentsToWindow(result.roundedPoint
InMainFrame()); | 2512 IntPoint touchCenter = m_frame->view()->contentsToWindow(result.roundedPoint
InMainFrame()); |
2511 IntRect touchRect = m_frame->view()->contentsToWindow(result.hitTestLocation
().boundingBox()); | 2513 IntRect touchRect = m_frame->view()->contentsToWindow(result.hitTestLocation
().boundingBox()); |
2512 WillBeHeapVector<RefPtrWillBeMember<Node>, 11> nodes; | 2514 WillBeHeapVector<RefPtrWillBeMember<Node>, 11> nodes; |
2513 copyToVector(result.rectBasedTestResult(), nodes); | 2515 copyToVector(result.rectBasedTestResult(), nodes); |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3817 unsigned EventHandler::accessKeyModifiers() | 3819 unsigned EventHandler::accessKeyModifiers() |
3818 { | 3820 { |
3819 #if OS(MACOSX) | 3821 #if OS(MACOSX) |
3820 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3822 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3821 #else | 3823 #else |
3822 return PlatformEvent::AltKey; | 3824 return PlatformEvent::AltKey; |
3823 #endif | 3825 #endif |
3824 } | 3826 } |
3825 | 3827 |
3826 } // namespace WebCore | 3828 } // namespace WebCore |
OLD | NEW |