| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 float availableWidth() const { return m_availableWidth; } | 64 float availableWidth() const { return m_availableWidth; } |
| 65 float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; } | 65 float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; } |
| 66 | 66 |
| 67 void updateAvailableWidth(LayoutUnit minimumHeight = LayoutUnit()); | 67 void updateAvailableWidth(LayoutUnit minimumHeight = LayoutUnit()); |
| 68 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); | 68 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); |
| 69 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } | 69 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } |
| 70 void commit(); | 70 void commit(); |
| 71 void applyOverhang(LineLayoutRubyRun, LineLayoutItem startLayoutItem, LineLa
youtItem endLayoutItem); | 71 void applyOverhang(LineLayoutRubyRun, LineLayoutItem startLayoutItem, LineLa
youtItem endLayoutItem); |
| 72 void fitBelowFloats(bool isFirstLine = false); | 72 void fitBelowFloats(bool isFirstLine = false); |
| 73 void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = w
idth; } | 73 void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = w
idth; } |
| 74 void snapUncommittedWidth() { m_uncommittedWidth = LayoutUnit(m_uncommittedW
idth).toFloat(); } | 74 void snapUncommittedWidth() { m_uncommittedWidth = LayoutUnit::fromFloatCeil
(m_uncommittedWidth).toFloat(); } |
| 75 | 75 |
| 76 IndentTextOrNot indentText() const { return m_indentText; } | 76 IndentTextOrNot indentText() const { return m_indentText; } |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 void computeAvailableWidthFromLeftAndRight(); | 79 void computeAvailableWidthFromLeftAndRight(); |
| 80 void updateLineDimension(LayoutUnit newLineTop, LayoutUnit newLineWidth, con
st float& newLineLeft, const float& newLineRight); | 80 void updateLineDimension(LayoutUnit newLineTop, LayoutUnit newLineWidth, con
st float& newLineLeft, const float& newLineRight); |
| 81 void wrapNextToShapeOutside(bool isFirstLine); | 81 void wrapNextToShapeOutside(bool isFirstLine); |
| 82 | 82 |
| 83 LineLayoutBlockFlow m_block; | 83 LineLayoutBlockFlow m_block; |
| 84 float m_uncommittedWidth; | 84 float m_uncommittedWidth; |
| 85 float m_committedWidth; | 85 float m_committedWidth; |
| 86 float m_overhangWidth; // The amount by which |m_availableWidth| has been in
flated to account for possible contraction due to ruby overhang. | 86 float m_overhangWidth; // The amount by which |m_availableWidth| has been in
flated to account for possible contraction due to ruby overhang. |
| 87 float m_trailingWhitespaceWidth; | 87 float m_trailingWhitespaceWidth; |
| 88 float m_left; | 88 float m_left; |
| 89 float m_right; | 89 float m_right; |
| 90 float m_availableWidth; | 90 float m_availableWidth; |
| 91 bool m_isFirstLine; | 91 bool m_isFirstLine; |
| 92 IndentTextOrNot m_indentText; | 92 IndentTextOrNot m_indentText; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| 96 | 96 |
| 97 #endif // LineWidth_h | 97 #endif // LineWidth_h |
| OLD | NEW |