| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 for (LayoutUnit lineBottom = lineTop; lineBottom <= lineTop + lineHeight; li
neBottom++) { | 95 for (LayoutUnit lineBottom = lineTop; lineBottom <= lineTop + lineHeight; li
neBottom++) { |
| 96 LayoutUnit availableWidthAtBottom = availableWidthAtOffset(block, lineBo
ttom, shouldIndentText); | 96 LayoutUnit availableWidthAtBottom = availableWidthAtOffset(block, lineBo
ttom, shouldIndentText); |
| 97 if (availableWidthAtBottom < uncommittedWidth) | 97 if (availableWidthAtBottom < uncommittedWidth) |
| 98 return false; | 98 return false; |
| 99 } | 99 } |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void LineWidth::wrapNextToShapeOutside(bool isFirstLine) | 103 void LineWidth::wrapNextToShapeOutside(bool isFirstLine) |
| 104 { | 104 { |
| 105 LayoutUnit lineHeight = m_block.lineHeight(isFirstLine, m_block.isHorizontal
WritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); | 105 LayoutUnit lineHeight = m_block.lineHeight(isFirstLine, HorizontalLine, Posi
tionOfInteriorLineBoxes); |
| 106 LayoutUnit lineLogicalTop = m_block.logicalHeight(); | 106 LayoutUnit lineLogicalTop = m_block.logicalHeight(); |
| 107 LayoutUnit newLineTop = lineLogicalTop; | 107 LayoutUnit newLineTop = lineLogicalTop; |
| 108 LayoutUnit floatLogicalBottom = lineLogicalTop; | 108 LayoutUnit floatLogicalBottom = lineLogicalTop; |
| 109 | 109 |
| 110 float newLineWidth; | 110 float newLineWidth; |
| 111 float newLineLeft = m_left; | 111 float newLineLeft = m_left; |
| 112 float newLineRight = m_right; | 112 float newLineRight = m_right; |
| 113 while (true) { | 113 while (true) { |
| 114 newLineWidth = availableWidthAtOffset(m_block, newLineTop, shouldIndentT
ext(), newLineLeft, newLineRight); | 114 newLineWidth = availableWidthAtOffset(m_block, newLineTop, shouldIndentT
ext(), newLineLeft, newLineRight); |
| 115 if (newLineWidth >= m_uncommittedWidth && isWholeLineFit(m_block, newLin
eTop, lineHeight, m_uncommittedWidth, shouldIndentText())) | 115 if (newLineWidth >= m_uncommittedWidth && isWholeLineFit(m_block, newLin
eTop, lineHeight, m_uncommittedWidth, shouldIndentText())) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 147 } |
| 148 updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLi
neRight); | 148 updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLi
neRight); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void LineWidth::computeAvailableWidthFromLeftAndRight() | 151 void LineWidth::computeAvailableWidthFromLeftAndRight() |
| 152 { | 152 { |
| 153 m_availableWidth = max(0.0f, m_right - m_left); | 153 m_availableWidth = max(0.0f, m_right - m_left); |
| 154 } | 154 } |
| 155 | 155 |
| 156 } | 156 } |
| OLD | NEW |