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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (node && node->isDocumentNode()) | 155 if (node && node->isDocumentNode()) |
156 setDocumentForAnonymous(toDocument(node)); | 156 setDocumentForAnonymous(toDocument(node)); |
157 | 157 |
158 m_isAllASCII = m_text.containsOnlyASCII(); | 158 m_isAllASCII = m_text.containsOnlyASCII(); |
159 m_canUseSimpleFontCodePath = computeCanUseSimpleFontCodePath(); | 159 m_canUseSimpleFontCodePath = computeCanUseSimpleFontCodePath(); |
160 setIsText(); | 160 setIsText(); |
161 | 161 |
162 view()->frameView()->incrementVisuallyNonEmptyCharacterCount(m_text.length()
); | 162 view()->frameView()->incrementVisuallyNonEmptyCharacterCount(m_text.length()
); |
163 } | 163 } |
164 | 164 |
165 #ifndef NDEBUG | 165 #if ENABLE(ASSERT) |
166 | 166 |
167 RenderText::~RenderText() | 167 RenderText::~RenderText() |
168 { | 168 { |
169 ASSERT(!m_firstTextBox); | 169 ASSERT(!m_firstTextBox); |
170 ASSERT(!m_lastTextBox); | 170 ASSERT(!m_lastTextBox); |
171 } | 171 } |
172 | 172 |
173 #endif | 173 #endif |
174 | 174 |
175 const char* RenderText::renderName() const | 175 const char* RenderText::renderName() const |
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 return result; | 1832 return result; |
1833 } | 1833 } |
1834 | 1834 |
1835 bool RenderText::computeCanUseSimpleFontCodePath() const | 1835 bool RenderText::computeCanUseSimpleFontCodePath() const |
1836 { | 1836 { |
1837 if (isAllASCII() || m_text.is8Bit()) | 1837 if (isAllASCII() || m_text.is8Bit()) |
1838 return true; | 1838 return true; |
1839 return Character::characterRangeCodePath(characters16(), length()) == Simple
Path; | 1839 return Character::characterRangeCodePath(characters16(), length()) == Simple
Path; |
1840 } | 1840 } |
1841 | 1841 |
1842 #ifndef NDEBUG | 1842 #if ENABLE(ASSERT) |
1843 | 1843 |
1844 void RenderText::checkConsistency() const | 1844 void RenderText::checkConsistency() const |
1845 { | 1845 { |
1846 #ifdef CHECK_CONSISTENCY | 1846 #ifdef CHECK_CONSISTENCY |
1847 const InlineTextBox* prev = 0; | 1847 const InlineTextBox* prev = 0; |
1848 for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child-
>nextTextBox()) { | 1848 for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child-
>nextTextBox()) { |
1849 ASSERT(child->renderer() == this); | 1849 ASSERT(child->renderer() == this); |
1850 ASSERT(child->prevTextBox() == prev); | 1850 ASSERT(child->prevTextBox() == prev); |
1851 prev = child; | 1851 prev = child; |
1852 } | 1852 } |
(...skipping 15 matching lines...) Expand all Loading... |
1868 } | 1868 } |
1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1870 } | 1870 } |
1871 | 1871 |
1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
1873 { | 1873 { |
1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
1875 } | 1875 } |
1876 | 1876 |
1877 } // namespace WebCore | 1877 } // namespace WebCore |
OLD | NEW |