OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |