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

Unified Diff: Source/core/rendering/svg/SVGTextChunkBuilder.cpp

Issue 184023003: Make InlineBox::renderer() and related subclass methods return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No reference reassignment. Created 6 years, 10 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/svg/SVGRootInlineBox.cpp ('k') | Source/core/rendering/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGTextChunkBuilder.cpp
diff --git a/Source/core/rendering/svg/SVGTextChunkBuilder.cpp b/Source/core/rendering/svg/SVGTextChunkBuilder.cpp
index bbaa5be44d8337d7fd3a885117e9f8aafbb22736..488fbd4bddddfaed4f901721af7b7f96e1deaff1 100644
--- a/Source/core/rendering/svg/SVGTextChunkBuilder.cpp
+++ b/Source/core/rendering/svg/SVGTextChunkBuilder.cpp
@@ -91,10 +91,9 @@ void SVGTextChunkBuilder::addTextChunk(Vector<SVGInlineTextBox*>& lineLayoutBoxe
SVGInlineTextBox* textBox = lineLayoutBoxes[boxStart];
ASSERT(textBox);
- RenderSVGInlineText* textRenderer = toRenderSVGInlineText(textBox->textRenderer());
- ASSERT(textRenderer);
+ RenderSVGInlineText& textRenderer = toRenderSVGInlineText(textBox->textRenderer());
- const RenderStyle* style = textRenderer->style();
+ const RenderStyle* style = toRenderSVGInlineText(textBox->textRenderer()).style();
ASSERT(style);
const SVGRenderStyle* svgStyle = style->svgStyle();
@@ -125,7 +124,7 @@ void SVGTextChunkBuilder::addTextChunk(Vector<SVGInlineTextBox*>& lineLayoutBoxe
// Handle 'lengthAdjust' property.
float desiredTextLength = 0;
- if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromRenderer(textRenderer->parent())) {
+ if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromRenderer(textRenderer.parent())) {
SVGLengthContext lengthContext(textContentElement);
if (textContentElement->textLengthIsSpecifiedByUser())
desiredTextLength = textContentElement->textLength()->currentValue()->value(lengthContext);
« no previous file with comments | « Source/core/rendering/svg/SVGRootInlineBox.cpp ('k') | Source/core/rendering/svg/SVGTextLayoutEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698