| Index: third_party/WebKit/Source/core/layout/LayoutText.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
|
| index 316e7b86ffc69818cf0e122639f219710f16b36a..98afcf30cfc3ecd117d44b2687a4801f6466f9b5 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
|
| @@ -1404,6 +1404,29 @@ void applyTextTransform(const ComputedStyle* style, String& text, UChar previous
|
| }
|
| }
|
|
|
| +void LayoutText::applyTextTransformFromTo(int from, int len, const ComputedStyle* style)
|
| +{
|
| + if (!style)
|
| + return;
|
| +
|
| + String textToCapitalize;
|
| + switch (style->textTransform()) {
|
| + case TTNONE:
|
| + break;
|
| + case CAPITALIZE:
|
| + textToCapitalize = m_text.substring(from, len);
|
| + makeCapitalized(&textToCapitalize, previousCharacter());
|
| + m_text.replace(from, len, textToCapitalize);
|
| + break;
|
| + case UPPERCASE:
|
| + m_text.replace(from, len, m_text.substring(from, len).upper(style->locale()));
|
| + break;
|
| + case LOWERCASE:
|
| + m_text.replace(from, len, m_text.substring(from, len).lower(style->locale()));
|
| + break;
|
| + }
|
| +}
|
| +
|
| void LayoutText::setTextInternal(PassRefPtr<StringImpl> text)
|
| {
|
| ASSERT(text);
|
|
|