void StyleEngine::modifiedStyleSheetCandidateNode(Node* node) { if (!node->inDocument()) return; TreeScope& treeScope = node->hasTagName(styleTag) ? node->treeScope() : m_document; ASSERT(node->hasTagName(styleTag) || treeScope == m_document); markTreeScopeDirty(treeScope); }
void StyleEngine::modifiedStyleSheetCandidateNode(Node* node) { if (!node->inDocument()) return; TreeScope& treeScope = isHTMLStyleElement(*node) ? node->treeScope() : *m_document; ASSERT(isHTMLStyleElement(node) || treeScope == m_document); markTreeScopeDirty(treeScope); }
void StyleEngine::removeStyleSheetCandidateNode(Node* node, ContainerNode* scopingNode, TreeScope& treeScope) { ASSERT(isHTMLStyleElement(node) || treeScope == m_document); TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScope); ASSERT(collection); collection->removeStyleSheetCandidateNode(node, scopingNode); markTreeScopeDirty(treeScope); m_activeTreeScopes.remove(&treeScope); }
void StyleEngine::removeStyleSheetCandidateNode(Node* node, ContainerNode* scopingNode) { TreeScope& treeScope = scopingNode ? scopingNode->treeScope() : m_document; ASSERT(node->hasTagName(styleTag) || treeScope == m_document); TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScope); ASSERT(collection); collection->removeStyleSheetCandidateNode(node, scopingNode); markTreeScopeDirty(treeScope); m_activeTreeScopes.remove(&treeScope); }
void StyleEngine::modifiedStyleSheet(StyleSheet* sheet) { if (!sheet) return; Node* node = sheet->ownerNode(); if (!node || !node->inDocument()) return; TreeScope& treeScope = node->hasTagName(styleTag) ? node->treeScope() : m_document; ASSERT(node->hasTagName(styleTag) || treeScope == m_document); markTreeScopeDirty(treeScope); }
void StyleEngine::modifiedStyleSheet(StyleSheet* sheet) { if (!sheet) return; Node* node = sheet->ownerNode(); if (!node || !node->inDocument()) return; TreeScope& treeScope = isHTMLStyleElement(*node) ? node->treeScope() : *m_document; ASSERT(isHTMLStyleElement(node) || treeScope == m_document); markTreeScopeDirty(treeScope); }
void StyleEngine::addStyleSheetCandidateNode(Node* node, bool createdByParser) { if (!node->inDocument()) return; TreeScope& treeScope = isHTMLStyleElement(*node) ? node->treeScope() : *m_document; ASSERT(isHTMLStyleElement(node) || treeScope == m_document); TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(treeScope); ASSERT(collection); collection->addStyleSheetCandidateNode(node, createdByParser); markTreeScopeDirty(treeScope); if (treeScope != m_document) insertTreeScopeInDocumentOrder(m_activeTreeScopes, &treeScope); }
// This method is called whenever a top-level stylesheet has finished loading. void StyleEngine::removePendingSheet(Node* styleSheetCandidateNode, RemovePendingSheetNotificationType notification) { TreeScope* treeScope = styleSheetCandidateNode->hasTagName(styleTag) ? &styleSheetCandidateNode->treeScope() : &m_document; markTreeScopeDirty(*treeScope); master()->styleEngine()->notifyPendingStyleSheetRemoved(notification); }