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.get()); |
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 checkSetPrefix(prefix, es); | 96 checkSetPrefix(prefix, es); |
97 if (es.hadException()) | 97 if (es.hadException()) |
98 return; | 98 return; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 | 209 |
210 void Attr::attachToElement(Element* element) | 210 void Attr::attachToElement(Element* element) |
211 { | 211 { |
212 ASSERT(!m_element); | 212 ASSERT(!m_element); |
213 m_element = element; | 213 m_element = element; |
214 m_standaloneValue = nullAtom; | 214 m_standaloneValue = nullAtom; |
215 } | 215 } |
216 | 216 |
217 } | 217 } |
OLD | NEW |