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

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

Issue 1547263002: Fix SVGInlineTextMetricsIterator not to keep a pointer to LineLayoutItem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: eae review, remove excessive assert 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 | « third_party/WebKit/Source/core/layout/api/LineLayoutSVGInlineText.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) Research In Motion Limited 2010-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010-2012. 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 ++m_logicalMetricsListOffset; 350 ++m_logicalMetricsListOffset;
351 m_logicalCharacterOffset += logicalMetrics.length(); 351 m_logicalCharacterOffset += logicalMetrics.length();
352 } 352 }
353 353
354 void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, Line LayoutSVGInlineText textLineLayout, const ComputedStyle& style) 354 void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, Line LayoutSVGInlineText textLineLayout, const ComputedStyle& style)
355 { 355 {
356 if (m_inPathLayout && !m_textPathCalculator) 356 if (m_inPathLayout && !m_textPathCalculator)
357 return; 357 return;
358 358
359 // Find the start of the current text box in the metrics list. 359 // Find the start of the current text box in the metrics list.
360 m_visualMetricsIterator.advanceToTextStart(&textLineLayout, textBox->start() ); 360 m_visualMetricsIterator.advanceToTextStart(textLineLayout, textBox->start()) ;
361 361
362 const Font& font = style.font(); 362 const Font& font = style.font();
363 363
364 SVGTextLayoutEngineSpacing spacingLayout(font, style.effectiveZoom()); 364 SVGTextLayoutEngineSpacing spacingLayout(font, style.effectiveZoom());
365 SVGTextLayoutEngineBaseline baselineLayout(font, style.effectiveZoom()); 365 SVGTextLayoutEngineBaseline baselineLayout(font, style.effectiveZoom());
366 366
367 bool didStartTextFragment = false; 367 bool didStartTextFragment = false;
368 bool applySpacingToNextCharacter = false; 368 bool applySpacingToNextCharacter = false;
369 369
370 float lastAngle = 0; 370 float lastAngle = 0;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 } 557 }
558 558
559 if (!didStartTextFragment) 559 if (!didStartTextFragment)
560 return; 560 return;
561 561
562 // Close last open fragment, if needed. 562 // Close last open fragment, if needed.
563 recordTextFragment(textBox); 563 recordTextFragment(textBox);
564 } 564 }
565 565
566 } 566 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LineLayoutSVGInlineText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698