OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 return current - 1; | 1664 return current - 1; |
1665 | 1665 |
1666 long result = textBreakPreceding(iterator, current); | 1666 long result = textBreakPreceding(iterator, current); |
1667 if (result == TextBreakDone) | 1667 if (result == TextBreakDone) |
1668 result = current - 1; | 1668 result = current - 1; |
1669 | 1669 |
1670 | 1670 |
1671 return result; | 1671 return result; |
1672 } | 1672 } |
1673 | 1673 |
1674 #if OS(DARWIN) | 1674 #if OS(MACOSX) |
1675 | 1675 |
1676 #define HANGUL_CHOSEONG_START (0x1100) | 1676 #define HANGUL_CHOSEONG_START (0x1100) |
1677 #define HANGUL_CHOSEONG_END (0x115F) | 1677 #define HANGUL_CHOSEONG_END (0x115F) |
1678 #define HANGUL_JUNGSEONG_START (0x1160) | 1678 #define HANGUL_JUNGSEONG_START (0x1160) |
1679 #define HANGUL_JUNGSEONG_END (0x11A2) | 1679 #define HANGUL_JUNGSEONG_END (0x11A2) |
1680 #define HANGUL_JONGSEONG_START (0x11A8) | 1680 #define HANGUL_JONGSEONG_START (0x11A8) |
1681 #define HANGUL_JONGSEONG_END (0x11F9) | 1681 #define HANGUL_JONGSEONG_END (0x11F9) |
1682 #define HANGUL_SYLLABLE_START (0xAC00) | 1682 #define HANGUL_SYLLABLE_START (0xAC00) |
1683 #define HANGUL_SYLLABLE_END (0xD7AF) | 1683 #define HANGUL_SYLLABLE_END (0xD7AF) |
1684 #define HANGUL_JONGSEONG_COUNT (28) | 1684 #define HANGUL_JONGSEONG_COUNT (28) |
(...skipping 21 matching lines...) Expand all Loading... |
1706 inline bool isRegionalIndicator(UChar32 c) | 1706 inline bool isRegionalIndicator(UChar32 c) |
1707 { | 1707 { |
1708 // National flag emoji each consists of a pair of regional indicator symbols
. | 1708 // National flag emoji each consists of a pair of regional indicator symbols
. |
1709 return 0x1F1E6 <= c && c <= 0x1F1FF; | 1709 return 0x1F1E6 <= c && c <= 0x1F1FF; |
1710 } | 1710 } |
1711 | 1711 |
1712 #endif | 1712 #endif |
1713 | 1713 |
1714 int RenderText::previousOffsetForBackwardDeletion(int current) const | 1714 int RenderText::previousOffsetForBackwardDeletion(int current) const |
1715 { | 1715 { |
1716 #if OS(DARWIN) | 1716 #if OS(MACOSX) |
1717 ASSERT(m_text); | 1717 ASSERT(m_text); |
1718 StringImpl& text = *m_text.impl(); | 1718 StringImpl& text = *m_text.impl(); |
1719 UChar32 character; | 1719 UChar32 character; |
1720 bool sawRegionalIndicator = false; | 1720 bool sawRegionalIndicator = false; |
1721 while (current > 0) { | 1721 while (current > 0) { |
1722 if (U16_IS_TRAIL(text[--current])) | 1722 if (U16_IS_TRAIL(text[--current])) |
1723 --current; | 1723 --current; |
1724 if (current < 0) | 1724 if (current < 0) |
1725 break; | 1725 break; |
1726 | 1726 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 | 1857 |
1858 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); | 1858 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); |
1859 if (!secureTextTimer) { | 1859 if (!secureTextTimer) { |
1860 secureTextTimer = new SecureTextTimer(this); | 1860 secureTextTimer = new SecureTextTimer(this); |
1861 gSecureTextTimers->add(this, secureTextTimer); | 1861 gSecureTextTimers->add(this, secureTextTimer); |
1862 } | 1862 } |
1863 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1863 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1864 } | 1864 } |
1865 | 1865 |
1866 } // namespace WebCore | 1866 } // namespace WebCore |
OLD | NEW |