Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: Source/core/dom/CharacterData.cpp

Issue 267573002: Merge 171240 "Fix compilation on Chromium OS after r171165" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1847/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (offsetCount.hasOverflowed() || offset + count > length) 118 if (offsetCount.hasOverflowed() || offset + count > length)
119 realCount = length - offset; 119 realCount = length - offset;
120 else 120 else
121 realCount = count; 121 realCount = count;
122 122
123 return true; 123 return true;
124 } 124 }
125 125
126 void CharacterData::deleteData(unsigned offset, unsigned count, ExceptionState& exceptionState, RecalcStyleBehavior recalcStyleBehavior) 126 void CharacterData::deleteData(unsigned offset, unsigned count, ExceptionState& exceptionState, RecalcStyleBehavior recalcStyleBehavior)
127 { 127 {
128 unsigned realCount; 128 unsigned realCount = 0;
129 if (!validateOffsetCount(offset, count, length(), realCount, exceptionState) ) 129 if (!validateOffsetCount(offset, count, length(), realCount, exceptionState) )
130 return; 130 return;
131 131
132 String newStr = m_data; 132 String newStr = m_data;
133 newStr.remove(offset, realCount); 133 newStr.remove(offset, realCount);
134 134
135 setDataAndUpdate(newStr, offset, realCount, 0, recalcStyleBehavior); 135 setDataAndUpdate(newStr, offset, realCount, 0, recalcStyleBehavior);
136 136
137 document().didRemoveText(this, offset, realCount); 137 document().didRemoveText(this, offset, realCount);
138 } 138 }
139 139
140 void CharacterData::replaceData(unsigned offset, unsigned count, const String& d ata, ExceptionState& exceptionState) 140 void CharacterData::replaceData(unsigned offset, unsigned count, const String& d ata, ExceptionState& exceptionState)
141 { 141 {
142 unsigned realCount; 142 unsigned realCount = 0;
143 if (!validateOffsetCount(offset, count, length(), realCount, exceptionState) ) 143 if (!validateOffsetCount(offset, count, length(), realCount, exceptionState) )
144 return; 144 return;
145 145
146 String newStr = m_data; 146 String newStr = m_data;
147 newStr.remove(offset, realCount); 147 newStr.remove(offset, realCount);
148 newStr.insert(data, offset); 148 newStr.insert(data, offset);
149 149
150 setDataAndUpdate(newStr, offset, realCount, data.length()); 150 setDataAndUpdate(newStr, offset, realCount, data.length());
151 151
152 // update the markers for spell checking and grammar checking 152 // update the markers for spell checking and grammar checking
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 { 208 {
209 return static_cast<int>(length()); 209 return static_cast<int>(length());
210 } 210 }
211 211
212 bool CharacterData::offsetInCharacters() const 212 bool CharacterData::offsetInCharacters() const
213 { 213 {
214 return true; 214 return true;
215 } 215 }
216 216
217 } // namespace WebCore 217 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698