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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 if (!oldStyle) { | 194 if (!oldStyle) { |
195 updateNeedsTranscoding(); | 195 updateNeedsTranscoding(); |
196 needsResetText = m_needsTranscoding; | 196 needsResetText = m_needsTranscoding; |
197 } else if (oldStyle->font().needsTranscoding() != newStyle->font().needsTran
scoding() || (newStyle->font().needsTranscoding() && oldStyle->font().family().f
amily() != newStyle->font().family().family())) { | 197 } else if (oldStyle->font().needsTranscoding() != newStyle->font().needsTran
scoding() || (newStyle->font().needsTranscoding() && oldStyle->font().family().f
amily() != newStyle->font().family().family())) { |
198 updateNeedsTranscoding(); | 198 updateNeedsTranscoding(); |
199 needsResetText = true; | 199 needsResetText = true; |
200 } | 200 } |
201 | 201 |
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 (needsResetText || oldTransform != newStyle->textTransform() || oldSecuri
ty != newStyle->textSecurity()) { | 204 if (needsResetText || oldTransform != newStyle->textTransform() || oldSecuri
ty != newStyle->textSecurity()) |
205 if (RefPtr<StringImpl> textToTransform = originalText()) | 205 transformText(); |
206 setText(textToTransform.release(), true); | |
207 } | |
208 } | 206 } |
209 | 207 |
210 void RenderText::removeAndDestroyTextBoxes() | 208 void RenderText::removeAndDestroyTextBoxes() |
211 { | 209 { |
212 if (!documentBeingDestroyed()) { | 210 if (!documentBeingDestroyed()) { |
213 if (firstTextBox()) { | 211 if (firstTextBox()) { |
214 if (isBR()) { | 212 if (isBR()) { |
215 RootInlineBox* next = firstTextBox()->root()->nextRootBox(); | 213 RootInlineBox* next = firstTextBox()->root()->nextRootBox(); |
216 if (next) | 214 if (next) |
217 next->markDirty(); | 215 next->markDirty(); |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 // If the text node is empty, dirty the line where new text will be inserted
. | 1238 // If the text node is empty, dirty the line where new text will be inserted
. |
1241 if (!firstTextBox() && parent()) { | 1239 if (!firstTextBox() && parent()) { |
1242 parent()->dirtyLinesFromChangedChild(this); | 1240 parent()->dirtyLinesFromChangedChild(this); |
1243 dirtiedLines = true; | 1241 dirtiedLines = true; |
1244 } | 1242 } |
1245 | 1243 |
1246 m_linesDirty = dirtiedLines; | 1244 m_linesDirty = dirtiedLines; |
1247 setText(text, force); | 1245 setText(text, force); |
1248 } | 1246 } |
1249 | 1247 |
| 1248 void RenderText::transformText() |
| 1249 { |
| 1250 if (RefPtr<StringImpl> textToTransform = originalText()) |
| 1251 setText(textToTransform.release(), true); |
| 1252 } |
| 1253 |
1250 static inline bool isInlineFlowOrEmptyText(const RenderObject* o) | 1254 static inline bool isInlineFlowOrEmptyText(const RenderObject* o) |
1251 { | 1255 { |
1252 if (o->isRenderInline()) | 1256 if (o->isRenderInline()) |
1253 return true; | 1257 return true; |
1254 if (!o->isText()) | 1258 if (!o->isText()) |
1255 return false; | 1259 return false; |
1256 StringImpl* text = toRenderText(o)->text(); | 1260 StringImpl* text = toRenderText(o)->text(); |
1257 if (!text) | 1261 if (!text) |
1258 return true; | 1262 return true; |
1259 return !text->length(); | 1263 return !text->length(); |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 | 1817 |
1814 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); | 1818 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); |
1815 if (!secureTextTimer) { | 1819 if (!secureTextTimer) { |
1816 secureTextTimer = new SecureTextTimer(this); | 1820 secureTextTimer = new SecureTextTimer(this); |
1817 gSecureTextTimers->add(this, secureTextTimer); | 1821 gSecureTextTimers->add(this, secureTextTimer); |
1818 } | 1822 } |
1819 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1823 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1820 } | 1824 } |
1821 | 1825 |
1822 } // namespace WebCore | 1826 } // namespace WebCore |
OLD | NEW |