OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 Node* node = sheet->ownerNode(); | 191 Node* node = sheet->ownerNode(); |
192 if (!node || !node->inDocument()) | 192 if (!node || !node->inDocument()) |
193 return; | 193 return; |
194 | 194 |
195 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume
nt; | 195 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume
nt; |
196 ASSERT(isStyleElement(*node) || treeScope == m_document); | 196 ASSERT(isStyleElement(*node) || treeScope == m_document); |
197 | 197 |
198 markTreeScopeDirty(treeScope); | 198 markTreeScopeDirty(treeScope); |
199 } | 199 } |
200 | 200 |
201 void StyleEngine::addStyleSheetCandidateNode(Node* node, bool createdByParser) | 201 void StyleEngine::addStyleSheetCandidateNode(Node* node) |
202 { | 202 { |
203 if (!node->inDocument() || document().isDetached()) | 203 if (!node->inDocument() || document().isDetached()) |
204 return; | 204 return; |
205 | 205 |
206 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume
nt; | 206 TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_docume
nt; |
207 ASSERT(isStyleElement(*node) || treeScope == m_document); | 207 ASSERT(isStyleElement(*node) || treeScope == m_document); |
208 ASSERT(!isXSLStyleSheet(*node)); | 208 ASSERT(!isXSLStyleSheet(*node)); |
209 TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(tr
eeScope); | 209 TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(tr
eeScope); |
210 ASSERT(collection); | 210 ASSERT(collection); |
211 collection->addStyleSheetCandidateNode(node, createdByParser); | 211 collection->addStyleSheetCandidateNode(node); |
212 | 212 |
213 markTreeScopeDirty(treeScope); | 213 markTreeScopeDirty(treeScope); |
214 if (treeScope != m_document) | 214 if (treeScope != m_document) |
215 m_activeTreeScopes.add(&treeScope); | 215 m_activeTreeScopes.add(&treeScope); |
216 } | 216 } |
217 | 217 |
218 void StyleEngine::removeStyleSheetCandidateNode(Node* node) | 218 void StyleEngine::removeStyleSheetCandidateNode(Node* node) |
219 { | 219 { |
220 removeStyleSheetCandidateNode(node, *m_document); | 220 removeStyleSheetCandidateNode(node, *m_document); |
221 } | 221 } |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 visitor->trace(m_dirtyTreeScopes); | 735 visitor->trace(m_dirtyTreeScopes); |
736 visitor->trace(m_activeTreeScopes); | 736 visitor->trace(m_activeTreeScopes); |
737 visitor->trace(m_fontSelector); | 737 visitor->trace(m_fontSelector); |
738 visitor->trace(m_textToSheetCache); | 738 visitor->trace(m_textToSheetCache); |
739 visitor->trace(m_sheetToTextCache); | 739 visitor->trace(m_sheetToTextCache); |
740 #endif | 740 #endif |
741 CSSFontSelectorClient::trace(visitor); | 741 CSSFontSelectorClient::trace(visitor); |
742 } | 742 } |
743 | 743 |
744 } // namespace blink | 744 } // namespace blink |
OLD | NEW |