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

Unified Diff: Source/core/css/resolver/ElementResolveContext.h

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/css/StyleSheetContents.cpp ('k') | Source/core/css/resolver/ElementResolveContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ElementResolveContext.h
diff --git a/Source/core/css/resolver/ElementResolveContext.h b/Source/core/css/resolver/ElementResolveContext.h
index fcb43631ed5ffe9ee2398436cd26113a6b904c50..ebbe1cfe50f680aa7da2d158c435e8a89fa8bd4a 100644
--- a/Source/core/css/resolver/ElementResolveContext.h
+++ b/Source/core/css/resolver/ElementResolveContext.h
@@ -47,9 +47,8 @@ public:
explicit ElementResolveContext(Element*);
- // FIXME: This should return a reference.
- Document* document() const { return m_element->document(); }
- bool isDocumentElement() const { return m_element && m_element == m_element->document()->documentElement(); }
+ Document& document() const { return m_element->document(); }
+ bool isDocumentElement() const { return m_element && m_element == m_element->document().documentElement(); }
Element* element() const { return m_element; }
const ContainerNode* parentNode() const { return m_parentNode; }
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/resolver/ElementResolveContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698