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 Frame* mainFrame = frame->page()->mainFrame(); |
1781 if (loader->frame() != mainFrame) { | 1781 if (loader->frame() != mainFrame) { |
1782 invalidateFrameOwnerElement(loader->frame()); | 1782 invalidateFrameOwnerElement(loader->frame()); |
1783 return; | 1783 return; |
1784 } | 1784 } |
1785 | 1785 |
1786 setDocument(mainFrame->document()); | 1786 setDocument(mainFrame->isLocalFrame() ? toLocalFrame(mainFrame)->document()
: 0); |
1787 } | 1787 } |
1788 | 1788 |
1789 void InspectorDOMAgent::didInsertDOMNode(Node* node) | 1789 void InspectorDOMAgent::didInsertDOMNode(Node* node) |
1790 { | 1790 { |
1791 if (isWhitespace(node)) | 1791 if (isWhitespace(node)) |
1792 return; | 1792 return; |
1793 | 1793 |
1794 // We could be attaching existing subtree. Forget the bindings. | 1794 // We could be attaching existing subtree. Forget the bindings. |
1795 unbind(node, m_documentNodeToIdMap.get()); | 1795 unbind(node, m_documentNodeToIdMap.get()); |
1796 | 1796 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 if (!m_documentNodeToIdMap->contains(m_document.get())) { | 2096 if (!m_documentNodeToIdMap->contains(m_document.get())) { |
2097 RefPtr<TypeBuilder::DOM::Node> root; | 2097 RefPtr<TypeBuilder::DOM::Node> root; |
2098 getDocument(errorString, root); | 2098 getDocument(errorString, root); |
2099 return errorString->isEmpty(); | 2099 return errorString->isEmpty(); |
2100 } | 2100 } |
2101 return true; | 2101 return true; |
2102 } | 2102 } |
2103 | 2103 |
2104 } // namespace WebCore | 2104 } // namespace WebCore |
2105 | 2105 |
OLD | NEW |