| 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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 { | 1411 { |
| 1412 setScrollbarsSuppressed(false); | 1412 setScrollbarsSuppressed(false); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 bool FrameView::scrollToFragment(const KURL& url) | 1415 bool FrameView::scrollToFragment(const KURL& url) |
| 1416 { | 1416 { |
| 1417 // If our URL has no ref, then we have no place we need to jump to. | 1417 // If our URL has no ref, then we have no place we need to jump to. |
| 1418 // OTOH If CSS target was set previously, we want to set it to 0, recalc | 1418 // OTOH If CSS target was set previously, we want to set it to 0, recalc |
| 1419 // and possibly paint invalidation because :target pseudo class may have bee
n | 1419 // and possibly paint invalidation because :target pseudo class may have bee
n |
| 1420 // set (see bug 11321). | 1420 // set (see bug 11321). |
| 1421 if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget()) | 1421 // Similarly for svg, if we had a previous svgView() then we need to reset |
| 1422 // the initial view if we don't have a fragment. |
| 1423 if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget() && !m_
frame->document()->isSVGDocument()) |
| 1422 return false; | 1424 return false; |
| 1423 | 1425 |
| 1424 String fragmentIdentifier = url.fragmentIdentifier(); | 1426 String fragmentIdentifier = url.fragmentIdentifier(); |
| 1425 if (scrollToAnchor(fragmentIdentifier)) | 1427 if (scrollToAnchor(fragmentIdentifier)) |
| 1426 return true; | 1428 return true; |
| 1427 | 1429 |
| 1428 // Try again after decoding the ref, based on the document's encoding. | 1430 // Try again after decoding the ref, based on the document's encoding. |
| 1429 if (m_frame->document()->encoding().isValid()) | 1431 if (m_frame->document()->encoding().isValid()) |
| 1430 return scrollToAnchor(decodeURLEscapeSequences(fragmentIdentifier, m_fra
me->document()->encoding())); | 1432 return scrollToAnchor(decodeURLEscapeSequences(fragmentIdentifier, m_fra
me->document()->encoding())); |
| 1431 | 1433 |
| (...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4019 return; | 4021 return; |
| 4020 | 4022 |
| 4021 ScrollableArea::setScrollOrigin(origin); | 4023 ScrollableArea::setScrollOrigin(origin); |
| 4022 | 4024 |
| 4023 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 4025 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
| 4024 if (updatePositionAtAll && updatePositionSynchronously) | 4026 if (updatePositionAtAll && updatePositionSynchronously) |
| 4025 updateScrollbars(scrollOffsetDouble()); | 4027 updateScrollbars(scrollOffsetDouble()); |
| 4026 } | 4028 } |
| 4027 | 4029 |
| 4028 } // namespace blink | 4030 } // namespace blink |
| OLD | NEW |