OLD | NEW |
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 public: | 194 public: |
195 BidiResolver() | 195 BidiResolver() |
196 : m_direction(WTF::Unicode::OtherNeutral) | 196 : m_direction(WTF::Unicode::OtherNeutral) |
197 , m_reachedEndOfLine(false) | 197 , m_reachedEndOfLine(false) |
198 , m_emptyRun(true) | 198 , m_emptyRun(true) |
199 , m_nestedIsolateCount(0) | 199 , m_nestedIsolateCount(0) |
200 , m_trailingSpaceRun(0) | 200 , m_trailingSpaceRun(0) |
201 { | 201 { |
202 } | 202 } |
203 | 203 |
204 #ifndef NDEBUG | 204 #if ENABLE(ASSERT) |
205 ~BidiResolver(); | 205 ~BidiResolver(); |
206 #endif | 206 #endif |
207 | 207 |
208 const Iterator& position() const { return m_current; } | 208 const Iterator& position() const { return m_current; } |
209 Iterator& position() { return m_current; } | 209 Iterator& position() { return m_current; } |
210 void setPositionIgnoringNestedIsolates(const Iterator& position) { m_current
= position; } | 210 void setPositionIgnoringNestedIsolates(const Iterator& position) { m_current
= position; } |
211 void setPosition(const Iterator& position, unsigned nestedIsolatedCount) | 211 void setPosition(const Iterator& position, unsigned nestedIsolatedCount) |
212 { | 212 { |
213 m_current = position; | 213 m_current = position; |
214 m_nestedIsolateCount = nestedIsolatedCount; | 214 m_nestedIsolateCount = nestedIsolatedCount; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 bool needsToApplyL1Rule() { return false; } | 309 bool needsToApplyL1Rule() { return false; } |
310 int findFirstTrailingSpaceAtRun(Run*) { return 0; } | 310 int findFirstTrailingSpaceAtRun(Run*) { return 0; } |
311 // http://www.unicode.org/reports/tr9/#L1 | 311 // http://www.unicode.org/reports/tr9/#L1 |
312 void applyL1Rule(); | 312 void applyL1Rule(); |
313 | 313 |
314 Vector<BidiEmbedding, 8> m_currentExplicitEmbeddingSequence; | 314 Vector<BidiEmbedding, 8> m_currentExplicitEmbeddingSequence; |
315 HashMap<Run *, MidpointState<Iterator> > m_midpointStateForIsolatedRun; | 315 HashMap<Run *, MidpointState<Iterator> > m_midpointStateForIsolatedRun; |
316 }; | 316 }; |
317 | 317 |
318 #ifndef NDEBUG | 318 #if ENABLE(ASSERT) |
319 template <class Iterator, class Run> | 319 template <class Iterator, class Run> |
320 BidiResolver<Iterator, Run>::~BidiResolver() | 320 BidiResolver<Iterator, Run>::~BidiResolver() |
321 { | 321 { |
322 // The owner of this resolver should have handled the isolated runs. | 322 // The owner of this resolver should have handled the isolated runs. |
323 ASSERT(m_isolatedRuns.isEmpty()); | 323 ASSERT(m_isolatedRuns.isEmpty()); |
324 } | 324 } |
325 #endif | 325 #endif |
326 | 326 |
327 template <class Iterator, class Run> | 327 template <class Iterator, class Run> |
328 void BidiResolver<Iterator, Run>::appendRun() | 328 void BidiResolver<Iterator, Run>::appendRun() |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 template<class Iterator, class Run> | 1078 template<class Iterator, class Run> |
1079 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun
(Run* run) | 1079 MidpointState<Iterator> BidiResolver<Iterator, Run>::midpointStateForIsolatedRun
(Run* run) |
1080 { | 1080 { |
1081 return m_midpointStateForIsolatedRun.take(run); | 1081 return m_midpointStateForIsolatedRun.take(run); |
1082 } | 1082 } |
1083 | 1083 |
1084 | 1084 |
1085 } // namespace WebCore | 1085 } // namespace WebCore |
1086 | 1086 |
1087 #endif // BidiResolver_h | 1087 #endif // BidiResolver_h |
OLD | NEW |