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

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

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/CharacterData.h ('k') | Source/core/dom/ContainerNode.h » ('j') | 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 17 matching lines...) Expand all
28 #include "FrameSelection.h" 28 #include "FrameSelection.h"
29 #include "InspectorInstrumentation.h" 29 #include "InspectorInstrumentation.h"
30 #include "MutationEvent.h" 30 #include "MutationEvent.h"
31 #include "MutationObserverInterestGroup.h" 31 #include "MutationObserverInterestGroup.h"
32 #include "MutationRecord.h" 32 #include "MutationRecord.h"
33 #include "NodeRenderingContext.h" 33 #include "NodeRenderingContext.h"
34 #include "RenderText.h" 34 #include "RenderText.h"
35 #include "StyleInheritedData.h" 35 #include "StyleInheritedData.h"
36 #include "Text.h" 36 #include "Text.h"
37 #include "TextBreakIterator.h" 37 #include "TextBreakIterator.h"
38 #include "WebCoreMemoryInstrumentation.h"
39 38
40 using namespace std; 39 using namespace std;
41 40
42 namespace WebCore { 41 namespace WebCore {
43 42
44 void CharacterData::setData(const String& data, ExceptionCode&) 43 void CharacterData::setData(const String& data, ExceptionCode&)
45 { 44 {
46 const String& nonNullData = !data.isNull() ? data : emptyString(); 45 const String& nonNullData = !data.isNull() ? data : emptyString();
47 if (m_data == nonNullData) 46 if (m_data == nonNullData)
48 return; 47 return;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 96
98 document()->incDOMTreeVersion(); 97 document()->incDOMTreeVersion();
99 // We don't call dispatchModifiedEvent here because we don't want the 98 // We don't call dispatchModifiedEvent here because we don't want the
100 // parser to dispatch DOM mutation events. 99 // parser to dispatch DOM mutation events.
101 if (parentNode()) 100 if (parentNode())
102 parentNode()->childrenChanged(); 101 parentNode()->childrenChanged();
103 102
104 return characterLengthLimit; 103 return characterLengthLimit;
105 } 104 }
106 105
107 void CharacterData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
108 {
109 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
110 Node::reportMemoryUsage(memoryObjectInfo);
111 info.addMember(m_data, "data");
112 }
113
114 void CharacterData::appendData(const String& data, ExceptionCode&) 106 void CharacterData::appendData(const String& data, ExceptionCode&)
115 { 107 {
116 String newStr = m_data; 108 String newStr = m_data;
117 newStr.append(data); 109 newStr.append(data);
118 110
119 setDataAndUpdate(newStr, m_data.length(), 0, data.length()); 111 setDataAndUpdate(newStr, m_data.length(), 0, data.length());
120 112
121 // FIXME: Should we call textInserted here? 113 // FIXME: Should we call textInserted here?
122 } 114 }
123 115
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 { 231 {
240 return static_cast<int>(length()); 232 return static_cast<int>(length());
241 } 233 }
242 234
243 bool CharacterData::offsetInCharacters() const 235 bool CharacterData::offsetInCharacters() const
244 { 236 {
245 return true; 237 return true;
246 } 238 }
247 239
248 } // namespace WebCore 240 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/CharacterData.h ('k') | Source/core/dom/ContainerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698