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 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 if (!anchorNode) | 1962 if (!anchorNode) |
1963 return; | 1963 return; |
1964 | 1964 |
1965 if (!anchorNode->renderer()) | 1965 if (!anchorNode->renderer()) |
1966 return; | 1966 return; |
1967 | 1967 |
1968 LayoutRect rect; | 1968 LayoutRect rect; |
1969 if (anchorNode != m_frame->document()) | 1969 if (anchorNode != m_frame->document()) |
1970 rect = anchorNode->boundingBox(); | 1970 rect = anchorNode->boundingBox(); |
1971 | 1971 |
1972 RefPtrWillBeRawPtr<LocalFrame> boundaryFrame = m_frame->document()->findUnsa
feParentScrollPropagationBoundary(); | 1972 RefPtrWillBeRawPtr<Frame> boundaryFrame = m_frame->findUnsafeParentScrollPro
pagationBoundary(); |
1973 | 1973 |
1974 if (boundaryFrame) | 1974 // FIXME: Handle RemoteFrames |
1975 boundaryFrame->view()->setSafeToPropagateScrollToParent(false); | 1975 if (boundaryFrame && boundaryFrame->isLocalFrame()) |
| 1976 toLocalFrame(boundaryFrame.get())->view()->setSafeToPropagateScrollToPar
ent(false); |
1976 | 1977 |
1977 // Scroll nested layers and frames to reveal the anchor. | 1978 // Scroll nested layers and frames to reveal the anchor. |
1978 // Align to the top and to the closest side (this matches other browsers). | 1979 // Align to the top and to the closest side (this matches other browsers). |
1979 anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEd
geIfNeeded, ScrollAlignment::alignTopAlways); | 1980 anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEd
geIfNeeded, ScrollAlignment::alignTopAlways); |
1980 | 1981 |
1981 if (boundaryFrame) | 1982 if (boundaryFrame && boundaryFrame->isLocalFrame()) |
1982 boundaryFrame->view()->setSafeToPropagateScrollToParent(true); | 1983 toLocalFrame(boundaryFrame.get())->view()->setSafeToPropagateScrollToPar
ent(true); |
1983 | 1984 |
1984 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 1985 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
1985 cache->handleScrolledToAnchor(anchorNode.get()); | 1986 cache->handleScrolledToAnchor(anchorNode.get()); |
1986 | 1987 |
1987 // scrollRectToVisible can call into setScrollPosition(), which resets m_mai
ntainScrollPositionAnchor. | 1988 // scrollRectToVisible can call into setScrollPosition(), which resets m_mai
ntainScrollPositionAnchor. |
1988 m_maintainScrollPositionAnchor = anchorNode; | 1989 m_maintainScrollPositionAnchor = anchorNode; |
1989 } | 1990 } |
1990 | 1991 |
1991 bool FrameView::updateWidgets() | 1992 bool FrameView::updateWidgets() |
1992 { | 1993 { |
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4008 return; | 4009 return; |
4009 | 4010 |
4010 ScrollableArea::setScrollOrigin(origin); | 4011 ScrollableArea::setScrollOrigin(origin); |
4011 | 4012 |
4012 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 4013 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
4013 if (updatePositionAtAll && updatePositionSynchronously) | 4014 if (updatePositionAtAll && updatePositionSynchronously) |
4014 updateScrollbars(scrollOffsetDouble()); | 4015 updateScrollbars(scrollOffsetDouble()); |
4015 } | 4016 } |
4016 | 4017 |
4017 } // namespace blink | 4018 } // namespace blink |
OLD | NEW |