OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 return VisiblePosition(); | 692 return VisiblePosition(); |
693 LayoutObject* renderer = node->renderer(); | 693 LayoutObject* renderer = node->renderer(); |
694 if (!renderer) | 694 if (!renderer) |
695 return VisiblePosition(); | 695 return VisiblePosition(); |
696 VisiblePosition visiblePos = VisiblePosition(renderer->positionForPoint(resu
lt.localPoint())); | 696 VisiblePosition visiblePos = VisiblePosition(renderer->positionForPoint(resu
lt.localPoint())); |
697 if (visiblePos.isNull()) | 697 if (visiblePos.isNull()) |
698 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(node)); | 698 visiblePos = VisiblePosition(firstPositionInOrBeforeNode(node)); |
699 return visiblePos; | 699 return visiblePos; |
700 } | 700 } |
701 | 701 |
702 Document* LocalFrame::documentAtPoint(const IntPoint& point) | 702 Document* LocalFrame::documentAtPoint(const IntPoint& pointInRootFrame) |
703 { | 703 { |
704 if (!view()) | 704 if (!view()) |
705 return nullptr; | 705 return nullptr; |
706 | 706 |
707 IntPoint pt = view()->windowToContents(point); | 707 IntPoint pt = view()->rootFrameToContents(pointInRootFrame); |
708 HitTestResult result = HitTestResult(pt); | 708 HitTestResult result = HitTestResult(pt); |
709 | 709 |
710 if (contentRenderer()) | 710 if (contentRenderer()) |
711 result = eventHandler().hitTestResultAtPoint(pt, HitTestRequest::ReadOnl
y | HitTestRequest::Active); | 711 result = eventHandler().hitTestResultAtPoint(pt, HitTestRequest::ReadOnl
y | HitTestRequest::Active); |
712 return result.innerNode() ? &result.innerNode()->document() : nullptr; | 712 return result.innerNode() ? &result.innerNode()->document() : nullptr; |
713 } | 713 } |
714 | 714 |
715 PassRefPtrWillBeRawPtr<Range> LocalFrame::rangeForPoint(const IntPoint& framePoi
nt) | 715 PassRefPtrWillBeRawPtr<Range> LocalFrame::rangeForPoint(const IntPoint& framePoi
nt) |
716 { | 716 { |
717 VisiblePosition position = visiblePositionForPoint(framePoint); | 717 VisiblePosition position = visiblePositionForPoint(framePoint); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 // We detach the FrameView's custom scroll bars as early as | 824 // We detach the FrameView's custom scroll bars as early as |
825 // possible to prevent m_doc->detach() from messing with the view | 825 // possible to prevent m_doc->detach() from messing with the view |
826 // such that its scroll bars won't be torn down. | 826 // such that its scroll bars won't be torn down. |
827 // | 827 // |
828 // FIXME: We should revisit this. | 828 // FIXME: We should revisit this. |
829 if (m_view) | 829 if (m_view) |
830 m_view->prepareForDetach(); | 830 m_view->prepareForDetach(); |
831 } | 831 } |
832 | 832 |
833 } // namespace blink | 833 } // namespace blink |
OLD | NEW |