| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 StyleSheet* removedSheet = m_sheet; | 275 StyleSheet* removedSheet = m_sheet; |
| 276 if (m_sheet) { | 276 if (m_sheet) { |
| 277 DCHECK_EQ(m_sheet->ownerNode(), this); | 277 DCHECK_EQ(m_sheet->ownerNode(), this); |
| 278 clearSheet(); | 278 clearSheet(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 // No need to remove pending sheets. | 281 // No need to remove pending sheets. |
| 282 clearResource(); | 282 clearResource(); |
| 283 | 283 |
| 284 // If we're in document teardown, then we don't need to do any notification of
our sheet's removal. | 284 // If we're in document teardown, then we don't need to do any notification of |
| 285 // our sheet's removal. |
| 285 if (document().isActive()) | 286 if (document().isActive()) |
| 286 document().styleEngine().setNeedsActiveStyleUpdate(removedSheet, | 287 document().styleEngine().setNeedsActiveStyleUpdate(removedSheet, |
| 287 FullStyleUpdate); | 288 FullStyleUpdate); |
| 288 } | 289 } |
| 289 | 290 |
| 290 void ProcessingInstruction::clearSheet() { | 291 void ProcessingInstruction::clearSheet() { |
| 291 DCHECK(m_sheet); | 292 DCHECK(m_sheet); |
| 292 if (m_sheet->isLoading()) | 293 if (m_sheet->isLoading()) |
| 293 document().styleEngine().removePendingSheet(*this, m_styleEngineContext); | 294 document().styleEngine().removePendingSheet(*this, m_styleEngineContext); |
| 294 m_sheet.release()->clearOwnerNode(); | 295 m_sheet.release()->clearOwnerNode(); |
| 295 } | 296 } |
| 296 | 297 |
| 297 DEFINE_TRACE(ProcessingInstruction) { | 298 DEFINE_TRACE(ProcessingInstruction) { |
| 298 visitor->trace(m_sheet); | 299 visitor->trace(m_sheet); |
| 299 visitor->trace(m_listenerForXSLT); | 300 visitor->trace(m_listenerForXSLT); |
| 300 CharacterData::trace(visitor); | 301 CharacterData::trace(visitor); |
| 301 ResourceOwner<StyleSheetResource>::trace(visitor); | 302 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 302 } | 303 } |
| 303 | 304 |
| 304 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |