| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 WTF_MAKE_NONCOPYABLE(BidiResolver); | 216 WTF_MAKE_NONCOPYABLE(BidiResolver); |
| 217 | 217 |
| 218 public: | 218 public: |
| 219 BidiResolver() | 219 BidiResolver() |
| 220 : m_direction(WTF::Unicode::OtherNeutral), | 220 : m_direction(WTF::Unicode::OtherNeutral), |
| 221 m_reachedEndOfLine(false), | 221 m_reachedEndOfLine(false), |
| 222 m_emptyRun(true), | 222 m_emptyRun(true), |
| 223 m_nestedIsolateCount(0), | 223 m_nestedIsolateCount(0), |
| 224 m_trailingSpaceRun(0) {} | 224 m_trailingSpaceRun(0) {} |
| 225 | 225 |
| 226 #if ENABLE(ASSERT) | 226 #if DCHECK_IS_ON() |
| 227 ~BidiResolver(); | 227 ~BidiResolver(); |
| 228 #endif | 228 #endif |
| 229 | 229 |
| 230 const Iterator& position() const { return m_current; } | 230 const Iterator& position() const { return m_current; } |
| 231 Iterator& position() { return m_current; } | 231 Iterator& position() { return m_current; } |
| 232 void setPositionIgnoringNestedIsolates(const Iterator& position) { | 232 void setPositionIgnoringNestedIsolates(const Iterator& position) { |
| 233 m_current = position; | 233 m_current = position; |
| 234 } | 234 } |
| 235 void setPosition(const Iterator& position, unsigned nestedIsolatedCount) { | 235 void setPosition(const Iterator& position, unsigned nestedIsolatedCount) { |
| 236 m_current = position; | 236 m_current = position; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // http://www.unicode.org/reports/tr9/#L1 | 368 // http://www.unicode.org/reports/tr9/#L1 |
| 369 void applyL1Rule(BidiRunList<Run>&); | 369 void applyL1Rule(BidiRunList<Run>&); |
| 370 | 370 |
| 371 TextDirection determineDirectionalityInternal(bool breakOnParagraph, | 371 TextDirection determineDirectionalityInternal(bool breakOnParagraph, |
| 372 bool* hasStrongDirectionality); | 372 bool* hasStrongDirectionality); |
| 373 | 373 |
| 374 Vector<BidiEmbedding, 8> m_currentExplicitEmbeddingSequence; | 374 Vector<BidiEmbedding, 8> m_currentExplicitEmbeddingSequence; |
| 375 HashMap<Run*, MidpointState<Iterator>> m_midpointStateForIsolatedRun; | 375 HashMap<Run*, MidpointState<Iterator>> m_midpointStateForIsolatedRun; |
| 376 }; | 376 }; |
| 377 | 377 |
| 378 #if ENABLE(ASSERT) | 378 #if DCHECK_IS_ON() |
| 379 template <class Iterator, class Run, class IsolatedRun> | 379 template <class Iterator, class Run, class IsolatedRun> |
| 380 BidiResolver<Iterator, Run, IsolatedRun>::~BidiResolver() { | 380 BidiResolver<Iterator, Run, IsolatedRun>::~BidiResolver() { |
| 381 // The owner of this resolver should have handled the isolated runs. | 381 // The owner of this resolver should have handled the isolated runs. |
| 382 ASSERT(m_isolatedRuns.isEmpty()); | 382 ASSERT(m_isolatedRuns.isEmpty()); |
| 383 ASSERT(!m_runs.runCount()); | 383 ASSERT(!m_runs.runCount()); |
| 384 } | 384 } |
| 385 #endif | 385 #endif |
| 386 | 386 |
| 387 template <class Iterator, class Run, class IsolatedRun> | 387 template <class Iterator, class Run, class IsolatedRun> |
| 388 void BidiResolver<Iterator, Run, IsolatedRun>::appendRun( | 388 void BidiResolver<Iterator, Run, IsolatedRun>::appendRun( |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 template <class Iterator, class Run, class IsolatedRun> | 1216 template <class Iterator, class Run, class IsolatedRun> |
| 1217 MidpointState<Iterator> | 1217 MidpointState<Iterator> |
| 1218 BidiResolver<Iterator, Run, IsolatedRun>::midpointStateForIsolatedRun( | 1218 BidiResolver<Iterator, Run, IsolatedRun>::midpointStateForIsolatedRun( |
| 1219 Run& run) { | 1219 Run& run) { |
| 1220 return m_midpointStateForIsolatedRun.take(&run); | 1220 return m_midpointStateForIsolatedRun.take(&run); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 } // namespace blink | 1223 } // namespace blink |
| 1224 | 1224 |
| 1225 #endif // BidiResolver_h | 1225 #endif // BidiResolver_h |
| OLD | NEW |