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

Side by Side Diff: Source/core/layout/svg/line/SVGInlineTextBox.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/SVGTextQuery.cpp ('k') | Source/core/layout/svg/line/SVGRootInlineBox.h » ('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) 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 TextRun SVGInlineTextBox::constructTextRun(const ComputedStyle& style, const SVG TextFragment& fragment) const 170 TextRun SVGInlineTextBox::constructTextRun(const ComputedStyle& style, const SVG TextFragment& fragment) const
171 { 171 {
172 LayoutText* text = &layoutObject(); 172 LayoutText* text = &layoutObject();
173 173
174 // FIXME(crbug.com/264211): This should not be necessary but can occur if we 174 // FIXME(crbug.com/264211): This should not be necessary but can occur if we
175 // layout during layout. Remove this when 264211 is fixed. 175 // layout during layout. Remove this when 264211 is fixed.
176 RELEASE_ASSERT(!text->needsLayout()); 176 RELEASE_ASSERT(!text->needsLayout());
177 177
178 TextRun run(static_cast<const LChar*>(0) // characters, will be set below if non-zero. 178 TextRun run(static_cast<const LChar*>(nullptr) // characters, will be set be low if non-zero.
179 , 0 // length, will be set below if non-zero. 179 , 0 // length, will be set below if non-zero.
180 , 0 // xPos, only relevant with allowTabs=true 180 , 0 // xPos, only relevant with allowTabs=true
181 , 0 // padding, only relevant for justified text, not relevant for SVG 181 , 0 // padding, only relevant for justified text, not relevant for SVG
182 , TextRun::AllowTrailingExpansion 182 , TextRun::AllowTrailingExpansion
183 , direction() 183 , direction()
184 , dirOverride() || style.rtlOrdering() == VisualOrder /* directionalOver ride */); 184 , dirOverride() || style.rtlOrdering() == VisualOrder /* directionalOver ride */);
185 185
186 if (fragment.length) { 186 if (fragment.length) {
187 if (text->is8Bit()) 187 if (text->is8Bit())
188 run.setText(text->characters8() + fragment.characterOffset, fragment .length); 188 run.setText(text->characters8() + fragment.characterOffset, fragment .length);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 layoutObject().updateHitTestResult(result, locationInContainer.p oint() - toLayoutSize(accumulatedOffset)); 269 layoutObject().updateHitTestResult(result, locationInContainer.p oint() - toLayoutSize(accumulatedOffset));
270 if (!result.addNodeToListBasedTestResult(layoutObject().node(), locationInContainer, rect)) 270 if (!result.addNodeToListBasedTestResult(layoutObject().node(), locationInContainer, rect))
271 return true; 271 return true;
272 } 272 }
273 } 273 }
274 } 274 }
275 return false; 275 return false;
276 } 276 }
277 277
278 } // namespace blink 278 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/svg/SVGTextQuery.cpp ('k') | Source/core/layout/svg/line/SVGRootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698