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 Apple Inc. All right r
eserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All right r
eserved. |
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 410 |
411 static inline bool isIsolatedInline(RenderObject* object) | 411 static inline bool isIsolatedInline(RenderObject* object) |
412 { | 412 { |
413 ASSERT(object); | 413 ASSERT(object); |
414 return object->isRenderInline() && isIsolated(object->style()->unicodeBidi()
); | 414 return object->isRenderInline() && isIsolated(object->style()->unicodeBidi()
); |
415 } | 415 } |
416 | 416 |
417 static inline RenderObject* containingIsolate(RenderObject* object, RenderObject
* root) | 417 static inline RenderObject* containingIsolate(RenderObject* object, RenderObject
* root) |
418 { | 418 { |
419 ASSERT(object); | 419 ASSERT(object); |
| 420 RenderObject* containingIsolateObj = 0; |
420 while (object && object != root) { | 421 while (object && object != root) { |
| 422 if (containingIsolateObj && !isIsolatedInline(object)) |
| 423 break; |
| 424 |
421 if (isIsolatedInline(object)) | 425 if (isIsolatedInline(object)) |
422 return object; | 426 containingIsolateObj = object; |
| 427 |
423 object = object->parent(); | 428 object = object->parent(); |
424 } | 429 } |
425 return 0; | 430 return containingIsolateObj; |
426 } | 431 } |
427 | 432 |
428 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter) | 433 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter) |
429 { | 434 { |
430 RenderObject* object = iter.object(); | 435 RenderObject* object = iter.object(); |
431 if (!object) | 436 if (!object) |
432 return 0; | 437 return 0; |
433 unsigned count = 0; | 438 unsigned count = 0; |
434 while (object && object != iter.root()) { | 439 while (object && object != iter.root()) { |
435 if (isIsolatedInline(object)) | 440 if (isIsolatedInline(object)) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 m_sor = m_eor; | 542 m_sor = m_eor; |
538 } | 543 } |
539 | 544 |
540 m_direction = WTF::Unicode::OtherNeutral; | 545 m_direction = WTF::Unicode::OtherNeutral; |
541 m_status.eor = WTF::Unicode::OtherNeutral; | 546 m_status.eor = WTF::Unicode::OtherNeutral; |
542 } | 547 } |
543 | 548 |
544 } | 549 } |
545 | 550 |
546 #endif // InlineIterator_h | 551 #endif // InlineIterator_h |
OLD | NEW |