| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 , m_element(nullptr) | 50 , m_element(nullptr) |
| 51 , m_name(name) | 51 , m_name(name) |
| 52 , m_standaloneValueOrAttachedLocalName(standaloneValue) | 52 , m_standaloneValueOrAttachedLocalName(standaloneValue) |
| 53 , m_ignoreChildrenChanged(0) | 53 , m_ignoreChildrenChanged(0) |
| 54 { | 54 { |
| 55 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
| 56 } | 56 } |
| 57 | 57 |
| 58 PassRefPtrWillBeRawPtr<Attr> Attr::create(Element& element, const QualifiedName&
name) | 58 PassRefPtrWillBeRawPtr<Attr> Attr::create(Element& element, const QualifiedName&
name) |
| 59 { | 59 { |
| 60 RefPtrWillBeRawPtr<Attr> attr = adoptRefWillBeRefCountedGarbageCollected(new
Attr(element, name)); | 60 RefPtrWillBeRawPtr<Attr> attr = adoptRefWillBeNoop(new Attr(element, name)); |
| 61 attr->createTextChild(); | 61 attr->createTextChild(); |
| 62 return attr.release(); | 62 return attr.release(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 PassRefPtrWillBeRawPtr<Attr> Attr::create(Document& document, const QualifiedNam
e& name, const AtomicString& value) | 65 PassRefPtrWillBeRawPtr<Attr> Attr::create(Document& document, const QualifiedNam
e& name, const AtomicString& value) |
| 66 { | 66 { |
| 67 RefPtrWillBeRawPtr<Attr> attr = adoptRefWillBeRefCountedGarbageCollected(new
Attr(document, name, value)); | 67 RefPtrWillBeRawPtr<Attr> attr = adoptRefWillBeNoop(new Attr(document, name,
value)); |
| 68 attr->createTextChild(); | 68 attr->createTextChild(); |
| 69 return attr.release(); | 69 return attr.release(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 Attr::~Attr() | 72 Attr::~Attr() |
| 73 { | 73 { |
| 74 } | 74 } |
| 75 | 75 |
| 76 const QualifiedName Attr::qualifiedName() const | 76 const QualifiedName Attr::qualifiedName() const |
| 77 { | 77 { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 void Attr::setNodeValue(const String& v) | 147 void Attr::setNodeValue(const String& v) |
| 148 { | 148 { |
| 149 // Attr uses AtomicString type for its value to save memory as there | 149 // Attr uses AtomicString type for its value to save memory as there |
| 150 // is duplication among Elements' attributes values. | 150 // is duplication among Elements' attributes values. |
| 151 setValueInternal(AtomicString(v)); | 151 setValueInternal(AtomicString(v)); |
| 152 } | 152 } |
| 153 | 153 |
| 154 PassRefPtrWillBeRawPtr<Node> Attr::cloneNode(bool /*deep*/) | 154 PassRefPtrWillBeRawPtr<Node> Attr::cloneNode(bool /*deep*/) |
| 155 { | 155 { |
| 156 RefPtrWillBeRawPtr<Attr> clone = adoptRefWillBeRefCountedGarbageCollected(ne
w Attr(document(), m_name, value())); | 156 RefPtrWillBeRawPtr<Attr> clone = adoptRefWillBeNoop(new Attr(document(), m_n
ame, value())); |
| 157 cloneChildNodes(clone.get()); | 157 cloneChildNodes(clone.get()); |
| 158 return clone.release(); | 158 return clone.release(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // DOM Section 1.1.1 | 161 // DOM Section 1.1.1 |
| 162 bool Attr::childTypeAllowed(NodeType type) const | 162 bool Attr::childTypeAllowed(NodeType type) const |
| 163 { | 163 { |
| 164 return TEXT_NODE == type; | 164 return TEXT_NODE == type; |
| 165 } | 165 } |
| 166 | 166 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 detachFromElementWithValue(value()); | 225 detachFromElementWithValue(value()); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void Attr::trace(Visitor* visitor) | 228 void Attr::trace(Visitor* visitor) |
| 229 { | 229 { |
| 230 visitor->registerWeakMembers<Attr, &Attr::clearWeakMembers>(this); | 230 visitor->registerWeakMembers<Attr, &Attr::clearWeakMembers>(this); |
| 231 ContainerNode::trace(visitor); | 231 ContainerNode::trace(visitor); |
| 232 } | 232 } |
| 233 | 233 |
| 234 } | 234 } |
| OLD | NEW |