OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 { | 97 { |
98 ASSERT(!didMoveToNewDocumentWasCalled); | 98 ASSERT(!didMoveToNewDocumentWasCalled); |
99 ASSERT_UNUSED(oldDocument, oldDocument == oldDocumentDidMoveToNewDocumentWas
CalledWith); | 99 ASSERT_UNUSED(oldDocument, oldDocument == oldDocumentDidMoveToNewDocumentWas
CalledWith); |
100 didMoveToNewDocumentWasCalled = true; | 100 didMoveToNewDocumentWasCalled = true; |
101 } | 101 } |
102 #endif | 102 #endif |
103 | 103 |
104 inline void TreeScopeAdopter::updateTreeScope(Node* node) const | 104 inline void TreeScopeAdopter::updateTreeScope(Node* node) const |
105 { | 105 { |
106 ASSERT(!node->isTreeScope()); | 106 ASSERT(!node->isTreeScope()); |
107 ASSERT(&node->treeScope() == m_oldScope); | 107 ASSERT(node->treeScope() == m_oldScope); |
108 m_newScope->guardRef(); | 108 m_newScope->guardRef(); |
109 m_oldScope->guardDeref(); | 109 m_oldScope->guardDeref(); |
110 node->setTreeScope(m_newScope); | 110 node->setTreeScope(m_newScope); |
111 } | 111 } |
112 | 112 |
113 inline void TreeScopeAdopter::moveNodeToNewDocument(Node* node, Document* oldDoc
ument, Document* newDocument) const | 113 inline void TreeScopeAdopter::moveNodeToNewDocument(Node* node, Document* oldDoc
ument, Document* newDocument) const |
114 { | 114 { |
115 ASSERT(!node->inDocument() || oldDocument != newDocument); | 115 ASSERT(!node->inDocument() || oldDocument != newDocument); |
116 | 116 |
117 if (node->hasRareData()) { | 117 if (node->hasRareData()) { |
(...skipping 11 matching lines...) Expand all Loading... |
129 #ifndef NDEBUG | 129 #ifndef NDEBUG |
130 didMoveToNewDocumentWasCalled = false; | 130 didMoveToNewDocumentWasCalled = false; |
131 oldDocumentDidMoveToNewDocumentWasCalledWith = oldDocument; | 131 oldDocumentDidMoveToNewDocumentWasCalledWith = oldDocument; |
132 #endif | 132 #endif |
133 | 133 |
134 node->didMoveToNewDocument(oldDocument); | 134 node->didMoveToNewDocument(oldDocument); |
135 ASSERT(didMoveToNewDocumentWasCalled); | 135 ASSERT(didMoveToNewDocumentWasCalled); |
136 } | 136 } |
137 | 137 |
138 } | 138 } |
OLD | NEW |