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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (m_registeredAsCandidate) { | 84 if (m_registeredAsCandidate) { |
85 document.styleEngine()->removeStyleSheetCandidateNode(element, scopingNo
de, treeScope); | 85 document.styleEngine()->removeStyleSheetCandidateNode(element, scopingNo
de, treeScope); |
86 m_registeredAsCandidate = false; | 86 m_registeredAsCandidate = false; |
87 } | 87 } |
88 | 88 |
89 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); | 89 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); |
90 | 90 |
91 if (m_sheet) | 91 if (m_sheet) |
92 clearSheet(element); | 92 clearSheet(element); |
93 if (removedSheet) | 93 if (removedSheet) |
94 document.removedStyleSheet(removedSheet.get(), RecalcStyleDeferred, Anal
yzedStyleUpdate); | 94 document.removedStyleSheet(removedSheet.get(), AnalyzedStyleUpdate); |
95 } | 95 } |
96 | 96 |
97 void StyleElement::clearDocumentData(Document& document, Element* element) | 97 void StyleElement::clearDocumentData(Document& document, Element* element) |
98 { | 98 { |
99 if (m_sheet) | 99 if (m_sheet) |
100 m_sheet->clearOwnerNode(); | 100 m_sheet->clearOwnerNode(); |
101 | 101 |
102 if (element->inDocument()) { | 102 if (element->inDocument()) { |
103 ContainerNode* scopingNode = isHTMLStyleElement(element) ? toHTMLStyleEl
ement(element)->scopingNode() : 0; | 103 ContainerNode* scopingNode = isHTMLStyleElement(element) ? toHTMLStyleEl
ement(element)->scopingNode() : 0; |
104 TreeScope& treeScope = scopingNode ? scopingNode->treeScope() : element-
>treeScope(); | 104 TreeScope& treeScope = scopingNode ? scopingNode->treeScope() : element-
>treeScope(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 { | 188 { |
189 document.styleEngine()->addPendingSheet(); | 189 document.styleEngine()->addPendingSheet(); |
190 } | 190 } |
191 | 191 |
192 void StyleElement::trace(Visitor* visitor) | 192 void StyleElement::trace(Visitor* visitor) |
193 { | 193 { |
194 visitor->trace(m_sheet); | 194 visitor->trace(m_sheet); |
195 } | 195 } |
196 | 196 |
197 } | 197 } |
OLD | NEW |