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 16 matching lines...) Expand all Loading... |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/layout/BidiRunForLine.h" | 28 #include "core/layout/BidiRunForLine.h" |
29 | 29 |
30 #include "core/layout/line/InlineIterator.h" | 30 #include "core/layout/line/InlineIterator.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 using namespace WTF::Unicode; | 34 using namespace WTF::Unicode; |
35 | 35 |
36 static LayoutObject* firstLayoutObjectForDirectionalityDetermination( | 36 static LayoutObject* firstLayoutObjectForDirectionalityDetermination( |
37 LayoutObject* root, LayoutObject* current = 0) | 37 LayoutObject* root, LayoutObject* current = nullptr) |
38 { | 38 { |
39 LayoutObject* next = current; | 39 LayoutObject* next = current; |
40 while (current) { | 40 while (current) { |
41 if (isIsolated(current->style()->unicodeBidi()) | 41 if (isIsolated(current->style()->unicodeBidi()) |
42 && (current->isLayoutInline() || current->isLayoutBlock())) { | 42 && (current->isLayoutInline() || current->isLayoutBlock())) { |
43 if (current != root) | 43 if (current != root) |
44 current = 0; | 44 current = nullptr; |
45 else | 45 else |
46 current = next; | 46 current = next; |
47 break; | 47 break; |
48 } | 48 } |
49 current = current->parent(); | 49 current = current->parent(); |
50 } | 50 } |
51 | 51 |
52 if (!current) | 52 if (!current) |
53 current = root->slowFirstChild(); | 53 current = root->slowFirstChild(); |
54 | 54 |
55 while (current) { | 55 while (current) { |
56 next = 0; | 56 next = nullptr; |
57 if (isIteratorTarget(current) && !(current->isText() | 57 if (isIteratorTarget(current) && !(current->isText() |
58 && toLayoutText(current)->isAllCollapsibleWhitespace())) | 58 && toLayoutText(current)->isAllCollapsibleWhitespace())) |
59 break; | 59 break; |
60 | 60 |
61 if (!isIteratorTarget(current) | 61 if (!isIteratorTarget(current) |
62 && !isIsolated(current->style()->unicodeBidi())) | 62 && !isIsolated(current->style()->unicodeBidi())) |
63 next = current->slowFirstChild(); | 63 next = current->slowFirstChild(); |
64 | 64 |
65 if (!next) { | 65 if (!next) { |
66 while (current && current != root) { | 66 while (current && current != root) { |
(...skipping 139 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 |