| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 { | 202 { |
| 203 LocalFrame* frame = document->frame(); | 203 LocalFrame* frame = document->frame(); |
| 204 | 204 |
| 205 if (!frame) | 205 if (!frame) |
| 206 return HitTestResult(); | 206 return HitTestResult(); |
| 207 FrameView* frameView = frame->view(); | 207 FrameView* frameView = frame->view(); |
| 208 if (!frameView) | 208 if (!frameView) |
| 209 return HitTestResult(); | 209 return HitTestResult(); |
| 210 | 210 |
| 211 float scaleFactor = frame->pageZoomFactor(); | 211 float scaleFactor = frame->pageZoomFactor(); |
| 212 IntPoint point = roundedIntPoint(FloatPoint(x * scaleFactor + frameView->sc
rollX(), y * scaleFactor + frameView->scrollY())); | 212 IntPoint point = roundedIntPoint(FloatPoint(x * scaleFactor, y * scaleFactor
)); |
| 213 | 213 |
| 214 if (!frameView->visibleContentRect().contains(point)) | 214 if (!frameView->visibleContentRect().contains(point)) |
| 215 return HitTestResult(); | 215 return HitTestResult(); |
| 216 | 216 |
| 217 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); | 217 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 218 HitTestResult result(point); | 218 HitTestResult result(point); |
| 219 document->renderView()->hitTest(request, result); | 219 document->renderView()->hitTest(request, result); |
| 220 return result; | 220 return result; |
| 221 } | 221 } |
| 222 | 222 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 visitor->trace(m_document); | 451 visitor->trace(m_document); |
| 452 visitor->trace(m_parentTreeScope); | 452 visitor->trace(m_parentTreeScope); |
| 453 visitor->trace(m_selection); | 453 visitor->trace(m_selection); |
| 454 visitor->trace(m_elementsById); | 454 visitor->trace(m_elementsById); |
| 455 visitor->trace(m_imageMapsByName); | 455 visitor->trace(m_imageMapsByName); |
| 456 visitor->trace(m_labelsByForAttribute); | 456 visitor->trace(m_labelsByForAttribute); |
| 457 visitor->trace(m_scopedStyleResolver); | 457 visitor->trace(m_scopedStyleResolver); |
| 458 } | 458 } |
| 459 | 459 |
| 460 } // namespace blink | 460 } // namespace blink |
| OLD | NEW |