Index: Source/core/rendering/RenderText.cpp |
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp |
index 871e01d6bd76efcf2f8bfda1c17ff7117b1c20e6..d639fa3feda5331c7352a6fc9d4bd5b16099b1e3 100644 |
--- a/Source/core/rendering/RenderText.cpp |
+++ b/Source/core/rendering/RenderText.cpp |
@@ -1672,7 +1672,7 @@ int RenderText::previousOffset(int current) const |
return result; |
} |
-#if OS(MACOSX) |
+#if OS(MACOSX) || OS(LINUX) |
lgombos
2013/10/31 02:18:51
Should this be OS(POSIX) instead to include Androi
|
#define HANGUL_CHOSEONG_START (0x1100) |
#define HANGUL_CHOSEONG_END (0x115F) |
@@ -1714,7 +1714,7 @@ inline bool isRegionalIndicator(UChar32 c) |
int RenderText::previousOffsetForBackwardDeletion(int current) const |
{ |
-#if OS(MACOSX) |
+#if OS(MACOSX) || OS(LINUX) |
ASSERT(m_text); |
StringImpl& text = *m_text.impl(); |
UChar32 character; |
@@ -1757,7 +1757,6 @@ int RenderText::previousOffsetForBackwardDeletion(int current) const |
character = text.characterStartingAt(current); |
if (((character >= HANGUL_CHOSEONG_START) && (character <= HANGUL_JONGSEONG_END)) || ((character >= HANGUL_SYLLABLE_START) && (character <= HANGUL_SYLLABLE_END))) { |
HangulState state; |
- HangulState initialState; |
if (character < HANGUL_JUNGSEONG_START) |
state = HangulStateL; |
@@ -1768,8 +1767,6 @@ int RenderText::previousOffsetForBackwardDeletion(int current) const |
else |
state = isHangulLVT(character) ? HangulStateLVT : HangulStateLV; |
- initialState = state; |
- |
while (current > 0 && ((character = text.characterStartingAt(current - 1)) >= HANGUL_CHOSEONG_START) && (character <= HANGUL_SYLLABLE_END) && ((character <= HANGUL_JONGSEONG_END) || (character >= HANGUL_SYLLABLE_START))) { |
switch (state) { |
case HangulStateV: |
@@ -1801,7 +1798,7 @@ int RenderText::previousOffsetForBackwardDeletion(int current) const |
return current; |
#else |
- // Platforms other than Mac delete by one code point. |
+ // Platforms other than Mac or Linux delete by one code point. |
if (U16_IS_TRAIL(m_text[--current])) |
--current; |
if (current < 0) |