| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 bool RenderText::isTextFragment() const | 177 bool RenderText::isTextFragment() const |
| 178 { | 178 { |
| 179 return false; | 179 return false; |
| 180 } | 180 } |
| 181 | 181 |
| 182 bool RenderText::isWordBreak() const | 182 bool RenderText::isWordBreak() const |
| 183 { | 183 { |
| 184 return false; | 184 return false; |
| 185 } | 185 } |
| 186 | 186 |
| 187 void RenderText::updateNeedsTranscoding() |
| 188 { |
| 189 const WTF::TextEncoding* encoding = document()->encoding().isValid() ? &docu
ment()->encoding() : 0; |
| 190 m_needsTranscoding = fontTranscoder().needsTranscoding(style()->font().fontD
escription(), encoding); |
| 191 } |
| 192 |
| 187 void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl
e) | 193 void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl
e) |
| 188 { | 194 { |
| 189 // There is no need to ever schedule repaints from a style change of a text
run, since | 195 // There is no need to ever schedule repaints from a style change of a text
run, since |
| 190 // we already did this for the parent of the text run. | 196 // we already did this for the parent of the text run. |
| 191 // We do have to schedule layouts, though, since a style change can force us
to | 197 // We do have to schedule layouts, though, since a style change can force us
to |
| 192 // need to relayout. | 198 // need to relayout. |
| 193 if (diff == StyleDifferenceLayout) { | 199 if (diff == StyleDifferenceLayout) { |
| 194 setNeedsLayoutAndPrefWidthsRecalc(); | 200 setNeedsLayoutAndPrefWidthsRecalc(); |
| 195 m_knownToHaveNoOverflowAndNoFallbackFonts = false; | 201 m_knownToHaveNoOverflowAndNoFallbackFonts = false; |
| 196 } | 202 } |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 case LOWERCASE: | 1327 case LOWERCASE: |
| 1322 text = text.lower(style->locale()); | 1328 text = text.lower(style->locale()); |
| 1323 break; | 1329 break; |
| 1324 } | 1330 } |
| 1325 } | 1331 } |
| 1326 | 1332 |
| 1327 void RenderText::setTextInternal(PassRefPtr<StringImpl> text) | 1333 void RenderText::setTextInternal(PassRefPtr<StringImpl> text) |
| 1328 { | 1334 { |
| 1329 ASSERT(text); | 1335 ASSERT(text); |
| 1330 m_text = text; | 1336 m_text = text; |
| 1337 if (m_needsTranscoding) { |
| 1338 const WTF::TextEncoding* encoding = document()->encoding().isValid() ? &
document()->encoding() : 0; |
| 1339 fontTranscoder().convert(m_text, style()->font().fontDescription(), enco
ding); |
| 1340 } |
| 1341 ASSERT(m_text); |
| 1331 | 1342 |
| 1332 if (style()) { | 1343 if (style()) { |
| 1333 applyTextTransform(style(), m_text, previousCharacter()); | 1344 applyTextTransform(style(), m_text, previousCharacter()); |
| 1334 | 1345 |
| 1335 // We use the same characters here as for list markers. | 1346 // We use the same characters here as for list markers. |
| 1336 // See the listMarkerText function in RenderListMarker.cpp. | 1347 // See the listMarkerText function in RenderListMarker.cpp. |
| 1337 switch (style()->textSecurity()) { | 1348 switch (style()->textSecurity()) { |
| 1338 case TSNONE: | 1349 case TSNONE: |
| 1339 break; | 1350 break; |
| 1340 case TSCIRCLE: | 1351 case TSCIRCLE: |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1841 } | 1852 } |
| 1842 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1853 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
| 1843 } | 1854 } |
| 1844 | 1855 |
| 1845 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1856 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
| 1846 { | 1857 { |
| 1847 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1858 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
| 1848 } | 1859 } |
| 1849 | 1860 |
| 1850 } // namespace WebCore | 1861 } // namespace WebCore |
| OLD | NEW |