| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2013 Adobe Systems Incorporated. | 5 * Copyright (C) 2013 Adobe Systems Incorporated. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 } | 1152 } |
| 1153 | 1153 |
| 1154 ASSERT_WITH_SECURITY_IMPLICATION(m_currentStyle->refCount() > 0); | 1154 ASSERT_WITH_SECURITY_IMPLICATION(m_currentStyle->refCount() > 0); |
| 1155 if (checkForBreak && !m_width.fitsOnLine()) { | 1155 if (checkForBreak && !m_width.fitsOnLine()) { |
| 1156 // if we have floats, try to get below them. | 1156 // if we have floats, try to get below them. |
| 1157 if (m_currentCharacterIsSpace && !m_ignoringSpaces && m_currentStyle->co
llapseWhiteSpace()) | 1157 if (m_currentCharacterIsSpace && !m_ignoringSpaces && m_currentStyle->co
llapseWhiteSpace()) |
| 1158 m_trailingObjects.clear(); | 1158 m_trailingObjects.clear(); |
| 1159 | 1159 |
| 1160 if (m_width.committedWidth()) { | 1160 if (m_width.committedWidth()) { |
| 1161 m_atEnd = true; | 1161 m_atEnd = true; |
| 1162 // When the leading or trailing space of text is collapsed and a lin
e break is inserted instead of it, |
| 1163 // we need to restore the space while the text is copied(ctrl+c). Se
e http://crbug.com/318925 |
| 1164 if (m_lastObject && m_lastObject.isText() && m_current.getLineLayout
Item().isText()) { |
| 1165 LineLayoutText lastLayoutText(m_lastObject); |
| 1166 if (lastLayoutText.text().endsWith(' ')) |
| 1167 lastLayoutText.setNeedToRestoreCollapsedSpace(true); |
| 1168 } |
| 1162 return; | 1169 return; |
| 1163 } | 1170 } |
| 1164 | 1171 |
| 1165 m_width.fitBelowFloats(m_lineInfo.isFirstLine()); | 1172 m_width.fitBelowFloats(m_lineInfo.isFirstLine()); |
| 1166 | 1173 |
| 1167 // |width| may have been adjusted because we got shoved down past a floa
t (thus | 1174 // |width| may have been adjusted because we got shoved down past a floa
t (thus |
| 1168 // giving us more room), so we need to retest, and only jump to | 1175 // giving us more room), so we need to retest, and only jump to |
| 1169 // the end label if we still don't fit on the line. -dwh | 1176 // the end label if we still don't fit on the line. -dwh |
| 1170 if (!m_width.fitsOnLine()) { | 1177 if (!m_width.fitsOnLine()) { |
| 1171 m_atEnd = true; | 1178 m_atEnd = true; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1195 | 1202 |
| 1196 if (style.getTextIndentType() == TextIndentHanging) | 1203 if (style.getTextIndentType() == TextIndentHanging) |
| 1197 indentText = indentText == IndentText ? DoNotIndentText : IndentText; | 1204 indentText = indentText == IndentText ? DoNotIndentText : IndentText; |
| 1198 | 1205 |
| 1199 return indentText; | 1206 return indentText; |
| 1200 } | 1207 } |
| 1201 | 1208 |
| 1202 } // namespace blink | 1209 } // namespace blink |
| 1203 | 1210 |
| 1204 #endif // BreakingContextInlineHeaders_h | 1211 #endif // BreakingContextInlineHeaders_h |
| OLD | NEW |