| 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. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All right reserved. | 4 * All right reserved. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2013 Adobe Systems Incorporated. | 6 * Copyright (C) 2013 Adobe Systems Incorporated. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 wordMeasurement); | 812 wordMeasurement); |
| 813 | 813 |
| 814 int end = start + len; | 814 int end = start + len; |
| 815 if (breakAll) { | 815 if (breakAll) { |
| 816 end = lastBreakablePositionForBreakAll(text, style, start, end); | 816 end = lastBreakablePositionForBreakAll(text, style, start, end); |
| 817 if (!end) | 817 if (!end) |
| 818 return false; | 818 return false; |
| 819 len = end - start; | 819 len = end - start; |
| 820 } | 820 } |
| 821 FloatRect rect = font.selectionRectForText(run, FloatPoint(), 0, 0, len); | 821 FloatRect rect = font.selectionRectForText(run, FloatPoint(), 0, 0, len); |
| 822 DCHECK(m_width.fitsOnLine(rect.width() - | |
| 823 1)); // avoid failure when rect is rounded up. | |
| 824 return rewindToMidWordBreak(wordMeasurement, end, rect.width()); | 822 return rewindToMidWordBreak(wordMeasurement, end, rect.width()); |
| 825 } | 823 } |
| 826 | 824 |
| 827 ALWAYS_INLINE bool BreakingContext::hyphenate( | 825 ALWAYS_INLINE bool BreakingContext::hyphenate( |
| 828 LineLayoutText text, | 826 LineLayoutText text, |
| 829 const ComputedStyle& style, | 827 const ComputedStyle& style, |
| 830 const Font& font, | 828 const Font& font, |
| 831 const Hyphenation& hyphenation, | 829 const Hyphenation& hyphenation, |
| 832 float lastSpaceWordSpacing, | 830 float lastSpaceWordSpacing, |
| 833 WordMeasurement& wordMeasurement) { | 831 WordMeasurement& wordMeasurement) { |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 | 1495 |
| 1498 if (style.getTextIndentType() == TextIndentHanging) | 1496 if (style.getTextIndentType() == TextIndentHanging) |
| 1499 indentText = indentText == IndentText ? DoNotIndentText : IndentText; | 1497 indentText = indentText == IndentText ? DoNotIndentText : IndentText; |
| 1500 | 1498 |
| 1501 return indentText; | 1499 return indentText; |
| 1502 } | 1500 } |
| 1503 | 1501 |
| 1504 } // namespace blink | 1502 } // namespace blink |
| 1505 | 1503 |
| 1506 #endif // BreakingContextInlineHeaders_h | 1504 #endif // BreakingContextInlineHeaders_h |
| OLD | NEW |