| Index: Source/core/rendering/RenderText.cpp
|
| diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
|
| index 8fcee94eb5b0906b30294a4480352e5e67b099f0..b6473b6491904623c4e1a4edfe7bd96106ed3e48 100644
|
| --- a/Source/core/rendering/RenderText.cpp
|
| +++ b/Source/core/rendering/RenderText.cpp
|
| @@ -184,6 +184,12 @@ bool RenderText::isWordBreak() const
|
| return false;
|
| }
|
|
|
| +void RenderText::updateNeedsTranscoding()
|
| +{
|
| + const WTF::TextEncoding* encoding = document()->encoding().isValid() ? &document()->encoding() : 0;
|
| + m_needsTranscoding = fontTranscoder().needsTranscoding(style()->font().fontDescription(), encoding);
|
| +}
|
| +
|
| void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
|
| {
|
| // There is no need to ever schedule repaints from a style change of a text run, since
|
| @@ -1328,6 +1334,11 @@ void RenderText::setTextInternal(PassRefPtr<StringImpl> text)
|
| {
|
| ASSERT(text);
|
| m_text = text;
|
| + if (m_needsTranscoding) {
|
| + const WTF::TextEncoding* encoding = document()->encoding().isValid() ? &document()->encoding() : 0;
|
| + fontTranscoder().convert(m_text, style()->font().fontDescription(), encoding);
|
| + }
|
| + ASSERT(m_text);
|
|
|
| if (style()) {
|
| applyTextTransform(style(), m_text, previousCharacter());
|
|
|