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 * Copyright (C) 2013 Adobe Systems Incorporated. | 5 * Copyright (C) 2013 Adobe Systems Incorporated. |
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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 | 719 |
720 inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
& hyphenated) | 720 inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
& hyphenated) |
721 { | 721 { |
722 if (!m_current.offset()) | 722 if (!m_current.offset()) |
723 m_appliedStartWidth = false; | 723 m_appliedStartWidth = false; |
724 | 724 |
725 RenderText* renderText = toRenderText(m_current.object()); | 725 RenderText* renderText = toRenderText(m_current.object()); |
726 | 726 |
727 bool isSVGText = renderText->isSVGInlineText(); | 727 bool isSVGText = renderText->isSVGInlineText(); |
728 | 728 |
| 729 // If we have left a no-wrap inline and entered an autowrap inline while ign
oring spaces |
| 730 // then we need to mark the start of the autowrap inline as a potential line
break now. |
| 731 if (m_autoWrap && !RenderStyle::autoWrap(m_lastWS) && m_ignoringSpaces) { |
| 732 m_width.commit(); |
| 733 m_lineBreak.moveToStartOf(m_current.object()); |
| 734 } |
| 735 |
729 if (renderText->style()->hasTextCombine() && m_current.object()->isCombineTe
xt() && !toRenderCombineText(m_current.object())->isCombined()) { | 736 if (renderText->style()->hasTextCombine() && m_current.object()->isCombineTe
xt() && !toRenderCombineText(m_current.object())->isCombined()) { |
730 RenderCombineText* combineRenderer = toRenderCombineText(m_current.objec
t()); | 737 RenderCombineText* combineRenderer = toRenderCombineText(m_current.objec
t()); |
731 combineRenderer->combineText(); | 738 combineRenderer->combineText(); |
732 // The length of the renderer's text may have changed. Increment stale i
terator positions | 739 // The length of the renderer's text may have changed. Increment stale i
terator positions |
733 if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreak, combineRenderer)
) { | 740 if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreak, combineRenderer)
) { |
734 ASSERT(iteratorIsBeyondEndOfRenderCombineText(m_resolver.position(),
combineRenderer)); | 741 ASSERT(iteratorIsBeyondEndOfRenderCombineText(m_resolver.position(),
combineRenderer)); |
735 m_lineBreak.increment(); | 742 m_lineBreak.increment(); |
736 m_resolver.position().increment(&m_resolver); | 743 m_resolver.position().increment(&m_resolver); |
737 } | 744 } |
738 } | 745 } |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 m_lineBreak.increment(); | 1145 m_lineBreak.increment(); |
1139 } while (!m_lineBreak.atEnd() && isEmptyInline(m_lineBreak.object())); | 1146 } while (!m_lineBreak.atEnd() && isEmptyInline(m_lineBreak.object())); |
1140 } | 1147 } |
1141 | 1148 |
1142 return m_lineBreak; | 1149 return m_lineBreak; |
1143 } | 1150 } |
1144 | 1151 |
1145 } | 1152 } |
1146 | 1153 |
1147 #endif // BreakingContextInlineHeaders_h | 1154 #endif // BreakingContextInlineHeaders_h |
OLD | NEW |