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

Side by Side Diff: Source/core/layout/svg/SVGTextChunkBuilder.cpp

Issue 1161803002: Add early-out in SVGTextChunkBuilder::finalizeTransformMatrices() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« 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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 if (isVerticalText) 244 if (isVerticalText)
245 fragment.y += textAnchorShift; 245 fragment.y += textAnchorShift;
246 else 246 else
247 fragment.x += textAnchorShift; 247 fragment.x += textAnchorShift;
248 } 248 }
249 } 249 }
250 250
251 void SVGTextChunkBuilder::finalizeTransformMatrices(const Vector<SVGInlineTextBo x*>& boxes) const 251 void SVGTextChunkBuilder::finalizeTransformMatrices(const Vector<SVGInlineTextBo x*>& boxes) const
252 { 252 {
253 if (m_textBoxTransformations.isEmpty())
254 return;
255
253 for (SVGInlineTextBox* textBox : boxes) { 256 for (SVGInlineTextBox* textBox : boxes) {
254 AffineTransform textBoxTransformation = m_textBoxTransformations.get(tex tBox); 257 AffineTransform textBoxTransformation = m_textBoxTransformations.get(tex tBox);
255 if (textBoxTransformation.isIdentity()) 258 if (textBoxTransformation.isIdentity())
256 continue; 259 continue;
257 260
258 for (SVGTextFragment& fragment : textBox->textFragments()) { 261 for (SVGTextFragment& fragment : textBox->textFragments()) {
259 ASSERT(fragment.lengthAdjustTransform.isIdentity()); 262 ASSERT(fragment.lengthAdjustTransform.isIdentity());
260 fragment.lengthAdjustTransform = textBoxTransformation; 263 fragment.lengthAdjustTransform = textBoxTransformation;
261 } 264 }
262 } 265 }
263 } 266 }
264 267
265 } 268 }
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