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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 newLineTop++; | 185 newLineTop++; |
186 } | 186 } |
187 updateLineDimension(newLineTop, LayoutUnit(newLineWidth), newLineLeft, | 187 updateLineDimension(newLineTop, LayoutUnit(newLineWidth), newLineLeft, |
188 newLineRight); | 188 newLineRight); |
189 } | 189 } |
190 | 190 |
191 void LineWidth::fitBelowFloats(bool isFirstLine) { | 191 void LineWidth::fitBelowFloats(bool isFirstLine) { |
192 ASSERT(!m_committedWidth); | 192 ASSERT(!m_committedWidth); |
193 ASSERT(!fitsOnLine()); | 193 ASSERT(!fitsOnLine()); |
194 m_block.positionNewFloats(m_block.logicalHeight(), this); | 194 m_block.placeNewFloats(m_block.logicalHeight(), this); |
195 | 195 |
196 LayoutUnit floatLogicalBottom; | 196 LayoutUnit floatLogicalBottom; |
197 LayoutUnit lastFloatLogicalBottom = m_block.logicalHeight(); | 197 LayoutUnit lastFloatLogicalBottom = m_block.logicalHeight(); |
198 LayoutUnit newLineWidth = m_availableWidth; | 198 LayoutUnit newLineWidth = m_availableWidth; |
199 LayoutUnit newLineLeft = m_left; | 199 LayoutUnit newLineLeft = m_left; |
200 LayoutUnit newLineRight = m_right; | 200 LayoutUnit newLineRight = m_right; |
201 | 201 |
202 FloatingObject* lastFloatFromPreviousLine = | 202 FloatingObject* lastFloatFromPreviousLine = |
203 m_block.lastFloatFromPreviousLine(); | 203 m_block.lastFloatFromPreviousLine(); |
204 if (lastFloatFromPreviousLine && | 204 if (lastFloatFromPreviousLine && |
(...skipping 16 matching lines...) Expand all Loading... |
221 updateLineDimension(lastFloatLogicalBottom, LayoutUnit(newLineWidth), | 221 updateLineDimension(lastFloatLogicalBottom, LayoutUnit(newLineWidth), |
222 newLineLeft, newLineRight); | 222 newLineLeft, newLineRight); |
223 } | 223 } |
224 | 224 |
225 void LineWidth::computeAvailableWidthFromLeftAndRight() { | 225 void LineWidth::computeAvailableWidthFromLeftAndRight() { |
226 m_availableWidth = (m_right - m_left).clampNegativeToZero() + | 226 m_availableWidth = (m_right - m_left).clampNegativeToZero() + |
227 LayoutUnit::fromFloatCeil(m_overhangWidth); | 227 LayoutUnit::fromFloatCeil(m_overhangWidth); |
228 } | 228 } |
229 | 229 |
230 } // namespace blink | 230 } // namespace blink |
OLD | NEW |