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

Unified Diff: Source/core/rendering/RenderTreeAsText.cpp

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/rendering/RenderTheme.cpp ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTreeAsText.cpp
diff --git a/Source/core/rendering/RenderTreeAsText.cpp b/Source/core/rendering/RenderTreeAsText.cpp
index 59c2959cfcb4e820592021a4c14802879f10abaf..fe1ea054c022931bfbf5f0af2757adce2e33395b 100644
--- a/Source/core/rendering/RenderTreeAsText.cpp
+++ b/Source/core/rendering/RenderTreeAsText.cpp
@@ -720,7 +720,7 @@ static String nodePosition(Node* node)
{
StringBuilder result;
- Element* body = node->document()->body();
+ Element* body = node->document().body();
Node* parent;
for (Node* n = node; n; n = parent) {
parent = n->parentOrShadowHostNode();
@@ -805,7 +805,7 @@ String externalRepresentation(Element* element, RenderAsTextBehavior behavior)
// Doesn't support printing mode.
ASSERT(!(behavior & RenderAsTextPrintingMode));
if (!(behavior & RenderAsTextDontUpdateLayout))
- element->document()->updateLayout();
+ element->document().updateLayout();
RenderObject* renderer = element->renderer();
if (!renderer || !renderer->isBox())
@@ -831,7 +831,7 @@ String counterValueForElement(Element* element)
{
// Make sure the element is not freed during the layout.
RefPtr<Element> elementRef(element);
- element->document()->updateLayout();
+ element->document().updateLayout();
TextStream stream;
bool isFirstCounter = true;
// The counter renderers should be children of :before or :after pseudo-elements.
@@ -846,7 +846,7 @@ String markerTextForListItem(Element* element)
{
// Make sure the element is not freed during the layout.
RefPtr<Element> elementRef(element);
- element->document()->updateLayout();
+ element->document().updateLayout();
RenderObject* renderer = element->renderer();
if (!renderer || !renderer->isListItem())
« no previous file with comments | « Source/core/rendering/RenderTheme.cpp ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698