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

Side by Side Diff: Source/platform/text/BidiRunList.h

Issue 62483002: Add ASSERTs in BidiResolver and RenderBlockLineLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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/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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 m_firstRun = 0; 197 m_firstRun = 0;
198 m_lastRun = 0; 198 m_lastRun = 0;
199 m_runCount = 0; 199 m_runCount = 0;
200 } 200 }
201 201
202 template <class Run> 202 template <class Run>
203 void BidiRunList<Run>::reverseRuns(unsigned start, unsigned end) 203 void BidiRunList<Run>::reverseRuns(unsigned start, unsigned end)
204 { 204 {
205 if (!m_runCount) 205 ASSERT(m_runCount);
206 return;
207
208 if (start >= end) 206 if (start >= end)
209 return; 207 return;
210 208
211 ASSERT(end < m_runCount); 209 ASSERT(end < m_runCount);
212 210
213 // Get the item before the start of the runs to reverse and put it in 211 // Get the item before the start of the runs to reverse and put it in
214 // |beforeStart|. |curr| should point to the first run to reverse. 212 // |beforeStart|. |curr| should point to the first run to reverse.
215 Run* curr = m_firstRun; 213 Run* curr = m_firstRun;
216 Run* beforeStart = 0; 214 Run* beforeStart = 0;
217 unsigned i = 0; 215 unsigned i = 0;
(...skipping 30 matching lines...) Expand all
248 m_firstRun = endRun; 246 m_firstRun = endRun;
249 247
250 startRun->m_next = afterEnd; 248 startRun->m_next = afterEnd;
251 if (!afterEnd) 249 if (!afterEnd)
252 m_lastRun = startRun; 250 m_lastRun = startRun;
253 } 251 }
254 252
255 } // namespace WebCore 253 } // namespace WebCore
256 254
257 #endif // BidiRunList 255 #endif // BidiRunList
OLDNEW
« no previous file with comments | « Source/platform/text/BidiResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698