| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 setNeedsLayoutAndPrefWidthsRecalc(); | 198 setNeedsLayoutAndPrefWidthsRecalc(); |
| 199 m_knownToHaveNoOverflowAndNoFallbackFonts = false; | 199 m_knownToHaveNoOverflowAndNoFallbackFonts = false; |
| 200 } | 200 } |
| 201 | 201 |
| 202 RenderStyle* newStyle = style(); | 202 RenderStyle* newStyle = style(); |
| 203 ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; | 203 ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; |
| 204 ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; | 204 ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; |
| 205 if (oldTransform != newStyle->textTransform() || oldSecurity != newStyle->te
xtSecurity()) | 205 if (oldTransform != newStyle->textTransform() || oldSecurity != newStyle->te
xtSecurity()) |
| 206 transformText(); | 206 transformText(); |
| 207 | 207 |
| 208 // This is an optimization that kicks off font load before layout. |
| 209 // In order to make it fast, we only check if the first character of the |
| 210 // text is included in the unicode ranges of the fonts. |
| 208 if (!text().containsOnlyWhitespace()) | 211 if (!text().containsOnlyWhitespace()) |
| 209 newStyle->font().willUseFontData(); | 212 newStyle->font().willUseFontData(text().characterStartingAt(0)); |
| 210 } | 213 } |
| 211 | 214 |
| 212 void RenderText::removeAndDestroyTextBoxes() | 215 void RenderText::removeAndDestroyTextBoxes() |
| 213 { | 216 { |
| 214 if (!documentBeingDestroyed()) { | 217 if (!documentBeingDestroyed()) { |
| 215 if (firstTextBox()) { | 218 if (firstTextBox()) { |
| 216 if (isBR()) { | 219 if (isBR()) { |
| 217 RootInlineBox* next = firstTextBox()->root().nextRootBox(); | 220 RootInlineBox* next = firstTextBox()->root().nextRootBox(); |
| 218 if (next) | 221 if (next) |
| 219 next->markDirty(); | 222 next->markDirty(); |
| (...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1865 } | 1868 } |
| 1866 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
| 1867 } | 1870 } |
| 1868 | 1871 |
| 1869 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
| 1870 { | 1873 { |
| 1871 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
| 1872 } | 1875 } |
| 1873 | 1876 |
| 1874 } // namespace WebCore | 1877 } // namespace WebCore |
| OLD | NEW |