| 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, 2008, 2009 Apple Inc. All rights | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void deleteData(unsigned offset, unsigned count, ExceptionState&); | 51 void deleteData(unsigned offset, unsigned count, ExceptionState&); |
| 52 | 52 |
| 53 bool containsOnlyWhitespace() const; | 53 bool containsOnlyWhitespace() const; |
| 54 | 54 |
| 55 StringImpl* dataImpl() { return m_data.impl(); } | 55 StringImpl* dataImpl() { return m_data.impl(); } |
| 56 | 56 |
| 57 void parserAppendData(const String&); | 57 void parserAppendData(const String&); |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 CharacterData(TreeScope& treeScope, const String& text, ConstructionType type) | 60 CharacterData(TreeScope& treeScope, const String& text, ConstructionType type) |
| 61 : Node(&treeScope, type), m_data(!text.isNull() ? text : emptyString()) { | 61 : Node(&treeScope, type), m_data(!text.isNull() ? text : emptyString) { |
| 62 DCHECK(type == CreateOther || type == CreateText || | 62 DCHECK(type == CreateOther || type == CreateText || |
| 63 type == CreateEditingText); | 63 type == CreateEditingText); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void setDataWithoutUpdate(const String& data) { | 66 void setDataWithoutUpdate(const String& data) { |
| 67 DCHECK(!data.isNull()); | 67 DCHECK(!data.isNull()); |
| 68 m_data = data; | 68 m_data = data; |
| 69 } | 69 } |
| 70 enum UpdateSource { | 70 enum UpdateSource { |
| 71 UpdateFromParser, | 71 UpdateFromParser, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 90 delete; // This will catch anyone doing an unnecessary check. | 90 delete; // This will catch anyone doing an unnecessary check. |
| 91 bool isElementNode() const = | 91 bool isElementNode() const = |
| 92 delete; // This will catch anyone doing an unnecessary check. | 92 delete; // This will catch anyone doing an unnecessary check. |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 DEFINE_NODE_TYPE_CASTS(CharacterData, isCharacterDataNode()); | 95 DEFINE_NODE_TYPE_CASTS(CharacterData, isCharacterDataNode()); |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| 98 | 98 |
| 99 #endif // CharacterData_h | 99 #endif // CharacterData_h |
| OLD | NEW |