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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp

Issue 2610253004: Migrate WTF::Vector::append() to ::push_back() [part 9 of N] (Closed)
Patch Set: rebase Created 3 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 TextBreakIterator* iterator = wordBreakIterator(text, 0, len); 139 TextBreakIterator* iterator = wordBreakIterator(text, 0, len);
140 140
141 // FIXME: When http://crbug.com/411764 is fixed, replace this with an ASSERT. 141 // FIXME: When http://crbug.com/411764 is fixed, replace this with an ASSERT.
142 if (!iterator) 142 if (!iterator)
143 return; 143 return;
144 144
145 int pos = iterator->first(); 145 int pos = iterator->first();
146 while (pos >= 0 && pos < len) { 146 while (pos >= 0 && pos < len) {
147 int next = iterator->next(); 147 int next = iterator->next();
148 if (isWordTextBreak(iterator)) 148 if (isWordTextBreak(iterator))
149 words.append(WordBoundaries(pos, next)); 149 words.push_back(WordBoundaries(pos, next));
150 pos = next; 150 pos = next;
151 } 151 }
152 } 152 }
153 153
154 String AbstractInlineTextBox::text() const { 154 String AbstractInlineTextBox::text() const {
155 if (!m_inlineTextBox || !m_lineLayoutItem) 155 if (!m_inlineTextBox || !m_lineLayoutItem)
156 return String(); 156 return String();
157 157
158 unsigned start = m_inlineTextBox->start(); 158 unsigned start = m_inlineTextBox->start();
159 unsigned len = m_inlineTextBox->len(); 159 unsigned len = m_inlineTextBox->len();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 InlineBox* previous = m_inlineTextBox->prevOnLine(); 214 InlineBox* previous = m_inlineTextBox->prevOnLine();
215 if (previous && previous->isInlineTextBox()) 215 if (previous && previous->isInlineTextBox())
216 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), 216 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(),
217 toInlineTextBox(previous)); 217 toInlineTextBox(previous));
218 218
219 return nullptr; 219 return nullptr;
220 } 220 }
221 221
222 } // namespace blink 222 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698