| 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 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 if (!anchorNode) | 1938 if (!anchorNode) |
| 1939 return; | 1939 return; |
| 1940 | 1940 |
| 1941 if (!anchorNode->renderer()) | 1941 if (!anchorNode->renderer()) |
| 1942 return; | 1942 return; |
| 1943 | 1943 |
| 1944 LayoutRect rect; | 1944 LayoutRect rect; |
| 1945 if (anchorNode != m_frame->document()) | 1945 if (anchorNode != m_frame->document()) |
| 1946 rect = anchorNode->boundingBox(); | 1946 rect = anchorNode->boundingBox(); |
| 1947 | 1947 |
| 1948 RefPtrWillBeRawPtr<LocalFrame> boundaryFrame = m_frame->document()->findUnsa
feParentScrollPropagationBoundary(); | 1948 RefPtrWillBeRawPtr<Frame> boundaryFrame = m_frame->findUnsafeParentScrollPro
pagationBoundary(); |
| 1949 | 1949 |
| 1950 if (boundaryFrame) | 1950 // FIXME: Handle RemoteFrames |
| 1951 boundaryFrame->view()->setSafeToPropagateScrollToParent(false); | 1951 if (boundaryFrame && boundaryFrame->isLocalFrame()) |
| 1952 toLocalFrame(boundaryFrame.get())->view()->setSafeToPropagateScrollToPar
ent(false); |
| 1952 | 1953 |
| 1953 // Scroll nested layers and frames to reveal the anchor. | 1954 // Scroll nested layers and frames to reveal the anchor. |
| 1954 // Align to the top and to the closest side (this matches other browsers). | 1955 // Align to the top and to the closest side (this matches other browsers). |
| 1955 anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEd
geIfNeeded, ScrollAlignment::alignTopAlways); | 1956 anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEd
geIfNeeded, ScrollAlignment::alignTopAlways); |
| 1956 | 1957 |
| 1957 if (boundaryFrame) | 1958 if (boundaryFrame && boundaryFrame->isLocalFrame()) |
| 1958 boundaryFrame->view()->setSafeToPropagateScrollToParent(true); | 1959 toLocalFrame(boundaryFrame.get())->view()->setSafeToPropagateScrollToPar
ent(true); |
| 1959 | 1960 |
| 1960 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) | 1961 if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) |
| 1961 cache->handleScrolledToAnchor(anchorNode.get()); | 1962 cache->handleScrolledToAnchor(anchorNode.get()); |
| 1962 | 1963 |
| 1963 // scrollRectToVisible can call into setScrollPosition(), which resets m_mai
ntainScrollPositionAnchor. | 1964 // scrollRectToVisible can call into setScrollPosition(), which resets m_mai
ntainScrollPositionAnchor. |
| 1964 m_maintainScrollPositionAnchor = anchorNode; | 1965 m_maintainScrollPositionAnchor = anchorNode; |
| 1965 } | 1966 } |
| 1966 | 1967 |
| 1967 bool FrameView::updateWidgets() | 1968 bool FrameView::updateWidgets() |
| 1968 { | 1969 { |
| (...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3981 return; | 3982 return; |
| 3982 | 3983 |
| 3983 ScrollableArea::setScrollOrigin(origin); | 3984 ScrollableArea::setScrollOrigin(origin); |
| 3984 | 3985 |
| 3985 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 3986 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
| 3986 if (updatePositionAtAll && updatePositionSynchronously) | 3987 if (updatePositionAtAll && updatePositionSynchronously) |
| 3987 updateScrollbars(scrollOffsetDouble()); | 3988 updateScrollbars(scrollOffsetDouble()); |
| 3988 } | 3989 } |
| 3989 | 3990 |
| 3990 } // namespace blink | 3991 } // namespace blink |
| OLD | NEW |