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