| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); | 80 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); |
| 81 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } | 81 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } |
| 82 void commit(); | 82 void commit(); |
| 83 void applyOverhang(LineLayoutRubyRun, | 83 void applyOverhang(LineLayoutRubyRun, |
| 84 LineLayoutItem startLayoutItem, | 84 LineLayoutItem startLayoutItem, |
| 85 LineLayoutItem endLayoutItem); | 85 LineLayoutItem endLayoutItem); |
| 86 void fitBelowFloats(bool isFirstLine = false); | 86 void fitBelowFloats(bool isFirstLine = false); |
| 87 void setTrailingWhitespaceWidth(float width) { | 87 void setTrailingWhitespaceWidth(float width) { |
| 88 m_trailingWhitespaceWidth = width; | 88 m_trailingWhitespaceWidth = width; |
| 89 } | 89 } |
| 90 void snapUncommittedWidth() { | 90 void snapAtNodeBoundary() { |
| 91 m_uncommittedWidth = | 91 if (!m_uncommittedWidth) { |
| 92 LayoutUnit::fromFloatCeil(m_uncommittedWidth).toFloat(); | 92 m_committedWidth = LayoutUnit::fromFloatCeil(m_committedWidth).toFloat(); |
| 93 } else { |
| 94 m_uncommittedWidth = |
| 95 LayoutUnit::fromFloatCeil(m_committedWidth + m_uncommittedWidth) |
| 96 .toFloat() - |
| 97 m_committedWidth; |
| 98 } |
| 93 } | 99 } |
| 94 | 100 |
| 95 IndentTextOrNot indentText() const { return m_indentText; } | 101 IndentTextOrNot indentText() const { return m_indentText; } |
| 96 | 102 |
| 97 private: | 103 private: |
| 98 void computeAvailableWidthFromLeftAndRight(); | 104 void computeAvailableWidthFromLeftAndRight(); |
| 99 void updateLineDimension(LayoutUnit newLineTop, | 105 void updateLineDimension(LayoutUnit newLineTop, |
| 100 LayoutUnit newLineWidth, | 106 LayoutUnit newLineWidth, |
| 101 const LayoutUnit& newLineLeft, | 107 const LayoutUnit& newLineLeft, |
| 102 const LayoutUnit& newLineRight); | 108 const LayoutUnit& newLineRight); |
| 103 void wrapNextToShapeOutside(bool isFirstLine); | 109 void wrapNextToShapeOutside(bool isFirstLine); |
| 104 | 110 |
| 105 LineLayoutBlockFlow m_block; | 111 LineLayoutBlockFlow m_block; |
| 106 float m_uncommittedWidth; | 112 float m_uncommittedWidth; |
| 107 float m_committedWidth; | 113 float m_committedWidth; |
| 108 // The amount by which |m_availableWidth| has been inflated to account for | 114 // The amount by which |m_availableWidth| has been inflated to account for |
| 109 // possible contraction due to ruby overhang. | 115 // possible contraction due to ruby overhang. |
| 110 float m_overhangWidth; | 116 float m_overhangWidth; |
| 111 float m_trailingWhitespaceWidth; | 117 float m_trailingWhitespaceWidth; |
| 112 LayoutUnit m_left; | 118 LayoutUnit m_left; |
| 113 LayoutUnit m_right; | 119 LayoutUnit m_right; |
| 114 LayoutUnit m_availableWidth; | 120 LayoutUnit m_availableWidth; |
| 115 bool m_isFirstLine; | 121 bool m_isFirstLine; |
| 116 IndentTextOrNot m_indentText; | 122 IndentTextOrNot m_indentText; |
| 117 }; | 123 }; |
| 118 | 124 |
| 119 } // namespace blink | 125 } // namespace blink |
| 120 | 126 |
| 121 #endif // LineWidth_h | 127 #endif // LineWidth_h |
| OLD | NEW |