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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 return current - 1; | 1726 return current - 1; |
1727 | 1727 |
1728 long result = textBreakPreceding(iterator, current); | 1728 long result = textBreakPreceding(iterator, current); |
1729 if (result == TextBreakDone) | 1729 if (result == TextBreakDone) |
1730 result = current - 1; | 1730 result = current - 1; |
1731 | 1731 |
1732 | 1732 |
1733 return result; | 1733 return result; |
1734 } | 1734 } |
1735 | 1735 |
1736 #if OS(MAC_OS_X) | 1736 #if OS(DARWIN) |
1737 | 1737 |
1738 #define HANGUL_CHOSEONG_START (0x1100) | 1738 #define HANGUL_CHOSEONG_START (0x1100) |
1739 #define HANGUL_CHOSEONG_END (0x115F) | 1739 #define HANGUL_CHOSEONG_END (0x115F) |
1740 #define HANGUL_JUNGSEONG_START (0x1160) | 1740 #define HANGUL_JUNGSEONG_START (0x1160) |
1741 #define HANGUL_JUNGSEONG_END (0x11A2) | 1741 #define HANGUL_JUNGSEONG_END (0x11A2) |
1742 #define HANGUL_JONGSEONG_START (0x11A8) | 1742 #define HANGUL_JONGSEONG_START (0x11A8) |
1743 #define HANGUL_JONGSEONG_END (0x11F9) | 1743 #define HANGUL_JONGSEONG_END (0x11F9) |
1744 #define HANGUL_SYLLABLE_START (0xAC00) | 1744 #define HANGUL_SYLLABLE_START (0xAC00) |
1745 #define HANGUL_SYLLABLE_END (0xD7AF) | 1745 #define HANGUL_SYLLABLE_END (0xD7AF) |
1746 #define HANGUL_JONGSEONG_COUNT (28) | 1746 #define HANGUL_JONGSEONG_COUNT (28) |
(...skipping 21 matching lines...) Expand all Loading... |
1768 inline bool isRegionalIndicator(UChar32 c) | 1768 inline bool isRegionalIndicator(UChar32 c) |
1769 { | 1769 { |
1770 // National flag emoji each consists of a pair of regional indicator symbols
. | 1770 // National flag emoji each consists of a pair of regional indicator symbols
. |
1771 return 0x1F1E6 <= c && c <= 0x1F1FF; | 1771 return 0x1F1E6 <= c && c <= 0x1F1FF; |
1772 } | 1772 } |
1773 | 1773 |
1774 #endif | 1774 #endif |
1775 | 1775 |
1776 int RenderText::previousOffsetForBackwardDeletion(int current) const | 1776 int RenderText::previousOffsetForBackwardDeletion(int current) const |
1777 { | 1777 { |
1778 #if OS(MAC_OS_X) | 1778 #if OS(DARWIN) |
1779 ASSERT(m_text); | 1779 ASSERT(m_text); |
1780 StringImpl& text = *m_text.impl(); | 1780 StringImpl& text = *m_text.impl(); |
1781 UChar32 character; | 1781 UChar32 character; |
1782 bool sawRegionalIndicator = false; | 1782 bool sawRegionalIndicator = false; |
1783 while (current > 0) { | 1783 while (current > 0) { |
1784 if (U16_IS_TRAIL(text[--current])) | 1784 if (U16_IS_TRAIL(text[--current])) |
1785 --current; | 1785 --current; |
1786 if (current < 0) | 1786 if (current < 0) |
1787 break; | 1787 break; |
1788 | 1788 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 void RenderText::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 1926 void RenderText::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
1927 { | 1927 { |
1928 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; | 1928 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; |
1929 RenderObject::reportMemoryUsage(memoryObjectInfo); | 1929 RenderObject::reportMemoryUsage(memoryObjectInfo); |
1930 info.addMember(m_text, "text"); | 1930 info.addMember(m_text, "text"); |
1931 info.addMember(m_firstTextBox, "firstTextBox"); | 1931 info.addMember(m_firstTextBox, "firstTextBox"); |
1932 info.addMember(m_lastTextBox, "lastTextBox"); | 1932 info.addMember(m_lastTextBox, "lastTextBox"); |
1933 } | 1933 } |
1934 | 1934 |
1935 } // namespace WebCore | 1935 } // namespace WebCore |
OLD | NEW |