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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp

Issue 1577313002: Remove unused variable in LayoutSVGInlineText::positionForPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | 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) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006 Apple Computer Inc. 3 * Copyright (C) 2006 Apple Computer Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) 2008 Rob Buis <buis@kde.org> 5 * Copyright (C) 2008 Rob Buis <buis@kde.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 // Map local point to absolute point, as the character origins stored in the text fragments use absolute coordinates. 171 // Map local point to absolute point, as the character origins stored in the text fragments use absolute coordinates.
172 FloatPoint absolutePoint(point); 172 FloatPoint absolutePoint(point);
173 absolutePoint.moveBy(containingBlock->location()); 173 absolutePoint.moveBy(containingBlock->location());
174 174
175 float closestDistance = std::numeric_limits<float>::max(); 175 float closestDistance = std::numeric_limits<float>::max();
176 float closestDistancePosition = 0; 176 float closestDistancePosition = 0;
177 const SVGTextFragment* closestDistanceFragment = nullptr; 177 const SVGTextFragment* closestDistanceFragment = nullptr;
178 SVGInlineTextBox* closestDistanceBox = nullptr; 178 SVGInlineTextBox* closestDistanceBox = nullptr;
179 179
180 AffineTransform fragmentTransform;
181 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 180 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
182 if (!box->isSVGInlineTextBox()) 181 if (!box->isSVGInlineTextBox())
183 continue; 182 continue;
184 183
185 SVGInlineTextBox* textBox = toSVGInlineTextBox(box); 184 SVGInlineTextBox* textBox = toSVGInlineTextBox(box);
186 for (const SVGTextFragment& fragment : textBox->textFragments()) { 185 for (const SVGTextFragment& fragment : textBox->textFragments()) {
187 FloatRect fragmentRect = fragment.boundingBox(baseline); 186 FloatRect fragmentRect = fragment.boundingBox(baseline);
188 187
189 float distance = 0; 188 float distance = 0;
190 if (!fragmentRect.contains(absolutePoint)) 189 if (!fragmentRect.contains(absolutePoint))
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 247
249 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const 248 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const
250 { 249 {
251 RefPtr<StringImpl> result = LayoutText::originalText(); 250 RefPtr<StringImpl> result = LayoutText::originalText();
252 if (!result) 251 if (!result)
253 return nullptr; 252 return nullptr;
254 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P RE); 253 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P RE);
255 } 254 }
256 255
257 } 256 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698