| 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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 int nextBreakable = -1; | 921 int nextBreakable = -1; |
| 922 int lastWordBoundary = 0; | 922 int lastWordBoundary = 0; |
| 923 float cachedWordTrailingSpaceWidth[2] = { 0, 0 }; // LTR, RTL | 923 float cachedWordTrailingSpaceWidth[2] = { 0, 0 }; // LTR, RTL |
| 924 | 924 |
| 925 int firstGlyphLeftOverflow = -1; | 925 int firstGlyphLeftOverflow = -1; |
| 926 | 926 |
| 927 bool breakAll = (styleToUse->wordBreak() == BreakAllWordBreak || styleToUse-
>wordBreak() == BreakWordBreak) && styleToUse->autoWrap(); | 927 bool breakAll = (styleToUse->wordBreak() == BreakAllWordBreak || styleToUse-
>wordBreak() == BreakWordBreak) && styleToUse->autoWrap(); |
| 928 | 928 |
| 929 TextRun textRun(text()); | 929 TextRun textRun(text()); |
| 930 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; | 930 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; |
| 931 | |
| 932 BidiCharacterRun* run; | 931 BidiCharacterRun* run; |
| 933 TextDirection textDirection = styleToUse->direction(); | 932 TextDirection textDirection = styleToUse->direction(); |
| 934 if (isOverride(styleToUse->unicodeBidi())) { | 933 if (isOverride(styleToUse->unicodeBidi())) { |
| 935 run = 0; | 934 run = 0; |
| 936 } else { | 935 } else { |
| 937 BidiStatus status(textDirection, false); | 936 BidiStatus status(textDirection, false); |
| 938 bidiResolver.setStatus(status); | 937 bidiResolver.setStatus(status); |
| 939 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&textRun,
0)); | 938 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&textRun,
0)); |
| 940 bool hardLineBreak = false; | 939 bool hardLineBreak = false; |
| 941 bool reorderRuns = false; | 940 bool reorderRuns = false; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 if (!styleToUse->autoWrap()) | 1099 if (!styleToUse->autoWrap()) |
| 1101 m_firstLineMinWidth = currMaxWidth; | 1100 m_firstLineMinWidth = currMaxWidth; |
| 1102 } | 1101 } |
| 1103 | 1102 |
| 1104 if (currMaxWidth > m_maxWidth) | 1103 if (currMaxWidth > m_maxWidth) |
| 1105 m_maxWidth = currMaxWidth; | 1104 m_maxWidth = currMaxWidth; |
| 1106 currMaxWidth = 0; | 1105 currMaxWidth = 0; |
| 1107 } else { | 1106 } else { |
| 1108 TextRun run = constructTextRun(this, f, this, i, 1, styleToUse,
textDirection); | 1107 TextRun run = constructTextRun(this, f, this, i, 1, styleToUse,
textDirection); |
| 1109 run.setCharactersLength(len - i); | 1108 run.setCharactersLength(len - i); |
| 1109 run.setUseComplexCodePath(!canUseSimpleFontCodePath()); |
| 1110 ASSERT(run.charactersLength() >= run.length()); | 1110 ASSERT(run.charactersLength() >= run.length()); |
| 1111 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize(
)); | 1111 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize(
)); |
| 1112 run.setXPos(leadWidth + currMaxWidth); | 1112 run.setXPos(leadWidth + currMaxWidth); |
| 1113 | 1113 |
| 1114 currMaxWidth += f.width(run); | 1114 currMaxWidth += f.width(run); |
| 1115 glyphOverflow.right = 0; | 1115 glyphOverflow.right = 0; |
| 1116 needsWordSpacing = isSpace && !previousCharacterIsSpace && i ==
len - 1; | 1116 needsWordSpacing = isSpace && !previousCharacterIsSpace && i ==
len - 1; |
| 1117 } | 1117 } |
| 1118 ASSERT(lastWordBoundary == i); | 1118 ASSERT(lastWordBoundary == i); |
| 1119 lastWordBoundary++; | 1119 lastWordBoundary++; |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 } | 1862 } |
| 1863 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1863 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1866 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
| 1867 { | 1867 { |
| 1868 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1868 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 } // namespace blink | 1871 } // namespace blink |
| OLD | NEW |