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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 bool needsWordSpacing; | 561 bool needsWordSpacing; |
562 | 562 |
563 if (firstRun && firstRun->m_object->isReplaced()) { | 563 if (firstRun && firstRun->m_object->isReplaced()) { |
564 RenderBox* renderBox = toRenderBox(firstRun->m_object); | 564 RenderBox* renderBox = toRenderBox(firstRun->m_object); |
565 updateLogicalInlinePositions(this, lineLogicalLeft, lineLogicalRight, av
ailableLogicalWidth, isFirstLine, shouldIndentText, renderBox->logicalHeight()); | 565 updateLogicalInlinePositions(this, lineLogicalLeft, lineLogicalRight, av
ailableLogicalWidth, isFirstLine, shouldIndentText, renderBox->logicalHeight()); |
566 } | 566 } |
567 | 567 |
568 computeInlineDirectionPositionsForSegment(lineBox, lineInfo, textAlign, line
LogicalLeft, availableLogicalWidth, firstRun, trailingSpaceRun, textBoxDataMap,
verticalPositionCache, wordMeasurements); | 568 computeInlineDirectionPositionsForSegment(lineBox, lineInfo, textAlign, line
LogicalLeft, availableLogicalWidth, firstRun, trailingSpaceRun, textBoxDataMap,
verticalPositionCache, wordMeasurements); |
569 // The widths of all runs are now known. We can now place every inline box (
and | 569 // The widths of all runs are now known. We can now place every inline box (
and |
570 // compute accurate widths for the inline flow boxes). | 570 // compute accurate widths for the inline flow boxes). |
571 needsWordSpacing = false; | 571 needsWordSpacing = lineBox->isLeftToRightDirection() ? false: true; |
572 lineBox->placeBoxesInInlineDirection(lineLogicalLeft, needsWordSpacing); | 572 lineBox->placeBoxesInInlineDirection(lineLogicalLeft, needsWordSpacing); |
573 } | 573 } |
574 | 574 |
575 BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo
x* lineBox, const LineInfo& lineInfo, ETextAlign textAlign, float& logicalLeft, | 575 BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo
x* lineBox, const LineInfo& lineInfo, ETextAlign textAlign, float& logicalLeft, |
576 float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun,
GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& vertica
lPositionCache, | 576 float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun,
GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& vertica
lPositionCache, |
577 WordMeasurements& wordMeasurements) | 577 WordMeasurements& wordMeasurements) |
578 { | 578 { |
579 bool needsWordSpacing = true; | 579 bool needsWordSpacing = true; |
580 float totalLogicalWidth = lineBox->getFlowSpacingLogicalWidth().toFloat(); | 580 float totalLogicalWidth = lineBox->getFlowSpacingLogicalWidth().toFloat(); |
581 unsigned expansionOpportunityCount = 0; | 581 unsigned expansionOpportunityCount = 0; |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2037 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); | 2037 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); |
2038 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; | 2038 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; |
2039 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2039 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
2040 | 2040 |
2041 if (!style()->isLeftToRightDirection()) | 2041 if (!style()->isLeftToRightDirection()) |
2042 return logicalWidth() - logicalLeft; | 2042 return logicalWidth() - logicalLeft; |
2043 return logicalLeft; | 2043 return logicalLeft; |
2044 } | 2044 } |
2045 | 2045 |
2046 } | 2046 } |
OLD | NEW |