OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 bool isSpace = false; | 920 bool isSpace = false; |
921 bool firstWord = true; | 921 bool firstWord = true; |
922 bool firstLine = true; | 922 bool firstLine = true; |
923 int nextBreakable = -1; | 923 int nextBreakable = -1; |
924 int lastWordBoundary = 0; | 924 int lastWordBoundary = 0; |
925 float cachedWordTrailingSpaceWidth[2] = { 0, 0 }; // LTR, RTL | 925 float cachedWordTrailingSpaceWidth[2] = { 0, 0 }; // LTR, RTL |
926 | 926 |
927 bool breakAll = (styleToUse.wordBreak() == BreakAllWordBreak || styleToUse.w
ordBreak() == BreakWordBreak) && styleToUse.autoWrap(); | 927 bool breakAll = (styleToUse.wordBreak() == BreakAllWordBreak || styleToUse.w
ordBreak() == BreakWordBreak) && styleToUse.autoWrap(); |
928 bool keepAll = styleToUse.wordBreak() == KeepAllWordBreak && styleToUse.auto
Wrap(); | 928 bool keepAll = styleToUse.wordBreak() == KeepAllWordBreak && styleToUse.auto
Wrap(); |
929 | 929 |
930 Hyphenation* hyphenation = styleToUse.getHyphens() == HyphensAuto | 930 Hyphenation* hyphenation = styleToUse.getHyphenation(); |
931 ? Hyphenation::get(f.getFontDescription().locale()) : nullptr; | |
932 bool disableSoftHyphen = styleToUse.getHyphens() == HyphensNone; | 931 bool disableSoftHyphen = styleToUse.getHyphens() == HyphensNone; |
933 float maxWordWidth = 0; | 932 float maxWordWidth = 0; |
934 if (!hyphenation) | 933 if (!hyphenation) |
935 maxWordWidth = std::numeric_limits<float>::infinity(); | 934 maxWordWidth = std::numeric_limits<float>::infinity(); |
936 | 935 |
937 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; | 936 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; |
938 BidiCharacterRun* run; | 937 BidiCharacterRun* run; |
939 TextDirection textDirection = styleToUse.direction(); | 938 TextDirection textDirection = styleToUse.direction(); |
940 if ((is8Bit() && textDirection == LTR) || isOverride(styleToUse.unicodeBidi(
))) { | 939 if ((is8Bit() && textDirection == LTR) || isOverride(styleToUse.unicodeBidi(
))) { |
941 run = 0; | 940 run = 0; |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 1749 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
1751 invalidateDisplayItemClient(*box, invalidationReason); | 1750 invalidateDisplayItemClient(*box, invalidationReason); |
1752 if (box->truncation() != cNoTruncation) { | 1751 if (box->truncation() != cNoTruncation) { |
1753 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) | 1752 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) |
1754 invalidateDisplayItemClient(*ellipsisBox, invalidationReason); | 1753 invalidateDisplayItemClient(*ellipsisBox, invalidationReason); |
1755 } | 1754 } |
1756 } | 1755 } |
1757 } | 1756 } |
1758 | 1757 |
1759 } // namespace blink | 1758 } // namespace blink |
OLD | NEW |