OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All |
5 * rights reserved. | 5 * rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 if (!validateOffsetCount(offset, count, length(), realCount, exceptionState)) | 144 if (!validateOffsetCount(offset, count, length(), realCount, exceptionState)) |
145 return; | 145 return; |
146 | 146 |
147 String newStr = m_data; | 147 String newStr = m_data; |
148 newStr.remove(offset, realCount); | 148 newStr.remove(offset, realCount); |
149 newStr.insert(data, offset); | 149 newStr.insert(data, offset); |
150 | 150 |
151 setDataAndUpdate(newStr, offset, realCount, data.length(), | 151 setDataAndUpdate(newStr, offset, realCount, data.length(), |
152 UpdateFromNonParser); | 152 UpdateFromNonParser); |
153 | 153 |
154 // update the markers for spell checking and grammar checking | |
155 document().didRemoveText(this, offset, realCount); | 154 document().didRemoveText(this, offset, realCount); |
156 document().didInsertText(this, offset, data.length()); | 155 document().didInsertText(this, offset, data.length()); |
157 } | 156 } |
158 | 157 |
159 String CharacterData::nodeValue() const { | 158 String CharacterData::nodeValue() const { |
160 return m_data; | 159 return m_data; |
161 } | 160 } |
162 | 161 |
163 bool CharacterData::containsOnlyWhitespace() const { | 162 bool CharacterData::containsOnlyWhitespace() const { |
164 return m_data.containsOnlyWhitespace(); | 163 return m_data.containsOnlyWhitespace(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 dispatchSubtreeModifiedEvent(); | 215 dispatchSubtreeModifiedEvent(); |
217 } | 216 } |
218 InspectorInstrumentation::characterDataModified(this); | 217 InspectorInstrumentation::characterDataModified(this); |
219 } | 218 } |
220 | 219 |
221 int CharacterData::maxCharacterOffset() const { | 220 int CharacterData::maxCharacterOffset() const { |
222 return static_cast<int>(length()); | 221 return static_cast<int>(length()); |
223 } | 222 } |
224 | 223 |
225 } // namespace blink | 224 } // namespace blink |
OLD | NEW |