Chromium Code Reviews| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 float availableWidth() const { return m_availableWidth; } | 61 float availableWidth() const { return m_availableWidth; } |
| 62 float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; } | 62 float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; } |
| 63 | 63 |
| 64 void updateAvailableWidth(LayoutUnit minimumHeight = 0); | 64 void updateAvailableWidth(LayoutUnit minimumHeight = 0); |
| 65 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); | 65 void shrinkAvailableWidthForNewFloatIfNeeded(const FloatingObject&); |
| 66 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } | 66 void addUncommittedWidth(float delta) { m_uncommittedWidth += delta; } |
| 67 void commit(); | 67 void commit(); |
| 68 void applyOverhang(LineLayoutRubyRun, LineLayoutItem startLayoutItem, LineLa youtItem endLayoutItem); | 68 void applyOverhang(LineLayoutRubyRun, LineLayoutItem startLayoutItem, LineLa youtItem endLayoutItem); |
| 69 void fitBelowFloats(bool isFirstLine = false); | 69 void fitBelowFloats(bool isFirstLine = false); |
| 70 void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = w idth; } | 70 void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = w idth; } |
| 71 void snapUncommittedWidth() { m_uncommittedWidth = LayoutUnit(m_uncommittedW idth).toFloat(); } | |
|
eae
2015/09/29 14:50:00
Is the currentWidth already snapped? What about sn
szager1
2015/09/29 16:48:32
Based on conversation with eae: currentWidth is us
| |
| 71 | 72 |
| 72 bool shouldIndentText() const { return m_shouldIndentText == IndentText; } | 73 bool shouldIndentText() const { return m_shouldIndentText == IndentText; } |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 void computeAvailableWidthFromLeftAndRight(); | 76 void computeAvailableWidthFromLeftAndRight(); |
| 76 void updateLineDimension(LayoutUnit newLineTop, LayoutUnit newLineWidth, con st float& newLineLeft, const float& newLineRight); | 77 void updateLineDimension(LayoutUnit newLineTop, LayoutUnit newLineWidth, con st float& newLineLeft, const float& newLineRight); |
| 77 void wrapNextToShapeOutside(bool isFirstLine); | 78 void wrapNextToShapeOutside(bool isFirstLine); |
| 78 | 79 |
| 79 LineLayoutBlockFlow m_block; | 80 LineLayoutBlockFlow m_block; |
| 80 float m_uncommittedWidth; | 81 float m_uncommittedWidth; |
| 81 float m_committedWidth; | 82 float m_committedWidth; |
| 82 float m_overhangWidth; // The amount by which |m_availableWidth| has been in flated to account for possible contraction due to ruby overhang. | 83 float m_overhangWidth; // The amount by which |m_availableWidth| has been in flated to account for possible contraction due to ruby overhang. |
| 83 float m_trailingWhitespaceWidth; | 84 float m_trailingWhitespaceWidth; |
| 84 float m_left; | 85 float m_left; |
| 85 float m_right; | 86 float m_right; |
| 86 float m_availableWidth; | 87 float m_availableWidth; |
| 87 bool m_isFirstLine; | 88 bool m_isFirstLine; |
| 88 IndentTextOrNot m_shouldIndentText; | 89 IndentTextOrNot m_shouldIndentText; |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } | 92 } |
| 92 | 93 |
| 93 #endif // LineWidth_h | 94 #endif // LineWidth_h |
| OLD | NEW |