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