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, 2009, 2010 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
4 * All right reserved. | 4 * All right reserved. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 inline bool operator!=(const InlineIterator& it1, const InlineIterator& it2) { | 140 inline bool operator!=(const InlineIterator& it1, const InlineIterator& it2) { |
141 return it1.offset() != it2.offset() || | 141 return it1.offset() != it2.offset() || |
142 it1.getLineLayoutItem() != it2.getLineLayoutItem(); | 142 it1.getLineLayoutItem() != it2.getLineLayoutItem(); |
143 } | 143 } |
144 | 144 |
145 static inline WTF::Unicode::CharDirection embedCharFromDirection( | 145 static inline WTF::Unicode::CharDirection embedCharFromDirection( |
146 TextDirection dir, | 146 TextDirection dir, |
147 EUnicodeBidi unicodeBidi) { | 147 EUnicodeBidi unicodeBidi) { |
148 using namespace WTF::Unicode; | 148 using namespace WTF::Unicode; |
149 if (unicodeBidi == Embed) { | 149 if (unicodeBidi == Embed) { |
150 return dir == TextDirection::Rtl ? RightToLeftEmbedding | 150 return dir == TextDirection::kRtl ? RightToLeftEmbedding |
151 : LeftToRightEmbedding; | 151 : LeftToRightEmbedding; |
152 } | 152 } |
153 return dir == TextDirection::Rtl ? RightToLeftOverride : LeftToRightOverride; | 153 return dir == TextDirection::kRtl ? RightToLeftOverride : LeftToRightOverride; |
154 } | 154 } |
155 | 155 |
156 static inline bool treatAsIsolated(const ComputedStyle& style) { | 156 static inline bool treatAsIsolated(const ComputedStyle& style) { |
157 return isIsolated(style.unicodeBidi()) && | 157 return isIsolated(style.unicodeBidi()) && |
158 style.rtlOrdering() == EOrder::Logical; | 158 style.rtlOrdering() == EOrder::Logical; |
159 } | 159 } |
160 | 160 |
161 template <class Observer> | 161 template <class Observer> |
162 static inline void notifyObserverEnteredObject(Observer* observer, | 162 static inline void notifyObserverEnteredObject(Observer* observer, |
163 LineLayoutItem object) { | 163 LineLayoutItem object) { |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 BidiRunList<BidiRun>& runs, | 588 BidiRunList<BidiRun>& runs, |
589 int start, | 589 int start, |
590 int stop, | 590 int stop, |
591 BidiRun* run, | 591 BidiRun* run, |
592 BidiContext* context, | 592 BidiContext* context, |
593 TextDirection direction) const { | 593 TextDirection direction) const { |
594 DCHECK(context); | 594 DCHECK(context); |
595 BidiRun* newTrailingRun = new BidiRun( | 595 BidiRun* newTrailingRun = new BidiRun( |
596 context->override(), context->level(), start, stop, run->m_lineLayoutItem, | 596 context->override(), context->level(), start, stop, run->m_lineLayoutItem, |
597 WTF::Unicode::OtherNeutral, context->dir()); | 597 WTF::Unicode::OtherNeutral, context->dir()); |
598 if (direction == TextDirection::Ltr) | 598 if (direction == TextDirection::kLtr) |
599 runs.addRun(newTrailingRun); | 599 runs.addRun(newTrailingRun); |
600 else | 600 else |
601 runs.prependRun(newTrailingRun); | 601 runs.prependRun(newTrailingRun); |
602 | 602 |
603 return newTrailingRun; | 603 return newTrailingRun; |
604 } | 604 } |
605 | 605 |
606 template <> | 606 template <> |
607 inline bool InlineBidiResolver::needsToApplyL1Rule(BidiRunList<BidiRun>& runs) { | 607 inline bool InlineBidiResolver::needsToApplyL1Rule(BidiRunList<BidiRun>& runs) { |
608 if (!runs.logicallyLastRun() | 608 if (!runs.logicallyLastRun() |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 m_sor = m_eor; | 895 m_sor = m_eor; |
896 } | 896 } |
897 | 897 |
898 m_direction = WTF::Unicode::OtherNeutral; | 898 m_direction = WTF::Unicode::OtherNeutral; |
899 m_status.eor = WTF::Unicode::OtherNeutral; | 899 m_status.eor = WTF::Unicode::OtherNeutral; |
900 } | 900 } |
901 | 901 |
902 } // namespace blink | 902 } // namespace blink |
903 | 903 |
904 #endif // InlineIterator_h | 904 #endif // InlineIterator_h |
OLD | NEW |