| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 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 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 | 173 |
| 174 static Node* hoveredNodeForPoint(Frame* frame, const IntPoint& point, bool ignor
ePointerEventsNone) | 174 static Node* hoveredNodeForPoint(Frame* frame, const IntPoint& point, bool ignor
ePointerEventsNone) |
| 175 { | 175 { |
| 176 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; | 176 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; |
| 177 if (ignorePointerEventsNone) | 177 if (ignorePointerEventsNone) |
| 178 hitType |= HitTestRequest::IgnorePointerEventsNone; | 178 hitType |= HitTestRequest::IgnorePointerEventsNone; |
| 179 HitTestRequest request(hitType); | 179 HitTestRequest request(hitType); |
| 180 HitTestResult result(frame->view()->windowToContents(point)); | 180 HitTestResult result(frame->view()->windowToContents(point)); |
| 181 frame->contentRenderer()->hitTest(request, result); | 181 frame->contentRenderer()->hitTest(request, result); |
| 182 result.setToNonShadowAncestor(); | 182 result.setToShadowHostIfInUserAgentShadowRoot(); |
| 183 Node* node = result.innerNode(); | 183 Node* node = result.innerNode(); |
| 184 while (node && node->nodeType() == Node::TEXT_NODE) | 184 while (node && node->nodeType() == Node::TEXT_NODE) |
| 185 node = node->parentNode(); | 185 node = node->parentNode(); |
| 186 return node; | 186 return node; |
| 187 } | 187 } |
| 188 | 188 |
| 189 static Node* hoveredNodeForEvent(Frame* frame, const PlatformMouseEvent& event,
bool ignorePointerEventsNone) | 189 static Node* hoveredNodeForEvent(Frame* frame, const PlatformMouseEvent& event,
bool ignorePointerEventsNone) |
| 190 { | 190 { |
| 191 return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone)
; | 191 return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone)
; |
| 192 } | 192 } |
| (...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 | 1830 |
| 1831 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m
ainWorldScriptState(frame)); | 1831 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m
ainWorldScriptState(frame)); |
| 1832 if (injectedScript.hasNoValue()) | 1832 if (injectedScript.hasNoValue()) |
| 1833 return 0; | 1833 return 0; |
| 1834 | 1834 |
| 1835 return injectedScript.wrapNode(node, objectGroup); | 1835 return injectedScript.wrapNode(node, objectGroup); |
| 1836 } | 1836 } |
| 1837 | 1837 |
| 1838 } // namespace WebCore | 1838 } // namespace WebCore |
| 1839 | 1839 |
| OLD | NEW |