| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if (m_registeredAsCandidate) { | 85 if (m_registeredAsCandidate) { |
| 86 document.styleEngine()->removeStyleSheetCandidateNode(element, scopingNo
de, treeScope); | 86 document.styleEngine()->removeStyleSheetCandidateNode(element, scopingNo
de, treeScope); |
| 87 m_registeredAsCandidate = false; | 87 m_registeredAsCandidate = false; |
| 88 } | 88 } |
| 89 | 89 |
| 90 RefPtr<StyleSheet> removedSheet = m_sheet.get(); | 90 RefPtr<StyleSheet> removedSheet = m_sheet.get(); |
| 91 | 91 |
| 92 if (m_sheet) | 92 if (m_sheet) |
| 93 clearSheet(element); | 93 clearSheet(element); |
| 94 if (removedSheet) | 94 if (removedSheet) |
| 95 document.removedStyleSheet(removedSheet.get(), AnalyzedStyleUpdate); | 95 document.removedStyleSheet(removedSheet.get()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void StyleElement::clearDocumentData(Document& document, Element* element) | 98 void StyleElement::clearDocumentData(Document& document, Element* element) |
| 99 { | 99 { |
| 100 if (m_sheet) | 100 if (m_sheet) |
| 101 m_sheet->clearOwnerNode(); | 101 m_sheet->clearOwnerNode(); |
| 102 | 102 |
| 103 if (element->inDocument()) { | 103 if (element->inDocument()) { |
| 104 ContainerNode* scopingNode = isHTMLStyleElement(element) ? toHTMLStyleEl
ement(element)->scopingNode() : 0; | 104 ContainerNode* scopingNode = isHTMLStyleElement(element) ? toHTMLStyleEl
ement(element)->scopingNode() : 0; |
| 105 TreeScope& treeScope = scopingNode ? scopingNode->treeScope() : element-
>treeScope(); | 105 TreeScope& treeScope = scopingNode ? scopingNode->treeScope() : element-
>treeScope(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.g
et())) { | 154 if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.g
et())) { |
| 155 m_loading = true; | 155 m_loading = true; |
| 156 TextPosition startPosition = m_startPosition == TextPosition::belowR
angePosition() ? TextPosition::minimumPosition() : m_startPosition; | 156 TextPosition startPosition = m_startPosition == TextPosition::belowR
angePosition() ? TextPosition::minimumPosition() : m_startPosition; |
| 157 m_sheet = document.styleEngine()->createSheet(e, text, startPosition
, m_createdByParser); | 157 m_sheet = document.styleEngine()->createSheet(e, text, startPosition
, m_createdByParser); |
| 158 m_sheet->setMediaQueries(mediaQueries.release()); | 158 m_sheet->setMediaQueries(mediaQueries.release()); |
| 159 m_loading = false; | 159 m_loading = false; |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 | 163 |
| 164 document.styleResolverMayHaveChanged(); | 164 document.styleResolverChanged(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } | 167 } |
| OLD | NEW |