OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 23 matching lines...) Expand all Loading... |
34 , m_isCombined(false) | 34 , m_isCombined(false) |
35 , m_needsFontUpdate(false) | 35 , m_needsFontUpdate(false) |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 void RenderCombineText::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) | 39 void RenderCombineText::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) |
40 { | 40 { |
41 setStyleInternal(RenderStyle::clone(style())); | 41 setStyleInternal(RenderStyle::clone(style())); |
42 RenderText::styleDidChange(diff, oldStyle); | 42 RenderText::styleDidChange(diff, oldStyle); |
43 | 43 |
44 if (m_isCombined) | 44 if (m_isCombined) { |
45 RenderText::setTextInternal(originalText()); // This RenderCombineText h
as been combined once. Restore the original text for the next combineText(). | 45 RenderText::setTextInternal(originalText()); // This RenderCombineText h
as been combined once. Restore the original text for the next combineText(). |
| 46 m_isCombined = false; |
| 47 } |
46 | 48 |
47 m_needsFontUpdate = true; | 49 m_needsFontUpdate = true; |
48 } | 50 } |
49 | 51 |
50 void RenderCombineText::setTextInternal(PassRefPtr<StringImpl> text) | 52 void RenderCombineText::setTextInternal(PassRefPtr<StringImpl> text) |
51 { | 53 { |
52 RenderText::setTextInternal(text); | 54 RenderText::setTextInternal(text); |
53 | 55 |
54 m_needsFontUpdate = true; | 56 m_needsFontUpdate = true; |
55 } | 57 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 if (shouldUpdateFont) | 132 if (shouldUpdateFont) |
131 style()->font().update(style()->font().fontSelector()); | 133 style()->font().update(style()->font().fontSelector()); |
132 | 134 |
133 if (m_isCombined) { | 135 if (m_isCombined) { |
134 DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectRe
placementCharacter, 1)); | 136 DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectRe
placementCharacter, 1)); |
135 RenderText::setTextInternal(objectReplacementCharacterString.impl()); | 137 RenderText::setTextInternal(objectReplacementCharacterString.impl()); |
136 } | 138 } |
137 } | 139 } |
138 | 140 |
139 } // namespace WebCore | 141 } // namespace WebCore |
OLD | NEW |