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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return false; | 145 return false; |
146 } | 146 } |
147 quad->setP1(FloatPoint(coordinates[0], coordinates[1])); | 147 quad->setP1(FloatPoint(coordinates[0], coordinates[1])); |
148 quad->setP2(FloatPoint(coordinates[2], coordinates[3])); | 148 quad->setP2(FloatPoint(coordinates[2], coordinates[3])); |
149 quad->setP3(FloatPoint(coordinates[4], coordinates[5])); | 149 quad->setP3(FloatPoint(coordinates[4], coordinates[5])); |
150 quad->setP4(FloatPoint(coordinates[6], coordinates[7])); | 150 quad->setP4(FloatPoint(coordinates[6], coordinates[7])); |
151 | 151 |
152 return true; | 152 return true; |
153 } | 153 } |
154 | 154 |
155 static Node* hoveredNodeForPoint(LocalFrame* frame, const IntPoint& point, bool
ignorePointerEventsNone) | 155 static Node* hoveredNodeForPoint(LocalFrame* frame, const IntPoint& pointInRootF
rame, bool ignorePointerEventsNone) |
156 { | 156 { |
157 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; | 157 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR
equest::ReadOnly | HitTestRequest::AllowChildFrameContent; |
158 if (ignorePointerEventsNone) | 158 if (ignorePointerEventsNone) |
159 hitType |= HitTestRequest::IgnorePointerEventsNone; | 159 hitType |= HitTestRequest::IgnorePointerEventsNone; |
160 HitTestRequest request(hitType); | 160 HitTestRequest request(hitType); |
161 HitTestResult result(frame->view()->windowToContents(point)); | 161 HitTestResult result(frame->view()->rootFrameToContents(pointInRootFrame)); |
162 frame->contentRenderer()->hitTest(request, result); | 162 frame->contentRenderer()->hitTest(request, result); |
163 Node* node = result.innerPossiblyPseudoNode(); | 163 Node* node = result.innerPossiblyPseudoNode(); |
164 while (node && node->nodeType() == Node::TEXT_NODE) | 164 while (node && node->nodeType() == Node::TEXT_NODE) |
165 node = node->parentNode(); | 165 node = node->parentNode(); |
166 return node; | 166 return node; |
167 } | 167 } |
168 | 168 |
169 static Node* hoveredNodeForEvent(LocalFrame* frame, const PlatformGestureEvent&
event, bool ignorePointerEventsNone) | 169 static Node* hoveredNodeForEvent(LocalFrame* frame, const PlatformGestureEvent&
event, bool ignorePointerEventsNone) |
170 { | 170 { |
171 return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone)
; | 171 return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone)
; |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2358 visitor->trace(m_searchResults); | 2358 visitor->trace(m_searchResults); |
2359 #endif | 2359 #endif |
2360 visitor->trace(m_hoveredNodeForInspectMode); | 2360 visitor->trace(m_hoveredNodeForInspectMode); |
2361 visitor->trace(m_history); | 2361 visitor->trace(m_history); |
2362 visitor->trace(m_domEditor); | 2362 visitor->trace(m_domEditor); |
2363 visitor->trace(m_listener); | 2363 visitor->trace(m_listener); |
2364 InspectorBaseAgent::trace(visitor); | 2364 InspectorBaseAgent::trace(visitor); |
2365 } | 2365 } |
2366 | 2366 |
2367 } // namespace blink | 2367 } // namespace blink |
OLD | NEW |