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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 if (!insertionPoint->inDocument()) | 237 if (!insertionPoint->inDocument()) |
238 return; | 238 return; |
239 | 239 |
240 document().styleEngine()->removeStyleSheetCandidateNode(this); | 240 document().styleEngine()->removeStyleSheetCandidateNode(this); |
241 | 241 |
242 RefPtr<StyleSheet> removedSheet = m_sheet; | 242 RefPtr<StyleSheet> removedSheet = m_sheet; |
243 | 243 |
244 if (m_sheet) { | 244 if (m_sheet) { |
245 ASSERT(m_sheet->ownerNode() == this); | 245 ASSERT(m_sheet->ownerNode() == this); |
246 m_sheet->clearOwnerNode(); | 246 m_sheet->clearOwnerNode(); |
247 m_sheet = 0; | 247 m_sheet = nullptr; |
248 } | 248 } |
249 | 249 |
250 // If we're in document teardown, then we don't need to do any notification
of our sheet's removal. | 250 // If we're in document teardown, then we don't need to do any notification
of our sheet's removal. |
251 if (document().isActive()) | 251 if (document().isActive()) |
252 document().removedStyleSheet(removedSheet.get()); | 252 document().removedStyleSheet(removedSheet.get()); |
253 } | 253 } |
254 | 254 |
255 } // namespace | 255 } // namespace |
OLD | NEW |