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

Side by Side Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 101763008: Fix some problems reported by clang static analyzer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderMediaControls.cpp ('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) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return; 211 return;
212 212
213 RenderSVGInlineText* textRenderer = toRenderSVGInlineText(this->textRenderer ()); 213 RenderSVGInlineText* textRenderer = toRenderSVGInlineText(this->textRenderer ());
214 ASSERT(textRenderer); 214 ASSERT(textRenderer);
215 if (!textShouldBePainted(textRenderer)) 215 if (!textShouldBePainted(textRenderer))
216 return; 216 return;
217 217
218 RenderStyle* style = parentRenderer->style(); 218 RenderStyle* style = parentRenderer->style();
219 ASSERT(style); 219 ASSERT(style);
220 220
221 RenderStyle* selectionStyle = style;
222 if (hasSelection) {
223 selectionStyle = parentRenderer->getCachedPseudoStyle(SELECTION);
224 if (!selectionStyle)
225 selectionStyle = style;
226 }
227
228 int startPosition, endPosition; 221 int startPosition, endPosition;
229 selectionStartEnd(startPosition, endPosition); 222 selectionStartEnd(startPosition, endPosition);
230 223
231 int fragmentStartPosition = 0; 224 int fragmentStartPosition = 0;
232 int fragmentEndPosition = 0; 225 int fragmentEndPosition = 0;
233 AffineTransform fragmentTransform; 226 AffineTransform fragmentTransform;
234 unsigned textFragmentsSize = m_textFragments.size(); 227 unsigned textFragmentsSize = m_textFragments.size();
235 for (unsigned i = 0; i < textFragmentsSize; ++i) { 228 for (unsigned i = 0; i < textFragmentsSize; ++i) {
236 SVGTextFragment& fragment = m_textFragments.at(i); 229 SVGTextFragment& fragment = m_textFragments.at(i);
237 ASSERT(!m_paintingResource); 230 ASSERT(!m_paintingResource);
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 renderer()->updateHitTestResult(result, locationInContainer.poin t() - toLayoutSize(accumulatedOffset)); 739 renderer()->updateHitTestResult(result, locationInContainer.poin t() - toLayoutSize(accumulatedOffset));
747 if (!result.addNodeToRectBasedTestResult(renderer()->node(), req uest, locationInContainer, rect)) 740 if (!result.addNodeToRectBasedTestResult(renderer()->node(), req uest, locationInContainer, rect))
748 return true; 741 return true;
749 } 742 }
750 } 743 }
751 } 744 }
752 return false; 745 return false;
753 } 746 }
754 747
755 } // namespace WebCore 748 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMediaControls.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698