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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 void Attr::setPrefix(const AtomicString& prefix, ExceptionCode& ec) | 92 void Attr::setPrefix(const AtomicString& prefix, ExceptionCode& ec) |
93 { | 93 { |
94 ec = 0; | 94 ec = 0; |
95 checkSetPrefix(prefix, ec); | 95 checkSetPrefix(prefix, ec); |
96 if (ec) | 96 if (ec) |
97 return; | 97 return; |
98 | 98 |
99 if ((prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) | 99 if ((prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) |
100 || static_cast<Attr*>(this)->qualifiedName() == xmlnsAtom) { | 100 || static_cast<Attr*>(this)->qualifiedName() == xmlnsAtom) { |
101 ec = NAMESPACE_ERR; | 101 ec = NamespaceError; |
102 return; | 102 return; |
103 } | 103 } |
104 | 104 |
105 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix; | 105 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix; |
106 | 106 |
107 if (m_element) | 107 if (m_element) |
108 elementAttribute().setPrefix(newPrefix); | 108 elementAttribute().setPrefix(newPrefix); |
109 m_name.setPrefix(newPrefix); | 109 m_name.setPrefix(newPrefix); |
110 } | 110 } |
111 | 111 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 } | 207 } |
208 | 208 |
209 void Attr::attachToElement(Element* element) | 209 void Attr::attachToElement(Element* element) |
210 { | 210 { |
211 ASSERT(!m_element); | 211 ASSERT(!m_element); |
212 m_element = element; | 212 m_element = element; |
213 m_standaloneValue = nullAtom; | 213 m_standaloneValue = nullAtom; |
214 } | 214 } |
215 | 215 |
216 } | 216 } |
OLD | NEW |