| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Rob Buis | 2 * Copyright (C) 2006, 2007 Rob Buis |
| 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. | 3 * Copyright (C) 2008 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ASSERT(element); | 70 ASSERT(element); |
| 71 document.styleEngine()->removeStyleSheetCandidateNode(element, scopingNode); | 71 document.styleEngine()->removeStyleSheetCandidateNode(element, scopingNode); |
| 72 | 72 |
| 73 RefPtr<StyleSheet> removedSheet = m_sheet; | 73 RefPtr<StyleSheet> removedSheet = m_sheet; |
| 74 | 74 |
| 75 if (m_sheet) | 75 if (m_sheet) |
| 76 clearSheet(); | 76 clearSheet(); |
| 77 | 77 |
| 78 // If we're in document teardown, then we don't need to do any notification
of our sheet's removal. | 78 // If we're in document teardown, then we don't need to do any notification
of our sheet's removal. |
| 79 if (document.isActive()) | 79 if (document.isActive()) |
| 80 document.removedStyleSheet(removedSheet.get()); | 80 document.removedStyleSheet(removedSheet.get(), RecalcStyleDeferred, Anal
yzedStyleUpdate); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void StyleElement::clearDocumentData(Document& document, Element* element) | 83 void StyleElement::clearDocumentData(Document& document, Element* element) |
| 84 { | 84 { |
| 85 if (m_sheet) | 85 if (m_sheet) |
| 86 m_sheet->clearOwnerNode(); | 86 m_sheet->clearOwnerNode(); |
| 87 | 87 |
| 88 if (element->inDocument()) | 88 if (element->inDocument()) |
| 89 document.styleEngine()->removeStyleSheetCandidateNode(element, isHTMLSty
leElement(element) ? toHTMLStyleElement(element)->scopingNode() : 0); | 89 document.styleEngine()->removeStyleSheetCandidateNode(element, isHTMLSty
leElement(element) ? toHTMLStyleElement(element)->scopingNode() : 0); |
| 90 } | 90 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 document.styleEngine()->removePendingSheet(m_sheet->ownerNode()); | 170 document.styleEngine()->removePendingSheet(m_sheet->ownerNode()); |
| 171 return true; | 171 return true; |
| 172 } | 172 } |
| 173 | 173 |
| 174 void StyleElement::startLoadingDynamicSheet(Document& document) | 174 void StyleElement::startLoadingDynamicSheet(Document& document) |
| 175 { | 175 { |
| 176 document.styleEngine()->addPendingSheet(); | 176 document.styleEngine()->addPendingSheet(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } | 179 } |
| OLD | NEW |