| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 void Attr::setNodeValue(const String& v) | 111 void Attr::setNodeValue(const String& v) |
| 112 { | 112 { |
| 113 // Attr uses AtomicString type for its value to save memory as there | 113 // Attr uses AtomicString type for its value to save memory as there |
| 114 // is duplication among Elements' attributes values. | 114 // is duplication among Elements' attributes values. |
| 115 setValue(AtomicString(v)); | 115 setValue(AtomicString(v)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 PassRefPtrWillBeRawPtr<Node> Attr::cloneNode(bool /*deep*/) | 118 PassRefPtrWillBeRawPtr<Node> Attr::cloneNode(bool /*deep*/) |
| 119 { | 119 { |
| 120 UseCounter::count(document(), UseCounter::AttrCloneNode); |
| 120 return adoptRefWillBeNoop(new Attr(document(), m_name, value())); | 121 return adoptRefWillBeNoop(new Attr(document(), m_name, value())); |
| 121 } | 122 } |
| 122 | 123 |
| 123 void Attr::detachFromElementWithValue(const AtomicString& value) | 124 void Attr::detachFromElementWithValue(const AtomicString& value) |
| 124 { | 125 { |
| 125 ASSERT(m_element); | 126 ASSERT(m_element); |
| 126 m_standaloneValueOrAttachedLocalName = value; | 127 m_standaloneValueOrAttachedLocalName = value; |
| 127 m_element = nullptr; | 128 m_element = nullptr; |
| 128 } | 129 } |
| 129 | 130 |
| 130 void Attr::attachToElement(Element* element, const AtomicString& attachedLocalNa
me) | 131 void Attr::attachToElement(Element* element, const AtomicString& attachedLocalNa
me) |
| 131 { | 132 { |
| 132 ASSERT(!m_element); | 133 ASSERT(!m_element); |
| 133 m_element = element; | 134 m_element = element; |
| 134 m_standaloneValueOrAttachedLocalName = attachedLocalName; | 135 m_standaloneValueOrAttachedLocalName = attachedLocalName; |
| 135 } | 136 } |
| 136 | 137 |
| 137 DEFINE_TRACE(Attr) | 138 DEFINE_TRACE(Attr) |
| 138 { | 139 { |
| 139 visitor->trace(m_element); | 140 visitor->trace(m_element); |
| 140 Node::trace(visitor); | 141 Node::trace(visitor); |
| 141 } | 142 } |
| 142 | 143 |
| 143 } | 144 } |
| OLD | NEW |