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

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

Issue 267393003: DevTools: Load document (html) content from disk cache in page agent enabling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 } else { 1034 } else {
1035 view->setScrollPositionNonProgrammatically(m_currentItem->scrollPoint()) ; 1035 view->setScrollPositionNonProgrammatically(m_currentItem->scrollPoint()) ;
1036 } 1036 }
1037 1037
1038 if (m_frame->isMainFrame()) { 1038 if (m_frame->isMainFrame()) {
1039 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll ingCoordinator()) 1039 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll ingCoordinator())
1040 scrollingCoordinator->frameViewRootLayerDidChange(view); 1040 scrollingCoordinator->frameViewRootLayerDidChange(view);
1041 } 1041 }
1042 } 1042 }
1043 1043
1044 bool FrameLoader::documentResourceRequestFromCurrentHistoryItemForInspector(Reso urceRequestCachePolicy cachePolicy, ResourceRequest* request)
1045 {
1046 if (!m_currentItem)
1047 return false;
1048 *request = requestFromHistoryItem(m_currentItem.get(), cachePolicy);
1049 return true;
1050 }
1051
1044 void FrameLoader::detachChildren() 1052 void FrameLoader::detachChildren()
1045 { 1053 {
1046 typedef Vector<RefPtr<LocalFrame> > FrameVector; 1054 typedef Vector<RefPtr<LocalFrame> > FrameVector;
1047 FrameVector childrenToDetach; 1055 FrameVector childrenToDetach;
1048 childrenToDetach.reserveCapacity(m_frame->tree().childCount()); 1056 childrenToDetach.reserveCapacity(m_frame->tree().childCount());
1049 for (LocalFrame* child = m_frame->tree().lastChild(); child; child = child-> tree().previousSibling()) 1057 for (LocalFrame* child = m_frame->tree().lastChild(); child; child = child-> tree().previousSibling())
1050 childrenToDetach.append(child); 1058 childrenToDetach.append(child);
1051 FrameVector::iterator end = childrenToDetach.end(); 1059 FrameVector::iterator end = childrenToDetach.end();
1052 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it) 1060 for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it)
1053 (*it)->loader().detachFromParent(); 1061 (*it)->loader().detachFromParent();
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 { 1444 {
1437 SandboxFlags flags = m_forcedSandboxFlags; 1445 SandboxFlags flags = m_forcedSandboxFlags;
1438 if (LocalFrame* parentFrame = m_frame->tree().parent()) 1446 if (LocalFrame* parentFrame = m_frame->tree().parent())
1439 flags |= parentFrame->document()->sandboxFlags(); 1447 flags |= parentFrame->document()->sandboxFlags();
1440 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) 1448 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
1441 flags |= ownerElement->sandboxFlags(); 1449 flags |= ownerElement->sandboxFlags();
1442 return flags; 1450 return flags;
1443 } 1451 }
1444 1452
1445 } // namespace WebCore 1453 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698