Index: Source/core/rendering/RenderObject.h |
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
index 60746515d1a3dd05bcfe3885ce4798a8df2b8371..16264201d1ada3c0f0700e92de4cf91429c8f572 100644 |
--- a/Source/core/rendering/RenderObject.h |
+++ b/Source/core/rendering/RenderObject.h |
@@ -369,7 +369,7 @@ public: |
virtual bool isRenderScrollbarPart() const { return false; } |
- bool isRoot() const { return document()->documentElement() == m_node; } |
+ bool isRoot() const { return document().documentElement() == m_node; } |
bool isBody() const; |
bool isHR() const; |
bool isLegend() const; |
@@ -583,7 +583,7 @@ public: |
virtual void updateDragState(bool dragOn); |
- RenderView* view() const { return document()->renderView(); }; |
+ RenderView* view() const { return document().renderView(); }; |
// Returns true if this renderer is rooted, and optionally returns the hosting view (the root of the hierarchy). |
bool isRooted(RenderView** = 0) const; |
@@ -599,9 +599,8 @@ public: |
// pseudo elements for which their parent node is returned. |
Node* generatingNode() const { return isPseudoElement() ? node()->parentOrShadowHostNode() : node(); } |
- // FIXME: This should return a reference. |
- Document* document() const { return m_node->document(); } |
- Frame* frame() const { return document()->frame(); } |
+ Document& document() const { return m_node->document(); } |
+ Frame* frame() const { return document().frame(); } |
bool hasOutlineAnnotation() const; |
bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotation(); } |
@@ -756,7 +755,7 @@ public: |
virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
RenderStyle* style() const { return m_style.get(); } |
- RenderStyle* firstLineStyle() const { return document()->styleSheetCollections()->usesFirstLineRules() ? cachedFirstLineStyle() : style(); } |
+ RenderStyle* firstLineStyle() const { return document().styleSheetCollections()->usesFirstLineRules() ? cachedFirstLineStyle() : style(); } |
RenderStyle* style(bool firstLine) const { return firstLine ? firstLineStyle() : style(); } |
inline Color resolveColor(const RenderStyle* styleToUse, int colorProperty) const |
@@ -1211,7 +1210,7 @@ private: |
inline bool RenderObject::documentBeingDestroyed() const |
{ |
- return !document()->renderer(); |
+ return !document().renderer(); |
} |
inline bool RenderObject::isBeforeContent() const |