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

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

Issue 23475019: The HTML parser should lazy attach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: moar whitespace text node rebaselines Created 7 years, 3 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (!characterLengthLimit) 91 if (!characterLengthLimit)
92 return 0; 92 return 0;
93 93
94 if (string.is8Bit()) 94 if (string.is8Bit())
95 m_data.append(string.characters8() + offset, characterLengthLimit); 95 m_data.append(string.characters8() + offset, characterLengthLimit);
96 else 96 else
97 m_data.append(string.characters16() + offset, characterLengthLimit); 97 m_data.append(string.characters16() + offset, characterLengthLimit);
98 98
99 ASSERT(!renderer() || isTextNode()); 99 ASSERT(!renderer() || isTextNode());
100 if (isTextNode()) 100 if (isTextNode())
101 toText(this)->updateTextRenderer(oldLength, 0, DeprecatedAttachNow); 101 toText(this)->updateTextRenderer(oldLength, 0);
102 102
103 document().incDOMTreeVersion(); 103 document().incDOMTreeVersion();
104 104
105 if (parentNode()) 105 if (parentNode())
106 parentNode()->childrenChanged(); 106 parentNode()->childrenChanged();
107 107
108 return characterLengthLimit; 108 return characterLengthLimit;
109 } 109 }
110 110
111 void CharacterData::appendData(const String& data) 111 void CharacterData::appendData(const String& data)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 { 231 {
232 return static_cast<int>(length()); 232 return static_cast<int>(length());
233 } 233 }
234 234
235 bool CharacterData::offsetInCharacters() const 235 bool CharacterData::offsetInCharacters() const
236 { 236 {
237 return true; 237 return true;
238 } 238 }
239 239
240 } // namespace WebCore 240 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/plugins/plugin-remove-readystatechange.html ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698