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

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

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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
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, 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void CharacterData::setNodeValue(const String& nodeValue) 157 void CharacterData::setNodeValue(const String& nodeValue)
158 { 158 {
159 setData(nodeValue); 159 setData(nodeValue);
160 } 160 }
161 161
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 DCHECK(!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 (getNodeType() == 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 }
(...skipping 22 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/CharacterData.h ('k') | third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698