| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 computeAvailableWidthFromLeftAndRight(); | 99 computeAvailableWidthFromLeftAndRight(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void LineWidth::commit() | 102 void LineWidth::commit() |
| 103 { | 103 { |
| 104 m_committedWidth += m_uncommittedWidth; | 104 m_committedWidth += m_uncommittedWidth; |
| 105 m_uncommittedWidth = 0; | 105 m_uncommittedWidth = 0; |
| 106 } | 106 } |
| 107 | 107 |
| 108 void LineWidth::applyOverhang(LayoutRubyRun* rubyRun, RenderObject* startRendere
r, RenderObject* endRenderer) | 108 void LineWidth::applyOverhang(LayoutRubyRun* rubyRun, LayoutObject* startRendere
r, LayoutObject* endRenderer) |
| 109 { | 109 { |
| 110 int startOverhang; | 110 int startOverhang; |
| 111 int endOverhang; | 111 int endOverhang; |
| 112 rubyRun->getOverhang(m_isFirstLine, startRenderer, endRenderer, startOverhan
g, endOverhang); | 112 rubyRun->getOverhang(m_isFirstLine, startRenderer, endRenderer, startOverhan
g, endOverhang); |
| 113 | 113 |
| 114 startOverhang = std::min<int>(startOverhang, m_committedWidth); | 114 startOverhang = std::min<int>(startOverhang, m_committedWidth); |
| 115 m_availableWidth += startOverhang; | 115 m_availableWidth += startOverhang; |
| 116 | 116 |
| 117 endOverhang = std::max(std::min<int>(endOverhang, m_availableWidth - current
Width()), 0); | 117 endOverhang = std::max(std::min<int>(endOverhang, m_availableWidth - current
Width()), 0); |
| 118 m_availableWidth += endOverhang; | 118 m_availableWidth += endOverhang; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLi
neRight); | 191 updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLi
neRight); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void LineWidth::computeAvailableWidthFromLeftAndRight() | 194 void LineWidth::computeAvailableWidthFromLeftAndRight() |
| 195 { | 195 { |
| 196 m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth; | 196 m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth; |
| 197 } | 197 } |
| 198 | 198 |
| 199 } | 199 } |
| OLD | NEW |