| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 ShadowRoot::~ShadowRoot() | 66 ShadowRoot::~ShadowRoot() |
| 67 { | 67 { |
| 68 ASSERT(!m_prev); | 68 ASSERT(!m_prev); |
| 69 ASSERT(!m_next); | 69 ASSERT(!m_next); |
| 70 | 70 |
| 71 if (m_shadowRootRareData && m_shadowRootRareData->styleSheets()) | 71 if (m_shadowRootRareData && m_shadowRootRareData->styleSheets()) |
| 72 m_shadowRootRareData->styleSheets()->detachFromDocument(); | 72 m_shadowRootRareData->styleSheets()->detachFromDocument(); |
| 73 | 73 |
| 74 #if !ENABLE(OILPAN) |
| 74 document().styleEngine()->didRemoveShadowRoot(this); | 75 document().styleEngine()->didRemoveShadowRoot(this); |
| 76 #endif |
| 75 | 77 |
| 76 // We cannot let ContainerNode destructor call willBeDeletedFromDocument() | 78 // We cannot let ContainerNode destructor call willBeDeletedFromDocument() |
| 77 // for this ShadowRoot instance because TreeScope destructor | 79 // for this ShadowRoot instance because TreeScope destructor |
| 78 // clears Node::m_treeScope thus ContainerNode is no longer able | 80 // clears Node::m_treeScope thus ContainerNode is no longer able |
| 79 // to access it Document reference after that. | 81 // to access it Document reference after that. |
| 80 willBeDeletedFromDocument(); | 82 willBeDeletedFromDocument(); |
| 81 | 83 |
| 82 // We must remove all of our children first before the TreeScope destructor | 84 // We must remove all of our children first before the TreeScope destructor |
| 83 // runs so we don't go through TreeScopeAdopter for each child with a | 85 // runs so we don't go through TreeScopeAdopter for each child with a |
| 84 // destructed tree scope in each descendant. | 86 // destructed tree scope in each descendant. |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 326 |
| 325 StyleSheetList* ShadowRoot::styleSheets() | 327 StyleSheetList* ShadowRoot::styleSheets() |
| 326 { | 328 { |
| 327 if (!ensureShadowRootRareData()->styleSheets()) | 329 if (!ensureShadowRootRareData()->styleSheets()) |
| 328 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); | 330 m_shadowRootRareData->setStyleSheets(StyleSheetList::create(this)); |
| 329 | 331 |
| 330 return m_shadowRootRareData->styleSheets(); | 332 return m_shadowRootRareData->styleSheets(); |
| 331 } | 333 } |
| 332 | 334 |
| 333 } | 335 } |
| OLD | NEW |