| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 ASSERT(m_sheet->ownerNode() == element); | 77 ASSERT(m_sheet->ownerNode() == element); |
| 78 m_sheet->clearOwnerNode(); | 78 m_sheet->clearOwnerNode(); |
| 79 m_sheet = 0; | 79 m_sheet = 0; |
| 80 } | 80 } |
| 81 | 81 |
| 82 // If we're in document teardown, then we don't need to do any notification
of our sheet's removal. | 82 // If we're in document teardown, then we don't need to do any notification
of our sheet's removal. |
| 83 if (document->renderer()) | 83 if (document->renderer()) |
| 84 document->styleSelectorChanged(DeferRecalcStyle); | 84 document->styleSelectorChanged(DeferRecalcStyle); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void StyleElement::clearDocumentData(Document* document, Element* element) |
| 88 { |
| 89 if (m_sheet) |
| 90 m_sheet->clearOwnerNode(); |
| 91 |
| 92 if (element->inDocument()) |
| 93 document->removeStyleSheetCandidateNode(element); |
| 94 } |
| 95 |
| 87 void StyleElement::childrenChanged(Element* element) | 96 void StyleElement::childrenChanged(Element* element) |
| 88 { | 97 { |
| 89 ASSERT(element); | 98 ASSERT(element); |
| 90 if (m_createdByParser) | 99 if (m_createdByParser) |
| 91 return; | 100 return; |
| 92 | 101 |
| 93 process(element); | 102 process(element); |
| 94 } | 103 } |
| 95 | 104 |
| 96 void StyleElement::finishParsingChildren(Element* element) | 105 void StyleElement::finishParsingChildren(Element* element) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return true; | 191 return true; |
| 183 } | 192 } |
| 184 | 193 |
| 185 void StyleElement::startLoadingDynamicSheet(Document* document) | 194 void StyleElement::startLoadingDynamicSheet(Document* document) |
| 186 { | 195 { |
| 187 ASSERT(document); | 196 ASSERT(document); |
| 188 document->addPendingSheet(); | 197 document->addPendingSheet(); |
| 189 } | 198 } |
| 190 | 199 |
| 191 } | 200 } |
| OLD | NEW |