| 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 bool isNewUBAParagraph = layoutState.lineInfo().previousLineBrokeCleanly
(); | 813 bool isNewUBAParagraph = layoutState.lineInfo().previousLineBrokeCleanly
(); |
| 814 FloatingObject* lastFloatFromPreviousLine = (containsFloats()) ? m_float
ingObjects->set().last().get() : 0; | 814 FloatingObject* lastFloatFromPreviousLine = (containsFloats()) ? m_float
ingObjects->set().last().get() : 0; |
| 815 | 815 |
| 816 WordMeasurements wordMeasurements; | 816 WordMeasurements wordMeasurements; |
| 817 endOfLine = lineBreaker.nextLineBreak(resolver, bidiRuns, | 817 endOfLine = lineBreaker.nextLineBreak(resolver, bidiRuns, |
| 818 layoutState.lineInfo(), renderTextInfo, | 818 layoutState.lineInfo(), renderTextInfo, |
| 819 lastFloatFromPreviousLine, wordMeasurements); | 819 lastFloatFromPreviousLine, wordMeasurements); |
| 820 renderTextInfo.m_lineBreakIterator.resetPriorContext(); | 820 renderTextInfo.m_lineBreakIterator.resetPriorContext(); |
| 821 if (resolver.position().atEnd()) { | 821 if (resolver.position().atEnd()) { |
| 822 // FIXME: We shouldn't be creating any runs in nextLineBreak to begi
n with! | 822 // FIXME: We shouldn't be creating any runs in nextLineBreak to begi
n with! |
| 823 // Once BidiRunList is separated from BidiResolver this will not be
needed. | 823 // Figure out why we create new runs in nextLineBreak and why we |
| 824 // seem to rely on that behavior. |
| 825 // Removing the addRun calls in LineBreaker::skipLeadingWhitespace |
| 826 // breaks a bunch of bidi layout tests. |
| 824 bidiRuns.deleteRuns(); | 827 bidiRuns.deleteRuns(); |
| 825 resolver.markCurrentRunEmpty(); // FIXME: This can probably be repla
ced by an ASSERT (or just removed). | 828 resolver.markCurrentRunEmpty(); // FIXME: This can probably be repla
ced by an ASSERT (or just removed). |
| 826 layoutState.setCheckForFloatsFromLastLine(true); | 829 layoutState.setCheckForFloatsFromLastLine(true); |
| 827 resolver.setPosition(InlineIterator(resolver.position().root(), 0, 0
), 0); | 830 resolver.setPosition(InlineIterator(resolver.position().root(), 0, 0
), 0); |
| 828 break; | 831 break; |
| 829 } | 832 } |
| 830 | 833 |
| 831 ASSERT(endOfLine != resolver.position()); | 834 ASSERT(endOfLine != resolver.position()); |
| 832 | 835 |
| 833 // This is a short-cut for empty lines. | 836 // This is a short-cut for empty lines. |
| (...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); | 2037 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); |
| 2035 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; | 2038 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; |
| 2036 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2039 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
| 2037 | 2040 |
| 2038 if (!style()->isLeftToRightDirection()) | 2041 if (!style()->isLeftToRightDirection()) |
| 2039 return logicalWidth() - logicalLeft; | 2042 return logicalWidth() - logicalLeft; |
| 2040 return logicalLeft; | 2043 return logicalLeft; |
| 2041 } | 2044 } |
| 2042 | 2045 |
| 2043 } | 2046 } |
| OLD | NEW |