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 5bd5b139755c9bdb9217a6ca2657afaba9555318..9755abcd55c2ad9d89d3d7730b9f227160274c05 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp |
@@ -1414,6 +1414,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); |
rhogan
2016/09/12 18:58:25
A couple of things may have been the source of the
|
+ 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); |