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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 bool breakAll = m_currentStyle->wordBreak() == BreakAllWordBreak && m_autoWr
ap; | 736 bool breakAll = m_currentStyle->wordBreak() == BreakAllWordBreak && m_autoWr
ap; |
737 bool keepAll = m_currentStyle->wordBreak() == KeepAllWordBreak && m_autoWrap
; | 737 bool keepAll = m_currentStyle->wordBreak() == KeepAllWordBreak && m_autoWrap
; |
738 bool prohibitBreakInside = m_currentStyle->hasTextCombine() && layoutText.is
CombineText() && LineLayoutTextCombine(layoutText).isCombined(); | 738 bool prohibitBreakInside = m_currentStyle->hasTextCombine() && layoutText.is
CombineText() && LineLayoutTextCombine(layoutText).isCombined(); |
739 | 739 |
740 // This is currently only used for word-break: break-all, specifically for t
he case | 740 // This is currently only used for word-break: break-all, specifically for t
he case |
741 // where we have a break opportunity within a word, then a string of non-bre
akable | 741 // where we have a break opportunity within a word, then a string of non-bre
akable |
742 // content that ends up making our word wider than the current line. | 742 // content that ends up making our word wider than the current line. |
743 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html | 743 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html |
744 float widthMeasurementAtLastBreakOpportunity = 0; | 744 float widthMeasurementAtLastBreakOpportunity = 0; |
745 | 745 |
746 Hyphenation* hyphenation = style.getHyphens() == HyphensAuto | 746 Hyphenation* hyphenation = style.getHyphenation(); |
747 ? Hyphenation::get(font.getFontDescription().locale()) : nullptr; | |
748 bool disableSoftHyphen = style.getHyphens() == HyphensNone; | 747 bool disableSoftHyphen = style.getHyphens() == HyphensNone; |
749 float hyphenWidth = 0; | 748 float hyphenWidth = 0; |
750 | 749 |
751 if (layoutText.isSVGInlineText()) { | 750 if (layoutText.isSVGInlineText()) { |
752 breakWords = false; | 751 breakWords = false; |
753 breakAll = false; | 752 breakAll = false; |
754 keepAll = false; | 753 keepAll = false; |
755 } | 754 } |
756 | 755 |
757 // Use LineBreakType::Normal for break-all. When a word does not fit, | 756 // Use LineBreakType::Normal for break-all. When a word does not fit, |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 | 1190 |
1192 if (style.getTextIndentType() == TextIndentHanging) | 1191 if (style.getTextIndentType() == TextIndentHanging) |
1193 indentText = indentText == IndentText ? DoNotIndentText : IndentText; | 1192 indentText = indentText == IndentText ? DoNotIndentText : IndentText; |
1194 | 1193 |
1195 return indentText; | 1194 return indentText; |
1196 } | 1195 } |
1197 | 1196 |
1198 } // namespace blink | 1197 } // namespace blink |
1199 | 1198 |
1200 #endif // BreakingContextInlineHeaders_h | 1199 #endif // BreakingContextInlineHeaders_h |
OLD | NEW |