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

Side by Side Diff: Source/core/layout/line/AbstractInlineTextBox.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/layout/line/AbstractInlineTextBox.h" 32 #include "core/layout/line/AbstractInlineTextBox.h"
33 33
34 #include "core/editing/iterators/TextIterator.h" 34 #include "core/editing/iterators/TextIterator.h"
35 #include "platform/text/TextBreakIterator.h" 35 #include "platform/text/TextBreakIterator.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 AbstractInlineTextBox::InlineToAbstractInlineTextBoxHashMap* AbstractInlineTextB ox::gAbstractInlineTextBoxMap = 0; 39 AbstractInlineTextBox::InlineToAbstractInlineTextBoxHashMap* AbstractInlineTextB ox::gAbstractInlineTextBoxMap = nullptr;
40 40
41 PassRefPtr<AbstractInlineTextBox> AbstractInlineTextBox::getOrCreate(LayoutText* layoutText, InlineTextBox* inlineTextBox) 41 PassRefPtr<AbstractInlineTextBox> AbstractInlineTextBox::getOrCreate(LayoutText* layoutText, InlineTextBox* inlineTextBox)
42 { 42 {
43 if (!inlineTextBox) 43 if (!inlineTextBox)
44 return nullptr; 44 return nullptr;
45 45
46 if (!gAbstractInlineTextBoxMap) 46 if (!gAbstractInlineTextBoxMap)
47 gAbstractInlineTextBoxMap = new InlineToAbstractInlineTextBoxHashMap(); 47 gAbstractInlineTextBoxMap = new InlineToAbstractInlineTextBoxHashMap();
48 48
49 InlineToAbstractInlineTextBoxHashMap::const_iterator it = gAbstractInlineTex tBoxMap->find(inlineTextBox); 49 InlineToAbstractInlineTextBoxHashMap::const_iterator it = gAbstractInlineTex tBoxMap->find(inlineTextBox);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return nullptr; 191 return nullptr;
192 192
193 InlineBox* previous = m_inlineTextBox->prevOnLine(); 193 InlineBox* previous = m_inlineTextBox->prevOnLine();
194 if (previous && previous->isInlineTextBox()) 194 if (previous && previous->isInlineTextBox())
195 return getOrCreate(&toInlineTextBox(previous)->layoutObject(), toInlineT extBox(previous)); 195 return getOrCreate(&toInlineTextBox(previous)->layoutObject(), toInlineT extBox(previous));
196 196
197 return nullptr; 197 return nullptr;
198 } 198 }
199 199
200 } // namespace blink 200 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/compositing/GraphicsLayerUpdater.cpp ('k') | Source/core/layout/line/BreakingContextInlineHeaders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698