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

Side by Side Diff: Source/core/svg/SVGTextPositioningElement.cpp

Issue 715023002: Make SVGTextPositioningElement::elementFromRenderer take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compile problem Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGTextPositioningElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (!renderer) 83 if (!renderer)
84 return; 84 return;
85 85
86 ASSERT(updateRelativeLengths || attrName == SVGNames::rotateAttr); 86 ASSERT(updateRelativeLengths || attrName == SVGNames::rotateAttr);
87 87
88 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor (renderer)) 88 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor (renderer))
89 textRenderer->setNeedsPositioningValuesUpdate(); 89 textRenderer->setNeedsPositioningValuesUpdate();
90 markForLayoutAndParentResourceInvalidation(renderer); 90 markForLayoutAndParentResourceInvalidation(renderer);
91 } 91 }
92 92
93 SVGTextPositioningElement* SVGTextPositioningElement::elementFromRenderer(Render Object* renderer) 93 SVGTextPositioningElement* SVGTextPositioningElement::elementFromRenderer(Render Object& renderer)
94 { 94 {
95 if (!renderer) 95 if (!renderer.isSVGText() && !renderer.isSVGInline())
96 return 0; 96 return 0;
97 97
98 if (!renderer->isSVGText() && !renderer->isSVGInline()) 98 Node* node = renderer.node();
99 return 0;
100
101 Node* node = renderer->node();
102 ASSERT(node); 99 ASSERT(node);
103 ASSERT(node->isSVGElement()); 100 ASSERT(node->isSVGElement());
104 101
105 return isSVGTextPositioningElement(*node) ? toSVGTextPositioningElement(node ) : 0; 102 return isSVGTextPositioningElement(*node) ? toSVGTextPositioningElement(node ) : 0;
106 } 103 }
107 104
108 } 105 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTextPositioningElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698