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: Source/core/platform/text/BidiRunList.h

Issue 25373008: BidiResolver should not try to reverse runs when the run count is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missed layout test Created 7 years, 2 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/platform/text/BidiResolver.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved.
4 * Copyright (C) 2011 Google, Inc. All rights reserved. 4 * Copyright (C) 2011 Google, Inc. 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 m_firstRun = 0; 196 m_firstRun = 0;
197 m_lastRun = 0; 197 m_lastRun = 0;
198 m_runCount = 0; 198 m_runCount = 0;
199 } 199 }
200 200
201 template <class Run> 201 template <class Run>
202 void BidiRunList<Run>::reverseRuns(unsigned start, unsigned end) 202 void BidiRunList<Run>::reverseRuns(unsigned start, unsigned end)
203 { 203 {
204 if (!m_runCount)
205 return;
206
204 if (start >= end) 207 if (start >= end)
205 return; 208 return;
206 209
207 ASSERT(end < m_runCount); 210 ASSERT(end < m_runCount);
208 211
209 // Get the item before the start of the runs to reverse and put it in 212 // Get the item before the start of the runs to reverse and put it in
210 // |beforeStart|. |curr| should point to the first run to reverse. 213 // |beforeStart|. |curr| should point to the first run to reverse.
211 Run* curr = m_firstRun; 214 Run* curr = m_firstRun;
212 Run* beforeStart = 0; 215 Run* beforeStart = 0;
213 unsigned i = 0; 216 unsigned i = 0;
(...skipping 30 matching lines...) Expand all
244 m_firstRun = endRun; 247 m_firstRun = endRun;
245 248
246 startRun->m_next = afterEnd; 249 startRun->m_next = afterEnd;
247 if (!afterEnd) 250 if (!afterEnd)
248 m_lastRun = startRun; 251 m_lastRun = startRun;
249 } 252 }
250 253
251 } // namespace WebCore 254 } // namespace WebCore
252 255
253 #endif // BidiRunList 256 #endif // BidiRunList
OLDNEW
« no previous file with comments | « Source/core/platform/text/BidiResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698