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

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

Issue 112953007: Make TreeScope::documentScope() return a reference and ensure m_documentScope is never NULL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXMEs 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/TreeScope.h ('k') | Source/core/dom/TreeScopeAdopter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScope.cpp
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
index b0954f99645ca42080b6d54a2a3e19ffc294f462..a7c3e671b4b3832bd0e1ccc78a2832f50ddbdafe 100644
--- a/Source/core/dom/TreeScope.cpp
+++ b/Source/core/dom/TreeScope.cpp
@@ -80,14 +80,6 @@ TreeScope::TreeScope(Document* document)
m_rootNode->setTreeScope(this);
}
-TreeScope::TreeScope()
- : m_rootNode(0)
- , m_documentScope(0)
- , m_parentTreeScope(0)
- , m_guardRefCount(0)
-{
-}
-
TreeScope::~TreeScope()
{
ASSERT(!m_guardRefCount);
@@ -114,12 +106,6 @@ void TreeScope::destroyTreeScopeData()
m_labelsByForAttribute.clear();
}
-void TreeScope::clearDocumentScope()
-{
- ASSERT(rootNode()->isDocumentNode());
- m_documentScope = 0;
-}
-
void TreeScope::setParentTreeScope(TreeScope* newParentScope)
{
// A document node cannot be re-parented.
@@ -513,8 +499,7 @@ void TreeScope::setNeedsStyleRecalcForViewportUnits()
KURL TreeScope::completeURL(const String& url) const
{
- ASSERT(documentScope());
- return documentScope()->completeURLWithOverride(url, baseURL());
+ return documentScope().completeURLWithOverride(url, baseURL());
}
} // namespace WebCore
« no previous file with comments | « Source/core/dom/TreeScope.h ('k') | Source/core/dom/TreeScopeAdopter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698