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

Unified Diff: Source/core/dom/TreeScopeStyleSheetCollection.cpp

Issue 148703004: Have TreeScopeStyleSheetCollection::document() return a reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/core/dom/TreeScopeStyleSheetCollection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScopeStyleSheetCollection.cpp
diff --git a/Source/core/dom/TreeScopeStyleSheetCollection.cpp b/Source/core/dom/TreeScopeStyleSheetCollection.cpp
index 1bc66404d67a187e221806c336e4f976a7db2590..e53f441b87272714a1a8b1bfeb950b8e7d651263 100644
--- a/Source/core/dom/TreeScopeStyleSheetCollection.cpp
+++ b/Source/core/dom/TreeScopeStyleSheetCollection.cpp
@@ -54,7 +54,7 @@ void TreeScopeStyleSheetCollection::addStyleSheetCandidateNode(Node* node, bool
// since styles outside of the body and head continue to be shunted into the head
// (and thus can shift to end up before dynamically added DOM content that is also
// outside the body).
- if (createdByParser && document()->body())
+ if (createdByParser && document().body())
m_styleSheetCandidateNodes.parserAdd(node);
else
m_styleSheetCandidateNodes.add(node);
@@ -180,16 +180,16 @@ void TreeScopeStyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateM
// No point in doing the analysis work if we're just going to recalc the whole document anyways.
// This needs to be done after the compareStyleSheets calls above to ensure we don't throw away
// the StyleResolver if we don't need to.
- if (document()->hasPendingForcedStyleRecalc())
+ if (document().hasPendingForcedStyleRecalc())
return;
// If we are already parsing the body and so may have significant amount of elements, put some effort into trying to avoid style recalcs.
- if (!document()->body() || document()->hasNodesWithPlaceholderStyle())
+ if (!document().body() || document().hasNodesWithPlaceholderStyle())
return;
StyleInvalidationAnalysis invalidationAnalysis(addedSheets);
if (invalidationAnalysis.dirtiesAllStyle())
return;
- invalidationAnalysis.invalidateStyle(*document());
+ invalidationAnalysis.invalidateStyle(document());
change.requiresFullStyleRecalc = false;
return;
}
« no previous file with comments | « Source/core/dom/TreeScopeStyleSheetCollection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698