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 r
ights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All r
ights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 void CharacterData::setDataAndUpdate(const String& newData, unsigned offsetOfRep
lacedData, unsigned oldLength, unsigned newLength, UpdateSource source, RecalcSt
yleBehavior recalcStyleBehavior) | 162 void CharacterData::setDataAndUpdate(const String& newData, unsigned offsetOfRep
lacedData, unsigned oldLength, unsigned newLength, UpdateSource source, RecalcSt
yleBehavior recalcStyleBehavior) |
163 { | 163 { |
164 String oldData = m_data; | 164 String oldData = m_data; |
165 m_data = newData; | 165 m_data = newData; |
166 | 166 |
167 ASSERT(!layoutObject() || isTextNode()); | 167 ASSERT(!layoutObject() || isTextNode()); |
168 if (isTextNode()) | 168 if (isTextNode()) |
169 toText(this)->updateTextLayoutObject(offsetOfReplacedData, oldLength, re
calcStyleBehavior); | 169 toText(this)->updateTextLayoutObject(offsetOfReplacedData, oldLength, re
calcStyleBehavior); |
170 | 170 |
171 if (source != UpdateFromParser) { | 171 if (source != UpdateFromParser) { |
172 if (nodeType() == PROCESSING_INSTRUCTION_NODE) | 172 if (getNodeType() == PROCESSING_INSTRUCTION_NODE) |
173 toProcessingInstruction(this)->didAttributeChanged(); | 173 toProcessingInstruction(this)->didAttributeChanged(); |
174 | 174 |
175 if (document().frame()) | 175 if (document().frame()) |
176 document().frame()->selection().didUpdateCharacterData(this, offsetO
fReplacedData, oldLength, newLength); | 176 document().frame()->selection().didUpdateCharacterData(this, offsetO
fReplacedData, oldLength, newLength); |
177 } | 177 } |
178 | 178 |
179 document().incDOMTreeVersion(); | 179 document().incDOMTreeVersion(); |
180 didModifyData(oldData, source); | 180 didModifyData(oldData, source); |
181 } | 181 } |
182 | 182 |
(...skipping 17 matching lines...) Expand all Loading... |
200 } | 200 } |
201 InspectorInstrumentation::characterDataModified(this); | 201 InspectorInstrumentation::characterDataModified(this); |
202 } | 202 } |
203 | 203 |
204 int CharacterData::maxCharacterOffset() const | 204 int CharacterData::maxCharacterOffset() const |
205 { | 205 { |
206 return static_cast<int>(length()); | 206 return static_cast<int>(length()); |
207 } | 207 } |
208 | 208 |
209 } // namespace blink | 209 } // namespace blink |
OLD | NEW |