Chromium Code Reviews| 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 931 float wordTrailingSpaceWidth = f.fontDescription().typesettingFeatures() & K erning ? f.width(RenderBlockFlow::constructTextRun(this, f, &space, 1, styleToUs e, textDirection)) + wordSpacing : 0; | 931 float wordTrailingSpaceWidth = f.fontDescription().typesettingFeatures() & K erning ? f.width(RenderBlockFlow::constructTextRun(this, f, &space, 1, styleToUs e, textDirection)) + wordSpacing : 0; |
| 932 | 932 |
| 933 // If automatic hyphenation is allowed, we keep track of the width of the wi dest word (or word | 933 // If automatic hyphenation is allowed, we keep track of the width of the wi dest word (or word |
| 934 // fragment) encountered so far, and only try hyphenating words that are wid er. | 934 // fragment) encountered so far, and only try hyphenating words that are wid er. |
| 935 float maxWordWidth = numeric_limits<float>::max(); | 935 float maxWordWidth = numeric_limits<float>::max(); |
| 936 int firstGlyphLeftOverflow = -1; | 936 int firstGlyphLeftOverflow = -1; |
| 937 | 937 |
| 938 bool breakAll = (styleToUse->wordBreak() == BreakAllWordBreak || styleToUse- >wordBreak() == BreakWordBreak) && styleToUse->autoWrap(); | 938 bool breakAll = (styleToUse->wordBreak() == BreakAllWordBreak || styleToUse- >wordBreak() == BreakWordBreak) && styleToUse->autoWrap(); |
| 939 | 939 |
| 940 TextRun textRun(text()); | 940 TextRun textRun(text()); |
| 941 textRun.setDirection(textDirection); | |
| 942 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; | 941 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; |
| 943 bidiResolver.setStatus(BidiStatus(textRun.direction(), textRun.directionalOv erride())); | 942 bidiResolver.setStatus(BidiStatus(textRun.direction(), textRun.directionalOv erride())); |
| 944 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&textRun, 0)) ; | 943 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&textRun, 0)) ; |
| 944 | |
| 945 bool hasStrongDirectionality; | |
| 946 textRun.setDirection(bidiResolver.determineParagraphDirectionality(&hasStron gDirectionality)); | |
|
leviw_travelin_and_unemployed
2014/03/01 01:37:09
This is confusing since we're only running on a Te
| |
| 947 bidiResolver.setStatus(BidiStatus(textRun.direction(), textRun.directionalOv erride())); | |
| 948 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&textRun, 0)) ; | |
| 949 | |
| 945 bool hardLineBreak = false; | 950 bool hardLineBreak = false; |
| 946 bool reorderRuns = false; | 951 bool reorderRuns = false; |
| 947 bidiResolver.createBidiRunsForLine(TextRunIterator(&textRun, textRun.length( )), NoVisualOverride, hardLineBreak, reorderRuns); | 952 bidiResolver.createBidiRunsForLine(TextRunIterator(&textRun, textRun.length( )), NoVisualOverride, hardLineBreak, reorderRuns); |
| 948 | |
| 949 BidiRunList<BidiCharacterRun>& bidiRuns = bidiResolver.runs(); | 953 BidiRunList<BidiCharacterRun>& bidiRuns = bidiResolver.runs(); |
| 950 BidiCharacterRun* run = bidiRuns.firstRun(); | 954 BidiCharacterRun* run = bidiRuns.firstRun(); |
| 951 for (int i = 0; i < len; i++) { | 955 for (int i = 0; i < len; i++) { |
| 952 UChar c = uncheckedCharacterAt(i); | 956 UChar c = uncheckedCharacterAt(i); |
| 953 | 957 |
| 954 while (i > run->stop()) | 958 while (i > run->stop()) |
| 955 run = run->next(); | 959 run = run->next(); |
| 956 | 960 |
| 957 ASSERT(run); | 961 ASSERT(run); |
| 958 ASSERT(i >= run->start() && i <= run->stop()); | 962 ASSERT(i >= run->start() && i <= run->stop()); |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1867 } | 1871 } |
| 1868 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1872 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
| 1869 } | 1873 } |
| 1870 | 1874 |
| 1871 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1875 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
| 1872 { | 1876 { |
| 1873 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1877 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
| 1874 } | 1878 } |
| 1875 | 1879 |
| 1876 } // namespace WebCore | 1880 } // namespace WebCore |
| OLD | NEW |