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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ASSERT(&topResolver.runs() == &bidiRuns); | 112 ASSERT(&topResolver.runs() == &bidiRuns); |
113 ASSERT(topResolver.position() != endOfLine); | 113 ASSERT(topResolver.position() != endOfLine); |
114 LineLayoutItem currentRoot = topResolver.position().root(); | 114 LineLayoutItem currentRoot = topResolver.position().root(); |
115 topResolver.createBidiRunsForLine(endOfLine, override, | 115 topResolver.createBidiRunsForLine(endOfLine, override, |
116 previousLineBrokeCleanly); | 116 previousLineBrokeCleanly); |
117 | 117 |
118 while (!topResolver.isolatedRuns().isEmpty()) { | 118 while (!topResolver.isolatedRuns().isEmpty()) { |
119 // It does not matter which order we resolve the runs as long as we | 119 // It does not matter which order we resolve the runs as long as we |
120 // resolve them all. | 120 // resolve them all. |
121 BidiIsolatedRun isolatedRun = topResolver.isolatedRuns().last(); | 121 BidiIsolatedRun isolatedRun = topResolver.isolatedRuns().last(); |
122 topResolver.isolatedRuns().removeLast(); | 122 topResolver.isolatedRuns().pop_back(); |
123 currentRoot = isolatedRun.root; | 123 currentRoot = isolatedRun.root; |
124 | 124 |
125 LineLayoutItem startObj = isolatedRun.object; | 125 LineLayoutItem startObj = isolatedRun.object; |
126 | 126 |
127 // Only inlines make sense with unicode-bidi: isolate (blocks are | 127 // Only inlines make sense with unicode-bidi: isolate (blocks are |
128 // already isolated). | 128 // already isolated). |
129 // FIXME: Because enterIsolate is not passed a LayoutObject, we have to | 129 // FIXME: Because enterIsolate is not passed a LayoutObject, we have to |
130 // crawl up the tree to see which parent inline is the isolate. We could | 130 // crawl up the tree to see which parent inline is the isolate. We could |
131 // change enterIsolate to take a LayoutObject and do this logic there, | 131 // change enterIsolate to take a LayoutObject and do this logic there, |
132 // but that would be a layering violation for BidiResolver (which knows | 132 // but that would be a layering violation for BidiResolver (which knows |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 ASSERT(isolatedResolver.runs().runCount()); | 173 ASSERT(isolatedResolver.runs().runCount()); |
174 if (isolatedResolver.runs().runCount()) | 174 if (isolatedResolver.runs().runCount()) |
175 bidiRuns.replaceRunWithRuns(&isolatedRun.runToReplace, | 175 bidiRuns.replaceRunWithRuns(&isolatedRun.runToReplace, |
176 isolatedResolver.runs()); | 176 isolatedResolver.runs()); |
177 | 177 |
178 // If we encountered any nested isolate runs, save them for later | 178 // If we encountered any nested isolate runs, save them for later |
179 // processing. | 179 // processing. |
180 while (!isolatedResolver.isolatedRuns().isEmpty()) { | 180 while (!isolatedResolver.isolatedRuns().isEmpty()) { |
181 BidiIsolatedRun runWithContext = isolatedResolver.isolatedRuns().last(); | 181 BidiIsolatedRun runWithContext = isolatedResolver.isolatedRuns().last(); |
182 isolatedResolver.isolatedRuns().removeLast(); | 182 isolatedResolver.isolatedRuns().pop_back(); |
183 topResolver.setMidpointStateForIsolatedRun( | 183 topResolver.setMidpointStateForIsolatedRun( |
184 runWithContext.runToReplace, | 184 runWithContext.runToReplace, |
185 isolatedResolver.midpointStateForIsolatedRun( | 185 isolatedResolver.midpointStateForIsolatedRun( |
186 runWithContext.runToReplace)); | 186 runWithContext.runToReplace)); |
187 topResolver.isolatedRuns().append(runWithContext); | 187 topResolver.isolatedRuns().append(runWithContext); |
188 } | 188 } |
189 } | 189 } |
190 } | 190 } |
191 | 191 |
192 } // namespace blink | 192 } // namespace blink |
OLD | NEW |