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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 using namespace WTF::Unicode; | 31 using namespace WTF::Unicode; |
32 | 32 |
33 static LayoutObject* firstLayoutObjectForDirectionalityDetermination( | 33 static LayoutObject* firstLayoutObjectForDirectionalityDetermination( |
34 LayoutObject* root, LayoutObject* current = nullptr) | 34 LayoutObject* root, LayoutObject* current = nullptr) |
35 { | 35 { |
36 LayoutObject* next = current; | 36 LayoutObject* next = current; |
37 while (current) { | 37 while (current) { |
38 if (isIsolated(current->style()->unicodeBidi()) | 38 if (treatAsIsolated(current->styleRef()) |
39 && (current->isLayoutInline() || current->isLayoutBlock())) { | 39 && (current->isLayoutInline() || current->isLayoutBlock())) { |
40 if (current != root) | 40 if (current != root) |
41 current = nullptr; | 41 current = nullptr; |
42 else | 42 else |
43 current = next; | 43 current = next; |
44 break; | 44 break; |
45 } | 45 } |
46 current = current->parent(); | 46 current = current->parent(); |
47 } | 47 } |
48 | 48 |
49 if (!current) | 49 if (!current) |
50 current = root->slowFirstChild(); | 50 current = root->slowFirstChild(); |
51 | 51 |
52 while (current) { | 52 while (current) { |
53 next = nullptr; | 53 next = nullptr; |
54 if (isIteratorTarget(LineLayoutItem(current)) && !(current->isText() | 54 if (isIteratorTarget(LineLayoutItem(current)) && !(current->isText() |
55 && toLayoutText(current)->isAllCollapsibleWhitespace())) | 55 && toLayoutText(current)->isAllCollapsibleWhitespace())) |
56 break; | 56 break; |
57 | 57 |
58 if (!isIteratorTarget(LineLayoutItem(current)) | 58 if (!isIteratorTarget(LineLayoutItem(current)) |
59 && !isIsolated(current->style()->unicodeBidi())) | 59 && !treatAsIsolated(current->styleRef())) |
60 next = current->slowFirstChild(); | 60 next = current->slowFirstChild(); |
61 | 61 |
62 if (!next) { | 62 if (!next) { |
63 while (current && current != root) { | 63 while (current && current != root) { |
64 next = current->nextSibling(); | 64 next = current->nextSibling(); |
65 if (next) | 65 if (next) |
66 break; | 66 break; |
67 current = current->parent(); | 67 current = current->parent(); |
68 } | 68 } |
69 } | 69 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 isolatedRunsStack.resize(isolatedRunsStack.size() + 1); | 217 isolatedRunsStack.resize(isolatedRunsStack.size() + 1); |
218 isolatedRunsStack.last().isolatedRuns.appendVector( | 218 isolatedRunsStack.last().isolatedRuns.appendVector( |
219 isolatedResolver.isolatedRuns()); | 219 isolatedResolver.isolatedRuns()); |
220 isolatedRunsStack.last().root = isolatedInline; | 220 isolatedRunsStack.last().root = isolatedInline; |
221 restoreIsolatedMidpointStates(topResolver, isolatedResolver); | 221 restoreIsolatedMidpointStates(topResolver, isolatedResolver); |
222 } | 222 } |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 } // namespace blink | 226 } // namespace blink |
OLD | NEW |