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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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
« no previous file with comments | « Source/core/frame/PinchViewport.cpp ('k') | Source/core/inspector/InspectorFrontendHost.cpp » ('j') | 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 Node* previousSibling = innerPreviousSibling(frameOwner); 1770 Node* previousSibling = innerPreviousSibling(frameOwner);
1771 int prevId = previousSibling ? m_documentNodeToIdMap->get(previousSibling) : 0; 1771 int prevId = previousSibling ? m_documentNodeToIdMap->get(previousSibling) : 0;
1772 m_frontend->childNodeInserted(parentId, prevId, value.release()); 1772 m_frontend->childNodeInserted(parentId, prevId, value.release());
1773 } 1773 }
1774 1774
1775 void InspectorDOMAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader) 1775 void InspectorDOMAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
1776 { 1776 {
1777 // FIXME: If "frame" is always guarenteed to be in the same Page as loader-> frame() 1777 // FIXME: If "frame" is always guarenteed to be in the same Page as loader-> frame()
1778 // then all we need to check here is loader->frame()->isMainFrame() 1778 // then all we need to check here is loader->frame()->isMainFrame()
1779 // and we don't need "frame" at all. 1779 // and we don't need "frame" at all.
1780 LocalFrame* mainFrame = frame->page()->mainFrame(); 1780 if (!frame->page()->mainFrame()->isLocalFrame())
1781 return;
1782 LocalFrame* mainFrame = frame->page()->deprecatedLocalMainFrame();
1781 if (loader->frame() != mainFrame) { 1783 if (loader->frame() != mainFrame) {
1782 invalidateFrameOwnerElement(loader->frame()); 1784 invalidateFrameOwnerElement(loader->frame());
1783 return; 1785 return;
1784 } 1786 }
1785 1787
1786 setDocument(mainFrame->document()); 1788 setDocument(mainFrame->document());
1787 } 1789 }
1788 1790
1789 void InspectorDOMAgent::didInsertDOMNode(Node* node) 1791 void InspectorDOMAgent::didInsertDOMNode(Node* node)
1790 { 1792 {
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 if (!m_documentNodeToIdMap->contains(m_document.get())) { 2098 if (!m_documentNodeToIdMap->contains(m_document.get())) {
2097 RefPtr<TypeBuilder::DOM::Node> root; 2099 RefPtr<TypeBuilder::DOM::Node> root;
2098 getDocument(errorString, root); 2100 getDocument(errorString, root);
2099 return errorString->isEmpty(); 2101 return errorString->isEmpty();
2100 } 2102 }
2101 return true; 2103 return true;
2102 } 2104 }
2103 2105
2104 } // namespace WebCore 2106 } // namespace WebCore
2105 2107
OLDNEW
« no previous file with comments | « Source/core/frame/PinchViewport.cpp ('k') | Source/core/inspector/InspectorFrontendHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698