Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2467433002: Check scrollRestorationType explicitly in FrameLoader::processFragment() (Closed)
Patch Set: fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 ? m_frame->findUnsafeParentScrollPropagationBoundary() 1505 ? m_frame->findUnsafeParentScrollPropagationBoundary()
1506 : 0; 1506 : 0;
1507 1507
1508 // FIXME: Handle RemoteFrames 1508 // FIXME: Handle RemoteFrames
1509 if (boundaryFrame && boundaryFrame->isLocalFrame()) { 1509 if (boundaryFrame && boundaryFrame->isLocalFrame()) {
1510 toLocalFrame(boundaryFrame) 1510 toLocalFrame(boundaryFrame)
1511 ->view() 1511 ->view()
1512 ->setSafeToPropagateScrollToParent(false); 1512 ->setSafeToPropagateScrollToParent(false);
1513 } 1513 }
1514 1514
1515 // If scroll position is restored from history fragment then we should not 1515 // If scroll position is restored from history fragment or scroll
1516 // override it unless this is a same document reload. 1516 // restoration type is manual, then we should not override it unless this
1517 // is a same document reload.
1517 bool shouldScrollToFragment = 1518 bool shouldScrollToFragment =
1518 (loadStartType == NavigationWithinSameDocument && 1519 (loadStartType == NavigationWithinSameDocument &&
1519 !isBackForwardLoadType(m_loadType)) || 1520 !isBackForwardLoadType(m_loadType)) ||
1520 (documentLoader() && 1521 (documentLoader() &&
1521 !documentLoader()->initialScrollState().didRestoreFromHistory); 1522 !documentLoader()->initialScrollState().didRestoreFromHistory &&
1523 !(m_currentItem &&
1524 m_currentItem->scrollRestorationType() == ScrollRestorationManual));
1522 1525
1523 view->processUrlFragment(url, shouldScrollToFragment 1526 view->processUrlFragment(url, shouldScrollToFragment
1524 ? FrameView::UrlFragmentScroll 1527 ? FrameView::UrlFragmentScroll
1525 : FrameView::UrlFragmentDontScroll); 1528 : FrameView::UrlFragmentDontScroll);
1526 1529
1527 if (boundaryFrame && boundaryFrame->isLocalFrame()) 1530 if (boundaryFrame && boundaryFrame->isLocalFrame())
1528 toLocalFrame(boundaryFrame)->view()->setSafeToPropagateScrollToParent(true); 1531 toLocalFrame(boundaryFrame)->view()->setSafeToPropagateScrollToParent(true);
1529 } 1532 }
1530 1533
1531 bool FrameLoader::shouldClose(bool isReload) { 1534 bool FrameLoader::shouldClose(bool isReload) {
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 m_documentLoader ? m_documentLoader->url() : String()); 1948 m_documentLoader ? m_documentLoader->url() : String());
1946 return tracedValue; 1949 return tracedValue;
1947 } 1950 }
1948 1951
1949 inline void FrameLoader::takeObjectSnapshot() const { 1952 inline void FrameLoader::takeObjectSnapshot() const {
1950 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1953 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1951 toTracedValue()); 1954 toTracedValue());
1952 } 1955 }
1953 1956
1954 } // namespace blink 1957 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698