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

Unified Diff: Source/core/rendering/svg/RenderSVGInlineText.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
Index: Source/core/rendering/svg/RenderSVGInlineText.cpp
diff --git a/Source/core/rendering/svg/RenderSVGInlineText.cpp b/Source/core/rendering/svg/RenderSVGInlineText.cpp
index 1141a56d1c09a97a9656eeedff230845d20d5554..521d6a5ccddf682c814cc13cf29d4c50026ffa52 100644
--- a/Source/core/rendering/svg/RenderSVGInlineText.cpp
+++ b/Source/core/rendering/svg/RenderSVGInlineText.cpp
@@ -219,10 +219,9 @@ void RenderSVGInlineText::computeNewScaledFontForStyle(RenderObject* renderer, c
ASSERT(style);
ASSERT(renderer);
- Document* document = renderer->document();
- ASSERT(document);
+ Document& document = renderer->document();
- StyleResolver* styleResolver = document->styleResolver();
+ StyleResolver* styleResolver = document.styleResolver();
ASSERT(styleResolver);
// Alter font-size to the right on-screen value to avoid scaling the glyphs themselves, except when GeometricPrecision is specified.
@@ -239,7 +238,7 @@ void RenderSVGInlineText::computeNewScaledFontForStyle(RenderObject* renderer, c
FontDescription fontDescription(style->fontDescription());
// FIXME: We need to better handle the case when we compute very small fonts below (below 1pt).
- fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), DoNotUseSmartMinimumForFontSize));
+ fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(&document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), DoNotUseSmartMinimumForFontSize));
scaledFont = Font(fontDescription, 0, 0);
scaledFont.update(styleResolver->fontSelector());
« no previous file with comments | « Source/core/rendering/svg/ReferenceFilterBuilder.cpp ('k') | Source/core/rendering/svg/RenderSVGModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698