| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // We cannot let ContainerNode destructor call willBeDeletedFromDocument() | 77 // We cannot let ContainerNode destructor call willBeDeletedFromDocument() |
| 78 // for this ShadowRoot instance because TreeScope destructor | 78 // for this ShadowRoot instance because TreeScope destructor |
| 79 // clears Node::m_treeScope thus ContainerNode is no longer able | 79 // clears Node::m_treeScope thus ContainerNode is no longer able |
| 80 // to access it Document reference after that. | 80 // to access it Document reference after that. |
| 81 willBeDeletedFromDocument(); | 81 willBeDeletedFromDocument(); |
| 82 | 82 |
| 83 // We must remove all of our children first before the TreeScope destructor | 83 // We must remove all of our children first before the TreeScope destructor |
| 84 // runs so we don't go through TreeScopeAdopter for each child with a | 84 // runs so we don't go through TreeScopeAdopter for each child with a |
| 85 // destructed tree scope in each descendant. | 85 // destructed tree scope in each descendant. |
| 86 removeDetachedChildren(); | 86 removeDetachedChildren(); |
| 87 #endif | |
| 88 | 87 |
| 89 // We must call clearRareData() here since a ShadowRoot class inherits TreeS
cope | 88 // We must call clearRareData() here since a ShadowRoot class inherits TreeS
cope |
| 90 // as well as Node. See a comment on TreeScope.h for the reason. | 89 // as well as Node. See a comment on TreeScope.h for the reason. |
| 91 if (hasRareData()) | 90 if (hasRareData()) |
| 92 clearRareData(); | 91 clearRareData(); |
| 92 #endif |
| 93 } | 93 } |
| 94 | 94 |
| 95 void ShadowRoot::dispose() | 95 void ShadowRoot::dispose() |
| 96 { | 96 { |
| 97 #if !ENABLE(OILPAN) | 97 #if !ENABLE(OILPAN) |
| 98 removeDetachedChildren(); | 98 removeDetachedChildren(); |
| 99 #endif | 99 #endif |
| 100 } | 100 } |
| 101 | 101 |
| 102 ShadowRoot* ShadowRoot::olderShadowRootForBindings() const | 102 ShadowRoot* ShadowRoot::olderShadowRootForBindings() const |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 void ShadowRoot::trace(Visitor* visitor) | 340 void ShadowRoot::trace(Visitor* visitor) |
| 341 { | 341 { |
| 342 visitor->trace(m_prev); | 342 visitor->trace(m_prev); |
| 343 visitor->trace(m_next); | 343 visitor->trace(m_next); |
| 344 visitor->trace(m_shadowRootRareData); | 344 visitor->trace(m_shadowRootRareData); |
| 345 TreeScope::trace(visitor); | 345 TreeScope::trace(visitor); |
| 346 DocumentFragment::trace(visitor); | 346 DocumentFragment::trace(visitor); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } | 349 } |
| OLD | NEW |