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

Side by Side Diff: Source/platform/text/BidiResolver.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/core/rendering/RenderBlockLineLayout.cpp ('k') | Source/platform/text/BidiRunList.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) 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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void setContext(PassRefPtr<BidiContext> c) { m_status.context = c; } 192 void setContext(PassRefPtr<BidiContext> c) { m_status.context = c; }
193 193
194 void setLastDir(WTF::Unicode::Direction lastDir) { m_status.last = lastDir; } 194 void setLastDir(WTF::Unicode::Direction lastDir) { m_status.last = lastDir; }
195 void setLastStrongDir(WTF::Unicode::Direction lastStrongDir) { m_status.last Strong = lastStrongDir; } 195 void setLastStrongDir(WTF::Unicode::Direction lastStrongDir) { m_status.last Strong = lastStrongDir; }
196 void setEorDir(WTF::Unicode::Direction eorDir) { m_status.eor = eorDir; } 196 void setEorDir(WTF::Unicode::Direction eorDir) { m_status.eor = eorDir; }
197 197
198 WTF::Unicode::Direction dir() const { return m_direction; } 198 WTF::Unicode::Direction dir() const { return m_direction; }
199 void setDir(WTF::Unicode::Direction d) { m_direction = d; } 199 void setDir(WTF::Unicode::Direction d) { m_direction = d; }
200 200
201 const BidiStatus& status() const { return m_status; } 201 const BidiStatus& status() const { return m_status; }
202 void setStatus(const BidiStatus s) { m_status = s; } 202 void setStatus(const BidiStatus s)
203 {
204 ASSERT(s.context);
205 m_status = s;
206 }
203 207
204 MidpointState<Iterator>& midpointState() { return m_midpointState; } 208 MidpointState<Iterator>& midpointState() { return m_midpointState; }
205 209
206 // The current algorithm handles nested isolates one layer of nesting at a t ime. 210 // The current algorithm handles nested isolates one layer of nesting at a t ime.
207 // But when we layout each isolated span, we will walk into (and ignore) all 211 // But when we layout each isolated span, we will walk into (and ignore) all
208 // child isolated spans. 212 // child isolated spans.
209 void enterIsolate() { m_nestedIsolateCount++; } 213 void enterIsolate() { m_nestedIsolateCount++; }
210 void exitIsolate() { ASSERT(m_nestedIsolateCount >= 1); m_nestedIsolateCount --; } 214 void exitIsolate() { ASSERT(m_nestedIsolateCount >= 1); m_nestedIsolateCount --; }
211 bool inIsolate() const { return m_nestedIsolateCount; } 215 bool inIsolate() const { return m_nestedIsolateCount; }
212 216
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 template<class Iterator, class Run> 981 template<class Iterator, class Run>
978 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun (Run* run) 982 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun (Run* run)
979 { 983 {
980 return m_midpointStateForIsolatedRun.take(run); 984 return m_midpointStateForIsolatedRun.take(run);
981 } 985 }
982 986
983 987
984 } // namespace WebCore 988 } // namespace WebCore
985 989
986 #endif // BidiResolver_h 990 #endif // BidiResolver_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockLineLayout.cpp ('k') | Source/platform/text/BidiRunList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698