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 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights
reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 void Attr::createTextChild() | 79 void Attr::createTextChild() |
80 { | 80 { |
81 ASSERT(refCount()); | 81 ASSERT(refCount()); |
82 if (!value().isEmpty()) { | 82 if (!value().isEmpty()) { |
83 RefPtr<Text> textNode = document().createTextNode(value().string()); | 83 RefPtr<Text> textNode = document().createTextNode(value().string()); |
84 | 84 |
85 // This does everything appendChild() would do in this situation (assumi
ng m_ignoreChildrenChanged was set), | 85 // This does everything appendChild() would do in this situation (assumi
ng m_ignoreChildrenChanged was set), |
86 // but much more efficiently. | 86 // but much more efficiently. |
87 textNode->setParentOrShadowHostNode(this); | 87 textNode->setParentOrShadowHostNode(this); |
88 treeScope().adoptIfNeeded(textNode.get()); | 88 treeScope().adoptIfNeeded(*textNode); |
89 setFirstChild(textNode.get()); | 89 setFirstChild(textNode.get()); |
90 setLastChild(textNode.get()); | 90 setLastChild(textNode.get()); |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 void Attr::setPrefix(const AtomicString& prefix, ExceptionState& es) | 94 void Attr::setPrefix(const AtomicString& prefix, ExceptionState& es) |
95 { | 95 { |
96 UseCounter::count(document(), UseCounter::AttributeSetPrefix); | 96 UseCounter::count(document(), UseCounter::AttributeSetPrefix); |
97 | 97 |
98 checkSetPrefix(prefix, es); | 98 checkSetPrefix(prefix, es); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 | 215 |
216 void Attr::attachToElement(Element* element) | 216 void Attr::attachToElement(Element* element) |
217 { | 217 { |
218 ASSERT(!m_element); | 218 ASSERT(!m_element); |
219 m_element = element; | 219 m_element = element; |
220 m_standaloneValue = nullAtom; | 220 m_standaloneValue = nullAtom; |
221 } | 221 } |
222 | 222 |
223 } | 223 } |
OLD | NEW |