OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * Copyright (C) 2006 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. | 6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 *last = temp; | 252 *last = temp; |
253 ++first; | 253 ++first; |
254 continue; | 254 continue; |
255 } | 255 } |
256 | 256 |
257 SVGInlineTextBox* firstTextBox = toSVGInlineTextBox(*first); | 257 SVGInlineTextBox* firstTextBox = toSVGInlineTextBox(*first); |
258 SVGInlineTextBox* lastTextBox = toSVGInlineTextBox(*last); | 258 SVGInlineTextBox* lastTextBox = toSVGInlineTextBox(*last); |
259 | 259 |
260 // Reordering is only necessary for BiDi text that is _absolutely_ posit
ioned. | 260 // Reordering is only necessary for BiDi text that is _absolutely_ posit
ioned. |
261 if (firstTextBox->len() == 1 && firstTextBox->len() == lastTextBox->len(
)) { | 261 if (firstTextBox->len() == 1 && firstTextBox->len() == lastTextBox->len(
)) { |
262 RenderSVGInlineText& firstContext = toRenderSVGInlineText(firstTextB
ox->textRenderer()); | 262 RenderSVGInlineText& firstContext = toRenderSVGInlineText(firstTextB
ox->renderer()); |
263 RenderSVGInlineText& lastContext = toRenderSVGInlineText(lastTextBox
->textRenderer()); | 263 RenderSVGInlineText& lastContext = toRenderSVGInlineText(lastTextBox
->renderer()); |
264 | 264 |
265 SVGTextLayoutAttributes* firstAttributes = 0; | 265 SVGTextLayoutAttributes* firstAttributes = 0; |
266 SVGTextLayoutAttributes* lastAttributes = 0; | 266 SVGTextLayoutAttributes* lastAttributes = 0; |
267 findFirstAndLastAttributesInVector(attributes, &firstContext, &lastC
ontext, firstAttributes, lastAttributes); | 267 findFirstAndLastAttributesInVector(attributes, &firstContext, &lastC
ontext, firstAttributes, lastAttributes); |
268 swapItemsInLayoutAttributes(firstAttributes, lastAttributes, firstTe
xtBox->start(), lastTextBox->start()); | 268 swapItemsInLayoutAttributes(firstAttributes, lastAttributes, firstTe
xtBox->start(), lastTextBox->start()); |
269 } | 269 } |
270 | 270 |
271 InlineBox* temp = *first; | 271 InlineBox* temp = *first; |
272 *first = *last; | 272 *first = *last; |
273 *last = temp; | 273 *last = temp; |
274 | 274 |
275 ++first; | 275 ++first; |
276 } | 276 } |
277 } | 277 } |
278 | 278 |
279 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri
butes) | 279 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri
butes) |
280 { | 280 { |
281 Vector<InlineBox*> leafBoxesInLogicalOrder; | 281 Vector<InlineBox*> leafBoxesInLogicalOrder; |
282 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); | 282 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); |
283 } | 283 } |
284 | 284 |
285 } // namespace blink | 285 } // namespace blink |
OLD | NEW |