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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 IntPoint& point) { | 213 IntPoint& point) { |
214 LocalFrame* frame = document.frame(); | 214 LocalFrame* frame = document.frame(); |
215 if (!frame) | 215 if (!frame) |
216 return false; | 216 return false; |
217 FrameView* frameView = frame->view(); | 217 FrameView* frameView = frame->view(); |
218 if (!frameView) | 218 if (!frameView) |
219 return false; | 219 return false; |
220 | 220 |
221 FloatPoint pointInDocument(point); | 221 FloatPoint pointInDocument(point); |
222 pointInDocument.scale(frame->pageZoomFactor(), frame->pageZoomFactor()); | 222 pointInDocument.scale(frame->pageZoomFactor(), frame->pageZoomFactor()); |
223 pointInDocument.moveBy(frameView->scrollPosition()); | 223 pointInDocument.move(frameView->scrollOffset()); |
224 IntPoint roundedPointInDocument = roundedIntPoint(pointInDocument); | 224 IntPoint roundedPointInDocument = roundedIntPoint(pointInDocument); |
225 | 225 |
226 if (!frameView->visibleContentRect().contains(roundedPointInDocument)) | 226 if (!frameView->visibleContentRect().contains(roundedPointInDocument)) |
227 return false; | 227 return false; |
228 | 228 |
229 point = roundedPointInDocument; | 229 point = roundedPointInDocument; |
230 return true; | 230 return true; |
231 } | 231 } |
232 | 232 |
233 HitTestResult hitTestInDocument(const Document* document, | 233 HitTestResult hitTestInDocument(const Document* document, |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 visitor->trace(m_parentTreeScope); | 541 visitor->trace(m_parentTreeScope); |
542 visitor->trace(m_idTargetObserverRegistry); | 542 visitor->trace(m_idTargetObserverRegistry); |
543 visitor->trace(m_selection); | 543 visitor->trace(m_selection); |
544 visitor->trace(m_elementsById); | 544 visitor->trace(m_elementsById); |
545 visitor->trace(m_imageMapsByName); | 545 visitor->trace(m_imageMapsByName); |
546 visitor->trace(m_scopedStyleResolver); | 546 visitor->trace(m_scopedStyleResolver); |
547 visitor->trace(m_radioButtonGroupScope); | 547 visitor->trace(m_radioButtonGroupScope); |
548 } | 548 } |
549 | 549 |
550 } // namespace blink | 550 } // namespace blink |
OLD | NEW |