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. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 389 } |
390 | 390 |
391 static TextDirection determinePlaintextDirectionality(RenderObject* root, Render
Object* current = 0, unsigned pos = 0) | 391 static TextDirection determinePlaintextDirectionality(RenderObject* root, Render
Object* current = 0, unsigned pos = 0) |
392 { | 392 { |
393 InlineIterator iter(root, firstRenderObjectForDirectionalityDetermination(ro
ot, current), pos); | 393 InlineIterator iter(root, firstRenderObjectForDirectionalityDetermination(ro
ot, current), pos); |
394 InlineBidiResolver observer; | 394 InlineBidiResolver observer; |
395 observer.setPositionIgnoringNestedIsolates(iter); | 395 observer.setPositionIgnoringNestedIsolates(iter); |
396 observer.setStatus(BidiStatus(root->style()->direction(), isOverride(root->s
tyle()->unicodeBidi()))); | 396 observer.setStatus(BidiStatus(root->style()->direction(), isOverride(root->s
tyle()->unicodeBidi()))); |
397 while (!iter.atEnd()) { | 397 while (!iter.atEnd()) { |
398 if (observer.inIsolate()) { | 398 if (observer.inIsolate()) { |
399 iter.increment(&observer); | 399 iter.increment(&observer, InlineIterator::FastIncrementInlineRendere
r); |
400 continue; | 400 continue; |
401 } | 401 } |
402 if (iter.atParagraphSeparator()) | 402 if (iter.atParagraphSeparator()) |
403 break; | 403 break; |
404 if (UChar current = iter.current()) { | 404 if (UChar current = iter.current()) { |
405 Direction charDirection = direction(current); | 405 Direction charDirection = direction(current); |
406 if (charDirection == LeftToRight) | 406 if (charDirection == LeftToRight) |
407 return LTR; | 407 return LTR; |
408 if (charDirection == RightToLeft || charDirection == RightToLeftArab
ic) | 408 if (charDirection == RightToLeft || charDirection == RightToLeftArab
ic) |
409 return RTL; | 409 return RTL; |
(...skipping 3115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3525 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 3525 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
3526 | 3526 |
3527 setLineGridBox(lineGridBox); | 3527 setLineGridBox(lineGridBox); |
3528 | 3528 |
3529 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 3529 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
3530 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 3530 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
3531 // to this grid. | 3531 // to this grid. |
3532 } | 3532 } |
3533 | 3533 |
3534 } | 3534 } |
OLD | NEW |