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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months 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
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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 // restoration type is manual, then we should not override it unless this 1569 // restoration type is manual, then we should not override it unless this
1570 // is a same document reload. 1570 // is a same document reload.
1571 bool shouldScrollToFragment = 1571 bool shouldScrollToFragment =
1572 (loadStartType == NavigationWithinSameDocument && 1572 (loadStartType == NavigationWithinSameDocument &&
1573 !isBackForwardLoadType(frameLoadType)) || 1573 !isBackForwardLoadType(frameLoadType)) ||
1574 (documentLoader() && 1574 (documentLoader() &&
1575 !documentLoader()->initialScrollState().didRestoreFromHistory && 1575 !documentLoader()->initialScrollState().didRestoreFromHistory &&
1576 !(m_currentItem && 1576 !(m_currentItem &&
1577 m_currentItem->scrollRestorationType() == ScrollRestorationManual)); 1577 m_currentItem->scrollRestorationType() == ScrollRestorationManual));
1578 1578
1579 view->processUrlFragment(url, shouldScrollToFragment 1579 view->processUrlFragment(url,
1580 ? FrameView::UrlFragmentScroll 1580 shouldScrollToFragment
1581 : FrameView::UrlFragmentDontScroll); 1581 ? FrameView::UrlFragmentScroll
1582 : FrameView::UrlFragmentDontScroll);
1582 1583
1583 if (boundaryFrame && boundaryFrame->isLocalFrame()) 1584 if (boundaryFrame && boundaryFrame->isLocalFrame())
1584 toLocalFrame(boundaryFrame)->view()->setSafeToPropagateScrollToParent(true); 1585 toLocalFrame(boundaryFrame)->view()->setSafeToPropagateScrollToParent(true);
1585 } 1586 }
1586 1587
1587 bool FrameLoader::shouldClose(bool isReload) { 1588 bool FrameLoader::shouldClose(bool isReload) {
1588 Page* page = m_frame->page(); 1589 Page* page = m_frame->page();
1589 if (!page || !page->chromeClient().canOpenBeforeUnloadConfirmPanel()) 1590 if (!page || !page->chromeClient().canOpenBeforeUnloadConfirmPanel())
1590 return true; 1591 return true;
1591 1592
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 2002 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
2002 toTracedValue()); 2003 toTracedValue());
2003 } 2004 }
2004 2005
2005 DocumentLoader* FrameLoader::createDocumentLoader( 2006 DocumentLoader* FrameLoader::createDocumentLoader(
2006 const ResourceRequest& request, 2007 const ResourceRequest& request,
2007 const FrameLoadRequest& frameLoadRequest, 2008 const FrameLoadRequest& frameLoadRequest,
2008 FrameLoadType loadType, 2009 FrameLoadType loadType,
2009 NavigationType navigationType) { 2010 NavigationType navigationType) {
2010 DocumentLoader* loader = client()->createDocumentLoader( 2011 DocumentLoader* loader = client()->createDocumentLoader(
2011 m_frame, request, frameLoadRequest.substituteData().isValid() 2012 m_frame, request,
2012 ? frameLoadRequest.substituteData() 2013 frameLoadRequest.substituteData().isValid()
2013 : defaultSubstituteDataForURL(request.url()), 2014 ? frameLoadRequest.substituteData()
2015 : defaultSubstituteDataForURL(request.url()),
2014 frameLoadRequest.clientRedirect()); 2016 frameLoadRequest.clientRedirect());
2015 2017
2016 loader->setLoadType(loadType); 2018 loader->setLoadType(loadType);
2017 loader->setNavigationType(navigationType); 2019 loader->setNavigationType(navigationType);
2018 loader->setReplacesCurrentHistoryItem(loadType == 2020 loader->setReplacesCurrentHistoryItem(loadType ==
2019 FrameLoadTypeReplaceCurrentItem); 2021 FrameLoadTypeReplaceCurrentItem);
2020 return loader; 2022 return loader;
2021 } 2023 }
2022 2024
2023 } // namespace blink 2025 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698