| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 if (m_element) | 181 if (m_element) |
| 182 elementAttribute().setValue(newValue); | 182 elementAttribute().setValue(newValue); |
| 183 else | 183 else |
| 184 m_standaloneValue = newValue; | 184 m_standaloneValue = newValue; |
| 185 | 185 |
| 186 if (m_element) | 186 if (m_element) |
| 187 m_element->attributeChanged(qualifiedName(), newValue); | 187 m_element->attributeChanged(qualifiedName(), newValue); |
| 188 } | 188 } |
| 189 | 189 |
| 190 bool Attr::isId() const | |
| 191 { | |
| 192 return qualifiedName().matches(HTMLNames::idAttr); | |
| 193 } | |
| 194 | |
| 195 const AtomicString& Attr::value() const | 190 const AtomicString& Attr::value() const |
| 196 { | 191 { |
| 197 if (m_element) | 192 if (m_element) |
| 198 return m_element->getAttribute(qualifiedName()); | 193 return m_element->getAttribute(qualifiedName()); |
| 199 return m_standaloneValue; | 194 return m_standaloneValue; |
| 200 } | 195 } |
| 201 | 196 |
| 202 Attribute& Attr::elementAttribute() | 197 Attribute& Attr::elementAttribute() |
| 203 { | 198 { |
| 204 ASSERT(m_element); | 199 ASSERT(m_element); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 215 } | 210 } |
| 216 | 211 |
| 217 void Attr::attachToElement(Element* element) | 212 void Attr::attachToElement(Element* element) |
| 218 { | 213 { |
| 219 ASSERT(!m_element); | 214 ASSERT(!m_element); |
| 220 m_element = element; | 215 m_element = element; |
| 221 m_standaloneValue = nullAtom; | 216 m_standaloneValue = nullAtom; |
| 222 } | 217 } |
| 223 | 218 |
| 224 } | 219 } |
| OLD | NEW |