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

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

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 years, 6 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/layout/svg/SVGTextMetrics.cpp ('k') | Source/core/layout/svg/SVGTextQuery.cpp » ('j') | 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool m_isComplexText; 66 bool m_isComplexText;
67 float m_totalWidth; 67 float m_totalWidth;
68 TextDirection m_textDirection; 68 TextDirection m_textDirection;
69 69
70 // Simple text only. 70 // Simple text only.
71 OwnPtr<SimpleShaper> m_simpleShaper; 71 OwnPtr<SimpleShaper> m_simpleShaper;
72 }; 72 };
73 73
74 SVGTextMetricsCalculator::SVGTextMetricsCalculator(LayoutSVGInlineText* text) 74 SVGTextMetricsCalculator::SVGTextMetricsCalculator(LayoutSVGInlineText* text)
75 : m_text(text) 75 : m_text(text)
76 , m_bidiRun(0) 76 , m_bidiRun(nullptr)
77 , m_run(SVGTextMetrics::constructTextRun(text, 0, text->textLength(), text-> styleRef().direction())) 77 , m_run(SVGTextMetrics::constructTextRun(text, 0, text->textLength(), text-> styleRef().direction()))
78 , m_isComplexText(false) 78 , m_isComplexText(false)
79 , m_totalWidth(0) 79 , m_totalWidth(0)
80 { 80 {
81 const Font& scaledFont = text->scaledFont(); 81 const Font& scaledFont = text->scaledFont();
82 CodePath codePath = scaledFont.codePath(TextRunPaintInfo(m_run)); 82 CodePath codePath = scaledFont.codePath(TextRunPaintInfo(m_run));
83 m_isComplexText = codePath == ComplexPath; 83 m_isComplexText = codePath == ComplexPath;
84 m_run.setCodePath(m_isComplexText ? TextRun::ForceComplex : TextRun::ForceSi mple); 84 m_run.setCodePath(m_isComplexText ? TextRun::ForceComplex : TextRun::ForceSi mple);
85 85
86 if (!m_isComplexText) 86 if (!m_isComplexText)
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 269
270 void SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes(LayoutSVGText* textR oot, LayoutSVGInlineText* stopAtLeaf, SVGCharacterDataMap& allCharactersMap) 270 void SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes(LayoutSVGText* textR oot, LayoutSVGInlineText* stopAtLeaf, SVGCharacterDataMap& allCharactersMap)
271 { 271 {
272 ASSERT(textRoot); 272 ASSERT(textRoot);
273 MeasureTextData data(&allCharactersMap); 273 MeasureTextData data(&allCharactersMap);
274 walkTree(textRoot, stopAtLeaf, &data); 274 walkTree(textRoot, stopAtLeaf, &data);
275 } 275 }
276 276
277 } 277 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/SVGTextMetrics.cpp ('k') | Source/core/layout/svg/SVGTextQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698