| 126 | |
| 127 | |
| 128 | Attr* Element::removeAttributeNode(Attr* oldAttr) |
| 129 | { |
| 130 | poco_check_ptr (oldAttr); |
| 131 | |
| 132 | if (_pOwner->events()) |
| 133 | dispatchAttrModified(oldAttr, MutationEvent::REMOVAL, oldAttr->getValue(), EMPTY_STRING); |
| 134 | |
| 135 | if (oldAttr != _pFirstAttr) |
| 136 | { |
| 137 | Attr* pCur = _pFirstAttr; |
| 138 | while (pCur->_pNext != oldAttr) pCur = static_cast<Attr*>(pCur->_pNext); |
| 139 | if (pCur) |
| 140 | { |
| 141 | pCur->_pNext = static_cast<Attr*>(pCur->_pNext->_pNext); |
| 142 | } |
| 143 | else throw DOMException(DOMException::NOT_FOUND_ERR); |
| 144 | } |
| 145 | else _pFirstAttr = static_cast<Attr*>(_pFirstAttr->_pNext); |
| 146 | oldAttr->_pNext = 0; |
| 147 | oldAttr->_pParent = 0; |
| 148 | oldAttr->autoRelease(); |
| 149 | |
| 150 | return oldAttr; |
| 151 | } |
| 152 | |
| 153 | |
| 154 | Attr* Element::addAttributeNodeNP(Attr* oldAttr, Attr* newAttr) |
no test coverage detected