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, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 current = next; | 77 current = next; |
78 } | 78 } |
79 | 79 |
80 return current; | 80 return current; |
81 } | 81 } |
82 | 82 |
83 TextDirection determinePlaintextDirectionality(RenderObject* root, | 83 TextDirection determinePlaintextDirectionality(RenderObject* root, |
84 RenderObject* current = 0, unsigned pos = 0) | 84 RenderObject* current = 0, unsigned pos = 0) |
85 { | 85 { |
86 InlineIterator iter(root, | 86 RenderObject* firstRenderObject = firstRenderObjectForDirectionalityDetermin
ation(root, current); |
87 firstRenderObjectForDirectionalityDetermination(root, current), pos); | 87 InlineIterator iter(root, firstRenderObject, firstRenderObject == current ?
pos : 0); |
88 InlineBidiResolver observer; | 88 InlineBidiResolver observer; |
89 observer.setStatus(BidiStatus(root->style()->direction(), | 89 observer.setStatus(BidiStatus(root->style()->direction(), |
90 isOverride(root->style()->unicodeBidi()))); | 90 isOverride(root->style()->unicodeBidi()))); |
91 observer.setPositionIgnoringNestedIsolates(iter); | 91 observer.setPositionIgnoringNestedIsolates(iter); |
92 return observer.determineParagraphDirectionality(); | 92 return observer.determineParagraphDirectionality(); |
93 } | 93 } |
94 | 94 |
95 // FIXME: This should be a BidiStatus constructor or create method. | 95 // FIXME: This should be a BidiStatus constructor or create method. |
96 static inline BidiStatus statusWithDirection(TextDirection textDirection, | 96 static inline BidiStatus statusWithDirection(TextDirection textDirection, |
97 bool isOverride) | 97 bool isOverride) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 isolatedResolver.isolatedRuns()); | 206 isolatedResolver.isolatedRuns()); |
207 currentRoot = isolatedInline; | 207 currentRoot = isolatedInline; |
208 restoreIsolatedMidpointStates(topResolver, isolatedResolver); | 208 restoreIsolatedMidpointStates(topResolver, isolatedResolver); |
209 } | 209 } |
210 } | 210 } |
211 } | 211 } |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
214 | 214 |
215 #endif // BidiRunForLine_h | 215 #endif // BidiRunForLine_h |
OLD | NEW |