Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 819ad3dbd66768c38d7a1b452ff5413fee992d11..7a7f808e83527fcc84d7c23afb6a1aa8f76c933b 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -163,7 +163,7 @@ void StyleEngine::addPendingSheet()
void StyleEngine::removePendingSheet(Node* styleSheetCandidateNode)
{
DCHECK(styleSheetCandidateNode);
- TreeScope* treeScope = isStyleElement(*styleSheetCandidateNode) ? &styleSheetCandidateNode->treeScope() : m_document.get();
+ TreeScope* treeScope = isStyleElement(*styleSheetCandidateNode) ? &styleSheetCandidateNode->treeScopeOrDocument() : m_document.get();
if (styleSheetCandidateNode->inShadowIncludingDocument())
markTreeScopeDirty(*treeScope);
@@ -189,8 +189,8 @@ void StyleEngine::setNeedsActiveStyleUpdate(StyleSheet* sheet, StyleResolverUpda
if (sheet && document().isActive()) {
Node* node = sheet->ownerNode();
if (node && node->inShadowIncludingDocument()) {
- TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_document;
- DCHECK(isStyleElement(*node) || node->treeScope() == m_document);
+ TreeScope& treeScope = isStyleElement(*node) ? node->treeScopeOrDocument() : *m_document;
+ DCHECK(isStyleElement(*node) || node->treeScopeOrDocument() == m_document);
markTreeScopeDirty(treeScope);
}
}
@@ -203,7 +203,7 @@ void StyleEngine::addStyleSheetCandidateNode(Node* node)
if (!node->inShadowIncludingDocument() || document().isDetached())
return;
- TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_document;
+ TreeScope& treeScope = isStyleElement(*node) ? node->treeScopeOrDocument() : *m_document;
DCHECK(isStyleElement(*node) || treeScope == m_document);
DCHECK(!isXSLStyleSheet(*node));
TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(treeScope);
@@ -240,7 +240,7 @@ void StyleEngine::modifiedStyleSheetCandidateNode(Node* node)
if (!node->inShadowIncludingDocument())
return;
- TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_document;
+ TreeScope& treeScope = isStyleElement(*node) ? node->treeScopeOrDocument() : *m_document;
DCHECK(isStyleElement(*node) || treeScope == m_document);
markTreeScopeDirty(treeScope);
resolverChanged(FullStyleUpdate);
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.cpp ('k') | third_party/WebKit/Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698